blob: b2775cf04000fd0ab1eb6a74c34d2cdfa70d533d [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
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200635ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000636SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000637LIBC
638LIBM
639HAVE_GETHOSTBYNAME
640HAVE_GETHOSTBYNAME_R
641HAVE_GETHOSTBYNAME_R_3_ARG
642HAVE_GETHOSTBYNAME_R_5_ARG
643HAVE_GETHOSTBYNAME_R_6_ARG
644LIBOBJS
645TRUE
646MACHDEP_OBJS
647DYNLOADFILE
648DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700649DTRACE_OBJS
650DTRACE_HEADERS
651DFLAGS
652DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100670LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700671CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000672BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200673CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000674OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700675LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700676LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700677LLVM_PROF_ERR
678LLVM_PROF_FILE
679LLVM_PROF_MERGER
680PGO_PROF_USE_FLAG
681PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200682LLVM_AR_FOUND
683target_os
684target_vendor
685target_cpu
686target
687LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700688DEF_MAKE_RULE
689DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000690ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000691LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100692MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000693INSTALL_DATA
694INSTALL_SCRIPT
695INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200696ac_ct_READELF
697READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000698ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200699ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701GNULD
702LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000703LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000704RUNSHARED
705INSTSONAME
706LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000707PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000708BLDLIBRARY
709DLLLIBRARY
710LDLIBRARY
711LIBRARY
712BUILDEXEEXT
713EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200714NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200715MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200716PLATFORM_TRIPLET
717MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200718ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000719MAINCC
720CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700721SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200722GREP
723CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000724OBJEXT
725EXEEXT
726ac_ct_CC
727CPPFLAGS
728LDFLAGS
729CFLAGS
730CC
731EXPORT_MACOSX_DEPLOYMENT_TARGET
732CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200733_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000734MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000735FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800737FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000738FRAMEWORKALTINSTALLLAST
739FRAMEWORKALTINSTALLFIRST
740FRAMEWORKINSTALLLAST
741FRAMEWORKINSTALLFIRST
742PYTHONFRAMEWORKINSTALLDIR
743PYTHONFRAMEWORKPREFIX
744PYTHONFRAMEWORKDIR
745PYTHONFRAMEWORKIDENTIFIER
746PYTHONFRAMEWORK
747LIPO_32BIT_FLAGS
748ARCH_RUN_32BIT
749UNIVERSALSDK
750CONFIG_ARGS
751SOVERSION
752VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200754PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200818with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200819with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000820enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700821with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100822with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100823with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800824with_memory_sanitizer
825with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_libs
827with_system_expat
828with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100829with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000830enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700831with_tcltk_includes
832with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000834enable_ipv6
835with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000837with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_libm
841with_libc
842enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000843with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800844with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100845with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100846with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000847'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848 ac_precious_vars='build_alias
849host_alias
850target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100851MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852CC
853CFLAGS
854LDFLAGS
855LIBS
856CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800857CPP
858PKG_CONFIG
859PKG_CONFIG_PATH
860PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864ac_init_help=
865ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000866ac_unrecognized_opts=
867ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868# The variables have the same names as the options, with
869# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000870cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873no_recursion=
874prefix=NONE
875program_prefix=NONE
876program_suffix=NONE
877program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000882x_includes=NONE
883x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000884
885# Installation directory options.
886# These are left unexpanded so users can "make install exec_prefix=/foo"
887# and all the variables that are supposed to be based on exec_prefix
888# by default will actually change.
889# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891bindir='${exec_prefix}/bin'
892sbindir='${exec_prefix}/sbin'
893libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894datarootdir='${prefix}/share'
895datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896sysconfdir='${prefix}/etc'
897sharedstatedir='${prefix}/com'
898localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001288 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001401\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1441 --libdir=DIR object code libraries [EPREFIX/lib]
1442 --includedir=DIR C header files [PREFIX/include]
1443 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1444 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1445 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1446 --infodir=DIR info documentation [DATAROOTDIR/info]
1447 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1448 --mandir=DIR man documentation [DATAROOTDIR/man]
1449 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1450 --htmldir=DIR html documentation [DOCDIR]
1451 --dvidir=DIR dvi documentation [DOCDIR]
1452 --pdfdir=DIR pdf documentation [DOCDIR]
1453 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001454_ACEOF
1455
1456 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001457
1458System types:
1459 --build=BUILD configure for building on BUILD [guessed]
1460 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001461 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001467 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001481 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1482 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001483 --enable-loadable-sqlite-extensions
1484 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --enable-ipv6 Enable ipv6 (with ipv4) support
1486 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001487 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001488 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001489
1490Optional Packages:
1491 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1492 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001493 --with-universal-archs=ARCH
1494 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001495 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1496 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001497 --with-framework-name=FRAMEWORK
1498 specify an alternate name of the framework built
1499 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001500 --with-cxx-main=<compiler>
1501 compile main() and link python executable with C++
1502 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-suffix=.exe set executable suffix
1504 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001505 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001506 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001507 --with-lto Enable Link Time Optimization in any build. Disabled
1508 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001509 --with-hash-algorithm=[fnv|siphash24]
1510 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001511 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001512 enable AddressSanitizer (asan)
1513 --with-memory-sanitizer enable MemorySanitizer (msan)
1514 --with-undefined-behavior-sanitizer
1515 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001517 --with-system-expat build pyexpat module using an installed expat
1518 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001519 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001520 --with-system-libmpdec build _decimal module using an installed libmpdec
1521 library
Ned Deilyd819b932013-09-06 01:07:05 -07001522 --with-tcltk-includes='-I...'
1523 override search for Tcl and Tk include files
1524 --with-tcltk-libs='-L...'
1525 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001526 --with-dbmliborder=db1:db2:...
1527 order to check db backends for dbm. Valid value is a
1528 colon separated string with the backend names
1529 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-doc-strings disable/enable documentation strings
1531 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001532 --with(out)-c-locale-coercion
1533 disable/enable C locale coercion to a UTF-8 based
1534 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001535 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001536 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001537 --with-libm=STRING math library
1538 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001539 --with(out)-computed-gotos
1540 Use computed gotos in evaluation loop (enabled by
1541 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001542 --with(out)-ensurepip=[=upgrade]
1543 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001544 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001545 --with-ssl-default-suites=[python|openssl|STRING]
1546 Override default cipher suites string, python: use
1547 Python's preferred selection (default), openssl:
1548 leave OpenSSL's defaults untouched, STRING: use a
1549 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001552 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001553 CC C compiler command
1554 CFLAGS C compiler flags
1555 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1556 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001561 PKG_CONFIG path to pkg-config utility
1562 PKG_CONFIG_PATH
1563 directories to add to pkg-config's search path
1564 PKG_CONFIG_LIBDIR
1565 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567Use these variables to override the choices made by `configure' or to help
1568it to find libraries and programs with nonstandard names/locations.
1569
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001570Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
1574
1575if test "$ac_init_help" = "recursive"; then
1576 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001578 test -d "$ac_dir" ||
1579 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1580 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_builddir=.
1582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583case "$ac_dir" in
1584.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1585*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001586 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 case $ac_top_builddir_sub in
1590 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1591 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1592 esac ;;
1593esac
1594ac_abs_top_builddir=$ac_pwd
1595ac_abs_builddir=$ac_pwd$ac_dir_suffix
1596# for backward compatibility:
1597ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001598
1599case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001600 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$ac_top_builddir_sub
1603 ac_abs_top_srcdir=$ac_pwd ;;
1604 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001605 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 ac_top_srcdir=$srcdir
1607 ac_abs_top_srcdir=$srcdir ;;
1608 *) # Relative name.
1609 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1610 ac_top_srcdir=$ac_top_build_prefix$srcdir
1611 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001612esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001613ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 cd "$ac_dir" || { ac_status=$?; continue; }
1616 # Check for guested configure.
1617 if test -f "$ac_srcdir/configure.gnu"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1620 elif test -f "$ac_srcdir/configure"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001624 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001625 fi || ac_status=$?
1626 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 done
1628fi
1629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001630test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001631if $ac_init_version; then
1632 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001633python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001634generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001635
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001637This configure script is free software; the Free Software Foundation
1638gives unlimited permission to copy, distribute and modify it.
1639_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001640 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001642
1643## ------------------------ ##
1644## Autoconf initialization. ##
1645## ------------------------ ##
1646
1647# ac_fn_c_try_compile LINENO
1648# --------------------------
1649# Try to compile conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_compile ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 rm -f conftest.$ac_objext
1654 if { { ac_try="$ac_compile"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_compile") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } && {
1670 test -z "$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 } && test -s conftest.$ac_objext; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_compile
1684
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001685# ac_fn_c_try_cpp LINENO
1686# ----------------------
1687# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1688ac_fn_c_try_cpp ()
1689{
1690 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1691 if { { ac_try="$ac_cpp conftest.$ac_ext"
1692case "(($ac_try" in
1693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1694 *) ac_try_echo=$ac_try;;
1695esac
1696eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1697$as_echo "$ac_try_echo"; } >&5
1698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1699 ac_status=$?
1700 if test -s conftest.err; then
1701 grep -v '^ *+' conftest.err >conftest.er1
1702 cat conftest.er1 >&5
1703 mv -f conftest.er1 conftest.err
1704 fi
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; } > conftest.i && {
1707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1708 test ! -s conftest.err
1709 }; then :
1710 ac_retval=0
1711else
1712 $as_echo "$as_me: failed program was:" >&5
1713sed 's/^/| /' conftest.$ac_ext >&5
1714
1715 ac_retval=1
1716fi
1717 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1718 as_fn_set_status $ac_retval
1719
1720} # ac_fn_c_try_cpp
1721
Matthias Kloseb9621712010-04-24 17:59:49 +00001722# ac_fn_c_try_link LINENO
1723# -----------------------
1724# Try to link conftest.$ac_ext, and return whether this succeeded.
1725ac_fn_c_try_link ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 rm -f conftest.$ac_objext conftest$ac_exeext
1729 if { { ac_try="$ac_link"
1730case "(($ac_try" in
1731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1732 *) ac_try_echo=$ac_try;;
1733esac
1734eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1735$as_echo "$ac_try_echo"; } >&5
1736 (eval "$ac_link") 2>conftest.err
1737 ac_status=$?
1738 if test -s conftest.err; then
1739 grep -v '^ *+' conftest.err >conftest.er1
1740 cat conftest.er1 >&5
1741 mv -f conftest.er1 conftest.err
1742 fi
1743 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1744 test $ac_status = 0; } && {
1745 test -z "$ac_c_werror_flag" ||
1746 test ! -s conftest.err
1747 } && test -s conftest$ac_exeext && {
1748 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001749 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001750 }; then :
1751 ac_retval=0
1752else
1753 $as_echo "$as_me: failed program was:" >&5
1754sed 's/^/| /' conftest.$ac_ext >&5
1755
1756 ac_retval=1
1757fi
1758 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1759 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1760 # interfere with the next link command; also delete a directory that is
1761 # left behind by Apple's compiler. We do this before executing the actions.
1762 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001763 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 as_fn_set_status $ac_retval
1765
1766} # ac_fn_c_try_link
1767
Matthias Kloseb9621712010-04-24 17:59:49 +00001768# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1769# -------------------------------------------------------
1770# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1771# the include files in INCLUDES and setting the cache variable VAR
1772# accordingly.
1773ac_fn_c_check_header_mongrel ()
1774{
1775 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001776 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001779if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 $as_echo_n "(cached) " >&6
1781fi
1782eval ac_res=\$$3
1783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1784$as_echo "$ac_res" >&6; }
1785else
1786 # Is the header compilable?
1787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1788$as_echo_n "checking $2 usability... " >&6; }
1789cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1790/* end confdefs.h. */
1791$4
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_compile "$LINENO"; then :
1795 ac_header_compiler=yes
1796else
1797 ac_header_compiler=no
1798fi
1799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1801$as_echo "$ac_header_compiler" >&6; }
1802
1803# Is the header present?
1804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1805$as_echo_n "checking $2 presence... " >&6; }
1806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1807/* end confdefs.h. */
1808#include <$2>
1809_ACEOF
1810if ac_fn_c_try_cpp "$LINENO"; then :
1811 ac_header_preproc=yes
1812else
1813 ac_header_preproc=no
1814fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001815rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1817$as_echo "$ac_header_preproc" >&6; }
1818
1819# So? What about this header?
1820case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1821 yes:no: )
1822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1823$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1825$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1826 ;;
1827 no:yes:* )
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1829$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1831$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1833$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1835$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1837$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001838( $as_echo "## --------------------------------------- ##
1839## Report this to https://bugs.python.org/ ##
1840## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001841 ) | sed "s/^/$as_me: WARNING: /" >&2
1842 ;;
1843esac
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1845$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001846if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001847 $as_echo_n "(cached) " >&6
1848else
1849 eval "$3=\$ac_header_compiler"
1850fi
1851eval ac_res=\$$3
1852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1853$as_echo "$ac_res" >&6; }
1854fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001856
1857} # ac_fn_c_check_header_mongrel
1858
1859# ac_fn_c_try_run LINENO
1860# ----------------------
1861# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1862# that executables *can* be run.
1863ac_fn_c_try_run ()
1864{
1865 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1866 if { { ac_try="$ac_link"
1867case "(($ac_try" in
1868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1869 *) ac_try_echo=$ac_try;;
1870esac
1871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1872$as_echo "$ac_try_echo"; } >&5
1873 (eval "$ac_link") 2>&5
1874 ac_status=$?
1875 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1876 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1877 { { case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_try") 2>&5
1884 ac_status=$?
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; }; }; then :
1887 ac_retval=0
1888else
1889 $as_echo "$as_me: program exited with status $ac_status" >&5
1890 $as_echo "$as_me: failed program was:" >&5
1891sed 's/^/| /' conftest.$ac_ext >&5
1892
1893 ac_retval=$ac_status
1894fi
1895 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001896 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001897 as_fn_set_status $ac_retval
1898
1899} # ac_fn_c_try_run
1900
1901# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902# -------------------------------------------------------
1903# Tests whether HEADER exists and can be compiled using the include files in
1904# INCLUDES, setting the cache variable VAR accordingly.
1905ac_fn_c_check_header_compile ()
1906{
1907 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001910if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001911 $as_echo_n "(cached) " >&6
1912else
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914/* end confdefs.h. */
1915$4
1916#include <$2>
1917_ACEOF
1918if ac_fn_c_try_compile "$LINENO"; then :
1919 eval "$3=yes"
1920else
1921 eval "$3=no"
1922fi
1923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924fi
1925eval ac_res=\$$3
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001929
1930} # ac_fn_c_check_header_compile
1931
Matthias Kloseb9621712010-04-24 17:59:49 +00001932# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1933# -------------------------------------------
1934# Tests whether TYPE exists after having included INCLUDES, setting cache
1935# variable VAR accordingly.
1936ac_fn_c_check_type ()
1937{
1938 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1940$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001941if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001942 $as_echo_n "(cached) " >&6
1943else
1944 eval "$3=no"
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$4
1948int
1949main ()
1950{
1951if (sizeof ($2))
1952 return 0;
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1959/* end confdefs.h. */
1960$4
1961int
1962main ()
1963{
1964if (sizeof (($2)))
1965 return 0;
1966 ;
1967 return 0;
1968}
1969_ACEOF
1970if ac_fn_c_try_compile "$LINENO"; then :
1971
1972else
1973 eval "$3=yes"
1974fi
1975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979eval ac_res=\$$3
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1981$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001982 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001983
1984} # ac_fn_c_check_type
1985
Matthias Kloseb9621712010-04-24 17:59:49 +00001986# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1987# --------------------------------------------
1988# Tries to find the compile-time value of EXPR in a program that includes
1989# INCLUDES, setting VAR accordingly. Returns whether the value could be
1990# computed
1991ac_fn_c_compute_int ()
1992{
1993 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994 if test "$cross_compiling" = yes; then
1995 # Depending upon the size, compute the lo and hi bounds.
1996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1997/* end confdefs.h. */
1998$4
1999int
2000main ()
2001{
2002static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002003test_array [0] = 0;
2004return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002005
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 ac_lo=0 ac_mid=0
2012 while :; do
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$4
2016int
2017main ()
2018{
2019static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002020test_array [0] = 0;
2021return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002022
2023 ;
2024 return 0;
2025}
2026_ACEOF
2027if ac_fn_c_try_compile "$LINENO"; then :
2028 ac_hi=$ac_mid; break
2029else
2030 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2031 if test $ac_lo -le $ac_mid; then
2032 ac_lo= ac_hi=
2033 break
2034 fi
2035 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2036fi
2037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2038 done
2039else
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$4
2043int
2044main ()
2045{
2046static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002047test_array [0] = 0;
2048return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002049
2050 ;
2051 return 0;
2052}
2053_ACEOF
2054if ac_fn_c_try_compile "$LINENO"; then :
2055 ac_hi=-1 ac_mid=-1
2056 while :; do
2057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2058/* end confdefs.h. */
2059$4
2060int
2061main ()
2062{
2063static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002064test_array [0] = 0;
2065return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002066
2067 ;
2068 return 0;
2069}
2070_ACEOF
2071if ac_fn_c_try_compile "$LINENO"; then :
2072 ac_lo=$ac_mid; break
2073else
2074 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2075 if test $ac_mid -le $ac_hi; then
2076 ac_lo= ac_hi=
2077 break
2078 fi
2079 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2082 done
2083else
2084 ac_lo= ac_hi=
2085fi
2086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089# Binary search between lo and hi bounds.
2090while test "x$ac_lo" != "x$ac_hi"; do
2091 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2093/* end confdefs.h. */
2094$4
2095int
2096main ()
2097{
2098static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002099test_array [0] = 0;
2100return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106if ac_fn_c_try_compile "$LINENO"; then :
2107 ac_hi=$ac_mid
2108else
2109 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2110fi
2111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112done
2113case $ac_lo in #((
2114?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2115'') ac_retval=1 ;;
2116esac
2117 else
2118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119/* end confdefs.h. */
2120$4
2121static long int longval () { return $2; }
2122static unsigned long int ulongval () { return $2; }
2123#include <stdio.h>
2124#include <stdlib.h>
2125int
2126main ()
2127{
2128
2129 FILE *f = fopen ("conftest.val", "w");
2130 if (! f)
2131 return 1;
2132 if (($2) < 0)
2133 {
2134 long int i = longval ();
2135 if (i != ($2))
2136 return 1;
2137 fprintf (f, "%ld", i);
2138 }
2139 else
2140 {
2141 unsigned long int i = ulongval ();
2142 if (i != ($2))
2143 return 1;
2144 fprintf (f, "%lu", i);
2145 }
2146 /* Do not output a trailing newline, as this causes \r\n confusion
2147 on some platforms. */
2148 return ferror (f) || fclose (f) != 0;
2149
2150 ;
2151 return 0;
2152}
2153_ACEOF
2154if ac_fn_c_try_run "$LINENO"; then :
2155 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2156else
2157 ac_retval=1
2158fi
2159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2160 conftest.$ac_objext conftest.beam conftest.$ac_ext
2161rm -f conftest.val
2162
2163 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002164 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002165 as_fn_set_status $ac_retval
2166
2167} # ac_fn_c_compute_int
2168
2169# ac_fn_c_check_func LINENO FUNC VAR
2170# ----------------------------------
2171# Tests whether FUNC exists, setting the cache variable VAR accordingly
2172ac_fn_c_check_func ()
2173{
2174 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2176$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002177if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002178 $as_echo_n "(cached) " >&6
2179else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2184#define $2 innocuous_$2
2185
2186/* System header to define __stub macros and hopefully few prototypes,
2187 which can conflict with char $2 (); below.
2188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2189 <limits.h> exists even on freestanding compilers. */
2190
2191#ifdef __STDC__
2192# include <limits.h>
2193#else
2194# include <assert.h>
2195#endif
2196
2197#undef $2
2198
2199/* Override any GCC internal prototype to avoid an error.
2200 Use char because int might match the return type of a GCC
2201 builtin and then its argument prototype would still apply. */
2202#ifdef __cplusplus
2203extern "C"
2204#endif
2205char $2 ();
2206/* The GNU C library defines this for functions which it implements
2207 to always fail with ENOSYS. Some functions are actually named
2208 something starting with __ and the normal name is an alias. */
2209#if defined __stub_$2 || defined __stub___$2
2210choke me
2211#endif
2212
2213int
2214main ()
2215{
2216return $2 ();
2217 ;
2218 return 0;
2219}
2220_ACEOF
2221if ac_fn_c_try_link "$LINENO"; then :
2222 eval "$3=yes"
2223else
2224 eval "$3=no"
2225fi
2226rm -f core conftest.err conftest.$ac_objext \
2227 conftest$ac_exeext conftest.$ac_ext
2228fi
2229eval ac_res=\$$3
2230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2231$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002232 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002233
2234} # ac_fn_c_check_func
2235
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002236# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2237# ---------------------------------------------
2238# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2239# accordingly.
2240ac_fn_c_check_decl ()
2241{
2242 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2243 as_decl_name=`echo $2|sed 's/ *(.*//'`
2244 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2246$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2247if eval \${$3+:} false; then :
2248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252$4
2253int
2254main ()
2255{
2256#ifndef $as_decl_name
2257#ifdef __cplusplus
2258 (void) $as_decl_use;
2259#else
2260 (void) $as_decl_name;
2261#endif
2262#endif
2263
2264 ;
2265 return 0;
2266}
2267_ACEOF
2268if ac_fn_c_try_compile "$LINENO"; then :
2269 eval "$3=yes"
2270else
2271 eval "$3=no"
2272fi
2273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2274fi
2275eval ac_res=\$$3
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2277$as_echo "$ac_res" >&6; }
2278 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279
2280} # ac_fn_c_check_decl
2281
Matthias Kloseb9621712010-04-24 17:59:49 +00002282# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2283# ----------------------------------------------------
2284# Tries to find if the field MEMBER exists in type AGGR, after including
2285# INCLUDES, setting cache variable VAR accordingly.
2286ac_fn_c_check_member ()
2287{
2288 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2290$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002292 $as_echo_n "(cached) " >&6
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2311/* end confdefs.h. */
2312$5
2313int
2314main ()
2315{
2316static $2 ac_aggr;
2317if (sizeof ac_aggr.$3)
2318return 0;
2319 ;
2320 return 0;
2321}
2322_ACEOF
2323if ac_fn_c_try_compile "$LINENO"; then :
2324 eval "$4=yes"
2325else
2326 eval "$4=no"
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332eval ac_res=\$$4
2333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2334$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002335 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002336
2337} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002338cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002339This file contains any messages produced by compilers while
2340running configure, to aid debugging if configure makes a mistake.
2341
Ned Deily5489bda2018-01-31 17:44:09 -05002342It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002343generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002344
2345 $ $0 $@
2346
2347_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002348exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002349{
2350cat <<_ASUNAME
2351## --------- ##
2352## Platform. ##
2353## --------- ##
2354
2355hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2356uname -m = `(uname -m) 2>/dev/null || echo unknown`
2357uname -r = `(uname -r) 2>/dev/null || echo unknown`
2358uname -s = `(uname -s) 2>/dev/null || echo unknown`
2359uname -v = `(uname -v) 2>/dev/null || echo unknown`
2360
2361/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2362/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2363
2364/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2365/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2366/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002368/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2369/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2370/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2371
2372_ASUNAME
2373
2374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2375for as_dir in $PATH
2376do
2377 IFS=$as_save_IFS
2378 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002379 $as_echo "PATH: $as_dir"
2380 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002381IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002382
2383} >&5
2384
2385cat >&5 <<_ACEOF
2386
2387
2388## ----------- ##
2389## Core tests. ##
2390## ----------- ##
2391
2392_ACEOF
2393
2394
2395# Keep a trace of the command line.
2396# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002397# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002398# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002401ac_configure_args0=
2402ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_must_keep_next=false
2404for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002405do
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 for ac_arg
2407 do
2408 case $ac_arg in
2409 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2410 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2411 | -silent | --silent | --silen | --sile | --sil)
2412 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002413 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 esac
2416 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002421 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 case $ac_arg in
2424 *=* | --config-cache | -C | -disable-* | --disable-* \
2425 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2426 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2427 | -with-* | --with-* | -without-* | --without-* | --x)
2428 case "$ac_configure_args0 " in
2429 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2430 esac
2431 ;;
2432 -* ) ac_must_keep_next=true ;;
2433 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002434 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002435 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 ;;
2437 esac
2438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002439done
Matthias Kloseb9621712010-04-24 17:59:49 +00002440{ ac_configure_args0=; unset ac_configure_args0;}
2441{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443# When interrupted or exit'd, cleanup temporary files, and complete
2444# config.log. We remove comments because anyway the quotes in there
2445# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002446# WARNING: Use '\'' to represent an apostrophe within the trap.
2447# 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 +00002448trap 'exit_status=$?
2449 # Save into config.log some information that might help in debugging.
2450 {
2451 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002452
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002453 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002454## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002456 echo
2457 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458(
2459 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2460 eval ac_val=\$$ac_var
2461 case $ac_val in #(
2462 *${as_nl}*)
2463 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002464 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2465$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 esac
2467 case $ac_var in #(
2468 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002469 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2470 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 esac ;;
2472 esac
2473 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2476 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 "s/'\''/'\''\\\\'\'''\''/g;
2479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2480 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 esac |
2485 sort
2486)
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002488
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002489 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002490## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 echo
2493 for ac_var in $ac_subst_vars
2494 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 eval ac_val=\$$ac_var
2496 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002500 done | sort
2501 echo
2502
2503 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 echo
2508 for ac_var in $ac_subst_files
2509 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 eval ac_val=\$$ac_var
2511 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 done | sort
2516 echo
2517 fi
2518
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002520 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002521## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002523 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
2526 fi
2527 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 $as_echo "$as_me: caught signal $ac_signal"
2529 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531 rm -f core *.core core.conftest.* &&
2532 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002535for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002537done
2538ac_signal=0
2539
2540# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002542
Matthias Kloseb9621712010-04-24 17:59:49 +00002543$as_echo "/* confdefs.h */" > confdefs.h
2544
Martin v. Löwis11437992002-04-12 09:54:03 +00002545# Predefined preprocessor variables.
2546
2547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_NAME "$PACKAGE_NAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_VERSION "$PACKAGE_VERSION"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_STRING "$PACKAGE_STRING"
2561_ACEOF
2562
Martin v. Löwis11437992002-04-12 09:54:03 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2565_ACEOF
2566
Matthias Kloseb9621712010-04-24 17:59:49 +00002567cat >>confdefs.h <<_ACEOF
2568#define PACKAGE_URL "$PACKAGE_URL"
2569_ACEOF
2570
Martin v. Löwis11437992002-04-12 09:54:03 +00002571
2572# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002573# Prefer an explicitly selected file to automatically selected ones.
2574ac_site_file1=NONE
2575ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002577 # We do not want a PATH search for config.site.
2578 case $CONFIG_SITE in #((
2579 -*) ac_site_file1=./$CONFIG_SITE;;
2580 */*) ac_site_file1=$CONFIG_SITE;;
2581 *) ac_site_file1=./$CONFIG_SITE;;
2582 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$prefix/share/config.site
2585 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586else
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$ac_default_prefix/share/config.site
2588 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002590for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591do
Matthias Kloseb9621712010-04-24 17:59:49 +00002592 test "x$ac_site_file" = xNONE && continue
2593 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2595$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002597 . "$ac_site_file" \
2598 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2600as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002601See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002602 fi
2603done
2604
2605if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 # Some versions of bash will fail to source /dev/null (special files
2607 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2608 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2609 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2610$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2613 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 esac
2615 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002616else
Matthias Kloseb9621712010-04-24 17:59:49 +00002617 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2618$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 >$cache_file
2620fi
2621
2622# Check that the precious variables saved in the cache have kept the same
2623# value.
2624ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2627 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2629 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 case $ac_old_set,$ac_new_set in
2631 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2633$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 +00002634 ac_cache_corrupted=: ;;
2635 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002636 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2637$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 ac_cache_corrupted=: ;;
2639 ,);;
2640 *)
2641 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002642 # differences in whitespace do not lead to failure.
2643 ac_old_val_w=`echo x $ac_old_val`
2644 ac_new_val_w=`echo x $ac_new_val`
2645 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2647$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2648 ac_cache_corrupted=:
2649 else
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2651$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2652 eval $ac_var=\$ac_old_val
2653 fi
2654 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2655$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2657$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 fi;;
2659 esac
2660 # Pass precious variables to config.status.
2661 if test "$ac_new_set" = set; then
2662 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002663 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 *) ac_arg=$ac_var=$ac_new_val ;;
2665 esac
2666 case " $ac_configure_args " in
2667 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002669 esac
2670 fi
2671done
2672if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002673 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2676$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002677 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002679## -------------------- ##
2680## Main body of script. ##
2681## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682
Guido van Rossum7f43da71994-08-01 12:15:30 +00002683ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002685ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2686ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2687ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688
Guido van Rossum627b2d71993-12-24 10:39:16 +00002689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690
Trent Nelson4d4ec652012-10-16 08:51:24 -04002691
Christian Heimesff5be6e2018-01-20 13:19:21 +01002692
2693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Victor Stinner9ed34a82017-05-02 22:35:58 +02002713if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Xiang Zhang4c855572018-08-20 22:36:19 +08002758 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2759 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2760 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002884 $as_echo_n "(cached) " >&6
2885else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002886 if test -n "$PYTHON_FOR_REGEN"; then
2887 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002896 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002906PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2907if test -n "$PYTHON_FOR_REGEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2909$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
Victor Stinnera5c62a82017-05-03 18:21:48 +02002916 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
2921
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002922if test "$cross_compiling" = yes; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2924$as_echo_n "checking for python interpreter for cross build... " >&6; }
2925 if test -z "$PYTHON_FOR_BUILD"; then
2926 for interp in python$PACKAGE_VERSION python3 python; do
2927 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002928 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 +02002929 break
2930 fi
2931 interp=
2932 done
2933 if test x$interp = x; then
2934 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2935 fi
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2937$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002938 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 +02002939 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002940elif test "$cross_compiling" = maybe; then
2941 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002942else
2943 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2944fi
2945
2946
Martin v. Löwis11437992002-04-12 09:54:03 +00002947
Benjamin Petersond23f8222009-04-05 19:13:16 +00002948if test "$prefix" != "/"; then
2949 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2950fi
2951
2952
Martin v. Löwis11437992002-04-12 09:54:03 +00002953
2954
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002955# We don't use PACKAGE_ variables, and they cause conflicts
2956# with other autoconf-based packages that include Python.h
2957grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2958rm confdefs.h
2959mv confdefs.h.new confdefs.h
2960
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002961
Ned Deily5489bda2018-01-31 17:44:09 -05002962VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002963
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002964# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002965
2966SOVERSION=1.0
2967
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002968# The later defininition of _XOPEN_SOURCE disables certain features
2969# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2970
Matthias Kloseb9621712010-04-24 17:59:49 +00002971$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
2973
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002974# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2975# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2976# them.
2977
Matthias Kloseb9621712010-04-24 17:59:49 +00002978$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002979
2980
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002981# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2982# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2983# them.
2984
Matthias Kloseb9621712010-04-24 17:59:49 +00002985$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002986
2987
Martin v. Löwisd6320502004-08-12 13:45:08 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002989# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2990# them.
2991
Matthias Kloseb9621712010-04-24 17:59:49 +00002992$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002993
2994
2995
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002996define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002997
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002998# Arguments passed to configure.
2999
3000CONFIG_ARGS="$ac_configure_args"
3001
Matthias Kloseb9621712010-04-24 17:59:49 +00003002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3003$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003004# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003005if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003007 case $enableval in
3008 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003009 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003010 # information
3011 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003012 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003013 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003014 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3015 if test ! -d "${enableval}"
3016 then
3017 enableval=/
3018 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003019 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003020 ;;
3021 esac
3022 case $enableval in
3023 no)
3024 UNIVERSALSDK=
3025 enable_universalsdk=
3026 ;;
3027 *)
3028 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 if test ! -d "${UNIVERSALSDK}"
3030 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003031 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 ;;
3034 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003035
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003036
Thomas Wouters477c8d52006-05-27 19:21:47 +00003037else
3038
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003043
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044if test -n "${UNIVERSALSDK}"
3045then
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3047$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048else
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3050$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003053
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003054
Ned Deily87adb6e2013-10-18 21:09:56 -07003055ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057# For backward compatibility reasons we prefer to select '32-bit' if available,
3058# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003059UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060if test "`uname -s`" = "Darwin"
3061then
3062 if test -n "${UNIVERSALSDK}"
3063 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003064 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003065 then
3066 UNIVERSAL_ARCHS="intel"
3067 fi
3068 fi
3069fi
3070
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003071
Matthias Kloseb9621712010-04-24 17:59:49 +00003072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3073$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074
3075# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003076if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 UNIVERSAL_ARCHS="$withval"
3079
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080fi
3081
Ned Deily87adb6e2013-10-18 21:09:56 -07003082if test -n "${UNIVERSALSDK}"
3083then
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3085$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3086else
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3088$as_echo "no" >&6; }
3089fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003090
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091
3092# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094 withval=$with_framework_name;
3095 PYTHONFRAMEWORK=${withval}
3096 PYTHONFRAMEWORKDIR=${withval}.framework
3097 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3098
3099else
3100
3101 PYTHONFRAMEWORK=Python
3102 PYTHONFRAMEWORKDIR=Python.framework
3103 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3104
3105fi
3106
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003107# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003110 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003111 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003112 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003113 esac
3114 case $enableval in
3115 no)
3116 PYTHONFRAMEWORK=
3117 PYTHONFRAMEWORKDIR=no-framework
3118 PYTHONFRAMEWORKPREFIX=
3119 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120 FRAMEWORKINSTALLFIRST=
3121 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 FRAMEWORKALTINSTALLFIRST=
3123 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003124 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 if test "x${prefix}" = "xNONE"; then
3126 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3127 else
3128 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3129 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003130 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003131 ;;
3132 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003133 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003134 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003136 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003137 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3138 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003140 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 if test "x${prefix}" = "xNONE" ; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 else
3146 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3147 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148
3149 case "${enableval}" in
3150 /System*)
3151 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3152 if test "${prefix}" = "NONE" ; then
3153 # See below
3154 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3155 fi
3156 ;;
3157
3158 /Library*)
3159 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3160 ;;
3161
3162 */Library/Frameworks)
3163 MDIR="`dirname "${enableval}"`"
3164 MDIR="`dirname "${MDIR}"`"
3165 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3166
3167 if test "${prefix}" = "NONE"; then
3168 # User hasn't specified the
3169 # --prefix option, but wants to install
3170 # the framework in a non-default location,
3171 # ensure that the compatibility links get
3172 # installed relative to that prefix as well
3173 # instead of in /usr/local.
3174 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3175 fi
3176 ;;
3177
3178 *)
3179 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3180 ;;
3181 esac
3182
Jack Jansen127e56e2001-09-11 14:41:54 +00003183 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003184
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003185 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003191 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3192
3193 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3194
Jack Jansene578a632001-08-15 01:27:14 +00003195 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003196
Guido van Rossum563e7081996-09-10 18:20:48 +00003197else
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Jack Jansene578a632001-08-15 01:27:14 +00003199 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003200 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORKPREFIX=
3202 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST=
3204 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 FRAMEWORKALTINSTALLFIRST=
3206 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 if test "x${prefix}" = "xNONE" ; then
3209 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3210 else
3211 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3212 fi
Jack Jansene578a632001-08-15 01:27:14 +00003213 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003214
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003215
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003216fi
3217
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218
3219
Michael W. Hudson54241132001-12-07 15:38:26 +00003220
3221
3222
3223
Jack Jansene578a632001-08-15 01:27:14 +00003224
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003225
3226
3227
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003229
Ned Deilyb8f944f2013-11-21 22:42:25 -08003230
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231
3232cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003233#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003234_ACEOF
3235
3236
Jack Jansene578a632001-08-15 01:27:14 +00003237##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003238## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003239## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003240##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003241# Set name for machine-dependent library files
3242
Matthias Kloseb9621712010-04-24 17:59:49 +00003243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3244$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003245if test -z "$MACHDEP"
3246then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003247 # avoid using uname for cross builds
3248 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003249 # ac_sys_system and ac_sys_release are used for setting
3250 # a lot of different things including 'define_xopen_source'
3251 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003253 *-*-linux-android*)
3254 ac_sys_system=Linux-android
3255 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003262 *-*-vxworks*)
3263 ac_sys_system=VxWorks
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *)
3266 # for now, limit cross builds to known configurations
3267 MACHDEP="unknown"
3268 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3269 esac
3270 ac_sys_release=
3271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003273 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003274 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 fi
3280 ac_md_system=`echo $ac_sys_system |
3281 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3282 ac_md_release=`echo $ac_sys_release |
3283 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3284 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003285
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003287 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003288 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003289 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003290 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003291 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293fi
Guido van Rossum91922671997-10-09 20:24:13 +00003294
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003295
3296if test "$cross_compiling" = yes; then
3297 case "$host" in
3298 *-*-linux*)
3299 case "$host_cpu" in
3300 arm*)
3301 _host_cpu=arm
3302 ;;
3303 *)
3304 _host_cpu=$host_cpu
3305 esac
3306 ;;
3307 *-*-cygwin*)
3308 _host_cpu=
3309 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003310 *-*-vxworks*)
3311 _host_cpu=$host_cpu
3312 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003313 *)
3314 # for now, limit cross builds to known configurations
3315 MACHDEP="unknown"
3316 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3317 esac
3318 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3319fi
3320
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003321# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3322# disable features if it is defined, without any means to access these
3323# features as extensions. For these systems, we skip the definition of
3324# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3325# some feature, make sure there is no alternative way to access this
3326# feature. Also, when using wildcards, make sure you have verified the
3327# need for not defining _XOPEN_SOURCE on all systems matching the
3328# wildcard, and that the wildcard does not include future systems
3329# (which may remove their limitations).
3330case $ac_sys_system/$ac_sys_release in
3331 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3332 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003333 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003334 # In addition, Stefan Krah confirms that issue #1244610 exists through
3335 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003336 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337 define_xopen_source=no
3338 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3339 # also defined. This can be overridden by defining _BSD_SOURCE
3340 # As this has a different meaning on Linux, only define it on OpenBSD
3341
Matthias Kloseb9621712010-04-24 17:59:49 +00003342$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003343
3344 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003351
3352 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003353 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3354 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3355 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003356 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 +00003357 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003358 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3359 # request to enable features supported by the standard as a request
3360 # to disable features not supported by the standard. The best way
3361 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3362 # entirely and define __EXTENSIONS__ instead.
3363 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003364 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3366 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003367 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003368 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 define_xopen_source=no;;
3370 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003371 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003374 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3375 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3376 # identifies itself as Darwin/7.*
3377 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # disables platform specific features beyond repair.
3379 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # has no effect, don't bother defining them
3381 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003382 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003383 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3386 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3387 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003388 AIX/4)
3389 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003390 AIX/5)
3391 if test `uname -r` -eq 1; then
3392 define_xopen_source=no
3393 fi
3394 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003395 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3396 # defining NI_NUMERICHOST.
3397 QNX/6.3.2)
3398 define_xopen_source=no
3399 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003400 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3401 # in network headers still using system V types.
3402 VxWorks/*)
3403 define_xopen_source=no
3404 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003405
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406esac
3407
3408if test $define_xopen_source = yes
3409then
Victor Stinner14d098d2011-09-07 22:29:43 +02003410 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
Victor Stinner14d098d2011-09-07 22:29:43 +02003412$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003413
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3416 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3417 # several APIs are not declared. Since this is also needed in some
3418 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Matthias Kloseb9621712010-04-24 17:59:49 +00003420$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
3422
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003423
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003424$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003426fi
3427
Christian Heimes647cd872013-12-07 23:39:33 +01003428# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3429case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003430 hp*|HP*)
3431 define_stdc_a1=yes;;
3432 *)
3433 define_stdc_a1=no;;
3434esac
3435
3436if test $define_stdc_a1 = yes
3437then
Christian Heimes647cd872013-12-07 23:39:33 +01003438
3439$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3440
Christian Heimesb02bcae2013-12-08 15:21:08 +01003441fi
Christian Heimes647cd872013-12-07 23:39:33 +01003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3444# it may influence the way we can build extensions, so distutils
3445# needs to check it
3446
Thomas Wouters477c8d52006-05-27 19:21:47 +00003447
Jack Jansen6b08a402004-06-03 12:41:45 +00003448CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003450
Guido van Rossum627b2d71993-12-24 10:39:16 +00003451# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003452
3453# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3454# for debug/optimization stuff. BASECFLAGS is for flags that are required
3455# just to get things to compile and link. Users are free to override OPT
3456# when running configure or make. The build should not break if they do.
3457# BASECFLAGS should generally not be messed with, however.
3458
Guido van Rossum8b131c51995-03-09 14:10:13 +00003459# If the user switches compilers, we can't believe the cache
3460if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3461then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003462 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003463(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003464fi
3465
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003466# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3467# when the compiler supports them, but we don't always want -O2, and
3468# we set -g later.
3469if test -z "$CFLAGS"; then
3470 CFLAGS=
3471fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003472
3473if test "$ac_sys_system" = "Darwin"
3474then
3475 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003476 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003477 # information
3478 if test -z "${CC}"
3479 then
3480 found_gcc=
3481 found_clang=
3482 as_save_IFS=$IFS; IFS=:
3483 for as_dir in $PATH
3484 do
3485 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003486 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003487 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 fi
3490 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003491 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003492 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003493 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003494 fi
3495 fi
3496 done
3497 IFS=$as_save_IFS
3498
3499 if test -n "$found_gcc" -a -n "$found_clang"
3500 then
3501 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3502 then
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3504$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3505 CC="$found_clang"
3506 CXX="$found_clang++"
3507 fi
3508
3509
3510 elif test -z "$found_gcc" -a -n "$found_clang"
3511 then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3513$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3514 CC="$found_clang"
3515 CXX="$found_clang++"
3516
3517 elif test -z "$found_gcc" -a -z "$found_clang"
3518 then
3519 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3520 if test -n "${found_clang}"
3521 then
3522 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3523$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3524 CC="${found_clang}"
3525 CXX="`/usr/bin/xcrun -find clang++`"
3526
3527 # else: use default behaviour
3528 fi
3529 fi
3530 fi
3531fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003532ac_ext=c
3533ac_cpp='$CPP $CPPFLAGS'
3534ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3535ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3536ac_compiler_gnu=$ac_cv_c_compiler_gnu
3537if test -n "$ac_tool_prefix"; then
3538 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3539set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3541$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003542if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003544else
3545 if test -n "$CC"; then
3546 ac_cv_prog_CC="$CC" # Let the user override the test.
3547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549for as_dir in $PATH
3550do
3551 IFS=$as_save_IFS
3552 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003554 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 $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 +00003557 break 2
3558 fi
3559done
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003561IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003562
Jack Jansendd19cf82001-12-06 22:36:17 +00003563fi
3564fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003565CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003566if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3568$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003569else
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3571$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003572fi
3573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574
Martin v. Löwis11437992002-04-12 09:54:03 +00003575fi
3576if test -z "$ac_cv_prog_CC"; then
3577 ac_ct_CC=$CC
3578 # Extract the first word of "gcc", so it can be a program name with args.
3579set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003582if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003584else
3585 if test -n "$ac_ct_CC"; then
3586 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3587else
3588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $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 +00003597 break 2
3598 fi
3599done
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
3603fi
3604fi
3605ac_ct_CC=$ac_cv_prog_ac_ct_CC
3606if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3608$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609else
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614 if test "x$ac_ct_CC" = x; then
3615 CC=""
3616 else
3617 case $cross_compiling:$ac_tool_warned in
3618yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621ac_tool_warned=yes ;;
3622esac
3623 CC=$ac_ct_CC
3624 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003627fi
3628
Jack Jansendd19cf82001-12-06 22:36:17 +00003629if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003630 if test -n "$ac_tool_prefix"; then
3631 # 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 +00003632set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3634$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003635if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003637else
3638 if test -n "$CC"; then
3639 ac_cv_prog_CC="$CC" # Let the user override the test.
3640else
Martin v. Löwis11437992002-04-12 09:54:03 +00003641as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3642for as_dir in $PATH
3643do
3644 IFS=$as_save_IFS
3645 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003647 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003648 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 $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 +00003650 break 2
3651 fi
3652done
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003655
3656fi
3657fi
3658CC=$ac_cv_prog_CC
3659if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3661$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662else
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3664$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003667
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003669fi
3670if test -z "$CC"; then
3671 # Extract the first word of "cc", so it can be a program name with args.
3672set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003675if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003677else
3678 if test -n "$CC"; then
3679 ac_cv_prog_CC="$CC" # Let the user override the test.
3680else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3690 ac_prog_rejected=yes
3691 continue
3692 fi
3693 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 $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 +00003695 break 2
3696 fi
3697done
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003699IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003700
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701if test $ac_prog_rejected = yes; then
3702 # We found a bogon in the path, so make sure we never use it.
3703 set dummy $ac_cv_prog_CC
3704 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003705 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706 # We chose a different compiler from the bogus one.
3707 # However, it has the same basename, so the bogon will be chosen
3708 # first if we set CC to just the basename; use the full file name.
3709 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003710 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711 fi
3712fi
3713fi
3714fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003715CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3718$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719else
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3721$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722fi
3723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724
Martin v. Löwis11437992002-04-12 09:54:03 +00003725fi
3726if test -z "$CC"; then
3727 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003728 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 do
3730 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3731set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3733$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003734if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003736else
3737 if test -n "$CC"; then
3738 ac_cv_prog_CC="$CC" # Let the user override the test.
3739else
Martin v. Löwis11437992002-04-12 09:54:03 +00003740as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3741for as_dir in $PATH
3742do
3743 IFS=$as_save_IFS
3744 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003746 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003747 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $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 +00003749 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003751done
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003753IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003754
3755fi
3756fi
3757CC=$ac_cv_prog_CC
3758if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3760$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3763$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003764fi
3765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 test -n "$CC" && break
3768 done
3769fi
3770if test -z "$CC"; then
3771 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003773do
3774 # Extract the first word of "$ac_prog", so it can be a program name with args.
3775set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003778if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003780else
3781 if test -n "$ac_ct_CC"; then
3782 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3783else
3784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785for as_dir in $PATH
3786do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003791 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 $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 +00003793 break 2
3794 fi
3795done
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003797IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003798
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
3800fi
3801ac_ct_CC=$ac_cv_prog_ac_ct_CC
3802if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3804$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805else
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003808fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 test -n "$ac_ct_CC" && break
3812done
Michael W. Hudson54241132001-12-07 15:38:26 +00003813
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814 if test "x$ac_ct_CC" = x; then
3815 CC=""
3816 else
3817 case $cross_compiling:$ac_tool_warned in
3818yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003819{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3820$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821ac_tool_warned=yes ;;
3822esac
3823 CC=$ac_ct_CC
3824 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003825fi
3826
3827fi
3828
3829
Matthias Kloseb9621712010-04-24 17:59:49 +00003830test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003832as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003833See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003834
3835# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003836$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3837set X $ac_compile
3838ac_compiler=$2
3839for ac_option in --version -v -V -qversion; do
3840 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841case "(($ac_try" in
3842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3843 *) ac_try_echo=$ac_try;;
3844esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003845eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3846$as_echo "$ac_try_echo"; } >&5
3847 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003849 if test -s conftest.err; then
3850 sed '10a\
3851... rest of stderr output deleted ...
3852 10q' conftest.err >conftest.er1
3853 cat conftest.er1 >&5
3854 fi
3855 rm -f conftest.er1 conftest.err
3856 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3857 test $ac_status = 0; }
3858done
Martin v. Löwis11437992002-04-12 09:54:03 +00003859
Matthias Kloseb9621712010-04-24 17:59:49 +00003860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003861/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003862
Martin v. Löwis11437992002-04-12 09:54:03 +00003863int
3864main ()
3865{
3866
3867 ;
3868 return 0;
3869}
3870_ACEOF
3871ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003872ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003873# Try to create an executable without -o first, disregard a.out.
3874# It will help us diagnose broken compilers, and finding out an intuition
3875# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3877$as_echo_n "checking whether the C compiler works... " >&6; }
3878ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3879
3880# The possible output files:
3881ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883ac_rmfiles=
3884for ac_file in $ac_files
3885do
3886 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3889 esac
3890done
3891rm -f $ac_rmfiles
3892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894case "(($ac_try" in
3895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3896 *) ac_try_echo=$ac_try;;
3897esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003898eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3899$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3903 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3905# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3906# in a Makefile. We should not override ac_cv_exeext if it was cached,
3907# so that the user can short-circuit this test for compilers unknown to
3908# Autoconf.
3909for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003910do
3911 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003913 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003914 ;;
3915 [ab].out )
3916 # We found the default executable, but exeext='' is most
3917 # certainly right.
3918 break;;
3919 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003920 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921 then :; else
3922 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3923 fi
3924 # We set ac_cv_exeext here because the later test for it is not
3925 # safe: cross compilers may not add the suffix if given an `-o'
3926 # argument, so we may need to know it at that point already.
3927 # Even if this section looks crufty: it has the advantage of
3928 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003929 break;;
3930 * )
3931 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003932 esac
3933done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934test "$ac_cv_exeext" = no && ac_cv_exeext=
3935
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003936else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003937 ac_file=''
3938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003939if test -z "$ac_file"; then :
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3941$as_echo "no" >&6; }
3942$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003943sed 's/^/| /' conftest.$ac_ext >&5
3944
Matthias Kloseb9621712010-04-24 17:59:49 +00003945{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3946$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003947as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003948See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003949else
3950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3951$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3954$as_echo_n "checking for C compiler default output file name... " >&6; }
3955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3956$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958
Matthias Kloseb9621712010-04-24 17:59:49 +00003959rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003960ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3962$as_echo_n "checking for suffix of executables... " >&6; }
3963if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964case "(($ac_try" in
3965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3966 *) ac_try_echo=$ac_try;;
3967esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003968eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3969$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003970 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3973 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003974 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3975# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3976# work properly (i.e., refer to `conftest.exe'), while it won't with
3977# `rm'.
3978for ac_file in conftest.exe conftest conftest.*; do
3979 test -f "$ac_file" || continue
3980 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003981 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3983 break;;
3984 * ) break;;
3985 esac
3986done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003987else
Matthias Kloseb9621712010-04-24 17:59:49 +00003988 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003990as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003991See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993rm -f conftest conftest$ac_cv_exeext
3994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3995$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996
3997rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003998EXEEXT=$ac_cv_exeext
3999ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001/* end confdefs.h. */
4002#include <stdio.h>
4003int
4004main ()
4005{
4006FILE *f = fopen ("conftest.out", "w");
4007 return ferror (f) || fclose (f) != 0;
4008
4009 ;
4010 return 0;
4011}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004013ac_clean_files="$ac_clean_files conftest.out"
4014# Check that the compiler produces executables we can run. If not, either
4015# the compiler is broken, or we cross compile.
4016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4017$as_echo_n "checking whether we are cross compiling... " >&6; }
4018if test "$cross_compiling" != yes; then
4019 { { ac_try="$ac_link"
4020case "(($ac_try" in
4021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4022 *) ac_try_echo=$ac_try;;
4023esac
4024eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4025$as_echo "$ac_try_echo"; } >&5
4026 (eval "$ac_link") 2>&5
4027 ac_status=$?
4028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4029 test $ac_status = 0; }
4030 if { ac_try='./conftest$ac_cv_exeext'
4031 { { case "(($ac_try" in
4032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4033 *) ac_try_echo=$ac_try;;
4034esac
4035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4036$as_echo "$ac_try_echo"; } >&5
4037 (eval "$ac_try") 2>&5
4038 ac_status=$?
4039 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4040 test $ac_status = 0; }; }; then
4041 cross_compiling=no
4042 else
4043 if test "$cross_compiling" = maybe; then
4044 cross_compiling=yes
4045 else
4046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4047$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004048as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004049If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004050See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 fi
4052 fi
4053fi
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4055$as_echo "$cross_compiling" >&6; }
4056
4057rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4058ac_clean_files=$ac_clean_files_save
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4060$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004061if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004062 $as_echo_n "(cached) " >&6
4063else
4064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004065/* end confdefs.h. */
4066
4067int
4068main ()
4069{
4070
4071 ;
4072 return 0;
4073}
4074_ACEOF
4075rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004076if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077case "(($ac_try" in
4078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4079 *) ac_try_echo=$ac_try;;
4080esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004081eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4082$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004084 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4086 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004087 for ac_file in conftest.o conftest.obj conftest.*; do
4088 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004091 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4092 break;;
4093 esac
4094done
4095else
Matthias Kloseb9621712010-04-24 17:59:49 +00004096 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004097sed 's/^/| /' conftest.$ac_ext >&5
4098
Matthias Kloseb9621712010-04-24 17:59:49 +00004099{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004101as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004102See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004103fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4107$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004108OBJEXT=$ac_cv_objext
4109ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4111$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004112if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004114else
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004117
Martin v. Löwis11437992002-04-12 09:54:03 +00004118int
4119main ()
4120{
4121#ifndef __GNUC__
4122 choke me
4123#endif
4124
4125 ;
4126 return 0;
4127}
4128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 ac_compiler_gnu=yes
4131else
Matthias Kloseb9621712010-04-24 17:59:49 +00004132 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135ac_cv_c_compiler_gnu=$ac_compiler_gnu
4136
4137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4139$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4140if test $ac_compiler_gnu = yes; then
4141 GCC=yes
4142else
4143 GCC=
4144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004145ac_test_CFLAGS=${CFLAGS+set}
4146ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4148$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004149if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004150 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004151else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152 ac_save_c_werror_flag=$ac_c_werror_flag
4153 ac_c_werror_flag=yes
4154 ac_cv_prog_cc_g=no
4155 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004167if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004168 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 CFLAGS=""
4171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172/* end confdefs.h. */
4173
4174int
4175main ()
4176{
4177
4178 ;
4179 return 0;
4180}
4181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004182if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183
Matthias Kloseb9621712010-04-24 17:59:49 +00004184else
4185 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004186 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188/* end confdefs.h. */
4189
4190int
4191main ()
4192{
4193
4194 ;
4195 return 0;
4196}
4197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004198if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4206 ac_c_werror_flag=$ac_save_c_werror_flag
4207fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4209$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004210if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212elif test $ac_cv_prog_cc_g = yes; then
4213 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004214 CFLAGS="-g -O2"
4215 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004216 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217 fi
4218else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004219 if test "$GCC" = yes; then
4220 CFLAGS="-O2"
4221 else
4222 CFLAGS=
4223 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4226$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004227if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004229else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004231ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004233/* end confdefs.h. */
4234#include <stdarg.h>
4235#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004236struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004237/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4238struct buf { int x; };
4239FILE * (*rcsopen) (struct buf *, struct stat *, int);
4240static char *e (p, i)
4241 char **p;
4242 int i;
4243{
4244 return p[i];
4245}
4246static char *f (char * (*g) (char **, int), char **p, ...)
4247{
4248 char *s;
4249 va_list v;
4250 va_start (v,p);
4251 s = g (p, va_arg (v,int));
4252 va_end (v);
4253 return s;
4254}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004255
4256/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4257 function prototypes and stuff, but not '\xHH' hex character constants.
4258 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4261 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4266 inside strings and character constants. */
4267#define FOO(x) 'x'
4268int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4269
Skip Montanaro6dead952003-09-25 14:50:04 +00004270int test (int i, double x);
4271struct s1 {int (*f) (int a);};
4272struct s2 {int (*f) (double a);};
4273int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4274int argc;
4275char **argv;
4276int
4277main ()
4278{
4279return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4280 ;
4281 return 0;
4282}
4283_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4285 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004286do
4287 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004288 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f core conftest.err conftest.$ac_objext
4292 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004293done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004295CC=$ac_save_CC
4296
4297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298# AC_CACHE_VAL
4299case "x$ac_cv_prog_cc_c89" in
4300 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4302$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4305$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004307 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4309$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004310esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004311if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004312
Matthias Kloseb9621712010-04-24 17:59:49 +00004313fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004314
Martin v. Löwis11437992002-04-12 09:54:03 +00004315ac_ext=c
4316ac_cpp='$CPP $CPPFLAGS'
4317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4319ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004321ac_ext=c
4322ac_cpp='$CPP $CPPFLAGS'
4323ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4324ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4325ac_compiler_gnu=$ac_cv_c_compiler_gnu
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4327$as_echo_n "checking how to run the C preprocessor... " >&6; }
4328# On Suns, sometimes $CPP names a directory.
4329if test -n "$CPP" && test -d "$CPP"; then
4330 CPP=
4331fi
4332if test -z "$CPP"; then
4333 if ${ac_cv_prog_CPP+:} false; then :
4334 $as_echo_n "(cached) " >&6
4335else
4336 # Double quotes because CPP needs to be expanded
4337 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4338 do
4339 ac_preproc_ok=false
4340for ac_c_preproc_warn_flag in '' yes
4341do
4342 # Use a header file that comes with gcc, so configuring glibc
4343 # with a fresh cross-compiler works.
4344 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4345 # <limits.h> exists even on freestanding compilers.
4346 # On the NeXT, cc -E runs the code through the compiler's parser,
4347 # not just through cpp. "Syntax error" is here to catch this case.
4348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4349/* end confdefs.h. */
4350#ifdef __STDC__
4351# include <limits.h>
4352#else
4353# include <assert.h>
4354#endif
4355 Syntax error
4356_ACEOF
4357if ac_fn_c_try_cpp "$LINENO"; then :
4358
4359else
4360 # Broken: fails on valid input.
4361continue
4362fi
4363rm -f conftest.err conftest.i conftest.$ac_ext
4364
4365 # OK, works on sane cases. Now check whether nonexistent headers
4366 # can be detected and how.
4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4368/* end confdefs.h. */
4369#include <ac_nonexistent.h>
4370_ACEOF
4371if ac_fn_c_try_cpp "$LINENO"; then :
4372 # Broken: success on invalid input.
4373continue
4374else
4375 # Passes both tests.
4376ac_preproc_ok=:
4377break
4378fi
4379rm -f conftest.err conftest.i conftest.$ac_ext
4380
4381done
4382# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4383rm -f conftest.i conftest.err conftest.$ac_ext
4384if $ac_preproc_ok; then :
4385 break
4386fi
4387
4388 done
4389 ac_cv_prog_CPP=$CPP
4390
4391fi
4392 CPP=$ac_cv_prog_CPP
4393else
4394 ac_cv_prog_CPP=$CPP
4395fi
4396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4397$as_echo "$CPP" >&6; }
4398ac_preproc_ok=false
4399for ac_c_preproc_warn_flag in '' yes
4400do
4401 # Use a header file that comes with gcc, so configuring glibc
4402 # with a fresh cross-compiler works.
4403 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4404 # <limits.h> exists even on freestanding compilers.
4405 # On the NeXT, cc -E runs the code through the compiler's parser,
4406 # not just through cpp. "Syntax error" is here to catch this case.
4407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4408/* end confdefs.h. */
4409#ifdef __STDC__
4410# include <limits.h>
4411#else
4412# include <assert.h>
4413#endif
4414 Syntax error
4415_ACEOF
4416if ac_fn_c_try_cpp "$LINENO"; then :
4417
4418else
4419 # Broken: fails on valid input.
4420continue
4421fi
4422rm -f conftest.err conftest.i conftest.$ac_ext
4423
4424 # OK, works on sane cases. Now check whether nonexistent headers
4425 # can be detected and how.
4426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4427/* end confdefs.h. */
4428#include <ac_nonexistent.h>
4429_ACEOF
4430if ac_fn_c_try_cpp "$LINENO"; then :
4431 # Broken: success on invalid input.
4432continue
4433else
4434 # Passes both tests.
4435ac_preproc_ok=:
4436break
4437fi
4438rm -f conftest.err conftest.i conftest.$ac_ext
4439
4440done
4441# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4442rm -f conftest.i conftest.err conftest.$ac_ext
4443if $ac_preproc_ok; then :
4444
4445else
4446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4448as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4449See \`config.log' for more details" "$LINENO" 5; }
4450fi
4451
4452ac_ext=c
4453ac_cpp='$CPP $CPPFLAGS'
4454ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4455ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4456ac_compiler_gnu=$ac_cv_c_compiler_gnu
4457
4458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4459$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4460if ${ac_cv_path_GREP+:} false; then :
4461 $as_echo_n "(cached) " >&6
4462else
4463 if test -z "$GREP"; then
4464 ac_path_GREP_found=false
4465 # Loop through the user's path and test for each of PROGNAME-LIST
4466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4467for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4468do
4469 IFS=$as_save_IFS
4470 test -z "$as_dir" && as_dir=.
4471 for ac_prog in grep ggrep; do
4472 for ac_exec_ext in '' $ac_executable_extensions; do
4473 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4474 as_fn_executable_p "$ac_path_GREP" || continue
4475# Check for GNU ac_path_GREP and select it if it is found.
4476 # Check for GNU $ac_path_GREP
4477case `"$ac_path_GREP" --version 2>&1` in
4478*GNU*)
4479 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4480*)
4481 ac_count=0
4482 $as_echo_n 0123456789 >"conftest.in"
4483 while :
4484 do
4485 cat "conftest.in" "conftest.in" >"conftest.tmp"
4486 mv "conftest.tmp" "conftest.in"
4487 cp "conftest.in" "conftest.nl"
4488 $as_echo 'GREP' >> "conftest.nl"
4489 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4490 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4491 as_fn_arith $ac_count + 1 && ac_count=$as_val
4492 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4493 # Best one so far, save it but keep looking for a better one
4494 ac_cv_path_GREP="$ac_path_GREP"
4495 ac_path_GREP_max=$ac_count
4496 fi
4497 # 10*(2^10) chars as input seems more than enough
4498 test $ac_count -gt 10 && break
4499 done
4500 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4501esac
4502
4503 $ac_path_GREP_found && break 3
4504 done
4505 done
4506 done
4507IFS=$as_save_IFS
4508 if test -z "$ac_cv_path_GREP"; then
4509 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4510 fi
4511else
4512 ac_cv_path_GREP=$GREP
4513fi
4514
4515fi
4516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4517$as_echo "$ac_cv_path_GREP" >&6; }
4518 GREP="$ac_cv_path_GREP"
4519
4520
Łukasz Langaa785c872016-09-09 17:37:37 -07004521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4522$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4523if ${ac_cv_path_SED+:} false; then :
4524 $as_echo_n "(cached) " >&6
4525else
4526 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4527 for ac_i in 1 2 3 4 5 6 7; do
4528 ac_script="$ac_script$as_nl$ac_script"
4529 done
4530 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4531 { ac_script=; unset ac_script;}
4532 if test -z "$SED"; then
4533 ac_path_SED_found=false
4534 # Loop through the user's path and test for each of PROGNAME-LIST
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in $PATH
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
4540 for ac_prog in sed gsed; do
4541 for ac_exec_ext in '' $ac_executable_extensions; do
4542 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4543 as_fn_executable_p "$ac_path_SED" || continue
4544# Check for GNU ac_path_SED and select it if it is found.
4545 # Check for GNU $ac_path_SED
4546case `"$ac_path_SED" --version 2>&1` in
4547*GNU*)
4548 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4549*)
4550 ac_count=0
4551 $as_echo_n 0123456789 >"conftest.in"
4552 while :
4553 do
4554 cat "conftest.in" "conftest.in" >"conftest.tmp"
4555 mv "conftest.tmp" "conftest.in"
4556 cp "conftest.in" "conftest.nl"
4557 $as_echo '' >> "conftest.nl"
4558 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4559 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4560 as_fn_arith $ac_count + 1 && ac_count=$as_val
4561 if test $ac_count -gt ${ac_path_SED_max-0}; then
4562 # Best one so far, save it but keep looking for a better one
4563 ac_cv_path_SED="$ac_path_SED"
4564 ac_path_SED_max=$ac_count
4565 fi
4566 # 10*(2^10) chars as input seems more than enough
4567 test $ac_count -gt 10 && break
4568 done
4569 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4570esac
4571
4572 $ac_path_SED_found && break 3
4573 done
4574 done
4575 done
4576IFS=$as_save_IFS
4577 if test -z "$ac_cv_path_SED"; then
4578 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4579 fi
4580else
4581 ac_cv_path_SED=$SED
4582fi
4583
4584fi
4585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4586$as_echo "$ac_cv_path_SED" >&6; }
4587 SED="$ac_cv_path_SED"
4588 rm -f conftest.sed
4589
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004590
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591
4592
Matthias Kloseb9621712010-04-24 17:59:49 +00004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4594$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004596# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004597if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004598 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004599
4600 case $withval in
4601 no) with_cxx_main=no
4602 MAINCC='$(CC)';;
4603 yes) with_cxx_main=yes
4604 MAINCC='$(CXX)';;
4605 *) with_cxx_main=yes
4606 MAINCC=$withval
4607 if test -z "$CXX"
4608 then
4609 CXX=$withval
4610 fi;;
4611 esac
4612else
4613
4614 with_cxx_main=no
4615 MAINCC='$(CC)'
4616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004617fi
4618
Matthias Kloseb9621712010-04-24 17:59:49 +00004619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4620$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004621
4622preset_cxx="$CXX"
4623if test -z "$CXX"
4624then
4625 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004626 gcc) if test -n "$ac_tool_prefix"; then
4627 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4628set dummy ${ac_tool_prefix}g++; ac_word=$2
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630$as_echo_n "checking for $ac_word... " >&6; }
4631if ${ac_cv_path_CXX+:} false; then :
4632 $as_echo_n "(cached) " >&6
4633else
4634 case $CXX in
4635 [\\/]* | ?:[\\/]*)
4636 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4637 ;;
4638 *)
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640for as_dir in notfound
4641do
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004646 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4649 fi
4650done
4651 done
4652IFS=$as_save_IFS
4653
4654 ;;
4655esac
4656fi
4657CXX=$ac_cv_path_CXX
4658if test -n "$CXX"; then
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4660$as_echo "$CXX" >&6; }
4661else
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663$as_echo "no" >&6; }
4664fi
4665
4666
4667fi
4668if test -z "$ac_cv_path_CXX"; then
4669 ac_pt_CXX=$CXX
4670 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4673$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004674if ${ac_cv_path_ac_pt_CXX+:} false; then :
4675 $as_echo_n "(cached) " >&6
4676else
4677 case $ac_pt_CXX in
4678 [\\/]* | ?:[\\/]*)
4679 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4680 ;;
4681 *)
4682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4683for as_dir in notfound
4684do
4685 IFS=$as_save_IFS
4686 test -z "$as_dir" && as_dir=.
4687 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004689 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4691 break 2
4692 fi
4693done
4694 done
4695IFS=$as_save_IFS
4696
4697 ;;
4698esac
4699fi
4700ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4701if test -n "$ac_pt_CXX"; then
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4703$as_echo "$ac_pt_CXX" >&6; }
4704else
4705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4706$as_echo "no" >&6; }
4707fi
4708
4709 if test "x$ac_pt_CXX" = x; then
4710 CXX="g++"
4711 else
4712 case $cross_compiling:$ac_tool_warned in
4713yes:)
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4715$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4716ac_tool_warned=yes ;;
4717esac
4718 CXX=$ac_pt_CXX
4719 fi
4720else
4721 CXX="$ac_cv_path_CXX"
4722fi
4723 ;;
4724 cc) if test -n "$ac_tool_prefix"; then
4725 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4726set dummy ${ac_tool_prefix}c++; ac_word=$2
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004729if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004730 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731else
4732 case $CXX in
4733 [\\/]* | ?:[\\/]*)
4734 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4735 ;;
4736 *)
4737 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738for as_dir in notfound
4739do
4740 IFS=$as_save_IFS
4741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004744 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 break 2
4747 fi
4748done
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004750IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 ;;
4753esac
4754fi
4755CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4758$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759else
Matthias Kloseb9621712010-04-24 17:59:49 +00004760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004763
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764
4765fi
4766if test -z "$ac_cv_path_CXX"; then
4767 ac_pt_CXX=$CXX
4768 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004769set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4771$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004773 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004774else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004775 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 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 +00004778 ;;
4779 *)
4780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4781for as_dir in notfound
4782do
4783 IFS=$as_save_IFS
4784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 break 2
4790 fi
4791done
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004793IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795 ;;
4796esac
4797fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4799if test -n "$ac_pt_CXX"; then
4800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4801$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802else
Matthias Kloseb9621712010-04-24 17:59:49 +00004803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4804$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004806
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004807 if test "x$ac_pt_CXX" = x; then
4808 CXX="c++"
4809 else
4810 case $cross_compiling:$ac_tool_warned in
4811yes:)
4812{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4813$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4814ac_tool_warned=yes ;;
4815esac
4816 CXX=$ac_pt_CXX
4817 fi
4818else
4819 CXX="$ac_cv_path_CXX"
4820fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004821 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004822 clang|*/clang) if test -n "$ac_tool_prefix"; then
4823 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4824set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4826$as_echo_n "checking for $ac_word... " >&6; }
4827if ${ac_cv_path_CXX+:} false; then :
4828 $as_echo_n "(cached) " >&6
4829else
4830 case $CXX in
4831 [\\/]* | ?:[\\/]*)
4832 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4833 ;;
4834 *)
4835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4836for as_dir in notfound
4837do
4838 IFS=$as_save_IFS
4839 test -z "$as_dir" && as_dir=.
4840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004842 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4843 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4844 break 2
4845 fi
4846done
4847 done
4848IFS=$as_save_IFS
4849
Ned Deilycbfb9a52012-06-23 16:02:19 -07004850 ;;
4851esac
4852fi
4853CXX=$ac_cv_path_CXX
4854if test -n "$CXX"; then
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4856$as_echo "$CXX" >&6; }
4857else
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4859$as_echo "no" >&6; }
4860fi
4861
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004862
4863fi
4864if test -z "$ac_cv_path_CXX"; then
4865 ac_pt_CXX=$CXX
4866 # Extract the first word of "clang++", so it can be a program name with args.
4867set dummy clang++; ac_word=$2
4868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4869$as_echo_n "checking for $ac_word... " >&6; }
4870if ${ac_cv_path_ac_pt_CXX+:} false; then :
4871 $as_echo_n "(cached) " >&6
4872else
4873 case $ac_pt_CXX in
4874 [\\/]* | ?:[\\/]*)
4875 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4876 ;;
4877 *)
4878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4879for as_dir in notfound
4880do
4881 IFS=$as_save_IFS
4882 test -z "$as_dir" && as_dir=.
4883 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4887 break 2
4888 fi
4889done
4890 done
4891IFS=$as_save_IFS
4892
4893 ;;
4894esac
4895fi
4896ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4897if test -n "$ac_pt_CXX"; then
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4899$as_echo "$ac_pt_CXX" >&6; }
4900else
4901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4902$as_echo "no" >&6; }
4903fi
4904
4905 if test "x$ac_pt_CXX" = x; then
4906 CXX="clang++"
4907 else
4908 case $cross_compiling:$ac_tool_warned in
4909yes:)
4910{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4911$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4912ac_tool_warned=yes ;;
4913esac
4914 CXX=$ac_pt_CXX
4915 fi
4916else
4917 CXX="$ac_cv_path_CXX"
4918fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004919 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004920 icc|*/icc) if test -n "$ac_tool_prefix"; then
4921 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4922set dummy ${ac_tool_prefix}icpc; ac_word=$2
4923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4924$as_echo_n "checking for $ac_word... " >&6; }
4925if ${ac_cv_path_CXX+:} false; then :
4926 $as_echo_n "(cached) " >&6
4927else
4928 case $CXX in
4929 [\\/]* | ?:[\\/]*)
4930 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4931 ;;
4932 *)
4933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4934for as_dir in notfound
4935do
4936 IFS=$as_save_IFS
4937 test -z "$as_dir" && as_dir=.
4938 for ac_exec_ext in '' $ac_executable_extensions; do
4939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4940 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4942 break 2
4943 fi
4944done
4945 done
4946IFS=$as_save_IFS
4947
4948 ;;
4949esac
4950fi
4951CXX=$ac_cv_path_CXX
4952if test -n "$CXX"; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4954$as_echo "$CXX" >&6; }
4955else
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957$as_echo "no" >&6; }
4958fi
4959
4960
4961fi
4962if test -z "$ac_cv_path_CXX"; then
4963 ac_pt_CXX=$CXX
4964 # Extract the first word of "icpc", so it can be a program name with args.
4965set dummy icpc; ac_word=$2
4966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4967$as_echo_n "checking for $ac_word... " >&6; }
4968if ${ac_cv_path_ac_pt_CXX+:} false; then :
4969 $as_echo_n "(cached) " >&6
4970else
4971 case $ac_pt_CXX in
4972 [\\/]* | ?:[\\/]*)
4973 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4974 ;;
4975 *)
4976 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4977for as_dir in notfound
4978do
4979 IFS=$as_save_IFS
4980 test -z "$as_dir" && as_dir=.
4981 for ac_exec_ext in '' $ac_executable_extensions; do
4982 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4983 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4984 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4985 break 2
4986 fi
4987done
4988 done
4989IFS=$as_save_IFS
4990
4991 ;;
4992esac
4993fi
4994ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4995if test -n "$ac_pt_CXX"; then
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4997$as_echo "$ac_pt_CXX" >&6; }
4998else
4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5000$as_echo "no" >&6; }
5001fi
5002
5003 if test "x$ac_pt_CXX" = x; then
5004 CXX="icpc"
5005 else
5006 case $cross_compiling:$ac_tool_warned in
5007yes:)
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5009$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5010ac_tool_warned=yes ;;
5011esac
5012 CXX=$ac_pt_CXX
5013 fi
5014else
5015 CXX="$ac_cv_path_CXX"
5016fi
5017 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005018 esac
5019 if test "$CXX" = "notfound"
5020 then
5021 CXX=""
5022 fi
5023fi
5024if test -z "$CXX"
5025then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005026 if test -n "$ac_tool_prefix"; then
5027 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5028 do
5029 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005033if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005035else
5036 if test -n "$CXX"; then
5037 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5038else
5039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042 IFS=$as_save_IFS
5043 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005046 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005048 break 2
5049 fi
5050done
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005052IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053
5054fi
5055fi
5056CXX=$ac_cv_prog_CXX
5057if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5059$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060else
Matthias Kloseb9621712010-04-24 17:59:49 +00005061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5062$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005063fi
5064
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005066 test -n "$CXX" && break
5067 done
5068fi
5069if test -z "$CXX"; then
5070 ac_ct_CXX=$CXX
5071 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5072do
5073 # Extract the first word of "$ac_prog", so it can be a program name with args.
5074set dummy $ac_prog; ac_word=$2
5075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
5077if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5078 $as_echo_n "(cached) " >&6
5079else
5080 if test -n "$ac_ct_CXX"; then
5081 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5082else
5083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084for as_dir in $PATH
5085do
5086 IFS=$as_save_IFS
5087 test -z "$as_dir" && as_dir=.
5088 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005090 ac_cv_prog_ac_ct_CXX="$ac_prog"
5091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092 break 2
5093 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005094done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005095 done
5096IFS=$as_save_IFS
5097
5098fi
5099fi
5100ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5101if test -n "$ac_ct_CXX"; then
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5103$as_echo "$ac_ct_CXX" >&6; }
5104else
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110 test -n "$ac_ct_CXX" && break
5111done
5112
5113 if test "x$ac_ct_CXX" = x; then
5114 CXX="notfound"
5115 else
5116 case $cross_compiling:$ac_tool_warned in
5117yes:)
5118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5120ac_tool_warned=yes ;;
5121esac
5122 CXX=$ac_ct_CXX
5123 fi
5124fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126 if test "$CXX" = "notfound"
5127 then
5128 CXX=""
5129 fi
5130fi
5131if test "$preset_cxx" != "$CXX"
5132then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005133 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134
5135 By default, distutils will build C++ extension modules with \"$CXX\".
5136 If this is not intended, then set CXX on the configure command line.
5137 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005138$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139
5140 By default, distutils will build C++ extension modules with \"$CXX\".
5141 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005142 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005143fi
5144
5145
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005146MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5147
5148
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5150$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5151cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005152#undef bfin
5153#undef cris
5154#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005156#undef hppa
5157#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005158#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005159#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005160#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005161#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005163#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005164 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005165#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005166# if defined(__x86_64__) && defined(__LP64__)
5167 x86_64-linux-gnu
5168# elif defined(__x86_64__) && defined(__ILP32__)
5169 x86_64-linux-gnux32
5170# elif defined(__i386__)
5171 i386-linux-gnu
5172# elif defined(__aarch64__) && defined(__AARCH64EL__)
5173# if defined(__ILP32__)
5174 aarch64_ilp32-linux-gnu
5175# else
5176 aarch64-linux-gnu
5177# endif
5178# elif defined(__aarch64__) && defined(__AARCH64EB__)
5179# if defined(__ILP32__)
5180 aarch64_be_ilp32-linux-gnu
5181# else
5182 aarch64_be-linux-gnu
5183# endif
5184# elif defined(__alpha__)
5185 alpha-linux-gnu
5186# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5187# if defined(__ARMEL__)
5188 arm-linux-gnueabihf
5189# else
5190 armeb-linux-gnueabihf
5191# endif
5192# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5193# if defined(__ARMEL__)
5194 arm-linux-gnueabi
5195# else
5196 armeb-linux-gnueabi
5197# endif
5198# elif defined(__hppa__)
5199 hppa-linux-gnu
5200# elif defined(__ia64__)
5201 ia64-linux-gnu
5202# elif defined(__m68k__) && !defined(__mcoldfire__)
5203 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005204# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5205# if _MIPS_SIM == _ABIO32
5206 mipsisa32r6el-linux-gnu
5207# elif _MIPS_SIM == _ABIN32
5208 mipsisa64r6el-linux-gnuabin32
5209# elif _MIPS_SIM == _ABI64
5210 mipsisa64r6el-linux-gnuabi64
5211# else
5212# error unknown platform triplet
5213# endif
5214# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5215# if _MIPS_SIM == _ABIO32
5216 mipsisa32r6-linux-gnu
5217# elif _MIPS_SIM == _ABIN32
5218 mipsisa64r6-linux-gnuabin32
5219# elif _MIPS_SIM == _ABI64
5220 mipsisa64r6-linux-gnuabi64
5221# else
5222# error unknown platform triplet
5223# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005224# elif defined(__mips_hard_float) && defined(_MIPSEL)
5225# if _MIPS_SIM == _ABIO32
5226 mipsel-linux-gnu
5227# elif _MIPS_SIM == _ABIN32
5228 mips64el-linux-gnuabin32
5229# elif _MIPS_SIM == _ABI64
5230 mips64el-linux-gnuabi64
5231# else
5232# error unknown platform triplet
5233# endif
5234# elif defined(__mips_hard_float)
5235# if _MIPS_SIM == _ABIO32
5236 mips-linux-gnu
5237# elif _MIPS_SIM == _ABIN32
5238 mips64-linux-gnuabin32
5239# elif _MIPS_SIM == _ABI64
5240 mips64-linux-gnuabi64
5241# else
5242# error unknown platform triplet
5243# endif
5244# elif defined(__or1k__)
5245 or1k-linux-gnu
5246# elif defined(__powerpc__) && defined(__SPE__)
5247 powerpc-linux-gnuspe
5248# elif defined(__powerpc64__)
5249# if defined(__LITTLE_ENDIAN__)
5250 powerpc64le-linux-gnu
5251# else
5252 powerpc64-linux-gnu
5253# endif
5254# elif defined(__powerpc__)
5255 powerpc-linux-gnu
5256# elif defined(__s390x__)
5257 s390x-linux-gnu
5258# elif defined(__s390__)
5259 s390-linux-gnu
5260# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5261 sh4-linux-gnu
5262# elif defined(__sparc__) && defined(__arch64__)
5263 sparc64-linux-gnu
5264# elif defined(__sparc__)
5265 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005266# elif defined(__riscv)
5267# if __riscv_xlen == 32
5268 riscv32-linux-gnu
5269# elif __riscv_xlen == 64
5270 riscv64-linux-gnu
5271# else
5272# error unknown platform triplet
5273# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274# else
5275# error unknown platform triplet
5276# endif
5277#elif defined(__FreeBSD_kernel__)
5278# if defined(__LP64__)
5279 x86_64-kfreebsd-gnu
5280# elif defined(__i386__)
5281 i386-kfreebsd-gnu
5282# else
5283# error unknown platform triplet
5284# endif
5285#elif defined(__gnu_hurd__)
5286 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005287#elif defined(__APPLE__)
5288 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005289#elif defined(__VXWORKS__)
5290 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005291#else
5292# error unknown platform triplet
5293#endif
5294
5295EOF
5296
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005297if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5300$as_echo "$PLATFORM_TRIPLET" >&6; }
5301else
5302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5303$as_echo "none" >&6; }
5304fi
5305rm -f conftest.c conftest.out
5306
5307if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5308 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5309 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5310 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005311elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5312 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314
doko@ubuntu.com55532312016-06-14 08:55:19 +02005315if test x$MULTIARCH != x; then
5316 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5317fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005318
5319
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5321$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5322save_LDFLAGS="$LDFLAGS"
5323LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005324
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326/* end confdefs.h. */
5327
5328int
5329main ()
5330{
5331
5332 ;
5333 return 0;
5334}
5335_ACEOF
5336if ac_fn_c_try_link "$LINENO"; then :
5337 NO_AS_NEEDED="-Wl,--no-as-needed"
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5339$as_echo "yes" >&6; }
5340else
5341 NO_AS_NEEDED=""
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
5344fi
5345rm -f core conftest.err conftest.$ac_objext \
5346 conftest$ac_exeext conftest.$ac_ext
5347LDFLAGS="$save_LDFLAGS"
5348
5349
5350
5351# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352
Matthias Kloseb9621712010-04-24 17:59:49 +00005353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5354$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005355if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357else
5358 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5359 then ac_cv_path_EGREP="$GREP -E"
5360 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005363 # Loop through the user's path and test for each of PROGNAME-LIST
5364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005365for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5366do
5367 IFS=$as_save_IFS
5368 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 for ac_prog in egrep; do
5370 for ac_exec_ext in '' $ac_executable_extensions; do
5371 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005372 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005373# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 # Check for GNU $ac_path_EGREP
5375case `"$ac_path_EGREP" --version 2>&1` in
5376*GNU*)
5377 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5378*)
5379 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005380 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005381 while :
5382 do
5383 cat "conftest.in" "conftest.in" >"conftest.tmp"
5384 mv "conftest.tmp" "conftest.in"
5385 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5388 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5391 # Best one so far, save it but keep looking for a better one
5392 ac_cv_path_EGREP="$ac_path_EGREP"
5393 ac_path_EGREP_max=$ac_count
5394 fi
5395 # 10*(2^10) chars as input seems more than enough
5396 test $ac_count -gt 10 && break
5397 done
5398 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5399esac
5400
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 $ac_path_EGREP_found && break 3
5402 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005403 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005406 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005407 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 +00005408 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409else
5410 ac_cv_path_EGREP=$EGREP
5411fi
5412
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 fi
5414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5416$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005418
5419
Matthias Kloseb9621712010-04-24 17:59:49 +00005420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5421$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005422if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005423 $as_echo_n "(cached) " >&6
5424else
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005426/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005427#include <stdlib.h>
5428#include <stdarg.h>
5429#include <string.h>
5430#include <float.h>
5431
5432int
5433main ()
5434{
5435
5436 ;
5437 return 0;
5438}
5439_ACEOF
5440if ac_fn_c_try_compile "$LINENO"; then :
5441 ac_cv_header_stdc=yes
5442else
5443 ac_cv_header_stdc=no
5444fi
5445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5446
5447if test $ac_cv_header_stdc = yes; then
5448 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5450/* end confdefs.h. */
5451#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005452
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005457else
Matthias Kloseb9621712010-04-24 17:59:49 +00005458 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005459fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005460rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462fi
5463
5464if test $ac_cv_header_stdc = yes; then
5465 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467/* end confdefs.h. */
5468#include <stdlib.h>
5469
5470_ACEOF
5471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5472 $EGREP "free" >/dev/null 2>&1; then :
5473
5474else
5475 ac_cv_header_stdc=no
5476fi
5477rm -f conftest*
5478
5479fi
5480
5481if test $ac_cv_header_stdc = yes; then
5482 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5483 if test "$cross_compiling" = yes; then :
5484 :
5485else
5486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5487/* end confdefs.h. */
5488#include <ctype.h>
5489#include <stdlib.h>
5490#if ((' ' & 0x0FF) == 0x020)
5491# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5492# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5493#else
5494# define ISLOWER(c) \
5495 (('a' <= (c) && (c) <= 'i') \
5496 || ('j' <= (c) && (c) <= 'r') \
5497 || ('s' <= (c) && (c) <= 'z'))
5498# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5499#endif
5500
5501#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5502int
5503main ()
5504{
5505 int i;
5506 for (i = 0; i < 256; i++)
5507 if (XOR (islower (i), ISLOWER (i))
5508 || toupper (i) != TOUPPER (i))
5509 return 2;
5510 return 0;
5511}
5512_ACEOF
5513if ac_fn_c_try_run "$LINENO"; then :
5514
5515else
5516 ac_cv_header_stdc=no
5517fi
5518rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5519 conftest.$ac_objext conftest.beam conftest.$ac_ext
5520fi
5521
5522fi
5523fi
5524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5525$as_echo "$ac_cv_header_stdc" >&6; }
5526if test $ac_cv_header_stdc = yes; then
5527
5528$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5529
5530fi
5531
5532# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5533for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5534 inttypes.h stdint.h unistd.h
5535do :
5536 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5537ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5538"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005539if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 cat >>confdefs.h <<_ACEOF
5541#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5542_ACEOF
5543
5544fi
5545
5546done
5547
5548
5549
5550 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 +02005551if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005552 MINIX=yes
5553else
5554 MINIX=
5555fi
5556
5557
5558 if test "$MINIX" = yes; then
5559
5560$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5561
5562
5563$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5564
5565
5566$as_echo "#define _MINIX 1" >>confdefs.h
5567
5568 fi
5569
5570
5571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5572$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005573if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005574 $as_echo_n "(cached) " >&6
5575else
5576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5577/* end confdefs.h. */
5578
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005579# define __EXTENSIONS__ 1
5580 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005581int
5582main ()
5583{
5584
5585 ;
5586 return 0;
5587}
5588_ACEOF
5589if ac_fn_c_try_compile "$LINENO"; then :
5590 ac_cv_safe_to_define___extensions__=yes
5591else
5592 ac_cv_safe_to_define___extensions__=no
5593fi
5594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5595fi
5596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5597$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5598 test $ac_cv_safe_to_define___extensions__ = yes &&
5599 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5600
5601 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5602
5603 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5604
5605 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5606
5607 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5608
5609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005610
Xavier de Gaye95750b12016-07-09 11:05:42 +02005611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5612$as_echo_n "checking for the Android API level... " >&6; }
5613cat >> conftest.c <<EOF
5614#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005615android_api = __ANDROID_API__
5616arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005617#else
5618#error not Android
5619#endif
5620EOF
5621
5622if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005623 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5624 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5626$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005627 if test -z "$ANDROID_API_LEVEL"; then
5628 echo 'Fatal: you must define __ANDROID_API__'
5629 exit 1
5630 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005631
5632cat >>confdefs.h <<_ACEOF
5633#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5634_ACEOF
5635
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005636
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5638$as_echo_n "checking for the Android arm ABI... " >&6; }
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5640$as_echo "$_arm_arch" >&6; }
5641 if test "$_arm_arch" = 7; then
5642 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5643 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5644 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005645else
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5647$as_echo "not Android" >&6; }
5648fi
5649rm -f conftest.c conftest.out
5650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651# Check for unsupported systems
5652case $ac_sys_system/$ac_sys_release in
5653atheos*|Linux*/1*)
5654 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5655 echo See README for details.
5656 exit 1;;
5657esac
5658
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5661$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005664if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005665 withval=$with_suffix;
5666 case $withval in
5667 no) EXEEXT=;;
5668 yes) EXEEXT=.exe;;
5669 *) EXEEXT=$withval;;
5670 esac
5671fi
5672
Matthias Kloseb9621712010-04-24 17:59:49 +00005673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5674$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675
5676# Test whether we're running on a non-case-sensitive system, in which
5677# case we give a warning if no ext is given
5678
Matthias Kloseb9621712010-04-24 17:59:49 +00005679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5680$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681if test ! -d CaseSensitiveTestDir; then
5682mkdir CaseSensitiveTestDir
5683fi
5684
5685if test -d casesensitivetestdir
5686then
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=.exe
5690else
Matthias Kloseb9621712010-04-24 17:59:49 +00005691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693 BUILDEXEEXT=$EXEEXT
5694fi
5695rmdir CaseSensitiveTestDir
5696
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697case $ac_sys_system in
5698hp*|HP*)
5699 case $CC in
5700 cc|*/cc) CC="$CC -Ae";;
5701 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702esac
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
Matthias Kloseb9621712010-04-24 17:59:49 +00005705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5706$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707if test -z "$LIBRARY"
5708then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005709 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5712$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005713
5714# LDLIBRARY is the name of the library to link against (as opposed to the
5715# name of the library into which to insert object files). BLDLIBRARY is also
5716# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5717# is blank as the main program is not linked directly against LDLIBRARY.
5718# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5719# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5720# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5721# DLLLIBRARY is the shared (i.e., DLL) library.
5722#
5723# RUNSHARED is used to run shared python without installed libraries
5724#
5725# INSTSONAME is the name of the shared library that will be use to install
5726# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005727#
5728# LDVERSION is the shared library version number, normally the Python version
5729# with the ABI build flags appended.
5730
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731
5732
5733
5734
5735
5736
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005737
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738LDLIBRARY="$LIBRARY"
5739BLDLIBRARY='$(LDLIBRARY)'
5740INSTSONAME='$(LDLIBRARY)'
5741DLLLIBRARY=''
5742LDLIBRARYDIR=''
5743RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005744LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005745
5746# LINKCC is the command that links the python executable -- default is $(CC).
5747# If CXX is set, and if it is needed to link a main function that was
5748# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5749# python might then depend on the C++ runtime
5750# This is altered for AIX in order to build the export list before
5751# linking.
5752
Matthias Kloseb9621712010-04-24 17:59:49 +00005753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5754$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755if test -z "$LINKCC"
5756then
5757 LINKCC='$(PURIFY) $(MAINCC)'
5758 case $ac_sys_system in
5759 AIX*)
5760 exp_extra="\"\""
5761 if test $ac_sys_release -ge 5 -o \
5762 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5763 exp_extra="."
5764 fi
5765 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 QNX*)
5767 # qcc must be used because the other compilers do not
5768 # support -N.
5769 LINKCC=qcc;;
5770 esac
5771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5773$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774
5775# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5776# make sure we default having it set to "no": this is used by
5777# distutils.unixccompiler to know if it should add --enable-new-dtags
5778# to linker command lines, and failing to detect GNU ld simply results
5779# in the same bahaviour as before.
5780
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5782$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783ac_prog=ld
5784if test "$GCC" = yes; then
5785 ac_prog=`$CC -print-prog-name=ld`
5786fi
5787case `"$ac_prog" -V 2>&1 < /dev/null` in
5788 *GNU*)
5789 GNULD=yes;;
5790 *)
5791 GNULD=no;;
5792esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5794$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795
Matthias Kloseb9621712010-04-24 17:59:49 +00005796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5797$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005798# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005799if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005800 enableval=$enable_shared;
5801fi
5802
5803
5804if test -z "$enable_shared"
5805then
5806 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005807 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 enable_shared="yes";;
5809 *)
5810 enable_shared="no";;
5811 esac
5812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5814$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
Matthias Kloseb9621712010-04-24 17:59:49 +00005816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5817$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005819if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005820 enableval=$enable_profiling;
5821fi
5822
5823if test "x$enable_profiling" = xyes; then
5824 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005825 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827/* end confdefs.h. */
5828int main() { return 0; }
5829_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830if ac_fn_c_try_link "$LINENO"; then :
5831
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005835rm -f core conftest.err conftest.$ac_objext \
5836 conftest$ac_exeext conftest.$ac_ext
5837 CC="$ac_save_cc"
5838else
5839 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5842$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
doko@ubuntu.comba015832012-06-30 16:52:05 +02005844if test "x$enable_profiling" = xyes; then
5845 BASECFLAGS="-pg $BASECFLAGS"
5846 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847fi
5848
Matthias Kloseb9621712010-04-24 17:59:49 +00005849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5850$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
5852# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5853# library that we build, but we do not want to link against it (we
5854# will find it with a -framework option). For this reason there is an
5855# extra variable BLDLIBRARY against which Python and the extension
5856# modules are linked, BLDLIBRARY. This is normally the same as
5857# LDLIBRARY, but empty for MacOSX framework builds.
5858if test "$enable_framework"
5859then
5860 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005861 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862 BLDLIBRARY=''
5863else
5864 BLDLIBRARY='$(LDLIBRARY)'
5865fi
5866
5867# Other platforms follow
5868if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005869 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870
Matthias Kloseb9621712010-04-24 17:59:49 +00005871$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872
5873 case $ac_sys_system in
5874 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005875 LDLIBRARY='libpython$(LDVERSION).dll.a'
5876 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 ;;
5878 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005879 LDLIBRARY='libpython$(LDVERSION).so'
5880 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005881 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005883 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005884 then
5885 PY3LIBRARY=libpython3.so
5886 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005888 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).so'
5890 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005891 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005893 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005894 then
5895 PY3LIBRARY=libpython3.so
5896 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
5898 hp*|HP*)
5899 case `uname -m` in
5900 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
5903 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
5906 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005908 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).dylib'
5912 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005915 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005916 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005917 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005918 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919
5920 esac
5921else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005922 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 case $ac_sys_system in
5924 CYGWIN*)
5925 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005926 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 ;;
5928 esac
5929fi
5930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005931if test "$cross_compiling" = yes; then
5932 RUNSHARED=
5933fi
5934
Matthias Kloseb9621712010-04-24 17:59:49 +00005935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5936$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005939if test -n "$ac_tool_prefix"; then
5940 for ac_prog in ar aal
5941 do
5942 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5943set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5945$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005946if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948else
5949 if test -n "$AR"; then
5950 ac_cv_prog_AR="$AR" # Let the user override the test.
5951else
5952as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5953for as_dir in $PATH
5954do
5955 IFS=$as_save_IFS
5956 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005959 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961 break 2
5962 fi
5963done
Matthias Kloseb9621712010-04-24 17:59:49 +00005964 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965IFS=$as_save_IFS
5966
5967fi
5968fi
5969AR=$ac_cv_prog_AR
5970if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5972$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973else
Matthias Kloseb9621712010-04-24 17:59:49 +00005974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5975$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005976fi
5977
5978
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005979 test -n "$AR" && break
5980 done
5981fi
5982if test -z "$AR"; then
5983 ac_ct_AR=$AR
5984 for ac_prog in ar aal
5985do
5986 # Extract the first word of "$ac_prog", so it can be a program name with args.
5987set dummy $ac_prog; ac_word=$2
5988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5989$as_echo_n "checking for $ac_word... " >&6; }
5990if ${ac_cv_prog_ac_ct_AR+:} false; then :
5991 $as_echo_n "(cached) " >&6
5992else
5993 if test -n "$ac_ct_AR"; then
5994 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5995else
5996as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997for as_dir in $PATH
5998do
5999 IFS=$as_save_IFS
6000 test -z "$as_dir" && as_dir=.
6001 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006002 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 ac_cv_prog_ac_ct_AR="$ac_prog"
6004 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005 break 2
6006 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006007done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006008 done
6009IFS=$as_save_IFS
6010
6011fi
6012fi
6013ac_ct_AR=$ac_cv_prog_ac_ct_AR
6014if test -n "$ac_ct_AR"; then
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6016$as_echo "$ac_ct_AR" >&6; }
6017else
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019$as_echo "no" >&6; }
6020fi
6021
6022
6023 test -n "$ac_ct_AR" && break
6024done
6025
6026 if test "x$ac_ct_AR" = x; then
6027 AR="ar"
6028 else
6029 case $cross_compiling:$ac_tool_warned in
6030yes:)
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6032$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6033ac_tool_warned=yes ;;
6034esac
6035 AR=$ac_ct_AR
6036 fi
6037fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006038
6039
6040# tweak ARFLAGS only if the user didn't set it on the command line
6041
6042if test -z "$ARFLAGS"
6043then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006044 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045fi
6046
doko@ubuntu.com58844492012-06-30 18:25:32 +02006047if test -n "$ac_tool_prefix"; then
6048 for ac_prog in readelf
6049 do
6050 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_prog_READELF+:} false; then :
6055 $as_echo_n "(cached) " >&6
6056else
6057 if test -n "$READELF"; then
6058 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6059else
6060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6061for as_dir in $PATH
6062do
6063 IFS=$as_save_IFS
6064 test -z "$as_dir" && as_dir=.
6065 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006067 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6069 break 2
6070 fi
6071done
6072 done
6073IFS=$as_save_IFS
6074
6075fi
6076fi
6077READELF=$ac_cv_prog_READELF
6078if test -n "$READELF"; then
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6080$as_echo "$READELF" >&6; }
6081else
6082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
6084fi
6085
6086
6087 test -n "$READELF" && break
6088 done
6089fi
6090if test -z "$READELF"; then
6091 ac_ct_READELF=$READELF
6092 for ac_prog in readelf
6093do
6094 # Extract the first word of "$ac_prog", so it can be a program name with args.
6095set dummy $ac_prog; ac_word=$2
6096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6097$as_echo_n "checking for $ac_word... " >&6; }
6098if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6099 $as_echo_n "(cached) " >&6
6100else
6101 if test -n "$ac_ct_READELF"; then
6102 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6103else
6104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105for as_dir in $PATH
6106do
6107 IFS=$as_save_IFS
6108 test -z "$as_dir" && as_dir=.
6109 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006111 ac_cv_prog_ac_ct_READELF="$ac_prog"
6112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113 break 2
6114 fi
6115done
6116 done
6117IFS=$as_save_IFS
6118
6119fi
6120fi
6121ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6122if test -n "$ac_ct_READELF"; then
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6124$as_echo "$ac_ct_READELF" >&6; }
6125else
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6127$as_echo "no" >&6; }
6128fi
6129
6130
6131 test -n "$ac_ct_READELF" && break
6132done
6133
6134 if test "x$ac_ct_READELF" = x; then
6135 READELF=":"
6136 else
6137 case $cross_compiling:$ac_tool_warned in
6138yes:)
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6141ac_tool_warned=yes ;;
6142esac
6143 READELF=$ac_ct_READELF
6144 fi
6145fi
6146
6147if test "$cross_compiling" = yes; then
6148 case "$READELF" in
6149 readelf|:)
6150 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6151 ;;
6152 esac
6153fi
6154
6155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006158hp*|HP*)
6159 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160 if test -z "$INSTALL"
6161 then
6162 INSTALL="${srcdir}/install-sh -c"
6163 fi
6164esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165# Find a good install program. We prefer a C program (faster),
6166# so one script is as good as another. But avoid the broken or
6167# incompatible versions:
6168# SysV /etc/install, /usr/sbin/install
6169# SunOS /usr/etc/install
6170# IRIX /sbin/install
6171# AIX /bin/install
6172# AmigaOS /C/install, which installs bootblocks on floppy discs
6173# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6174# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6175# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6176# OS/2's system install, which has a completely different semantic
6177# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178# Reject install programs that cannot install multiple files.
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6180$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006182if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184else
6185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6186for as_dir in $PATH
6187do
6188 IFS=$as_save_IFS
6189 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 # Account for people who put trailing slashes in PATH elements.
6191case $as_dir/ in #((
6192 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006193 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006194 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 /usr/ucb/* ) ;;
6196 *)
6197 # OSF1 and SCO ODT 3.0 have their own names for install.
6198 # Don't use installbsd from OSF since it installs stuff as root
6199 # by default.
6200 for ac_prog in ginstall scoinst install; do
6201 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006202 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 if test $ac_prog = install &&
6204 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6205 # AIX install. It has an incompatible calling convention.
6206 :
6207 elif test $ac_prog = install &&
6208 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6209 # program-specific install script used by HP pwplus--don't use.
6210 :
6211 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006212 rm -rf conftest.one conftest.two conftest.dir
6213 echo one > conftest.one
6214 echo two > conftest.two
6215 mkdir conftest.dir
6216 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6217 test -s conftest.one && test -s conftest.two &&
6218 test -s conftest.dir/conftest.one &&
6219 test -s conftest.dir/conftest.two
6220 then
6221 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6222 break 3
6223 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224 fi
6225 fi
6226 done
6227 done
6228 ;;
6229esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006230
6231 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232IFS=$as_save_IFS
6233
Matthias Kloseb9621712010-04-24 17:59:49 +00006234rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006235
6236fi
6237 if test "${ac_cv_path_install+set}" = set; then
6238 INSTALL=$ac_cv_path_install
6239 else
6240 # As a last resort, use the slow shell script. Don't cache a
6241 # value for INSTALL within a source directory, because that will
6242 # break other packages using the cache if that directory is
6243 # removed, or if the value is a relative name.
6244 INSTALL=$ac_install_sh
6245 fi
6246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6248$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249
6250# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6251# It thinks the first close brace ends the variable substitution.
6252test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6253
6254test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6255
6256test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6257
Matthias Klose93a0ef12012-03-15 18:08:34 +01006258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6259$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6260if test -z "$MKDIR_P"; then
6261 if ${ac_cv_path_mkdir+:} false; then :
6262 $as_echo_n "(cached) " >&6
6263else
6264 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6265for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6266do
6267 IFS=$as_save_IFS
6268 test -z "$as_dir" && as_dir=.
6269 for ac_prog in mkdir gmkdir; do
6270 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006271 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006272 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6273 'mkdir (GNU coreutils) '* | \
6274 'mkdir (coreutils) '* | \
6275 'mkdir (fileutils) '4.1*)
6276 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6277 break 3;;
6278 esac
6279 done
6280 done
6281 done
6282IFS=$as_save_IFS
6283
6284fi
6285
6286 test -d ./--version && rmdir ./--version
6287 if test "${ac_cv_path_mkdir+set}" = set; then
6288 MKDIR_P="$ac_cv_path_mkdir -p"
6289 else
6290 # As a last resort, use the slow shell script. Don't cache a
6291 # value for MKDIR_P within a source directory, because that will
6292 # break other packages using the cache if that directory is
6293 # removed, or if the value is a relative name.
6294 MKDIR_P="$ac_install_sh -d"
6295 fi
6296fi
6297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6298$as_echo "$MKDIR_P" >&6; }
6299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006300
6301# Not every filesystem supports hard links
6302
6303if test -z "$LN" ; then
6304 case $ac_sys_system in
6305 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306 *) LN=ln;;
6307 esac
6308fi
6309
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006310# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006311
6312ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006313
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6316$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317
6318# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006319if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 withval=$with_pydebug;
6321if test "$withval" != no
6322then
6323
Matthias Kloseb9621712010-04-24 17:59:49 +00006324$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
Matthias Kloseb9621712010-04-24 17:59:49 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6327$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006329 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006330else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
6333else
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336fi
6337
6338
Victor Stinnerf4e47032019-04-25 00:56:28 +02006339# Check for --with-trace-refs
6340# --with-trace-refs
6341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6342$as_echo_n "checking for --with-trace-refs... " >&6; }
6343
6344# Check whether --with-trace-refs was given.
6345if test "${with_trace_refs+set}" = set; then :
6346 withval=$with_trace_refs;
6347else
6348 with_trace_refs=no
6349fi
6350
6351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6352$as_echo "$with_trace_refs" >&6; }
6353
6354if test "$with_trace_refs" = "yes"
6355then
6356
6357$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6358
6359fi
6360
6361# Check for --with-assertions.
6362# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006363assertions='false'
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6365$as_echo_n "checking for --with-assertions... " >&6; }
6366
6367# Check whether --with-assertions was given.
6368if test "${with_assertions+set}" = set; then :
6369 withval=$with_assertions;
6370if test "$withval" != no
6371then
6372 assertions='true'
6373fi
6374fi
6375
6376if test "$assertions" = 'true'; then
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6378$as_echo "yes" >&6; }
6379elif test "$Py_DEBUG" = 'true'; then
6380 assertions='true'
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6382$as_echo "implied by --with-pydebug" >&6; }
6383else
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6385$as_echo "no" >&6; }
6386fi
6387
Brett Cannon63d98bc2016-09-06 17:12:40 -07006388# Enable optimization flags
6389
6390
6391Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6393$as_echo_n "checking for --enable-optimizations... " >&6; }
6394# Check whether --enable-optimizations was given.
6395if test "${enable_optimizations+set}" = set; then :
6396 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006397if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006398then
6399 Py_OPT='true'
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6401$as_echo "yes" >&6; };
6402else
6403 Py_OPT='false'
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405$as_echo "no" >&6; };
6406fi
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006413 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6414 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006415 # 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 +00006416 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006417 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006418 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006419 DEF_MAKE_RULE="build_all"
6420else
6421 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006422 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006423 DEF_MAKE_RULE="all"
6424fi
6425
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006426# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6427# normal names in the default $PATH (ie: Ubuntu). They exist under the
6428# non-suffixed name in their versioned llvm directory.
6429
6430llvm_bin_dir=''
6431llvm_path="${PATH}"
6432if test "${CC}" = "clang"
6433then
6434 clang_bin=`which clang`
6435 # Some systems install clang elsewhere as a symlink to the real path
6436 # which is where the related llvm tools are located.
6437 if test -L "${clang_bin}"
6438 then
6439 clang_dir=`dirname "${clang_bin}"`
6440 clang_bin=`readlink "${clang_bin}"`
6441 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6442 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6443 fi
6444fi
6445
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006446# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6448$as_echo_n "checking for --with-lto... " >&6; }
6449
6450# Check whether --with-lto was given.
6451if test "${with_lto+set}" = set; then :
6452 withval=$with_lto;
6453if test "$withval" != no
6454then
6455 Py_LTO='true'
6456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457$as_echo "yes" >&6; };
6458else
6459 Py_LTO='false'
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461$as_echo "no" >&6; };
6462fi
6463else
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
6466fi
6467
6468if test "$Py_LTO" = 'true' ; then
6469 case $CC in
6470 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006471
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006473$as_echo_n "checking target system type... " >&6; }
6474if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006475 $as_echo_n "(cached) " >&6
6476else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006477 if test "x$target_alias" = x; then
6478 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6481 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6482fi
6483
6484fi
6485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6486$as_echo "$ac_cv_target" >&6; }
6487case $ac_cv_target in
6488*-*-*) ;;
6489*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6490esac
6491target=$ac_cv_target
6492ac_save_IFS=$IFS; IFS='-'
6493set x $ac_cv_target
6494shift
6495target_cpu=$1
6496target_vendor=$2
6497shift; shift
6498# Remember, the first character of IFS is used to create $*,
6499# except with old shells:
6500target_os=$*
6501IFS=$ac_save_IFS
6502case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6503
6504
6505# The aliases save the names the user supplied, while $host etc.
6506# will get canonicalized.
6507test -n "$target_alias" &&
6508 test "$program_prefix$program_suffix$program_transform_name" = \
6509 NONENONEs,x,x, &&
6510 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006511# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6512set dummy $target_alias-llvm-ar; ac_word=$2
6513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6514$as_echo_n "checking for $ac_word... " >&6; }
6515if ${ac_cv_path_LLVM_AR+:} false; then :
6516 $as_echo_n "(cached) " >&6
6517else
6518 case $LLVM_AR in
6519 [\\/]* | ?:[\\/]*)
6520 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6521 ;;
6522 *)
6523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6524for as_dir in ${llvm_path}
6525do
6526 IFS=$as_save_IFS
6527 test -z "$as_dir" && as_dir=.
6528 for ac_exec_ext in '' $ac_executable_extensions; do
6529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6530 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6532 break 2
6533 fi
6534done
6535 done
6536IFS=$as_save_IFS
6537
6538 ;;
6539esac
6540fi
6541LLVM_AR=$ac_cv_path_LLVM_AR
6542if test -n "$LLVM_AR"; then
6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6544$as_echo "$LLVM_AR" >&6; }
6545else
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6547$as_echo "no" >&6; }
6548fi
6549
6550
6551if test -z "$ac_cv_path_LLVM_AR"; then
6552 if test "$build" = "$target"; then
6553 ac_pt_LLVM_AR=$LLVM_AR
6554 # Extract the first word of "llvm-ar", so it can be a program name with args.
6555set dummy llvm-ar; ac_word=$2
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6557$as_echo_n "checking for $ac_word... " >&6; }
6558if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6559 $as_echo_n "(cached) " >&6
6560else
6561 case $ac_pt_LLVM_AR in
6562 [\\/]* | ?:[\\/]*)
6563 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6564 ;;
6565 *)
6566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6567for as_dir in ${llvm_path}
6568do
6569 IFS=$as_save_IFS
6570 test -z "$as_dir" && as_dir=.
6571 for ac_exec_ext in '' $ac_executable_extensions; do
6572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6573 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6575 break 2
6576 fi
6577done
6578 done
6579IFS=$as_save_IFS
6580
6581 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6582 ;;
6583esac
6584fi
6585ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6586if test -n "$ac_pt_LLVM_AR"; then
6587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6588$as_echo "$ac_pt_LLVM_AR" >&6; }
6589else
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594 LLVM_AR=$ac_pt_LLVM_AR
6595 else
6596 LLVM_AR="''"
6597 fi
6598else
6599 LLVM_AR="$ac_cv_path_LLVM_AR"
6600fi
6601
6602
6603 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6604 then
6605 LLVM_AR_FOUND="found"
6606 else
6607 LLVM_AR_FOUND="not-found"
6608 fi
6609 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6610 then
6611 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6612 if test -n "${found_llvm_ar}"
6613 then
6614 LLVM_AR='/usr/bin/xcrun llvm-ar'
6615 LLVM_AR_FOUND=found
6616 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6617$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6618 fi
6619 fi
6620 if test $LLVM_AR_FOUND = not-found
6621 then
6622 LLVM_PROFR_ERR=yes
6623 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6624 else
6625 LLVM_AR_ERR=no
6626 fi
6627 AR="${LLVM_AR}"
6628 case $ac_sys_system in
6629 Darwin*)
6630 # Any changes made here should be reflected in the GCC+Darwin case below
6631 LTOFLAGS="-flto -Wl,-export_dynamic"
6632 ;;
6633 *)
6634 LTOFLAGS="-flto"
6635 ;;
6636 esac
6637 ;;
6638 *gcc*)
6639 case $ac_sys_system in
6640 Darwin*)
6641 LTOFLAGS="-flto -Wl,-export_dynamic"
6642 ;;
6643 *)
6644 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6645 ;;
6646 esac
6647 ;;
6648 esac
6649
6650 if test "$ac_cv_prog_cc_g" = "yes"
6651 then
6652 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6653 # to get debug symbols.
6654 LTOFLAGS="$LTOFLAGS -g"
6655 fi
6656
stratakisf92c7aa2018-12-04 15:54:01 +01006657 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006658 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006659fi
6660
6661# Enable PGO flags.
6662
6663
6664
6665
6666
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6669set dummy $target_alias-llvm-profdata; ac_word=$2
6670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6671$as_echo_n "checking for $ac_word... " >&6; }
6672if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6673 $as_echo_n "(cached) " >&6
6674else
6675 case $LLVM_PROFDATA in
6676 [\\/]* | ?:[\\/]*)
6677 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6678 ;;
6679 *)
6680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6681for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006682do
6683 IFS=$as_save_IFS
6684 test -z "$as_dir" && as_dir=.
6685 for ac_exec_ext in '' $ac_executable_extensions; do
6686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006687 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006688 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6689 break 2
6690 fi
6691done
6692 done
6693IFS=$as_save_IFS
6694
Gregory P. Smith799520c2016-09-07 16:10:00 -07006695 ;;
6696esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006697fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006698LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6699if test -n "$LLVM_PROFDATA"; then
6700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6701$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006702else
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6704$as_echo "no" >&6; }
6705fi
6706
6707
Gregory P. Smith799520c2016-09-07 16:10:00 -07006708if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6709 if test "$build" = "$target"; then
6710 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6711 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6712set dummy llvm-profdata; ac_word=$2
6713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6714$as_echo_n "checking for $ac_word... " >&6; }
6715if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6716 $as_echo_n "(cached) " >&6
6717else
6718 case $ac_pt_LLVM_PROFDATA in
6719 [\\/]* | ?:[\\/]*)
6720 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6721 ;;
6722 *)
6723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6724for as_dir in ${llvm_path}
6725do
6726 IFS=$as_save_IFS
6727 test -z "$as_dir" && as_dir=.
6728 for ac_exec_ext in '' $ac_executable_extensions; do
6729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6730 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6731 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6732 break 2
6733 fi
6734done
6735 done
6736IFS=$as_save_IFS
6737
6738 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6739 ;;
6740esac
6741fi
6742ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6743if test -n "$ac_pt_LLVM_PROFDATA"; then
6744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6745$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6746else
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6748$as_echo "no" >&6; }
6749fi
6750
6751 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6752 else
6753 LLVM_PROFDATA="''"
6754 fi
6755else
6756 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6757fi
6758
6759
6760if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6761then
6762 LLVM_PROF_FOUND="found"
6763else
6764 LLVM_PROF_FOUND="not-found"
6765fi
6766if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6767then
6768 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6769 if test -n "${found_llvm_profdata}"
6770 then
6771 # llvm-profdata isn't directly in $PATH in some cases.
6772 # https://apple.stackexchange.com/questions/197053/
6773 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6774 LLVM_PROF_FOUND=found
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6776$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6777 fi
6778fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779LLVM_PROF_ERR=no
6780case $CC in
6781 *clang*)
6782 # Any changes made here should be reflected in the GCC+Darwin case below
6783 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6784 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006785 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006786 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6787 if test $LLVM_PROF_FOUND = not-found
6788 then
6789 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006790 if test "${REQUIRE_PGO}" = "yes"
6791 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006792 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 -07006793 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006794 fi
6795 ;;
6796 *gcc*)
6797 case $ac_sys_system in
6798 Darwin*)
6799 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6800 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006801 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006802 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006803 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006804 then
6805 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006806 if test "${REQUIRE_PGO}" = "yes"
6807 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006808 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 -07006809 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006810 fi
6811 ;;
6812 *)
6813 PGO_PROF_GEN_FLAG="-fprofile-generate"
6814 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6815 LLVM_PROF_MERGER="true"
6816 LLVM_PROF_FILE=""
6817 ;;
6818 esac
6819 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006820 *icc*)
6821 PGO_PROF_GEN_FLAG="-prof-gen"
6822 PGO_PROF_USE_FLAG="-prof-use"
6823 LLVM_PROF_MERGER="true"
6824 LLVM_PROF_FILE=""
6825 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006826esac
6827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6829# merged with this chunk of code?
6830
6831# Optimizer/debugger flags
6832# ------------------------
6833# (The following bit of code is complicated enough - please keep things
6834# indented properly. Just pretend you're editing Python code. ;-)
6835
6836# There are two parallel sets of case statements below, one that checks to
6837# see if OPT was set and one that does BASECFLAGS setting based upon
6838# compiler and platform. BASECFLAGS tweaks need to be made even if the
6839# user set OPT.
6840
Victor Stinner23a683a2019-04-12 21:27:37 +02006841case $CC in
6842 *clang*)
6843 cc_is_clang=1
6844 ;;
6845 *)
6846 if $CC --version 2>&1 | grep -q clang
6847 then
6848 cc_is_clang=1
6849 else
6850 cc_is_clang=
6851 fi
6852esac
6853
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854# tweak OPT based on compiler and platform, only if the user didn't set
6855# it on the command line
6856
Victor Stinner9ed34a82017-05-02 22:35:58 +02006857
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006858if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859then
6860 case $GCC in
6861 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6863 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6864 WRAP="-fwrapv"
6865 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006866
Victor Stinner35f3d242017-04-21 12:35:24 +02006867 if test -n "${cc_is_clang}"
6868 then
6869 # Clang also needs -fwrapv
6870 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006871 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6872 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006873 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006874 fi
6875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876 case $ac_cv_prog_cc_g in
6877 yes)
6878 if test "$Py_DEBUG" = 'true' ; then
6879 # Optimization messes up debuggers, so turn it off for
6880 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006881 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006882 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006883 else
Victor Stinner28205b22017-04-21 11:24:34 +02006884 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006885 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 else
Victor Stinner28205b22017-04-21 11:24:34 +02006887 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006888 fi
6889 ;;
6890 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006891 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006892 ;;
6893 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006894
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006895 case $ac_sys_system in
6896 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6897 ;;
6898 esac
6899 ;;
6900
6901 *)
6902 OPT="-O"
6903 ;;
6904 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
6906
Victor Stinner23a683a2019-04-12 21:27:37 +02006907if test -n "${cc_is_clang}"
6908then
6909 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6910 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6911 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6912 # instruction which can lead to segmentation fault. Instruct clang that
6913 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6914 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6915 # on 16 bytes.
6916 #
Victor Stinnera304b132019-04-13 00:51:07 +02006917 # Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
Victor Stinner23a683a2019-04-12 21:27:37 +02006918 # since third party C extensions can have the same issue.
Victor Stinnera304b132019-04-13 00:51:07 +02006919 #
6920 # Check if -fmax-type-align flag is supported (it's not supported by old
6921 # clang versions):
6922 if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
6923 CFLAGS="$CFLAGS -fmax-type-align=8"
6924 fi
Victor Stinner23a683a2019-04-12 21:27:37 +02006925fi
6926
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006927
6928
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006929
stratakiscf10a752018-12-19 18:19:01 +01006930
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931# The -arch flags for universal builds on OSX
6932UNIVERSAL_ARCH_FLAGS=
6933
6934
6935# tweak BASECFLAGS based on compiler and platform
6936case $GCC in
6937yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006938 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006939
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6941$as_echo_n "checking for -Wextra... " >&6; }
6942 ac_save_cc="$CC"
6943 CC="$CC -Wextra -Werror"
6944 if ${ac_cv_extra_warnings+:} false; then :
6945 $as_echo_n "(cached) " >&6
6946else
6947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6948/* end confdefs.h. */
6949
6950
6951int
6952main ()
6953{
6954
6955 ;
6956 return 0;
6957}
6958
6959_ACEOF
6960if ac_fn_c_try_compile "$LINENO"; then :
6961
6962 ac_cv_extra_warnings=yes
6963
6964else
6965
6966 ac_cv_extra_warnings=no
6967
6968fi
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6970fi
6971
6972 CC="$ac_save_cc"
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6974$as_echo "$ac_cv_extra_warnings" >&6; }
6975
6976 if test $ac_cv_extra_warnings = yes
6977 then
6978 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6979 fi
6980
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981 # Python doesn't violate C99 aliasing rules, but older versions of
6982 # GCC produce warnings for legal Python code. Enable
6983 # -fno-strict-aliasing on versions of GCC that support but produce
6984 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6986$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006987 ac_save_cc="$CC"
6988 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006989 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006990 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006992else
Matthias Kloseb9621712010-04-24 17:59:49 +00006993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006994/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006995
Matthias Kloseb159a552010-04-25 21:00:44 +00006996
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006997int
6998main ()
6999{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007000
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007001 ;
7002 return 0;
7003}
Matthias Kloseb159a552010-04-25 21:00:44 +00007004
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007006if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007007
7008 CC="$ac_save_cc -fstrict-aliasing"
7009 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007011/* end confdefs.h. */
7012
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007013 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007014int
7015main ()
7016{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007017double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007018 ;
7019 return 0;
7020}
Matthias Kloseb159a552010-04-25 21:00:44 +00007021
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007023if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007024
7025 ac_cv_no_strict_aliasing=no
7026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007027else
Matthias Kloseb159a552010-04-25 21:00:44 +00007028
7029 ac_cv_no_strict_aliasing=yes
7030
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007033
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007034else
Matthias Kloseb159a552010-04-25 21:00:44 +00007035
7036 ac_cv_no_strict_aliasing=no
7037
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007038fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007040fi
7041
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007042 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7045$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007046 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047 then
7048 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7049 fi
7050
Zachary Ware5af85642015-12-21 12:09:17 -06007051 # ICC doesn't recognize the option, but only emits a warning
7052 ## XXX does it emit an unused result warning and can it be disabled?
7053 case "$CC" in
7054 *icc*)
7055 ac_cv_disable_unused_result_warning=no
7056 ;;
7057 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7059$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7060 ac_save_cc="$CC"
7061 CC="$CC -Wunused-result -Werror"
7062 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007063 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007064 $as_echo_n "(cached) " >&6
7065else
7066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7067/* end confdefs.h. */
7068
7069
7070int
7071main ()
7072{
7073
7074 ;
7075 return 0;
7076}
7077
7078_ACEOF
7079if ac_fn_c_try_compile "$LINENO"; then :
7080
7081 ac_cv_disable_unused_result_warning=yes
7082
7083else
7084
7085 ac_cv_disable_unused_result_warning=no
7086
7087fi
7088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7089fi
7090
7091 CFLAGS="$save_CFLAGS"
7092 CC="$ac_save_cc"
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7094$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007095 ;;
7096 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007097
7098 if test $ac_cv_disable_unused_result_warning = yes
7099 then
7100 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007101 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7102 fi
7103
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7105$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7106 ac_save_cc="$CC"
7107 CC="$CC -Wunused-parameter -Werror"
7108 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7109 $as_echo_n "(cached) " >&6
7110else
7111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7112/* end confdefs.h. */
7113
7114
7115int
7116main ()
7117{
7118
7119 ;
7120 return 0;
7121}
7122
7123_ACEOF
7124if ac_fn_c_try_compile "$LINENO"; then :
7125
7126 ac_cv_disable_unused_parameter_warning=yes
7127
7128else
7129
7130 ac_cv_disable_unused_parameter_warning=no
7131
7132fi
7133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7134fi
7135
7136 CC="$ac_save_cc"
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7138$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7139
7140 if test $ac_cv_disable_unused_parameter_warning = yes
7141 then
7142 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7143 fi
7144
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7146$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7147 ac_save_cc="$CC"
7148 CC="$CC -Wmissing-field-initializers -Werror"
7149 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7150 $as_echo_n "(cached) " >&6
7151else
7152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7153/* end confdefs.h. */
7154
7155
7156int
7157main ()
7158{
7159
7160 ;
7161 return 0;
7162}
7163
7164_ACEOF
7165if ac_fn_c_try_compile "$LINENO"; then :
7166
7167 ac_cv_disable_missing_field_initializers=yes
7168
7169else
7170
7171 ac_cv_disable_missing_field_initializers=no
7172
7173fi
7174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7175fi
7176
7177 CC="$ac_save_cc"
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7179$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7180
7181 if test $ac_cv_disable_missing_field_initializers = yes
7182 then
7183 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007184 fi
7185
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7187$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7188 ac_save_cc="$CC"
7189 CC="$CC -Wsign-compare"
7190 save_CFLAGS="$CFLAGS"
7191 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7192 $as_echo_n "(cached) " >&6
7193else
7194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7195/* end confdefs.h. */
7196
7197
7198int
7199main ()
7200{
7201
7202 ;
7203 return 0;
7204}
7205
7206_ACEOF
7207if ac_fn_c_try_compile "$LINENO"; then :
7208
7209 ac_cv_enable_sign_compare_warning=yes
7210
7211else
7212
7213 ac_cv_enable_sign_compare_warning=no
7214
7215fi
7216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7217fi
7218
7219 CFLAGS="$save_CFLAGS"
7220 CC="$ac_save_cc"
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7222$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7223
7224 if test $ac_cv_enable_sign_compare_warning = yes
7225 then
7226 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7227 fi
7228
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7230$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7231 ac_save_cc="$CC"
7232 CC="$CC -Wunreachable-code"
7233 save_CFLAGS="$CFLAGS"
7234 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7235 $as_echo_n "(cached) " >&6
7236else
7237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7238/* end confdefs.h. */
7239
7240
7241int
7242main ()
7243{
7244
7245 ;
7246 return 0;
7247}
7248
7249_ACEOF
7250if ac_fn_c_try_compile "$LINENO"; then :
7251
7252 ac_cv_enable_unreachable_code_warning=yes
7253
7254else
7255
7256 ac_cv_enable_unreachable_code_warning=no
7257
7258fi
7259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7260fi
7261
7262 CFLAGS="$save_CFLAGS"
7263 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007264
7265 # Don't enable unreachable code warning in debug mode, since it usually
7266 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007267 # Issue #24324: Unfortunately, the unreachable code warning does not work
7268 # correctly on gcc and has been silently removed from the compiler.
7269 # It is supported on clang but on OS X systems gcc may be an alias
7270 # for clang. Try to determine if the compiler is not really gcc and,
7271 # if so, only then enable the warning.
7272 if test $ac_cv_enable_unreachable_code_warning = yes && \
7273 test "$Py_DEBUG" != "true" && \
7274 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007275 then
7276 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007277 else
7278 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007279 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7281$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007282
INADA Naokie3364842018-06-05 20:40:53 +09007283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7284$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7285 ac_save_cc="$CC"
7286 CC="$CC -Werror -Wstrict-prototypes"
7287 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7288 $as_echo_n "(cached) " >&6
7289else
7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291/* end confdefs.h. */
7292
7293
7294int
7295main ()
7296{
7297
7298 ;
7299 return 0;
7300}
7301
7302_ACEOF
7303if ac_fn_c_try_compile "$LINENO"; then :
7304
7305 ac_cv_enable_strict_prototypes_warning=yes
7306
7307else
7308
7309 ac_cv_enable_strict_prototypes_warning=no
7310
7311fi
7312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7313fi
7314
7315 CC="$ac_save_cc"
7316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7317$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7318
7319 if test $ac_cv_enable_strict_prototypes_warning = yes
7320 then
7321 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7322 fi
7323
Victor Stinner193ee0a2017-02-06 14:24:00 +01007324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7325$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7326 ac_save_cc="$CC"
7327 CC="$CC -Werror=implicit-function-declaration"
7328 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7329 $as_echo_n "(cached) " >&6
7330else
7331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7332/* end confdefs.h. */
7333
7334
7335int
7336main ()
7337{
7338
7339 ;
7340 return 0;
7341}
7342
7343_ACEOF
7344if ac_fn_c_try_compile "$LINENO"; then :
7345
7346 ac_cv_enable_implicit_function_declaration_error=yes
7347
7348else
7349
7350 ac_cv_enable_implicit_function_declaration_error=no
7351
7352fi
7353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7354fi
7355
7356 CC="$ac_save_cc"
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7358$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7359
7360 if test $ac_cv_enable_implicit_function_declaration_error = yes
7361 then
7362 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7363 fi
7364
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007365 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7366 # support. Without this, treatment of subnormals doesn't follow
7367 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007368 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369 alpha*)
7370 BASECFLAGS="$BASECFLAGS -mieee"
7371 ;;
7372 esac
7373
7374 case $ac_sys_system in
7375 SCO_SV*)
7376 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7377 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007378
Ned Deily87adb6e2013-10-18 21:09:56 -07007379 Darwin*)
7380 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7381 # used to be here, but non-Apple gcc doesn't accept them.
7382 if test "${CC}" = gcc
7383 then
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007385$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 case "${UNIVERSALSDK}" in
7387 */MacOSX10.4u.sdk)
7388 # Build using 10.4 SDK, force usage of gcc when the
7389 # compiler is gcc, otherwise the user will get very
7390 # confusing error messages when building on OSX 10.6
7391 CC=gcc-4.0
7392 CPP=cpp-4.0
7393 ;;
7394 esac
7395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007396$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007397 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 if test "${enable_universalsdk}"
7400 then
7401 case "$UNIVERSAL_ARCHS" in
7402 32-bit)
7403 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7404 LIPO_32BIT_FLAGS=""
7405 ARCH_RUN_32BIT=""
7406 ;;
7407 64-bit)
7408 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7409 LIPO_32BIT_FLAGS=""
7410 ARCH_RUN_32BIT="true"
7411 ;;
7412 all)
7413 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7414 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7415 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7416 ;;
7417 intel)
7418 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7419 LIPO_32BIT_FLAGS="-extract i386"
7420 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7421 ;;
7422 intel-32)
7423 UNIVERSAL_ARCH_FLAGS="-arch i386"
7424 LIPO_32BIT_FLAGS=""
7425 ARCH_RUN_32BIT=""
7426 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007427 intel-64)
7428 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7429 LIPO_32BIT_FLAGS=""
7430 ARCH_RUN_32BIT="true"
7431 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 3-way)
7433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7436 ;;
7437 *)
7438 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7439 ;;
7440 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441
Ned Deily87adb6e2013-10-18 21:09:56 -07007442 if test "${UNIVERSALSDK}" != "/"
7443 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007444 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7445 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007446 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007447 else
7448 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7449 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 fi
7451 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 # Calculate an appropriate deployment target for this build:
7454 # The deployment target value is used explicitly to enable certain
7455 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007456 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 # component of the string returned by distutils.get_platform().
7458 #
7459 # Use the value from:
7460 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7461 # 2. the operating system version of the build machine if >= 10.6
7462 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7463 # below to pick either 10.3, 10.4, or 10.5 as the target.
7464 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465
Ned Deily87adb6e2013-10-18 21:09:56 -07007466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7467$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007468 cur_target_major=`sw_vers -productVersion | \
7469 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7470 cur_target_minor=`sw_vers -productVersion | \
7471 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7472 cur_target="${cur_target_major}.${cur_target_minor}"
7473 if test ${cur_target_major} -eq 10 && \
7474 test ${cur_target_minor} -ge 3 && \
7475 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007476 then
Ned Deily36820b62014-06-25 13:44:22 -07007477 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007478 cur_target=10.3
7479 if test ${enable_universalsdk}
7480 then
7481 case "$UNIVERSAL_ARCHS" in
7482 all|3-way|intel|64-bit)
7483 # These configurations were first supported in 10.5
7484 cur_target='10.5'
7485 ;;
7486 esac
7487 else
7488 if test `/usr/bin/arch` = "i386"
7489 then
7490 # 10.4 was the first release to support Intel archs
7491 cur_target="10.4"
7492 fi
7493 fi
7494 fi
7495 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007496
Ned Deily87adb6e2013-10-18 21:09:56 -07007497 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7498 # environment with a value that is the same as what we'll use
7499 # in the Makefile to ensure that we'll get the same compiler
7500 # environment during configure and build time.
7501 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7502 export MACOSX_DEPLOYMENT_TARGET
7503 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7505$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007506
Ned Deily87adb6e2013-10-18 21:09:56 -07007507 # end of Darwin* tests
7508 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509 esac
7510 ;;
7511
7512*)
7513 case $ac_sys_system in
7514 OpenUNIX*|UnixWare*)
7515 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7516 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517 SCO_SV*)
7518 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7519 ;;
7520 esac
7521 ;;
7522esac
7523
Zachary Ware5af85642015-12-21 12:09:17 -06007524# ICC needs -fp-model strict or floats behave badly
7525case "$CC" in
7526*icc*)
7527 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7528 ;;
7529esac
7530
T. Woutersddbfa2c2017-05-23 01:30:49 +02007531if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532 :
7533else
7534 OPT="-DNDEBUG $OPT"
7535fi
7536
7537if test "$ac_arch_flags"
7538then
7539 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7540fi
7541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542# On some compilers, pthreads are available without further options
7543# (e.g. MacOS X). On some of these systems, the compiler will not
7544# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7545# So we have to see first whether pthreads are available without
7546# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7548$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007549if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551else
Matthias Kloseb9621712010-04-24 17:59:49 +00007552 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 ac_cv_pthread_is_default=no
7554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556/* end confdefs.h. */
7557
Stefan Krah7dba5942012-11-22 22:49:11 +01007558#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559#include <pthread.h>
7560
7561void* routine(void* p){return NULL;}
7562
7563int main(){
7564 pthread_t p;
7565 if(pthread_create(&p,NULL,routine,NULL)!=0)
7566 return 1;
7567 (void)pthread_detach(p);
7568 return 0;
7569}
7570
7571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007572if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007573
7574 ac_cv_pthread_is_default=yes
7575 ac_cv_kthread=no
7576 ac_cv_pthread=no
7577
7578else
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7582 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583fi
7584
7585
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
7587
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7589$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590
7591
7592if test $ac_cv_pthread_is_default = yes
7593then
7594 ac_cv_kpthread=no
7595else
7596# -Kpthread, if available, provides the right #defines
7597# and linker options to make pthread_create available
7598# Some compilers won't report that they do not support -Kpthread,
7599# so we need to run a program to see whether it really made the
7600# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7602$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007603if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605else
7606 ac_save_cc="$CC"
7607CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007608if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609 ac_cv_kpthread=no
7610else
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612/* end confdefs.h. */
7613
Stefan Krah7dba5942012-11-22 22:49:11 +01007614#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615#include <pthread.h>
7616
7617void* routine(void* p){return NULL;}
7618
7619int main(){
7620 pthread_t p;
7621 if(pthread_create(&p,NULL,routine,NULL)!=0)
7622 return 1;
7623 (void)pthread_detach(p);
7624 return 0;
7625}
7626
7627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629 ac_cv_kpthread=yes
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
7636
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637CC="$ac_save_cc"
7638fi
7639
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7641$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642fi
7643
7644if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7645then
7646# -Kthread, if available, provides the right #defines
7647# and linker options to make pthread_create available
7648# Some compilers won't report that they do not support -Kthread,
7649# so we need to run a program to see whether it really made the
7650# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7652$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007653if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007654 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655else
7656 ac_save_cc="$CC"
7657CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007658if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659 ac_cv_kthread=no
7660else
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662/* end confdefs.h. */
7663
Stefan Krah7dba5942012-11-22 22:49:11 +01007664#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665#include <pthread.h>
7666
7667void* routine(void* p){return NULL;}
7668
7669int main(){
7670 pthread_t p;
7671 if(pthread_create(&p,NULL,routine,NULL)!=0)
7672 return 1;
7673 (void)pthread_detach(p);
7674 return 0;
7675}
7676
7677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679 ac_cv_kthread=yes
7680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685fi
7686
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007687CC="$ac_save_cc"
7688fi
7689
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7691$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007692fi
7693
7694if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7695then
7696# -pthread, if available, provides the right #defines
7697# and linker options to make pthread_create available
7698# Some compilers won't report that they do not support -pthread,
7699# so we need to run a program to see whether it really made the
7700# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7702$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007703if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007704 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705else
7706 ac_save_cc="$CC"
7707CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007708if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709 ac_cv_pthread=no
7710else
Matthias Kloseb9621712010-04-24 17:59:49 +00007711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712/* end confdefs.h. */
7713
Stefan Krah7dba5942012-11-22 22:49:11 +01007714#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007715#include <pthread.h>
7716
7717void* routine(void* p){return NULL;}
7718
7719int main(){
7720 pthread_t p;
7721 if(pthread_create(&p,NULL,routine,NULL)!=0)
7722 return 1;
7723 (void)pthread_detach(p);
7724 return 0;
7725}
7726
7727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007729 ac_cv_pthread=yes
7730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735fi
7736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737CC="$ac_save_cc"
7738fi
7739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7741$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007742fi
7743
7744# If we have set a CC compiler flag for thread support then
7745# check if it works for CXX, too.
7746ac_cv_cxx_thread=no
7747if test ! -z "$CXX"
7748then
Matthias Kloseb9621712010-04-24 17:59:49 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7750$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007751ac_save_cxx="$CXX"
7752
7753if test "$ac_cv_kpthread" = "yes"
7754then
7755 CXX="$CXX -Kpthread"
7756 ac_cv_cxx_thread=yes
7757elif test "$ac_cv_kthread" = "yes"
7758then
7759 CXX="$CXX -Kthread"
7760 ac_cv_cxx_thread=yes
7761elif test "$ac_cv_pthread" = "yes"
7762then
7763 CXX="$CXX -pthread"
7764 ac_cv_cxx_thread=yes
7765fi
7766
7767if test $ac_cv_cxx_thread = yes
7768then
7769 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7770 $CXX -c conftest.$ac_ext 2>&5
7771 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7772 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7773 then
7774 ac_cv_cxx_thread=yes
7775 else
7776 ac_cv_cxx_thread=no
7777 fi
7778 rm -fr conftest*
7779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7781$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782fi
7783CXX="$ac_save_cxx"
7784
7785
7786# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7788$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007789if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007790 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793/* end confdefs.h. */
7794#include <stdlib.h>
7795#include <stdarg.h>
7796#include <string.h>
7797#include <float.h>
7798
7799int
7800main ()
7801{
7802
7803 ;
7804 return 0;
7805}
7806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007807if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808 ac_cv_header_stdc=yes
7809else
Matthias Kloseb9621712010-04-24 17:59:49 +00007810 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7813
7814if test $ac_cv_header_stdc = yes; then
7815 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817/* end confdefs.h. */
7818#include <string.h>
7819
7820_ACEOF
7821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $EGREP "memchr" >/dev/null 2>&1; then :
7823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824else
7825 ac_cv_header_stdc=no
7826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007827rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828
7829fi
7830
7831if test $ac_cv_header_stdc = yes; then
7832 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007834/* end confdefs.h. */
7835#include <stdlib.h>
7836
7837_ACEOF
7838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007839 $EGREP "free" >/dev/null 2>&1; then :
7840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841else
7842 ac_cv_header_stdc=no
7843fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007844rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007845
7846fi
7847
7848if test $ac_cv_header_stdc = yes; then
7849 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007851 :
7852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854/* end confdefs.h. */
7855#include <ctype.h>
7856#include <stdlib.h>
7857#if ((' ' & 0x0FF) == 0x020)
7858# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7859# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7860#else
7861# define ISLOWER(c) \
7862 (('a' <= (c) && (c) <= 'i') \
7863 || ('j' <= (c) && (c) <= 'r') \
7864 || ('s' <= (c) && (c) <= 'z'))
7865# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7866#endif
7867
7868#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7869int
7870main ()
7871{
7872 int i;
7873 for (i = 0; i < 256; i++)
7874 if (XOR (islower (i), ISLOWER (i))
7875 || toupper (i) != TOUPPER (i))
7876 return 2;
7877 return 0;
7878}
7879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007880if ac_fn_c_try_run "$LINENO"; then :
7881
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007882else
Matthias Kloseb9621712010-04-24 17:59:49 +00007883 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007887fi
7888
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007889fi
7890fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7892$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007893if test $ac_cv_header_stdc = yes; then
7894
Matthias Kloseb9621712010-04-24 17:59:49 +00007895$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007896
7897fi
7898
stratakise768c862018-01-23 16:11:24 +01007899for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007900fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007901ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007902sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007903utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007904poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007905sys/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 +01007906sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007907sys/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 +01007908sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007909sys/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 -07007910libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007911linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007912sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007913do :
7914 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7915ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007916if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007917 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007918#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007919_ACEOF
7920
7921fi
7922
Guido van Rossum627b2d71993-12-24 10:39:16 +00007923done
7924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007925ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007926for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7929$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007930if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007932else
Matthias Kloseb9621712010-04-24 17:59:49 +00007933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007934/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007935#include <sys/types.h>
7936#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007937
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
7941if ((DIR *) 0)
7942return 0;
7943 ;
7944 return 0;
7945}
7946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007949else
Matthias Kloseb9621712010-04-24 17:59:49 +00007950 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007954eval ac_res=\$$as_ac_Header
7955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7956$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007957if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007959#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007960_ACEOF
7961
7962ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007963fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007965done
7966# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7967if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7969$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007970if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972else
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977/* Override any GCC internal prototype to avoid an error.
7978 Use char because int might match the return type of a GCC
7979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007980#ifdef __cplusplus
7981extern "C"
7982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007983char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007984int
7985main ()
7986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007988 ;
7989 return 0;
7990}
7991_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992for ac_lib in '' dir; do
7993 if test -z "$ac_lib"; then
7994 ac_res="none required"
7995 else
7996 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007997 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007999 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002rm -f core conftest.err conftest.$ac_objext \
8003 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008004 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007done
Victor Stinnere0be4232011-10-25 13:06:09 +02008008if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008009
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010else
8011 ac_cv_search_opendir=no
8012fi
8013rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008014LIBS=$ac_func_search_save_LIBS
8015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8017$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008019if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008022fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008023
Michael W. Hudson54241132001-12-07 15:38:26 +00008024else
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8026$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008027if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008029else
8030 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008032/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034/* Override any GCC internal prototype to avoid an error.
8035 Use char because int might match the return type of a GCC
8036 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008037#ifdef __cplusplus
8038extern "C"
8039#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008040char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 ;
8046 return 0;
8047}
8048_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049for ac_lib in '' x; do
8050 if test -z "$ac_lib"; then
8051 ac_res="none required"
8052 else
8053 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008055 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008058fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008059rm -f core conftest.err conftest.$ac_objext \
8060 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008061 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008062 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008064done
Victor Stinnere0be4232011-10-25 13:06:09 +02008065if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008066
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008067else
8068 ac_cv_search_opendir=no
8069fi
8070rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008071LIBS=$ac_func_search_save_LIBS
8072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8074$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008075ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008076if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079fi
8080
8081fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8084$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008085if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008087else
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008090#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008091int
8092main ()
8093{
8094return makedev(0, 0);
8095 ;
8096 return 0;
8097}
8098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008099if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008100 ac_cv_header_sys_types_h_makedev=yes
8101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008104rm -f core conftest.err conftest.$ac_objext \
8105 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008106
8107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8109$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008110
8111if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008112ac_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 +02008113if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008116
8117fi
8118
8119
8120
8121 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 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 +02008123if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008124
Matthias Kloseb9621712010-04-24 17:59:49 +00008125$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008126
8127fi
8128
8129
8130 fi
8131fi
8132
Michael W. Hudson54241132001-12-07 15:38:26 +00008133
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008134# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8135# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8136SAVE_CFLAGS=$CFLAGS
8137CFLAGS="-std=c99 $CFLAGS"
8138for ac_header in bluetooth/bluetooth.h
8139do :
8140 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8141if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8142 cat >>confdefs.h <<_ACEOF
8143#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8144_ACEOF
8145
8146fi
8147
8148done
8149
8150CFLAGS=$SAVE_CFLAGS
8151
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008152# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8153for ac_header in net/if.h
8154do :
8155 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8156#ifdef STDC_HEADERS
8157# include <stdlib.h>
8158# include <stddef.h>
8159#else
8160# ifdef HAVE_STDLIB_H
8161# include <stdlib.h>
8162# endif
8163#endif
8164#ifdef HAVE_SYS_SOCKET_H
8165# include <sys/socket.h>
8166#endif
8167
8168"
Victor Stinnere0be4232011-10-25 13:06:09 +02008169if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008170 cat >>confdefs.h <<_ACEOF
8171#define HAVE_NET_IF_H 1
8172_ACEOF
8173
8174fi
8175
8176done
8177
8178
Martin v. Löwis11017b12006-01-14 18:12:57 +00008179# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008180for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008181do :
8182 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 +00008183#ifdef HAVE_ASM_TYPES_H
8184#include <asm/types.h>
8185#endif
8186#ifdef HAVE_SYS_SOCKET_H
8187#include <sys/socket.h>
8188#endif
8189
Matthias Kloseb9621712010-04-24 17:59:49 +00008190"
Victor Stinnere0be4232011-10-25 13:06:09 +02008191if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008193#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008194_ACEOF
8195
8196fi
8197
8198done
8199
8200
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008201# On Linux, qrtr.h requires asm/types.h
8202for ac_header in linux/qrtr.h
8203do :
8204 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8205#ifdef HAVE_ASM_TYPES_H
8206#include <asm/types.h>
8207#endif
8208#ifdef HAVE_SYS_SOCKET_H
8209#include <sys/socket.h>
8210#endif
8211
8212"
8213if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8214 cat >>confdefs.h <<_ACEOF
8215#define HAVE_LINUX_QRTR_H 1
8216_ACEOF
8217
8218fi
8219
8220done
8221
8222
caaveryeffc12f2017-09-06 18:18:10 -04008223for ac_header in linux/vm_sockets.h
8224do :
8225 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8226#ifdef HAVE_SYS_SOCKET_H
8227#include <sys/socket.h>
8228#endif
8229
8230"
8231if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8232 cat >>confdefs.h <<_ACEOF
8233#define HAVE_LINUX_VM_SOCKETS_H 1
8234_ACEOF
8235
8236fi
8237
8238done
8239
8240
Charles-François Natali47413c12011-10-06 19:47:44 +02008241# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008242for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008243do :
8244 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8245ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8246#ifdef HAVE_SYS_SOCKET_H
8247#include <sys/socket.h>
8248#endif
8249
8250"
8251if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8252 cat >>confdefs.h <<_ACEOF
8253#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8254_ACEOF
8255
8256fi
8257
8258done
8259
8260
Guido van Rossum627b2d71993-12-24 10:39:16 +00008261# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008262was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8264$as_echo_n "checking for clock_t in time.h... " >&6; }
8265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008267#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
8269_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008272 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008273else
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
8275
Matthias Kloseb9621712010-04-24 17:59:49 +00008276$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008277
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008278
Guido van Rossum627b2d71993-12-24 10:39:16 +00008279fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008280rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008281
Matthias Kloseb9621712010-04-24 17:59:49 +00008282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8283$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8286$as_echo_n "checking for makedev... " >&6; }
8287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008288/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008289
Jesus Cea740f53a2010-04-28 11:35:30 +00008290#if defined(MAJOR_IN_MKDEV)
8291#include <sys/mkdev.h>
8292#elif defined(MAJOR_IN_SYSMACROS)
8293#include <sys/sysmacros.h>
8294#else
8295#include <sys/types.h>
8296#endif
8297
Neal Norwitz11690112002-07-30 01:08:28 +00008298int
8299main ()
8300{
Jesus Cea740f53a2010-04-28 11:35:30 +00008301
8302 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008303 ;
8304 return 0;
8305}
Matthias Kloseb159a552010-04-25 21:00:44 +00008306
Neal Norwitz11690112002-07-30 01:08:28 +00008307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008308if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008309 ac_cv_has_makedev=yes
8310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313rm -f core conftest.err conftest.$ac_objext \
8314 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8316$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008317if test "$ac_cv_has_makedev" = "yes"; then
8318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008320
8321fi
8322
Christian Heimes985ecdc2013-11-20 11:46:18 +01008323# byte swapping
8324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8325$as_echo_n "checking for le64toh... " >&6; }
8326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8327/* end confdefs.h. */
8328
8329#ifdef HAVE_ENDIAN_H
8330#include <endian.h>
8331#elif defined(HAVE_SYS_ENDIAN_H)
8332#include <sys/endian.h>
8333#endif
8334
8335int
8336main ()
8337{
8338
8339 le64toh(1)
8340 ;
8341 return 0;
8342}
8343
8344_ACEOF
8345if ac_fn_c_try_link "$LINENO"; then :
8346 ac_cv_has_le64toh=yes
8347else
8348 ac_cv_has_le64toh=no
8349fi
8350rm -f core conftest.err conftest.$ac_objext \
8351 conftest$ac_exeext conftest.$ac_ext
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8353$as_echo "$ac_cv_has_le64toh" >&6; }
8354if test "$ac_cv_has_le64toh" = "yes"; then
8355
8356$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8357
8358fi
8359
Martin v. Löwis399a6892002-10-04 10:22:02 +00008360use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008361# Don't use largefile support for GNU/Hurd
8362case $ac_sys_system in GNU*)
8363 use_lfs=no
8364esac
8365
Martin v. Löwis399a6892002-10-04 10:22:02 +00008366if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008367# Two defines needed to enable largefile support on various platforms
8368# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008369case $ac_sys_system/$ac_sys_release in
8370AIX*)
8371
8372$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8373
8374 ;;
8375esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008381
Martin v. Löwis399a6892002-10-04 10:22:02 +00008382fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008383
Guido van Rossum84e7b241996-08-19 21:59:00 +00008384# Add some code to confdefs.h so that the test for off_t works on SCO
8385cat >> confdefs.h <<\EOF
8386#if defined(SCO_DS)
8387#undef _OFF_T
8388#endif
8389EOF
8390
Guido van Rossumef2255b2000-03-10 22:30:29 +00008391# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008392ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008393if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008394
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008395else
Martin v. Löwis11437992002-04-12 09:54:03 +00008396
8397cat >>confdefs.h <<_ACEOF
8398#define mode_t int
8399_ACEOF
8400
8401fi
8402
Matthias Kloseb9621712010-04-24 17:59:49 +00008403ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008404if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008405
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406else
Martin v. Löwis11437992002-04-12 09:54:03 +00008407
8408cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008410_ACEOF
8411
8412fi
8413
Matthias Kloseb9621712010-04-24 17:59:49 +00008414ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008415if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008416
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008417else
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
8419cat >>confdefs.h <<_ACEOF
8420#define pid_t int
8421_ACEOF
8422
8423fi
8424
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008425
Martin v. Löwis11437992002-04-12 09:54:03 +00008426cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008427#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008431if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008433else
Martin v. Löwis11437992002-04-12 09:54:03 +00008434
8435cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008437_ACEOF
8438
8439fi
8440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8442$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008443if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008445else
Matthias Kloseb9621712010-04-24 17:59:49 +00008446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008447/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008449
8450_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008453 ac_cv_type_uid_t=yes
8454else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008455 ac_cv_type_uid_t=no
8456fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008457rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008458
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008459fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8461$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008462if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008463
Matthias Kloseb9621712010-04-24 17:59:49 +00008464$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008465
8466
Matthias Kloseb9621712010-04-24 17:59:49 +00008467$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008468
8469fi
8470
Mark Dickinson983bc162012-12-02 12:11:38 +00008471
Matthias Kloseb9621712010-04-24 17:59:49 +00008472ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008473if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474
Matthias Kloseb9621712010-04-24 17:59:49 +00008475$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008476
8477fi
8478
Stefan Krah1919b7e2012-03-21 18:25:23 +01008479ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8480if test "x$ac_cv_type___uint128_t" = xyes; then :
8481
8482$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8483
8484fi
8485
Jack Jansendd19cf82001-12-06 22:36:17 +00008486
Michael W. Hudson54241132001-12-07 15:38:26 +00008487# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008488# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008489# The cast to long int works around a bug in the HP C Compiler
8490# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8491# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8492# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8494$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008495if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008496 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008497else
Matthias Kloseb9621712010-04-24 17:59:49 +00008498 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 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 if test "$ac_cv_type_int" = yes; then
8502 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8503$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008504as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008505See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 else
8507 ac_cv_sizeof_int=0
8508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008510
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8513$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514
8515
8516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008518#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008519_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008520
8521
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522# The cast to long int works around a bug in the HP C Compiler
8523# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8524# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8525# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8527$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008528if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008529 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008530else
Matthias Kloseb9621712010-04-24 17:59:49 +00008531 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 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533else
Matthias Kloseb9621712010-04-24 17:59:49 +00008534 if test "$ac_cv_type_long" = yes; then
8535 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008537as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008538See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 else
8540 ac_cv_sizeof_long=0
8541 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008543
Martin v. Löwis11437992002-04-12 09:54:03 +00008544fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8546$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008547
8548
8549
Martin v. Löwis11437992002-04-12 09:54:03 +00008550cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008551#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008552_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008553
8554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555# The cast to long int works around a bug in the HP C Compiler
8556# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8557# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8558# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8560$as_echo_n "checking size of long long... " >&6; }
8561if ${ac_cv_sizeof_long_long+:} false; then :
8562 $as_echo_n "(cached) " >&6
8563else
8564 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8565
8566else
8567 if test "$ac_cv_type_long_long" = yes; then
8568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8570as_fn_error 77 "cannot compute sizeof (long long)
8571See \`config.log' for more details" "$LINENO" 5; }
8572 else
8573 ac_cv_sizeof_long_long=0
8574 fi
8575fi
8576
8577fi
8578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8579$as_echo "$ac_cv_sizeof_long_long" >&6; }
8580
8581
8582
8583cat >>confdefs.h <<_ACEOF
8584#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8585_ACEOF
8586
8587
8588# The cast to long int works around a bug in the HP C Compiler
8589# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8590# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8591# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8593$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008594if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008595 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008596else
Matthias Kloseb9621712010-04-24 17:59:49 +00008597 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 +00008598
Martin v. Löwis11437992002-04-12 09:54:03 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 if test "$ac_cv_type_void_p" = yes; then
8601 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008603as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008604See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605 else
8606 ac_cv_sizeof_void_p=0
8607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008609
Martin v. Löwis11437992002-04-12 09:54:03 +00008610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8612$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613
8614
8615
Martin v. Löwis11437992002-04-12 09:54:03 +00008616cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008617#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008618_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008619
8620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008621# The cast to long int works around a bug in the HP C Compiler
8622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8624# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8626$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008627if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008629else
Matthias Kloseb9621712010-04-24 17:59:49 +00008630 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 +00008631
Martin v. Löwis11437992002-04-12 09:54:03 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 if test "$ac_cv_type_short" = yes; then
8634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008636as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008637See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 else
8639 ac_cv_sizeof_short=0
8640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8645$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008646
8647
8648
Martin v. Löwis11437992002-04-12 09:54:03 +00008649cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008650#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008651_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008652
8653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008654# The cast to long int works around a bug in the HP C Compiler
8655# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8656# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8657# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8659$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008660if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008662else
Matthias Kloseb9621712010-04-24 17:59:49 +00008663 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 +00008664
Martin v. Löwis11437992002-04-12 09:54:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 if test "$ac_cv_type_float" = yes; then
8667 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008669as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008670See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671 else
8672 ac_cv_sizeof_float=0
8673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8678$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679
8680
8681
Martin v. Löwis11437992002-04-12 09:54:03 +00008682cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008683#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008684_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008685
8686
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687# The cast to long int works around a bug in the HP C Compiler
8688# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8689# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8690# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8692$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008694 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008695else
Matthias Kloseb9621712010-04-24 17:59:49 +00008696 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 +00008697
Martin v. Löwis11437992002-04-12 09:54:03 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 if test "$ac_cv_type_double" = yes; then
8700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008702as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008703See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008704 else
8705 ac_cv_sizeof_double=0
8706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8711$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008712
8713
8714
Martin v. Löwis11437992002-04-12 09:54:03 +00008715cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008716#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008717_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008718
8719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8725$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 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 +00008730
Martin v. Löwis11437992002-04-12 09:54:03 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 if test "$ac_cv_type_fpos_t" = yes; then
8733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008735as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008736See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008737 else
8738 ac_cv_sizeof_fpos_t=0
8739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741
Martin v. Löwis11437992002-04-12 09:54:03 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8744$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008745
8746
8747
Martin v. Löwis11437992002-04-12 09:54:03 +00008748cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008749#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008750_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008751
Michael W. Hudson54241132001-12-07 15:38:26 +00008752
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008753# The cast to long int works around a bug in the HP C Compiler
8754# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8755# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8756# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8758$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 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 +00008763
Martin v. Löwis18e16552006-02-15 17:27:45 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 if test "$ac_cv_type_size_t" = yes; then
8766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008768as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008769See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770 else
8771 ac_cv_sizeof_size_t=0
8772 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774
Martin v. Löwis18e16552006-02-15 17:27:45 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8777$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778
8779
8780
Martin v. Löwis18e16552006-02-15 17:27:45 +00008781cat >>confdefs.h <<_ACEOF
8782#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8783_ACEOF
8784
8785
Christian Heimes400adb02008-02-01 08:12:03 +00008786# The cast to long int works around a bug in the HP C Compiler
8787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8789# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8791$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008793 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 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 +00008796
Christian Heimes400adb02008-02-01 08:12:03 +00008797else
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 if test "$ac_cv_type_pid_t" = yes; then
8799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008801as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008802See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008803 else
8804 ac_cv_sizeof_pid_t=0
8805 fi
8806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807
Christian Heimes400adb02008-02-01 08:12:03 +00008808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8810$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008811
8812
8813
8814cat >>confdefs.h <<_ACEOF
8815#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8816_ACEOF
8817
8818
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008819# The cast to long int works around a bug in the HP C Compiler
8820# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8821# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8822# This bug is HP SR number 8606223364.
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8824$as_echo_n "checking size of uintptr_t... " >&6; }
8825if ${ac_cv_sizeof_uintptr_t+:} false; then :
8826 $as_echo_n "(cached) " >&6
8827else
8828 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8829
8830else
8831 if test "$ac_cv_type_uintptr_t" = yes; then
8832 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8834as_fn_error 77 "cannot compute sizeof (uintptr_t)
8835See \`config.log' for more details" "$LINENO" 5; }
8836 else
8837 ac_cv_sizeof_uintptr_t=0
8838 fi
8839fi
8840
8841fi
8842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8843$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8844
8845
8846
8847cat >>confdefs.h <<_ACEOF
8848#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8849_ACEOF
8850
8851
Michael W. Hudson54241132001-12-07 15:38:26 +00008852
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008853
Eitan Adler3055c942018-05-15 22:58:09 -07008854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8855$as_echo_n "checking for long double... " >&6; }
8856if ${ac_cv_type_long_double+:} false; then :
8857 $as_echo_n "(cached) " >&6
8858else
8859 if test "$GCC" = yes; then
8860 ac_cv_type_long_double=yes
8861 else
8862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863/* end confdefs.h. */
8864/* The Stardent Vistra knows sizeof (long double), but does
8865 not support it. */
8866 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008867int
8868main ()
8869{
Eitan Adler3055c942018-05-15 22:58:09 -07008870static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8871 sizeof (double) <= sizeof (long double))];
8872test_array [0] = 0;
8873return test_array [0];
8874
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008875 ;
8876 return 0;
8877}
8878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008879if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008880 ac_cv_type_long_double=yes
8881else
8882 ac_cv_type_long_double=no
8883fi
8884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8885 fi
8886fi
8887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8888$as_echo "$ac_cv_type_long_double" >&6; }
8889 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008890
Matthias Kloseb9621712010-04-24 17:59:49 +00008891$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008892
Eitan Adler3055c942018-05-15 22:58:09 -07008893 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008894
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008895# The cast to long int works around a bug in the HP C Compiler
8896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8900$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008901if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 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 +00008905
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 if test "$ac_cv_type_long_double" = yes; then
8908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008910as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008911See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008912 else
8913 ac_cv_sizeof_long_double=0
8914 fi
8915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8919$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008920
8921
8922
8923cat >>confdefs.h <<_ACEOF
8924#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8925_ACEOF
8926
8927
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008928
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929# The cast to long int works around a bug in the HP C Compiler
8930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8934$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008935if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 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 +00008939
Thomas Woutersb2137042007-02-01 18:02:27 +00008940else
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 if test "$ac_cv_type__Bool" = yes; then
8942 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008944as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008945See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008946 else
8947 ac_cv_sizeof__Bool=0
8948 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008950
Thomas Woutersb2137042007-02-01 18:02:27 +00008951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8953$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954
8955
8956
Thomas Woutersb2137042007-02-01 18:02:27 +00008957cat >>confdefs.h <<_ACEOF
8958#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8959_ACEOF
8960
8961
Thomas Woutersb2137042007-02-01 18:02:27 +00008962
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008963# The cast to long int works around a bug in the HP C Compiler
8964# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8965# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8966# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8968$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008969if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008970 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008971else
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973#ifdef HAVE_SYS_TYPES_H
8974#include <sys/types.h>
8975#endif
8976
Matthias Kloseb9621712010-04-24 17:59:49 +00008977"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979else
Matthias Kloseb9621712010-04-24 17:59:49 +00008980 if test "$ac_cv_type_off_t" = yes; then
8981 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008983as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008984See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008985 else
8986 ac_cv_sizeof_off_t=0
8987 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008989
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8992$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008993
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994
8995
Martin v. Löwis11437992002-04-12 09:54:03 +00008996cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008997#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008998_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008999
Michael W. Hudson54241132001-12-07 15:38:26 +00009000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001
Matthias Kloseb9621712010-04-24 17:59:49 +00009002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9003$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009004if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009005 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009006
Matthias Kloseb9621712010-04-24 17:59:49 +00009007$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009008
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9010$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009011else
Matthias Kloseb9621712010-04-24 17:59:49 +00009012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009014fi
9015
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016# The cast to long int works around a bug in the HP C Compiler
9017# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9018# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9019# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9021$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009022if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009023 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009024else
Matthias Kloseb9621712010-04-24 17:59:49 +00009025 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009026#ifdef HAVE_SYS_TYPES_H
9027#include <sys/types.h>
9028#endif
9029#ifdef HAVE_TIME_H
9030#include <time.h>
9031#endif
9032
Matthias Kloseb9621712010-04-24 17:59:49 +00009033"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009034
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009035else
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 if test "$ac_cv_type_time_t" = yes; then
9037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009039as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009040See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009041 else
9042 ac_cv_sizeof_time_t=0
9043 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9048$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009049
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009050
9051
Martin v. Löwis11437992002-04-12 09:54:03 +00009052cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009053#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009054_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009055
Michael W. Hudson54241132001-12-07 15:38:26 +00009056
9057
Trent Mick635f6fb2000-08-23 21:33:05 +00009058# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009059ac_save_cc="$CC"
9060if test "$ac_cv_kpthread" = "yes"
9061then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009062elif test "$ac_cv_kthread" = "yes"
9063then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009064elif test "$ac_cv_pthread" = "yes"
9065then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009066fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067
Matthias Kloseb9621712010-04-24 17:59:49 +00009068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9069$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009070have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009072/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009073
9074 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009075int
9076main ()
9077{
Guido van Rossum12580492000-09-24 16:47:19 +00009078pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ;
9080 return 0;
9081}
Matthias Kloseb159a552010-04-25 21:00:44 +00009082
Martin v. Löwis11437992002-04-12 09:54:03 +00009083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009084if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009085 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9089$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009090if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009091 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9093# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9094# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9096$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009097if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009099else
Matthias Kloseb9621712010-04-24 17:59:49 +00009100 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009101#ifdef HAVE_PTHREAD_H
9102#include <pthread.h>
9103#endif
9104
Matthias Kloseb9621712010-04-24 17:59:49 +00009105"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009107else
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 if test "$ac_cv_type_pthread_t" = yes; then
9109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009111as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009112See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009113 else
9114 ac_cv_sizeof_pthread_t=0
9115 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009116fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009117
Trent Mick635f6fb2000-08-23 21:33:05 +00009118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9120$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009122
9123
Martin v. Löwis11437992002-04-12 09:54:03 +00009124cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009125#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009126_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009127
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009128
Trent Mick635f6fb2000-08-23 21:33:05 +00009129fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009130
9131# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9132# This checking will be unnecessary after removing deprecated TLS API.
9133# The cast to long int works around a bug in the HP C Compiler
9134# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9135# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9136# This bug is HP SR number 8606223364.
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9138$as_echo_n "checking size of pthread_key_t... " >&6; }
9139if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9140 $as_echo_n "(cached) " >&6
9141else
9142 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9143"; then :
9144
9145else
9146 if test "$ac_cv_type_pthread_key_t" = yes; then
9147 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9148$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9149as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9150See \`config.log' for more details" "$LINENO" 5; }
9151 else
9152 ac_cv_sizeof_pthread_key_t=0
9153 fi
9154fi
9155
9156fi
9157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9158$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9159
9160
9161
9162cat >>confdefs.h <<_ACEOF
9163#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9164_ACEOF
9165
9166
9167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9168$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9169if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9171/* end confdefs.h. */
9172#include <pthread.h>
9173int
9174main ()
9175{
9176pthread_key_t k; k * 1;
9177 ;
9178 return 0;
9179}
9180_ACEOF
9181if ac_fn_c_try_compile "$LINENO"; then :
9182 ac_pthread_key_t_is_arithmetic_type=yes
9183else
9184 ac_pthread_key_t_is_arithmetic_type=no
9185
9186fi
9187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9189$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9190 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9191
9192$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9193
9194 fi
9195else
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9197$as_echo "no" >&6; }
9198fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009199CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009200
Michael W. Hudson54241132001-12-07 15:38:26 +00009201
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009202case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009203 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009204 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9205 ;;
9206 Darwin/*)
9207 OTHER_LIBTOOL_OPT=""
9208 ;;
9209esac
9210
9211
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009212
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009213case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009214 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009215 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9216 if test "${enable_universalsdk}"; then
9217 :
9218 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009219 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009220 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009223 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009224 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009225 if test ${gcc_version} '<' 4.0
9226 then
9227 LIBTOOL_CRUFT="-lcc_dynamic"
9228 else
9229 LIBTOOL_CRUFT=""
9230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009231 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009232 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009233else
Matthias Kloseb9621712010-04-24 17:59:49 +00009234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009235/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009236
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009237 #include <unistd.h>
9238 int main(int argc, char*argv[])
9239 {
9240 if (sizeof(long) == 4) {
9241 return 0;
9242 } else {
9243 return 1;
9244 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009245 }
9246
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009248if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249 ac_osx_32bit=yes
9250else
Matthias Kloseb9621712010-04-24 17:59:49 +00009251 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009255fi
9256
9257
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009258 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009259 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009260 i386)
9261 MACOSX_DEFAULT_ARCH="i386"
9262 ;;
9263 ppc)
9264 MACOSX_DEFAULT_ARCH="ppc"
9265 ;;
9266 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009267 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009268 ;;
9269 esac
9270 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009271 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009272 i386)
9273 MACOSX_DEFAULT_ARCH="x86_64"
9274 ;;
9275 ppc)
9276 MACOSX_DEFAULT_ARCH="ppc64"
9277 ;;
9278 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009279 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009280 ;;
9281 esac
9282
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009283 fi
9284
9285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009288esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9290$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009291if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009292then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009293 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009295 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009296
Matthias Kloseb9621712010-04-24 17:59:49 +00009297$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9300$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009301 if test $enable_shared = "yes"
9302 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009303 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 +00009304 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009305else
Matthias Kloseb9621712010-04-24 17:59:49 +00009306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9307$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308fi
9309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9311$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009312case $ac_sys_system/$ac_sys_release in
9313 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009314
Matthias Kloseb9621712010-04-24 17:59:49 +00009315$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009316
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9318$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009319 ;;
9320 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9322$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009323 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009324esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009325
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009327
Michael W. Hudson54241132001-12-07 15:38:26 +00009328
9329
9330
9331
Benjamin Peterson99f03762010-04-11 22:15:28 +00009332
Thomas Wouters477c8d52006-05-27 19:21:47 +00009333
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009334# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9335# -- usually .so, .sl on HP-UX, .dll on Cygwin
9336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9337$as_echo_n "checking the extension of shared libraries... " >&6; }
9338if test -z "$SHLIB_SUFFIX"; then
9339 case $ac_sys_system in
9340 hp*|HP*)
9341 case `uname -m` in
9342 ia64) SHLIB_SUFFIX=.so;;
9343 *) SHLIB_SUFFIX=.sl;;
9344 esac
9345 ;;
9346 CYGWIN*) SHLIB_SUFFIX=.dll;;
9347 *) SHLIB_SUFFIX=.so;;
9348 esac
9349fi
9350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9351$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009352
Guido van Rossum0a516c91994-09-12 10:58:40 +00009353# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009354# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009355# (Shared libraries in this instance are shared modules to be loaded into
9356# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9358$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009359if test -z "$LDSHARED"
9360then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009361 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009362 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009363 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009364 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009365 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009366 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009367 if test "$GCC" = "yes" ; then
9368 LDSHARED='$(CC) -shared'
9369 LDCXXSHARED='$(CXX) -shared'
9370 else
9371 LDSHARED='$(CC) -G'
9372 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009373 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009374 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009375 if test "$GCC" = "yes" ; then
9376 LDSHARED='$(CC) -shared'
9377 LDCXXSHARED='$(CXX) -shared'
9378 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009379 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009380 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009381 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009382 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009383 LDSHARED='$(CC) -bundle'
9384 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009385 if test "$enable_framework" ; then
9386 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009387 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9388 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009389 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009390 else
9391 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009392 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009393 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009394 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009395 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009396 LDSHARED='$(CC) -bundle'
9397 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009398 if test "$enable_framework" ; then
9399 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009400 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9401 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009403 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009404 # No framework, use the Python app as bundle-loader
9405 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009406 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009407 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009408 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009409 Darwin/*)
9410 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9411 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009412
Ned Deily36820b62014-06-25 13:44:22 -07009413 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9414 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9415 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9416 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9417 if test ${dep_target_major} -eq 10 && \
9418 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009419 then
Ned Deily36820b62014-06-25 13:44:22 -07009420 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009421 LDSHARED='$(CC) -bundle'
9422 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009423 if test "$enable_framework" ; then
9424 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009425 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9426 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009427 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009428 else
9429 # No framework, use the Python app as bundle-loader
9430 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9431 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009432 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009433 fi
Ned Deily36820b62014-06-25 13:44:22 -07009434 else
9435 # building for OS X 10.3 and later
9436 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9437 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9438 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009439 fi
9440 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009441 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009442 LDSHARED='$(CC) -shared'
9443 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009444 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009445 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009446 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009447 LDSHARED='$(CC) -shared'
9448 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009449 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009450 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009451 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009452 OpenBSD*)
9453 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9454 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009455 LDSHARED='$(CC) -shared $(CCSHARED)'
9456 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009457 else
9458 case `uname -r` in
9459 [01].* | 2.[0-7] | 2.[0-7].*)
9460 LDSHARED="ld -Bshareable ${LDFLAGS}"
9461 ;;
9462 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009463 LDSHARED='$(CC) -shared $(CCSHARED)'
9464 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009465 ;;
9466 esac
9467 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009468 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009469 LDSHARED='$(CC) -shared'
9470 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009471 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009472 if test "$GCC" = "yes" ; then
9473 LDSHARED='$(CC) -shared'
9474 LDCXXSHARED='$(CXX) -shared'
9475 else
9476 LDSHARED='$(CC) -G'
9477 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009478 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009479 SCO_SV*)
9480 LDSHARED='$(CC) -Wl,-G,-Bexport'
9481 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9482 CYGWIN*)
9483 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9484 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009485 *) LDSHARED="ld";;
9486 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009487fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9489$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009490LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009491BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009492# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009493# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9495$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009496if test -z "$CCSHARED"
9497then
Guido van Rossum07397971997-04-29 21:49:50 +00009498 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009499 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009500 then CCSHARED="-fPIC";
9501 elif test `uname -p` = sparc;
9502 then CCSHARED="-xcode=pic32";
9503 else CCSHARED="-Kpic";
9504 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009505 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009506 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009507 else CCSHARED="+z";
9508 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009509 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009510 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009511 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009512 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009513 if test "$GCC" = "yes"
9514 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009515 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009516 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009517 SCO_SV*)
9518 if test "$GCC" = "yes"
9519 then CCSHARED="-fPIC"
9520 else CCSHARED="-Kpic -belf"
9521 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009522 VxWorks*)
9523 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009524 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9527$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009528# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009529# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9531$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009532if test -z "$LINKFORSHARED"
9533then
Guido van Rossum07397971997-04-29 21:49:50 +00009534 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009535 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009536 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009537 LINKFORSHARED="-Wl,-E -Wl,+s";;
9538# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009539 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009540 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009541 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009543 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009544
9545 # Issue #18075: the default maximum stack size (8MBytes) is too
9546 # small for the default recursion limit. Increase the stack size
9547 # to ensure that tests don't crash
9548 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9549
Jack Jansene578a632001-08-15 01:27:14 +00009550 if test "$enable_framework"
9551 then
Jack Jansenda49e192005-01-07 13:08:22 +00009552 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009553 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009554 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009555 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009556 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009557 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009558 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009559 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9560 then
9561 LINKFORSHARED="-Wl,--export-dynamic"
9562 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009563 SunOS/5*) case $CC in
9564 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009565 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009566 then
9567 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009568 fi;;
9569 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009570 CYGWIN*)
9571 if test $enable_shared = "no"
9572 then
9573 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9574 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009575 QNX*)
9576 # -Wl,-E causes the symbols to be added to the dynamic
9577 # symbol table so that they can be found when a module
9578 # is loaded. -N 2048K causes the stack size to be set
9579 # to 2048 kilobytes so that the stack doesn't overflow
9580 # when running test_compile.py.
9581 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009582 VxWorks*)
9583 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9587$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009588
Michael W. Hudson54241132001-12-07 15:38:26 +00009589
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9592$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009593if test ! "$LIBRARY" = "$LDLIBRARY"
9594then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009595 case $ac_sys_system in
9596 CYGWIN*)
9597 # Cygwin needs CCSHARED when building extension DLLs
9598 # but not when building the interpreter DLL.
9599 CFLAGSFORSHARED='';;
9600 *)
9601 CFLAGSFORSHARED='$(CCSHARED)'
9602 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9605$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009606
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009607# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9608# library (with --enable-shared).
9609# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009610# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9611# if it is not required, since it creates a dependency of the shared library
9612# to LIBS. This, in turn, means that applications linking the shared libpython
9613# don't need to link LIBS explicitly. The default should be only changed
9614# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009615
Matthias Kloseb9621712010-04-24 17:59:49 +00009616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9617$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009618case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009619 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009620 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009621esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9623$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009624
9625
Guido van Rossum627b2d71993-12-24 10:39:16 +00009626# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9628$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009629if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009630 $as_echo_n "(cached) " >&6
9631else
9632 ac_check_lib_save_LIBS=$LIBS
9633LIBS="-lsendfile $LIBS"
9634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9635/* end confdefs.h. */
9636
9637/* Override any GCC internal prototype to avoid an error.
9638 Use char because int might match the return type of a GCC
9639 builtin and then its argument prototype would still apply. */
9640#ifdef __cplusplus
9641extern "C"
9642#endif
9643char sendfile ();
9644int
9645main ()
9646{
9647return sendfile ();
9648 ;
9649 return 0;
9650}
9651_ACEOF
9652if ac_fn_c_try_link "$LINENO"; then :
9653 ac_cv_lib_sendfile_sendfile=yes
9654else
9655 ac_cv_lib_sendfile_sendfile=no
9656fi
9657rm -f core conftest.err conftest.$ac_objext \
9658 conftest$ac_exeext conftest.$ac_ext
9659LIBS=$ac_check_lib_save_LIBS
9660fi
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9662$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009663if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009664 cat >>confdefs.h <<_ACEOF
9665#define HAVE_LIBSENDFILE 1
9666_ACEOF
9667
9668 LIBS="-lsendfile $LIBS"
9669
9670fi
9671
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9673$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009676else
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009678LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682/* Override any GCC internal prototype to avoid an error.
9683 Use char because int might match the return type of a GCC
9684 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009685#ifdef __cplusplus
9686extern "C"
9687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009688char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009689int
9690main ()
9691{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ;
9694 return 0;
9695}
9696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009697if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009698 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009699else
Matthias Kloseb9621712010-04-24 17:59:49 +00009700 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702rm -f core conftest.err conftest.$ac_objext \
9703 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009704LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9707$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009708if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 cat >>confdefs.h <<_ACEOF
9710#define HAVE_LIBDL 1
9711_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009713 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715fi
9716 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9718$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721else
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009723LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727/* Override any GCC internal prototype to avoid an error.
9728 Use char because int might match the return type of a GCC
9729 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009730#ifdef __cplusplus
9731extern "C"
9732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009733char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009734int
9735main ()
9736{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ;
9739 return 0;
9740}
9741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009742if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009744else
Matthias Kloseb9621712010-04-24 17:59:49 +00009745 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009747rm -f core conftest.err conftest.$ac_objext \
9748 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009749LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009751{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9752$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009753if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 cat >>confdefs.h <<_ACEOF
9755#define HAVE_LIBDLD 1
9756_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009757
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009758 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009760fi
9761 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009762
Michael Felt0d3ccb42017-12-30 22:39:20 +01009763# checks for uuid.h location
9764for ac_header in uuid/uuid.h uuid.h
9765do :
9766 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9767ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9768if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9769 cat >>confdefs.h <<_ACEOF
9770#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9771_ACEOF
9772
9773fi
9774
9775done
9776
9777
Berker Peksag9a10ff42017-11-08 23:09:16 +03009778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9779$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9781/* end confdefs.h. */
9782#include <uuid/uuid.h>
9783int
9784main ()
9785{
9786
9787#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009788void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009789#endif
9790
9791 ;
9792 return 0;
9793}
9794_ACEOF
9795if ac_fn_c_try_compile "$LINENO"; then :
9796
9797$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9798
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9800$as_echo "yes" >&6; }
9801else
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9803$as_echo "no" >&6; }
9804
9805fi
9806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9807
Michael Felt0d3ccb42017-12-30 22:39:20 +01009808# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009809# FreeBSD and OpenBSD provides support as well
9810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9811$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9813/* end confdefs.h. */
9814#include <uuid.h>
9815int
9816main ()
9817{
9818
9819#ifndef uuid_create
9820void *x = uuid_create
9821#endif
9822
9823 ;
9824 return 0;
9825}
9826_ACEOF
9827if ac_fn_c_try_compile "$LINENO"; then :
9828
9829$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9830
9831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9832$as_echo "yes" >&6; }
9833else
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9835$as_echo "no" >&6; }
9836
9837fi
9838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9839
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009840# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9841# stream in big-endian byte-order
9842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9843$as_echo_n "checking for uuid_enc_be... " >&6; }
9844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9845/* end confdefs.h. */
9846#include <uuid.h>
9847int
9848main ()
9849{
9850
9851#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009852void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009853#endif
9854
9855 ;
9856 return 0;
9857}
9858_ACEOF
9859if ac_fn_c_try_compile "$LINENO"; then :
9860
9861$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9862
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9864$as_echo "yes" >&6; }
9865else
9866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868
9869fi
9870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9871
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009872# 'Real Time' functions on Solaris
9873# posix4 on Solaris 2.6
9874# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009876$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009879else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009880 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884/* Override any GCC internal prototype to avoid an error.
9885 Use char because int might match the return type of a GCC
9886 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009887#ifdef __cplusplus
9888extern "C"
9889#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009890char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009891int
9892main ()
9893{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 ;
9896 return 0;
9897}
9898_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899for ac_lib in '' pthread rt posix4; do
9900 if test -z "$ac_lib"; then
9901 ac_res="none required"
9902 else
9903 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009904 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909rm -f core conftest.err conftest.$ac_objext \
9910 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009911 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009912 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009914done
Victor Stinnere0be4232011-10-25 13:06:09 +02009915if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009916
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917else
9918 ac_cv_search_sem_init=no
9919fi
9920rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009921LIBS=$ac_func_search_save_LIBS
9922fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9924$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009925ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009926if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009928
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009929fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009930
Martin v. Löwis519adae2003-09-20 10:47:47 +00009931
Martin v. Löwis19d17342003-06-14 21:03:05 +00009932# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9934$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009935if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937else
9938 ac_check_lib_save_LIBS=$LIBS
9939LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009941/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943/* Override any GCC internal prototype to avoid an error.
9944 Use char because int might match the return type of a GCC
9945 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009946#ifdef __cplusplus
9947extern "C"
9948#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009950int
9951main ()
9952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009954 ;
9955 return 0;
9956}
9957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009958if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009959 ac_cv_lib_intl_textdomain=yes
9960else
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009962fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009963rm -f core conftest.err conftest.$ac_objext \
9964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009965LIBS=$ac_check_lib_save_LIBS
9966fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9968$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009969if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009972
Brett Cannonc6d936e2009-06-07 20:09:53 +00009973 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009974fi
9975
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009976
9977# checks for system dependent C++ extensions support
9978case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9980$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009983
Georg Brandl59e87bd2011-02-15 19:48:59 +00009984 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009985int
9986main ()
9987{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009988loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ;
9990 return 0;
9991}
Matthias Kloseb159a552010-04-25 21:00:44 +00009992
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009994if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009995
Matthias Kloseb159a552010-04-25 21:00:44 +00009996
Matthias Kloseb9621712010-04-24 17:59:49 +00009997$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009998
Matthias Kloseb159a552010-04-25 21:00:44 +00009999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010000$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010001
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010002else
Matthias Kloseb159a552010-04-25 21:00:44 +000010003
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010005$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010006
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010008rm -f core conftest.err conftest.$ac_objext \
10009 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010010 *) ;;
10011esac
10012
Christian Heimes985ecdc2013-11-20 11:46:18 +010010013# check for systems that require aligned memory access
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10015$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010016if ${ac_cv_aligned_required+:} false; then :
10017 $as_echo_n "(cached) " >&6
10018else
10019 if test "$cross_compiling" = yes; then :
10020 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010021else
10022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10023/* end confdefs.h. */
10024
10025int main()
10026{
10027 char s[16];
10028 int i, *p1, *p2;
10029 for (i=0; i < 16; i++)
10030 s[i] = i;
10031 p1 = (int*)(s+1);
10032 p2 = (int*)(s+2);
10033 if (*p1 == *p2)
10034 return 1;
10035 return 0;
10036}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010037_ACEOF
10038if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010039 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010040else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010041 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010042fi
10043rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10044 conftest.$ac_objext conftest.beam conftest.$ac_ext
10045fi
10046
10047
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010048fi
10049
10050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10051$as_echo "$ac_cv_aligned_required" >&6; }
10052if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010053
10054$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10055
10056fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010057
10058# str, bytes and memoryview hash algorithm
10059
10060
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10062$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10063
10064# Check whether --with-hash_algorithm was given.
10065if test "${with_hash_algorithm+set}" = set; then :
10066 withval=$with_hash_algorithm;
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10068$as_echo "$withval" >&6; }
10069case "$withval" in
10070 siphash24)
10071 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10072
10073 ;;
10074 fnv)
10075 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10076
10077 ;;
10078 *)
10079 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10080 ;;
10081esac
10082
10083else
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10085$as_echo "default" >&6; }
10086fi
10087
10088
Charles-François Natalid30b0222014-05-08 23:08:51 +010010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10090$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10091
10092# Check whether --with-address_sanitizer was given.
10093if test "${with_address_sanitizer+set}" = set; then :
10094 withval=$with_address_sanitizer;
10095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10096$as_echo "$withval" >&6; }
10097BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10098LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010099# ASan works by controlling memory allocation, our own malloc interferes.
10100with_pymalloc="no"
10101
10102else
10103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105fi
10106
10107
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10109$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10110
10111# Check whether --with-memory_sanitizer was given.
10112if test "${with_memory_sanitizer+set}" = set; then :
10113 withval=$with_memory_sanitizer;
10114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10115$as_echo "$withval" >&6; }
10116BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10117LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10118# MSan works by controlling memory allocation, our own malloc interferes.
10119with_pymalloc="no"
10120
10121else
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
10124fi
10125
10126
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10128$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10129
10130# Check whether --with-undefined_behavior_sanitizer was given.
10131if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10132 withval=$with_undefined_behavior_sanitizer;
10133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10134$as_echo "$withval" >&6; }
10135BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10136LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010137
10138else
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141fi
10142
10143
Guido van Rossum70c7f481998-03-26 18:44:10 +000010144# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10146$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010147if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010149else
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010151LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155/* Override any GCC internal prototype to avoid an error.
10156 Use char because int might match the return type of a GCC
10157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010158#ifdef __cplusplus
10159extern "C"
10160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010161char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010162int
10163main ()
10164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010166 ;
10167 return 0;
10168}
10169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010172else
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010175rm -f core conftest.err conftest.$ac_objext \
10176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010177LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10180$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010181if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010182 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010183fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010184 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10186$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010187if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010189else
Martin v. Löwis11437992002-04-12 09:54:03 +000010190 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010191LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195/* Override any GCC internal prototype to avoid an error.
10196 Use char because int might match the return type of a GCC
10197 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010198#ifdef __cplusplus
10199extern "C"
10200#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010201char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010202int
10203main ()
10204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010206 ;
10207 return 0;
10208}
10209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010211 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010212else
Matthias Kloseb9621712010-04-24 17:59:49 +000010213 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010215rm -f core conftest.err conftest.$ac_objext \
10216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010217LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10220$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010222 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010223fi
10224 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010225
Matthias Kloseb9621712010-04-24 17:59:49 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10227$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010230if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010231 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10233$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010234LIBS="$withval $LIBS"
10235
10236else
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10238$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239fi
10240
Guido van Rossum7f43da71994-08-01 12:15:30 +000010241
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010242
10243
10244
10245
10246
10247
Victor Stinner23a683a2019-04-12 21:27:37 +020010248
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010249if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10250 if test -n "$ac_tool_prefix"; then
10251 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10252set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10254$as_echo_n "checking for $ac_word... " >&6; }
10255if ${ac_cv_path_PKG_CONFIG+:} false; then :
10256 $as_echo_n "(cached) " >&6
10257else
10258 case $PKG_CONFIG in
10259 [\\/]* | ?:[\\/]*)
10260 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10261 ;;
10262 *)
10263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10264for as_dir in $PATH
10265do
10266 IFS=$as_save_IFS
10267 test -z "$as_dir" && as_dir=.
10268 for ac_exec_ext in '' $ac_executable_extensions; do
10269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10270 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10272 break 2
10273 fi
10274done
10275 done
10276IFS=$as_save_IFS
10277
10278 ;;
10279esac
10280fi
10281PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10282if test -n "$PKG_CONFIG"; then
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10284$as_echo "$PKG_CONFIG" >&6; }
10285else
10286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10287$as_echo "no" >&6; }
10288fi
10289
10290
10291fi
10292if test -z "$ac_cv_path_PKG_CONFIG"; then
10293 ac_pt_PKG_CONFIG=$PKG_CONFIG
10294 # Extract the first word of "pkg-config", so it can be a program name with args.
10295set dummy pkg-config; ac_word=$2
10296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10297$as_echo_n "checking for $ac_word... " >&6; }
10298if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10299 $as_echo_n "(cached) " >&6
10300else
10301 case $ac_pt_PKG_CONFIG in
10302 [\\/]* | ?:[\\/]*)
10303 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10304 ;;
10305 *)
10306 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10307for as_dir in $PATH
10308do
10309 IFS=$as_save_IFS
10310 test -z "$as_dir" && as_dir=.
10311 for ac_exec_ext in '' $ac_executable_extensions; do
10312 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10313 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10314 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10315 break 2
10316 fi
10317done
10318 done
10319IFS=$as_save_IFS
10320
10321 ;;
10322esac
10323fi
10324ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10325if test -n "$ac_pt_PKG_CONFIG"; then
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10327$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10328else
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10330$as_echo "no" >&6; }
10331fi
10332
10333 if test "x$ac_pt_PKG_CONFIG" = x; then
10334 PKG_CONFIG=""
10335 else
10336 case $cross_compiling:$ac_tool_warned in
10337yes:)
10338{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10339$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10340ac_tool_warned=yes ;;
10341esac
10342 PKG_CONFIG=$ac_pt_PKG_CONFIG
10343 fi
10344else
10345 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10346fi
10347
10348fi
10349if test -n "$PKG_CONFIG"; then
10350 _pkg_min_version=0.9.0
10351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10352$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10353 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10355$as_echo "yes" >&6; }
10356 else
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359 PKG_CONFIG=""
10360 fi
10361fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010362
10363# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10365$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010366
10367# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010368if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010369 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010370else
10371 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010372fi
10373
10374
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10376$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010377
10378# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10380$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010381
10382# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010384 withval=$with_system_ffi;
10385fi
10386
10387
Zachary Waref40d4dd2016-09-17 01:25:24 -050010388if test "$ac_sys_system" = "Darwin"
10389then
10390 case "$with_system_ffi" in
10391 "")
10392 with_system_ffi="no"
10393 ;;
10394 yes|no)
10395 ;;
10396 *)
10397 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10398 ;;
10399 esac
10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10401$as_echo "$with_system_ffi" >&6; }
10402else
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10404$as_echo "yes" >&6; }
10405 if test "$with_system_ffi" != ""
10406 then
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10408$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10409 fi
10410 with_system_ffi="yes"
10411fi
Zachary Ware935043d2016-09-09 17:01:21 -070010412
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010413if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010414 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10415else
10416 LIBFFI_INCLUDEDIR=""
10417fi
10418
10419
Stefan Krah60187b52012-03-23 19:06:27 +010010420# Check for use of the system libmpdec library
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10422$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10423
10424# Check whether --with-system_libmpdec was given.
10425if test "${with_system_libmpdec+set}" = set; then :
10426 withval=$with_system_libmpdec;
10427else
10428 with_system_libmpdec="no"
10429fi
10430
10431
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10433$as_echo "$with_system_libmpdec" >&6; }
10434
Benjamin Peterson076ed002010-10-31 17:11:02 +000010435# Check for support for loadable sqlite extensions
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10437$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10438# Check whether --enable-loadable-sqlite-extensions was given.
10439if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10440 enableval=$enable_loadable_sqlite_extensions;
10441else
10442 enable_loadable_sqlite_extensions="no"
10443fi
10444
10445
10446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10447$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10448
Ned Deilyd819b932013-09-06 01:07:05 -070010449# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10450
10451
10452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10453$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10454
10455# Check whether --with-tcltk-includes was given.
10456if test "${with_tcltk_includes+set}" = set; then :
10457 withval=$with_tcltk_includes;
10458else
10459 with_tcltk_includes="default"
10460fi
10461
10462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10463$as_echo "$with_tcltk_includes" >&6; }
10464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10465$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10466
10467# Check whether --with-tcltk-libs was given.
10468if test "${with_tcltk_libs+set}" = set; then :
10469 withval=$with_tcltk_libs;
10470else
10471 with_tcltk_libs="default"
10472fi
10473
10474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10475$as_echo "$with_tcltk_libs" >&6; }
10476if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10477then
10478 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10479 then
10480 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10481 fi
10482 TCLTK_INCLUDES=""
10483 TCLTK_LIBS=""
10484else
10485 TCLTK_INCLUDES="$with_tcltk_includes"
10486 TCLTK_LIBS="$with_tcltk_libs"
10487fi
10488
Matthias Klose55708cc2009-04-30 08:06:49 +000010489# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10491$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010492
10493# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010495 withval=$with_dbmliborder;
10496if test x$with_dbmliborder = xyes
10497then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010498as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010499else
10500 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10501 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10502 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010503 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010504 fi
10505 done
10506fi
10507fi
10508
Matthias Kloseb9621712010-04-24 17:59:49 +000010509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10510$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010511
Martin v. Löwis11437992002-04-12 09:54:03 +000010512# Templates for things AC_DEFINEd more than once.
10513# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010514
10515
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010516if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010517then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010518 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010520
10521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010522elif test "$ac_cv_kpthread" = "yes"
10523then
10524 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010525 if test "$ac_cv_cxx_thread" = "yes"; then
10526 CXX="$CXX -Kpthread"
10527 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010528 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010529elif test "$ac_cv_kthread" = "yes"
10530then
10531 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010532 if test "$ac_cv_cxx_thread" = "yes"; then
10533 CXX="$CXX -Kthread"
10534 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010535 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010536elif test "$ac_cv_pthread" = "yes"
10537then
10538 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010539 if test "$ac_cv_cxx_thread" = "yes"; then
10540 CXX="$CXX -pthread"
10541 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010542 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010544 if test ! -z "$withval" -a -d "$withval"
10545 then LDFLAGS="$LDFLAGS -L$withval"
10546 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547
10548 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010549 # define _POSIX_THREADS in unistd.h. Some apparently don't
10550 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10552$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010555
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010557#ifdef _POSIX_THREADS
10558yes
10559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010560
10561_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564 unistd_defines_pthreads=yes
10565else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010566 unistd_defines_pthreads=no
10567fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010568rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10571$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010574
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010575 # Just looking for pthread_create in libpthread is not enough:
10576 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10577 # So we really have to include pthread.h, and then link.
10578 _libs=$LIBS
10579 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10581$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010583/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010584
10585#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010586#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010587
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010588void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010589int
10590main ()
10591{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010592
10593pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ;
10595 return 0;
10596}
10597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010599
Matthias Kloseb9621712010-04-24 17:59:49 +000010600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10601$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010602 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010603
Guido van Rossum02a1c402000-02-25 19:26:31 +000010604else
Martin v. Löwis11437992002-04-12 09:54:03 +000010605
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010606 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010609
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010610 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010611
Guido van Rossumad678af1998-10-02 14:42:15 +000010612else
Guido van Rossumad678af1998-10-02 14:42:15 +000010613
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10615$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618else
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010620LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624/* Override any GCC internal prototype to avoid an error.
10625 Use char because int might match the return type of a GCC
10626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010627#ifdef __cplusplus
10628extern "C"
10629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010630char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010631int
10632main ()
10633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010634return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010635 ;
10636 return 0;
10637}
10638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010640 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010641else
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010644rm -f core conftest.err conftest.$ac_objext \
10645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010646LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10649$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010650if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010651
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010652 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010653 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010654
Greg Steinadf63d62000-07-05 10:38:09 +000010655else
Greg Steinadf63d62000-07-05 10:38:09 +000010656
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10658$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010659if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010661else
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010663LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667/* Override any GCC internal prototype to avoid an error.
10668 Use char because int might match the return type of a GCC
10669 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010670#ifdef __cplusplus
10671extern "C"
10672#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010673char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010674int
10675main ()
10676{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 ;
10679 return 0;
10680}
10681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010682if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010684else
Matthias Kloseb9621712010-04-24 17:59:49 +000010685 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010686fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010687rm -f core conftest.err conftest.$ac_objext \
10688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010689LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10692$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010693if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010694
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010695 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010696 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010697
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010698else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010699
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10701$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010702if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010704else
Martin v. Löwis11437992002-04-12 09:54:03 +000010705 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010706LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010709
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010710/* Override any GCC internal prototype to avoid an error.
10711 Use char because int might match the return type of a GCC
10712 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010713#ifdef __cplusplus
10714extern "C"
10715#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010716char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010717int
10718main ()
10719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010727else
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010730rm -f core conftest.err conftest.$ac_objext \
10731 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010732LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010733fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10735$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010736if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010737
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010738 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010739 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010740
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010741else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010742
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10744$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010745if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010747else
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010749LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753/* Override any GCC internal prototype to avoid an error.
10754 Use char because int might match the return type of a GCC
10755 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010756#ifdef __cplusplus
10757extern "C"
10758#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010759char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010760int
10761main ()
10762{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010764 ;
10765 return 0;
10766}
10767_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010768if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010770else
Matthias Kloseb9621712010-04-24 17:59:49 +000010771 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010772fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010773rm -f core conftest.err conftest.$ac_objext \
10774 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010775LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010776fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10778$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010779if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010780
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010781 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010782 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010783
Guido van Rossumb93a8621998-05-07 13:27:32 +000010784else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010785
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010786 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10787
Guido van Rossum2d38f911996-06-26 19:47:01 +000010788fi
10789
Guido van Rossum627b2d71993-12-24 10:39:16 +000010790
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010791fi
10792
Guido van Rossum0be3e491997-05-22 20:33:33 +000010793fi
10794
Guido van Rossum49545951997-12-02 19:28:29 +000010795fi
10796
Guido van Rossumb93a8621998-05-07 13:27:32 +000010797fi
10798
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010799fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010800rm -f core conftest.err conftest.$ac_objext \
10801 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010802
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10804$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010805if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010807else
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010809LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010813/* Override any GCC internal prototype to avoid an error.
10814 Use char because int might match the return type of a GCC
10815 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010816#ifdef __cplusplus
10817extern "C"
10818#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010819char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010820int
10821main ()
10822{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010823return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010824 ;
10825 return 0;
10826}
10827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010829 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010830else
Matthias Kloseb9621712010-04-24 17:59:49 +000010831 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010833rm -f core conftest.err conftest.$ac_objext \
10834 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010835LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10838$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010839if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010840
Martin v. Löwis130fb172001-07-19 11:00:41 +000010841 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010842
Guido van Rossum627b2d71993-12-24 10:39:16 +000010843fi
10844
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010845
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010847
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010848if test "$posix_threads" = "yes"; then
10849 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010850
Matthias Kloseb9621712010-04-24 17:59:49 +000010851$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852
10853 fi
10854
10855 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10856 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010857 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010859
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010860 ;;
10861 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010862$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010863
10864 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010865 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010867
10868 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010869 esac
10870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10872$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010873 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875else
Matthias Kloseb9621712010-04-24 17:59:49 +000010876 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010877 ac_cv_pthread_system_supported=no
10878else
Matthias Kloseb9621712010-04-24 17:59:49 +000010879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010881
10882 #include <stdio.h>
10883 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010884 void *foo(void *parm) {
10885 return NULL;
10886 }
10887 main() {
10888 pthread_attr_t attr;
10889 pthread_t id;
10890 if (pthread_attr_init(&attr)) exit(-1);
10891 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10892 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10893 exit(0);
10894 }
10895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010896if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897 ac_cv_pthread_system_supported=yes
10898else
Matthias Kloseb9621712010-04-24 17:59:49 +000010899 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010901rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10902 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010903fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010905
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906fi
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10909$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010910 if test "$ac_cv_pthread_system_supported" = "yes"; then
10911
Matthias Kloseb9621712010-04-24 17:59:49 +000010912$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913
10914 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 for ac_func in pthread_sigmask
10916do :
10917 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010918if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010919 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010920#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010921_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010922 case $ac_sys_system in
10923 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010924
Matthias Kloseb9621712010-04-24 17:59:49 +000010925$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010926
10927 ;;
10928 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010929fi
10930done
10931
pdoxe14679c2017-10-05 00:01:56 -070010932 for ac_func in pthread_getcpuclockid
10933do :
10934 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10935if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10936 cat >>confdefs.h <<_ACEOF
10937#define HAVE_PTHREAD_GETCPUCLOCKID 1
10938_ACEOF
10939
10940fi
10941done
10942
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010943fi
10944
10945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10949$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010950# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010951if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010952 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956 ipv6=no
10957 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10959$as_echo "yes" >&6; }
10960 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961
10962 ipv6=yes
10963 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010964 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965else
Martin v. Löwis11437992002-04-12 09:54:03 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010968/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010969 /* AF_INET6 available check */
10970#include <sys/types.h>
10971#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010972int
10973main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010974{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010975int domain = AF_INET6;
10976 ;
10977 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978}
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010980if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010981
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10983$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010985
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010986else
Matthias Kloseb159a552010-04-25 21:00:44 +000010987
Matthias Kloseb9621712010-04-24 17:59:49 +000010988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010991
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010992fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010994
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010995if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10997$as_echo_n "checking if RFC2553 API is available... " >&6; }
10998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010999/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000011000
11001 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011003int
11004main ()
11005{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011007 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011008 ;
11009 return 0;
11010}
Matthias Kloseb159a552010-04-25 21:00:44 +000011011
Martin v. Löwis11437992002-04-12 09:54:03 +000011012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011014
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011016$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011017 ipv6=yes
11018
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011019else
Matthias Kloseb159a552010-04-25 21:00:44 +000011020
11021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011023 ipv6=no
11024
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011025fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011027fi
11028
11029if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011031
11032fi
11033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034fi
11035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036
11037ipv6type=unknown
11038ipv6lib=none
11039ipv6trylibc=no
11040
11041if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11043$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011044 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11045 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046 case $i in
11047 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051#include <netinet/in.h>
11052#ifdef IPV6_INRIA_VERSION
11053yes
11054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011058 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061
11062 ;;
11063 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067#include <netinet/in.h>
11068#ifdef __KAME__
11069yes
11070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011074 ipv6type=$i;
11075 ipv6lib=inet6
11076 ipv6libdir=/usr/local/v6/lib
11077 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080
11081 ;;
11082 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086#include <features.h>
11087#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11088yes
11089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 ipv6type=$i;
11094 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097
11098 ;;
11099 linux-inet6)
11100 if test -d /usr/inet6; then
11101 ipv6type=$i
11102 ipv6lib=inet6
11103 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011104 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105 fi
11106 ;;
11107 solaris)
11108 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011109 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i
11111 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 fi
11113 fi
11114 ;;
11115 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119#include <sys/param.h>
11120#ifdef _TOSHIBA_INET6
11121yes
11122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011125 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126 ipv6type=$i;
11127 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011128 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011130rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131
11132 ;;
11133 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011137#include </usr/local/v6/include/sys/v6config.h>
11138#ifdef __V6D__
11139yes
11140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011143 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011144 ipv6type=$i;
11145 ipv6lib=v6;
11146 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011147 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011149rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011150
11151 ;;
11152 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011155
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011156#include <sys/param.h>
11157#ifdef _ZETA_MINAMI_INET6
11158yes
11159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011160_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011161if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011162 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011163 ipv6type=$i;
11164 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011165 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011166fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011167rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011168
11169 ;;
11170 esac
11171 if test "$ipv6type" != "unknown"; then
11172 break
11173 fi
11174 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11176$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011177fi
11178
11179if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11180 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11181 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11182 echo "using lib$ipv6lib"
11183 else
11184 if test $ipv6trylibc = "yes"; then
11185 echo "using libc"
11186 else
11187 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11188 echo "You need to fetch lib$ipv6lib.a from appropriate"
11189 echo 'ipv6 kit and compile beforehand.'
11190 exit 1
11191 fi
11192 fi
11193fi
11194
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11196$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11198/* end confdefs.h. */
11199 /* CAN_RAW_FD_FRAMES available check */
11200#include <linux/can/raw.h>
11201int
11202main ()
11203{
11204int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11205 ;
11206 return 0;
11207}
11208_ACEOF
11209if ac_fn_c_try_compile "$LINENO"; then :
11210
11211
11212$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11213
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11215$as_echo "yes" >&6; }
11216
11217else
11218
11219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11220$as_echo "no" >&6; }
11221
11222fi
11223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11224
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011225# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11227$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011231 withval=$with_doc_strings;
11232fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011233
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011234
11235if test -z "$with_doc_strings"
11236then with_doc_strings="yes"
11237fi
11238if test "$with_doc_strings" != "no"
11239then
11240
Matthias Kloseb9621712010-04-24 17:59:49 +000011241$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011242
11243fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11245$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011246
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011247# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11249$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011253 withval=$with_pymalloc;
11254fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011255
Neil Schemenauera35c6882001-02-27 04:45:05 +000011256
Neil Schemenauer16c22972002-03-22 15:34:49 +000011257if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011258then
11259 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011260fi
11261if test "$with_pymalloc" != "no"
11262then
Martin v. Löwis11437992002-04-12 09:54:03 +000011263
Matthias Kloseb9621712010-04-24 17:59:49 +000011264$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011265
11266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11268$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011269
Nick Coghlan6ea41862017-06-11 13:16:15 +100011270# Check for --with-c-locale-coercion
11271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11272$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11273
11274# Check whether --with-c-locale-coercion was given.
11275if test "${with_c_locale_coercion+set}" = set; then :
11276 withval=$with_c_locale_coercion;
11277fi
11278
11279
11280if test -z "$with_c_locale_coercion"
11281then
11282 with_c_locale_coercion="yes"
11283fi
11284if test "$with_c_locale_coercion" != "no"
11285then
11286
11287$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11288
11289fi
11290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11291$as_echo "$with_c_locale_coercion" >&6; }
11292
Benjamin Peterson05159c42009-12-03 03:01:27 +000011293# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11295$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011296
11297# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011298if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011299 withval=$with_valgrind;
11300else
11301 with_valgrind=no
11302fi
11303
Matthias Kloseb9621712010-04-24 17:59:49 +000011304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11305$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011306if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011307 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 +020011308if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011311
11312else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011313 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011314
11315fi
11316
11317
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011318 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011319fi
11320
Łukasz Langaa785c872016-09-09 17:37:37 -070011321# Check for DTrace support
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11323$as_echo_n "checking for --with-dtrace... " >&6; }
11324
11325# Check whether --with-dtrace was given.
11326if test "${with_dtrace+set}" = set; then :
11327 withval=$with_dtrace;
11328else
11329 with_dtrace=no
11330fi
11331
11332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11333$as_echo "$with_dtrace" >&6; }
11334
11335
11336
11337
11338
11339DTRACE=
11340DFLAGS=
11341DTRACE_HEADERS=
11342DTRACE_OBJS=
11343
11344if test "$with_dtrace" = "yes"
11345then
11346 # Extract the first word of "dtrace", so it can be a program name with args.
11347set dummy dtrace; ac_word=$2
11348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11349$as_echo_n "checking for $ac_word... " >&6; }
11350if ${ac_cv_path_DTRACE+:} false; then :
11351 $as_echo_n "(cached) " >&6
11352else
11353 case $DTRACE in
11354 [\\/]* | ?:[\\/]*)
11355 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11356 ;;
11357 *)
11358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11359for as_dir in $PATH
11360do
11361 IFS=$as_save_IFS
11362 test -z "$as_dir" && as_dir=.
11363 for ac_exec_ext in '' $ac_executable_extensions; do
11364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11365 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11367 break 2
11368 fi
11369done
11370 done
11371IFS=$as_save_IFS
11372
11373 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11374 ;;
11375esac
11376fi
11377DTRACE=$ac_cv_path_DTRACE
11378if test -n "$DTRACE"; then
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11380$as_echo "$DTRACE" >&6; }
11381else
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11383$as_echo "no" >&6; }
11384fi
11385
11386
11387 if test "$DTRACE" = "not found"; then
11388 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11389 fi
11390
11391$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11392
11393 DTRACE_HEADERS="Include/pydtrace_probes.h"
11394
11395 # On OS X, DTrace providers do not need to be explicitly compiled and
11396 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11397 # generation flag '-G'. We check for presence of this flag, rather than
11398 # hardcoding support by OS, in the interest of robustness.
11399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11400$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11401if ${ac_cv_dtrace_link+:} false; then :
11402 $as_echo_n "(cached) " >&6
11403else
11404 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011405 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011406 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11407 ac_cv_dtrace_link=yes
11408
11409fi
11410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11411$as_echo "$ac_cv_dtrace_link" >&6; }
11412 if test "$ac_cv_dtrace_link" = "yes"; then
11413 DTRACE_OBJS="Python/pydtrace.o"
11414 fi
11415fi
11416
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011417# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011418
Guido van Rossum98935bf2001-09-05 19:13:16 +000011419DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011420
Guido van Rossume97ee181999-12-20 21:27:22 +000011421# the dlopen() function means we might want to use dynload_shlib.o. some
11422# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011423for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011424do :
11425 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011426if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011428#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011429_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011430
Guido van Rossume97ee181999-12-20 21:27:22 +000011431fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011432done
Guido van Rossume97ee181999-12-20 21:27:22 +000011433
Michael W. Hudson54241132001-12-07 15:38:26 +000011434
Guido van Rossume97ee181999-12-20 21:27:22 +000011435# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11436# loading of modules.
11437
Matthias Kloseb9621712010-04-24 17:59:49 +000011438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11439$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011440if test -z "$DYNLOADFILE"
11441then
11442 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011443 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11444 if test "$ac_cv_func_dlopen" = yes
11445 then DYNLOADFILE="dynload_shlib.o"
11446 else DYNLOADFILE="dynload_aix.o"
11447 fi
11448 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011449 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011450 *)
11451 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11452 # out any dynamic loading
11453 if test "$ac_cv_func_dlopen" = yes
11454 then DYNLOADFILE="dynload_shlib.o"
11455 else DYNLOADFILE="dynload_stub.o"
11456 fi
11457 ;;
11458 esac
11459fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11461$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011462if test "$DYNLOADFILE" != "dynload_stub.o"
11463then
Martin v. Löwis11437992002-04-12 09:54:03 +000011464
Matthias Kloseb9621712010-04-24 17:59:49 +000011465$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011466
11467fi
11468
Neil Schemenauer4e425612001-06-19 15:44:15 +000011469# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11470
Michael W. Hudson54241132001-12-07 15:38:26 +000011471
Matthias Kloseb9621712010-04-24 17:59:49 +000011472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11473$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011474if test -z "$MACHDEP_OBJS"
11475then
Jack Jansene578a632001-08-15 01:27:14 +000011476 MACHDEP_OBJS=$extra_machdep_objs
11477else
11478 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011479fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011480if test -z "$MACHDEP_OBJS"; then
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11482$as_echo "none" >&6; }
11483else
11484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11485$as_echo "$MACHDEP_OBJS" >&6; }
11486fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011487
Guido van Rossum627b2d71993-12-24 10:39:16 +000011488# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011489for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011490 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011491 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011492 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011493 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011494 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011495 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011496 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011497 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011498 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011499 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011500 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011501 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11502 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011503 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011504 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011505 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011506 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11507 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011508 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011509 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011510 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011511 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011512 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011513do :
11514 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11515ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011516if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011519_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011521fi
11522done
11523
Michael W. Hudson54241132001-12-07 15:38:26 +000011524
Benjamin Peterson40caa052018-09-12 15:52:40 -070011525# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11526# links. Some libc implementations have a stub lchmod implementation that always
11527# returns an error.
11528if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011529 for ac_func in lchmod
11530do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011531 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11532if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011533 cat >>confdefs.h <<_ACEOF
11534#define HAVE_LCHMOD 1
11535_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011536
11537fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011538done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011539
11540fi
11541
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011542ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11543 #include <dirent.h>
11544"
11545if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11546
11547$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11548
11549fi
11550
11551
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011552# For some functions, having a definition is not sufficient, since
11553# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11555$as_echo_n "checking for chroot... " >&6; }
11556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559int
11560main ()
11561{
11562void *x=chroot
11563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570
Matthias Kloseb159a552010-04-25 21:00:44 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576
11577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11580$as_echo_n "checking for link... " >&6; }
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584int
11585main ()
11586{
11587void *x=link
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11605$as_echo_n "checking for symlink... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011609int
11610main ()
11611{
11612void *x=symlink
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11630$as_echo_n "checking for fchdir... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633#include <unistd.h>
11634int
11635main ()
11636{
11637void *x=fchdir
11638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645
Matthias Kloseb159a552010-04-25 21:00:44 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011651
11652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11655$as_echo_n "checking for fsync... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658#include <unistd.h>
11659int
11660main ()
11661{
11662void *x=fsync
11663 ;
11664 return 0;
11665}
11666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011676
11677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11680$as_echo_n "checking for fdatasync... " >&6; }
11681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011682/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011683#include <unistd.h>
11684int
11685main ()
11686{
11687void *x=fdatasync
11688 ;
11689 return 0;
11690}
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011695
Matthias Kloseb159a552010-04-25 21:00:44 +000011696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011701
11702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11705$as_echo_n "checking for epoll... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011707/* end confdefs.h. */
11708#include <sys/epoll.h>
11709int
11710main ()
11711{
11712void *x=epoll_create
11713 ;
11714 return 0;
11715}
11716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011717if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011720
Matthias Kloseb159a552010-04-25 21:00:44 +000011721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011722$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011723else
Matthias Kloseb9621712010-04-24 17:59:49 +000011724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726
11727fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11730$as_echo_n "checking for epoll_create1... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11732/* end confdefs.h. */
11733#include <sys/epoll.h>
11734int
11735main ()
11736{
11737void *x=epoll_create1
11738 ;
11739 return 0;
11740}
11741_ACEOF
11742if ac_fn_c_try_compile "$LINENO"; then :
11743
11744$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11745
11746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11747$as_echo "yes" >&6; }
11748else
11749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11750$as_echo "no" >&6; }
11751
11752fi
11753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11755$as_echo_n "checking for kqueue... " >&6; }
11756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011757/* end confdefs.h. */
11758
11759#include <sys/types.h>
11760#include <sys/event.h>
11761
11762int
11763main ()
11764{
11765int x=kqueue()
11766 ;
11767 return 0;
11768}
11769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011770if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011773
Matthias Kloseb159a552010-04-25 21:00:44 +000011774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011775$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011776else
Matthias Kloseb9621712010-04-24 17:59:49 +000011777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11778$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011779
11780fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11783$as_echo_n "checking for prlimit... " >&6; }
11784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11785/* end confdefs.h. */
11786
11787#include <sys/time.h>
11788#include <sys/resource.h>
11789
11790int
11791main ()
11792{
11793void *x=prlimit
11794 ;
11795 return 0;
11796}
11797_ACEOF
11798if ac_fn_c_try_compile "$LINENO"; then :
11799
11800$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11801
11802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11803$as_echo "yes" >&6; }
11804else
11805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807
11808fi
11809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11810
Martin v. Löwisd5843682002-11-21 20:41:28 +000011811# On some systems (eg. FreeBSD 5), we would find a definition of the
11812# functions ctermid_r, setgroups in the library, but no prototype
11813# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11814# address to avoid compiler warnings and potential miscompilations
11815# because of the missing prototypes.
11816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11818$as_echo_n "checking for ctermid_r... " >&6; }
11819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011820/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011821
Martin v. Löwisd5843682002-11-21 20:41:28 +000011822#include <stdio.h>
11823
Martin v. Löwisd5843682002-11-21 20:41:28 +000011824int
11825main ()
11826{
11827void* p = ctermid_r
11828 ;
11829 return 0;
11830}
11831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011833
Matthias Kloseb9621712010-04-24 17:59:49 +000011834$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011835
Matthias Kloseb159a552010-04-25 21:00:44 +000011836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011837$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11840$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011841
11842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11844
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11846$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011847if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011848 $as_echo_n "(cached) " >&6
11849else
11850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011851/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011852#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011853int
11854main ()
11855{
11856void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011857
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011858 ;
11859 return 0;
11860}
11861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011862if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011863 ac_cv_flock_decl=yes
11864else
11865 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011866
11867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011869
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011870fi
11871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11872$as_echo "$ac_cv_flock_decl" >&6; }
11873if test "x${ac_cv_flock_decl}" = xyes; then
11874 for ac_func in flock
11875do :
11876 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011877if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011878 cat >>confdefs.h <<_ACEOF
11879#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011880_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011881
Antoine Pitroua3000072010-09-07 14:52:42 +000011882else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011884$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011885if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011886 $as_echo_n "(cached) " >&6
11887else
11888 ac_check_lib_save_LIBS=$LIBS
11889LIBS="-lbsd $LIBS"
11890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11891/* end confdefs.h. */
11892
11893/* Override any GCC internal prototype to avoid an error.
11894 Use char because int might match the return type of a GCC
11895 builtin and then its argument prototype would still apply. */
11896#ifdef __cplusplus
11897extern "C"
11898#endif
11899char flock ();
11900int
11901main ()
11902{
11903return flock ();
11904 ;
11905 return 0;
11906}
11907_ACEOF
11908if ac_fn_c_try_link "$LINENO"; then :
11909 ac_cv_lib_bsd_flock=yes
11910else
11911 ac_cv_lib_bsd_flock=no
11912fi
11913rm -f core conftest.err conftest.$ac_objext \
11914 conftest$ac_exeext conftest.$ac_ext
11915LIBS=$ac_check_lib_save_LIBS
11916fi
11917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11918$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011919if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011920 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011921
11922
11923$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11924
11925
11926fi
11927
11928
11929fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011930done
11931
Antoine Pitroua3000072010-09-07 14:52:42 +000011932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933
Matthias Kloseb9621712010-04-24 17:59:49 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11935$as_echo_n "checking for getpagesize... " >&6; }
11936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011937/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011938
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011939#include <unistd.h>
11940
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011941int
11942main ()
11943{
11944void* p = getpagesize
11945 ;
11946 return 0;
11947}
11948_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011949if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011952
Matthias Kloseb159a552010-04-25 21:00:44 +000011953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011954$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011955else
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11957$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011958
11959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011961
Victor Stinner984890f2011-11-24 13:53:38 +010011962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11963$as_echo_n "checking for broken unsetenv... " >&6; }
11964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11965/* end confdefs.h. */
11966
11967#include <stdlib.h>
11968
11969int
11970main ()
11971{
11972int res = unsetenv("DUMMY")
11973 ;
11974 return 0;
11975}
11976_ACEOF
11977if ac_fn_c_try_compile "$LINENO"; then :
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11979$as_echo "no" >&6; }
11980else
11981
11982$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11983
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11985$as_echo "yes" >&6; }
11986
11987fi
11988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11989
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011990for ac_prog in true
11991do
11992 # Extract the first word of "$ac_prog", so it can be a program name with args.
11993set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11995$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011998else
11999 if test -n "$TRUE"; then
12000 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12001else
12002as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12003for as_dir in $PATH
12004do
12005 IFS=$as_save_IFS
12006 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012008 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012009 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 $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 +000012011 break 2
12012 fi
12013done
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012016
12017fi
12018fi
12019TRUE=$ac_cv_prog_TRUE
12020if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12022$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012023else
Matthias Kloseb9621712010-04-24 17:59:49 +000012024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12025$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012026fi
12027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012029 test -n "$TRUE" && break
12030done
12031test -n "$TRUE" || TRUE="/bin/true"
12032
12033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12035$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012036if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012038else
12039 ac_check_lib_save_LIBS=$LIBS
12040LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012042/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012044/* Override any GCC internal prototype to avoid an error.
12045 Use char because int might match the return type of a GCC
12046 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012047#ifdef __cplusplus
12048extern "C"
12049#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012050char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012051int
12052main ()
12053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012055 ;
12056 return 0;
12057}
12058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012059if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060 ac_cv_lib_c_inet_aton=yes
12061else
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012064rm -f core conftest.err conftest.$ac_objext \
12065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066LIBS=$ac_check_lib_save_LIBS
12067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12069$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012071 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072else
Matthias Kloseb9621712010-04-24 17:59:49 +000012073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12074$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012075if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077else
12078 ac_check_lib_save_LIBS=$LIBS
12079LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012081/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012083/* Override any GCC internal prototype to avoid an error.
12084 Use char because int might match the return type of a GCC
12085 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012086#ifdef __cplusplus
12087extern "C"
12088#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012089char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012090int
12091main ()
12092{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012093return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012094 ;
12095 return 0;
12096}
12097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012099 ac_cv_lib_resolv_inet_aton=yes
12100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103rm -f core conftest.err conftest.$ac_objext \
12104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105LIBS=$ac_check_lib_save_LIBS
12106fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12108$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012110 cat >>confdefs.h <<_ACEOF
12111#define HAVE_LIBRESOLV 1
12112_ACEOF
12113
12114 LIBS="-lresolv $LIBS"
12115
12116fi
12117
12118
12119fi
12120
12121
Christian Heimesd0764e22007-12-04 15:00:33 +000012122# On Tru64, chflags seems to be present, but calling it will
12123# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12125$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012126if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012128else
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012130 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012133/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012134
Christian Heimesd0764e22007-12-04 15:00:33 +000012135#include <sys/stat.h>
12136#include <unistd.h>
12137int main(int argc, char*argv[])
12138{
12139 if(chflags(argv[0], 0) != 0)
12140 return 1;
12141 return 0;
12142}
Ned Deily3eb67d52011-06-28 00:00:28 -070012143
Christian Heimesd0764e22007-12-04 15:00:33 +000012144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012146 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12151 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012152fi
12153
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012154
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012155fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12157$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012158if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012159 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012160if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012161 ac_cv_have_chflags="yes"
12162else
12163 ac_cv_have_chflags="no"
12164fi
12165
12166fi
12167if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170
12171fi
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12174$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012179 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012182/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012183
Christian Heimesd0764e22007-12-04 15:00:33 +000012184#include <sys/stat.h>
12185#include <unistd.h>
12186int main(int argc, char*argv[])
12187{
12188 if(lchflags(argv[0], 0) != 0)
12189 return 1;
12190 return 0;
12191}
Ned Deily3eb67d52011-06-28 00:00:28 -070012192
Christian Heimesd0764e22007-12-04 15:00:33 +000012193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012195 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012196else
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012198fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012201fi
12202
12203
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12206$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012207if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012210 ac_cv_have_lchflags="yes"
12211else
12212 ac_cv_have_lchflags="no"
12213fi
12214
12215fi
12216if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012219
12220fi
12221
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012222case $ac_sys_system/$ac_sys_release in
12223Darwin/*)
12224 _CUR_CFLAGS="${CFLAGS}"
12225 _CUR_LDFLAGS="${LDFLAGS}"
12226 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12227 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12228 ;;
12229esac
12230
Matthias Kloseb9621712010-04-24 17:59:49 +000012231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12232$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012233if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012235else
12236 ac_check_lib_save_LIBS=$LIBS
12237LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012239/* end confdefs.h. */
12240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012241/* Override any GCC internal prototype to avoid an error.
12242 Use char because int might match the return type of a GCC
12243 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012244#ifdef __cplusplus
12245extern "C"
12246#endif
12247char inflateCopy ();
12248int
12249main ()
12250{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012252 ;
12253 return 0;
12254}
12255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012256if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012257 ac_cv_lib_z_inflateCopy=yes
12258else
Matthias Kloseb9621712010-04-24 17:59:49 +000012259 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012261rm -f core conftest.err conftest.$ac_objext \
12262 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012263LIBS=$ac_check_lib_save_LIBS
12264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12266$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012267if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012270
12271fi
12272
12273
12274case $ac_sys_system/$ac_sys_release in
12275Darwin/*)
12276 CFLAGS="${_CUR_CFLAGS}"
12277 LDFLAGS="${_CUR_LDFLAGS}"
12278 ;;
12279esac
12280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12282$as_echo_n "checking for hstrerror... " >&6; }
12283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012285
Martin v. Löwise9416172003-05-03 10:12:45 +000012286#include <netdb.h>
12287
Martin v. Löwise9416172003-05-03 10:12:45 +000012288int
12289main ()
12290{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012291void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012299
Matthias Kloseb159a552010-04-25 21:00:44 +000012300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012305
12306fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012307rm -f core conftest.err conftest.$ac_objext \
12308 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309
Matthias Kloseb9621712010-04-24 17:59:49 +000012310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12311$as_echo_n "checking for inet_aton... " >&6; }
12312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012313/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012314
Martin v. Löwis86d66262006-02-17 08:40:11 +000012315#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012316#include <sys/socket.h>
12317#include <netinet/in.h>
12318#include <arpa/inet.h>
12319
Martin v. Löwise9416172003-05-03 10:12:45 +000012320int
12321main ()
12322{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012323void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012324 ;
12325 return 0;
12326}
12327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012328if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012329
Matthias Kloseb9621712010-04-24 17:59:49 +000012330$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012331
Matthias Kloseb159a552010-04-25 21:00:44 +000012332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012337
12338fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012339rm -f core conftest.err conftest.$ac_objext \
12340 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12343$as_echo_n "checking for inet_pton... " >&6; }
12344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012345/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012346
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012347#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012348#include <sys/socket.h>
12349#include <netinet/in.h>
12350#include <arpa/inet.h>
12351
Martin v. Löwise9416172003-05-03 10:12:45 +000012352int
12353main ()
12354{
12355void* p = inet_pton
12356 ;
12357 return 0;
12358}
12359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012361
Matthias Kloseb9621712010-04-24 17:59:49 +000012362$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012363
Matthias Kloseb159a552010-04-25 21:00:44 +000012364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012365$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012366else
Matthias Kloseb9621712010-04-24 17:59:49 +000012367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12368$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012369
12370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012372
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012373# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12375$as_echo_n "checking for setgroups... " >&6; }
12376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012377/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012378
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012379#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012380#ifdef HAVE_GRP_H
12381#include <grp.h>
12382#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012383
Martin v. Löwisd5843682002-11-21 20:41:28 +000012384int
12385main ()
12386{
12387void* p = setgroups
12388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012395
Matthias Kloseb159a552010-04-25 21:00:44 +000012396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012397$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012401
12402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012404
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012405# check for openpty and forkpty
12406
12407for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012408do :
12409 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012410if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012411 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012413_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012415else
Matthias Kloseb9621712010-04-24 17:59:49 +000012416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12417$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012418if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012420else
Martin v. Löwis11437992002-04-12 09:54:03 +000012421 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012422LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012426/* Override any GCC internal prototype to avoid an error.
12427 Use char because int might match the return type of a GCC
12428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012429#ifdef __cplusplus
12430extern "C"
12431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012432char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012433int
12434main ()
12435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012437 ;
12438 return 0;
12439}
12440_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012443else
Matthias Kloseb9621712010-04-24 17:59:49 +000012444 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012445fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012446rm -f core conftest.err conftest.$ac_objext \
12447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012448LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12451$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012452if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012453 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012454 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012455else
Matthias Kloseb9621712010-04-24 17:59:49 +000012456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12457$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012458if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012460else
12461 ac_check_lib_save_LIBS=$LIBS
12462LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012464/* end confdefs.h. */
12465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012466/* Override any GCC internal prototype to avoid an error.
12467 Use char because int might match the return type of a GCC
12468 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012469#ifdef __cplusplus
12470extern "C"
12471#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012472char openpty ();
12473int
12474main ()
12475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012477 ;
12478 return 0;
12479}
12480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012482 ac_cv_lib_bsd_openpty=yes
12483else
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012486rm -f core conftest.err conftest.$ac_objext \
12487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012488LIBS=$ac_check_lib_save_LIBS
12489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12491$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012492if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012493 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012494 LIBS="$LIBS -lbsd"
12495fi
12496
12497
12498fi
12499
Fred Drake8cef4cf2000-06-28 16:40:38 +000012500
12501fi
12502done
12503
12504for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012505do :
12506 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012507if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012510_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511
Fred Drake8cef4cf2000-06-28 16:40:38 +000012512else
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12514$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012515if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517else
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012519LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523/* Override any GCC internal prototype to avoid an error.
12524 Use char because int might match the return type of a GCC
12525 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012526#ifdef __cplusplus
12527extern "C"
12528#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012529char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012530int
12531main ()
12532{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012543rm -f core conftest.err conftest.$ac_objext \
12544 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012545LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12548$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012549if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012551 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012552else
Matthias Kloseb9621712010-04-24 17:59:49 +000012553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12554$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012555if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012557else
12558 ac_check_lib_save_LIBS=$LIBS
12559LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012561/* end confdefs.h. */
12562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563/* Override any GCC internal prototype to avoid an error.
12564 Use char because int might match the return type of a GCC
12565 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012566#ifdef __cplusplus
12567extern "C"
12568#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012569char forkpty ();
12570int
12571main ()
12572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012574 ;
12575 return 0;
12576}
12577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012578if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012579 ac_cv_lib_bsd_forkpty=yes
12580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012582fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012583rm -f core conftest.err conftest.$ac_objext \
12584 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012585LIBS=$ac_check_lib_save_LIBS
12586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12588$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012589if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012591 LIBS="$LIBS -lbsd"
12592fi
12593
12594
12595fi
12596
Fred Drake8cef4cf2000-06-28 16:40:38 +000012597
12598fi
12599done
12600
Jack Jansendd19cf82001-12-06 22:36:17 +000012601
Michael W. Hudson54241132001-12-07 15:38:26 +000012602# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012603for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012604do :
12605 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12606ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012607if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012609#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012610_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012611
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012612fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012613done
12614
Michael W. Hudson54241132001-12-07 15:38:26 +000012615
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012616ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012617if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012618 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012619
Martin v. Löwis1142de32002-03-29 16:28:31 +000012620else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012622 *" dup2.$ac_objext "* ) ;;
12623 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012625esac
12626
Martin v. Löwis1142de32002-03-29 16:28:31 +000012627fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012628
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012629ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012630if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012631 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12632
12633else
12634 case " $LIBOBJS " in
12635 *" strdup.$ac_objext "* ) ;;
12636 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12637 ;;
12638esac
12639
12640fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012641
12642
12643for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012644do :
12645 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012646if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012648#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012651/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012652#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012653int
12654main ()
12655{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012656getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012657 ;
12658 return 0;
12659}
12660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Matthias Kloseb9621712010-04-24 17:59:49 +000012663$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012664
Guido van Rossum627b2d71993-12-24 10:39:16 +000012665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012667
Guido van Rossum627b2d71993-12-24 10:39:16 +000012668fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012669done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012670
Jack Jansen150753c2003-03-29 22:07:47 +000012671for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012672do :
12673 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012674if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012676#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012680#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012681int
12682main ()
12683{
12684setpgrp(0,0);
12685 ;
12686 return 0;
12687}
12688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012689if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012692
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012695
12696fi
12697done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012698
Thomas Wouters3a584202000-08-05 23:28:51 +000012699for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012700do :
12701 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012702if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012703 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012707/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012709int
12710main ()
12711{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 ;
12714 return 0;
12715}
12716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if ac_fn_c_try_compile "$LINENO"; then :
12718
Guido van Rossum627b2d71993-12-24 10:39:16 +000012719else
Skip Montanaro6dead952003-09-25 14:50:04 +000012720
Matthias Kloseb9621712010-04-24 17:59:49 +000012721$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012722
Martin v. Löwis11437992002-04-12 09:54:03 +000012723
Guido van Rossum627b2d71993-12-24 10:39:16 +000012724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012726
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012728done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729
Michael W. Hudson54241132001-12-07 15:38:26 +000012730
Gregory P. Smith387512c2018-12-30 15:42:32 -080012731# We search for both crypt and crypt_r as one or the other may be defined
12732# This gets us our -lcrypt in LIBS when required on the target platform.
12733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12734$as_echo_n "checking for library containing crypt... " >&6; }
12735if ${ac_cv_search_crypt+:} false; then :
12736 $as_echo_n "(cached) " >&6
12737else
12738 ac_func_search_save_LIBS=$LIBS
12739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12740/* end confdefs.h. */
12741
12742/* Override any GCC internal prototype to avoid an error.
12743 Use char because int might match the return type of a GCC
12744 builtin and then its argument prototype would still apply. */
12745#ifdef __cplusplus
12746extern "C"
12747#endif
12748char crypt ();
12749int
12750main ()
12751{
12752return crypt ();
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757for ac_lib in '' crypt; do
12758 if test -z "$ac_lib"; then
12759 ac_res="none required"
12760 else
12761 ac_res=-l$ac_lib
12762 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12763 fi
12764 if ac_fn_c_try_link "$LINENO"; then :
12765 ac_cv_search_crypt=$ac_res
12766fi
12767rm -f core conftest.err conftest.$ac_objext \
12768 conftest$ac_exeext
12769 if ${ac_cv_search_crypt+:} false; then :
12770 break
12771fi
12772done
12773if ${ac_cv_search_crypt+:} false; then :
12774
12775else
12776 ac_cv_search_crypt=no
12777fi
12778rm conftest.$ac_ext
12779LIBS=$ac_func_search_save_LIBS
12780fi
12781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12782$as_echo "$ac_cv_search_crypt" >&6; }
12783ac_res=$ac_cv_search_crypt
12784if test "$ac_res" != no; then :
12785 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12786
12787fi
12788
12789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12790$as_echo_n "checking for library containing crypt_r... " >&6; }
12791if ${ac_cv_search_crypt_r+:} false; then :
12792 $as_echo_n "(cached) " >&6
12793else
12794 ac_func_search_save_LIBS=$LIBS
12795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12796/* end confdefs.h. */
12797
12798/* Override any GCC internal prototype to avoid an error.
12799 Use char because int might match the return type of a GCC
12800 builtin and then its argument prototype would still apply. */
12801#ifdef __cplusplus
12802extern "C"
12803#endif
12804char crypt_r ();
12805int
12806main ()
12807{
12808return crypt_r ();
12809 ;
12810 return 0;
12811}
12812_ACEOF
12813for ac_lib in '' crypt; do
12814 if test -z "$ac_lib"; then
12815 ac_res="none required"
12816 else
12817 ac_res=-l$ac_lib
12818 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12819 fi
12820 if ac_fn_c_try_link "$LINENO"; then :
12821 ac_cv_search_crypt_r=$ac_res
12822fi
12823rm -f core conftest.err conftest.$ac_objext \
12824 conftest$ac_exeext
12825 if ${ac_cv_search_crypt_r+:} false; then :
12826 break
12827fi
12828done
12829if ${ac_cv_search_crypt_r+:} false; then :
12830
12831else
12832 ac_cv_search_crypt_r=no
12833fi
12834rm conftest.$ac_ext
12835LIBS=$ac_func_search_save_LIBS
12836fi
12837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12838$as_echo "$ac_cv_search_crypt_r" >&6; }
12839ac_res=$ac_cv_search_crypt_r
12840if test "$ac_res" != no; then :
12841 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12842
12843fi
12844
12845
12846ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12847if test "x$ac_cv_func_crypt_r" = xyes; then :
12848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12849/* end confdefs.h. */
12850
12851#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12852#include <crypt.h>
12853
12854int
12855main ()
12856{
12857
12858struct crypt_data d;
12859char *r = crypt_r("", "", &d);
12860
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865if ac_fn_c_try_compile "$LINENO"; then :
12866
12867$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12868
12869fi
12870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12871
12872fi
12873
12874
Victor Stinnere0be4232011-10-25 13:06:09 +020012875for ac_func in clock_gettime
12876do :
12877 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12878if test "x$ac_cv_func_clock_gettime" = xyes; then :
12879 cat >>confdefs.h <<_ACEOF
12880#define HAVE_CLOCK_GETTIME 1
12881_ACEOF
12882
12883else
12884
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12886$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12887if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12888 $as_echo_n "(cached) " >&6
12889else
12890 ac_check_lib_save_LIBS=$LIBS
12891LIBS="-lrt $LIBS"
12892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12893/* end confdefs.h. */
12894
12895/* Override any GCC internal prototype to avoid an error.
12896 Use char because int might match the return type of a GCC
12897 builtin and then its argument prototype would still apply. */
12898#ifdef __cplusplus
12899extern "C"
12900#endif
12901char clock_gettime ();
12902int
12903main ()
12904{
12905return clock_gettime ();
12906 ;
12907 return 0;
12908}
12909_ACEOF
12910if ac_fn_c_try_link "$LINENO"; then :
12911 ac_cv_lib_rt_clock_gettime=yes
12912else
12913 ac_cv_lib_rt_clock_gettime=no
12914fi
12915rm -f core conftest.err conftest.$ac_objext \
12916 conftest$ac_exeext conftest.$ac_ext
12917LIBS=$ac_check_lib_save_LIBS
12918fi
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12920$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12921if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12922
Victor Stinner7efb8332014-08-29 15:41:08 +020012923 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012924 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12925
12926
12927$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12928
12929
12930fi
12931
12932
12933fi
12934done
12935
12936
12937for ac_func in clock_getres
12938do :
12939 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12940if test "x$ac_cv_func_clock_getres" = xyes; then :
12941 cat >>confdefs.h <<_ACEOF
12942#define HAVE_CLOCK_GETRES 1
12943_ACEOF
12944
12945else
12946
12947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12948$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12949if ${ac_cv_lib_rt_clock_getres+:} false; then :
12950 $as_echo_n "(cached) " >&6
12951else
12952 ac_check_lib_save_LIBS=$LIBS
12953LIBS="-lrt $LIBS"
12954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12955/* end confdefs.h. */
12956
12957/* Override any GCC internal prototype to avoid an error.
12958 Use char because int might match the return type of a GCC
12959 builtin and then its argument prototype would still apply. */
12960#ifdef __cplusplus
12961extern "C"
12962#endif
12963char clock_getres ();
12964int
12965main ()
12966{
12967return clock_getres ();
12968 ;
12969 return 0;
12970}
12971_ACEOF
12972if ac_fn_c_try_link "$LINENO"; then :
12973 ac_cv_lib_rt_clock_getres=yes
12974else
12975 ac_cv_lib_rt_clock_getres=no
12976fi
12977rm -f core conftest.err conftest.$ac_objext \
12978 conftest$ac_exeext conftest.$ac_ext
12979LIBS=$ac_check_lib_save_LIBS
12980fi
12981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12982$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12983if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12984
12985 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12986
12987
12988fi
12989
12990
12991fi
12992done
12993
12994
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012995for ac_func in clock_settime
12996do :
12997 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12998if test "x$ac_cv_func_clock_settime" = xyes; then :
12999 cat >>confdefs.h <<_ACEOF
13000#define HAVE_CLOCK_SETTIME 1
13001_ACEOF
13002
13003else
13004
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13006$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13007if ${ac_cv_lib_rt_clock_settime+:} false; then :
13008 $as_echo_n "(cached) " >&6
13009else
13010 ac_check_lib_save_LIBS=$LIBS
13011LIBS="-lrt $LIBS"
13012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13013/* end confdefs.h. */
13014
13015/* Override any GCC internal prototype to avoid an error.
13016 Use char because int might match the return type of a GCC
13017 builtin and then its argument prototype would still apply. */
13018#ifdef __cplusplus
13019extern "C"
13020#endif
13021char clock_settime ();
13022int
13023main ()
13024{
13025return clock_settime ();
13026 ;
13027 return 0;
13028}
13029_ACEOF
13030if ac_fn_c_try_link "$LINENO"; then :
13031 ac_cv_lib_rt_clock_settime=yes
13032else
13033 ac_cv_lib_rt_clock_settime=no
13034fi
13035rm -f core conftest.err conftest.$ac_objext \
13036 conftest$ac_exeext conftest.$ac_ext
13037LIBS=$ac_check_lib_save_LIBS
13038fi
13039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13040$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13041if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13042
13043 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13044
13045
13046fi
13047
13048
13049fi
13050done
13051
13052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13054$as_echo_n "checking for major... " >&6; }
13055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013056/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013057
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013058#if defined(MAJOR_IN_MKDEV)
13059#include <sys/mkdev.h>
13060#elif defined(MAJOR_IN_SYSMACROS)
13061#include <sys/sysmacros.h>
13062#else
13063#include <sys/types.h>
13064#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013065
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013066int
13067main ()
13068{
13069
13070 makedev(major(0),minor(0));
13071
13072 ;
13073 return 0;
13074}
13075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013076if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013077
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13082$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013083
13084else
Skip Montanaro6dead952003-09-25 14:50:04 +000013085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013088
13089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013090rm -f core conftest.err conftest.$ac_objext \
13091 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013092
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013093# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013094# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13096$as_echo_n "checking for getaddrinfo... " >&6; }
13097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013098/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013099
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013100#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013101#include <sys/socket.h>
13102#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013103#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105int
13106main ()
13107{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013108getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 ;
13110 return 0;
13111}
13112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013113if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114 have_getaddrinfo=yes
13115else
Matthias Kloseb9621712010-04-24 17:59:49 +000013116 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013117fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013118rm -f core conftest.err conftest.$ac_objext \
13119 conftest$ac_exeext conftest.$ac_ext
13120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13121$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122if test $have_getaddrinfo = yes
13123then
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13125$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013126 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013127 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013128else
Matthias Kloseb9621712010-04-24 17:59:49 +000013129 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013130
13131if test "${enable_ipv6+set}" = set; then
13132 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13133else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013134 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013135fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013136else
Matthias Kloseb9621712010-04-24 17:59:49 +000013137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013138/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013139
Stefan Krah19c21392012-11-22 23:47:32 +010013140#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013141#include <sys/types.h>
13142#include <netdb.h>
13143#include <string.h>
13144#include <sys/socket.h>
13145#include <netinet/in.h>
13146
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013147int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013148{
13149 int passive, gaierr, inet4 = 0, inet6 = 0;
13150 struct addrinfo hints, *ai, *aitop;
13151 char straddr[INET6_ADDRSTRLEN], strport[16];
13152
13153 for (passive = 0; passive <= 1; passive++) {
13154 memset(&hints, 0, sizeof(hints));
13155 hints.ai_family = AF_UNSPEC;
13156 hints.ai_flags = passive ? AI_PASSIVE : 0;
13157 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013158 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013159 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13160 (void)gai_strerror(gaierr);
13161 goto bad;
13162 }
13163 for (ai = aitop; ai; ai = ai->ai_next) {
13164 if (ai->ai_addr == NULL ||
13165 ai->ai_addrlen == 0 ||
13166 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13167 straddr, sizeof(straddr), strport, sizeof(strport),
13168 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13169 goto bad;
13170 }
13171 switch (ai->ai_family) {
13172 case AF_INET:
13173 if (strcmp(strport, "54321") != 0) {
13174 goto bad;
13175 }
13176 if (passive) {
13177 if (strcmp(straddr, "0.0.0.0") != 0) {
13178 goto bad;
13179 }
13180 } else {
13181 if (strcmp(straddr, "127.0.0.1") != 0) {
13182 goto bad;
13183 }
13184 }
13185 inet4++;
13186 break;
13187 case AF_INET6:
13188 if (strcmp(strport, "54321") != 0) {
13189 goto bad;
13190 }
13191 if (passive) {
13192 if (strcmp(straddr, "::") != 0) {
13193 goto bad;
13194 }
13195 } else {
13196 if (strcmp(straddr, "::1") != 0) {
13197 goto bad;
13198 }
13199 }
13200 inet6++;
13201 break;
13202 case AF_UNSPEC:
13203 goto bad;
13204 break;
13205 default:
13206 /* another family support? */
13207 break;
13208 }
13209 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013210 freeaddrinfo(aitop);
13211 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013212 }
13213
13214 if (!(inet4 == 0 || inet4 == 2))
13215 goto bad;
13216 if (!(inet6 == 0 || inet6 == 2))
13217 goto bad;
13218
13219 if (aitop)
13220 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013221 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222
13223 bad:
13224 if (aitop)
13225 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013226 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013227}
13228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013230if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013231 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013235rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13236 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013240
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13244$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13245
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013246if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013247then
13248 if test $ipv6 = yes
13249 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250 echo 'Fatal: You must get working getaddrinfo() function.'
13251 echo ' or you can specify "--disable-ipv6"'.
13252 exit 1
13253 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013254else
Martin v. Löwis11437992002-04-12 09:54:03 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013257
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013258fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013259
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013260for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013261do :
13262 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013263if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013266_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013268fi
13269done
13270
Michael W. Hudson54241132001-12-07 15:38:26 +000013271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13274$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013275if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013279/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280#include <sys/types.h>
13281#include <sys/time.h>
13282#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013283
Martin v. Löwis11437992002-04-12 09:54:03 +000013284int
13285main ()
13286{
13287if ((struct tm *) 0)
13288return 0;
13289 ;
13290 return 0;
13291}
13292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013293if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013294 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013295else
Matthias Kloseb9621712010-04-24 17:59:49 +000013296 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13301$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013302if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305
13306fi
13307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13309$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013310if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013312else
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013314/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315#include <sys/types.h>
13316#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Martin v. Löwis11437992002-04-12 09:54:03 +000013318int
13319main ()
13320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013321struct tm tm;
13322 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ;
13325 return 0;
13326}
13327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329 ac_cv_struct_tm=time.h
13330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13336$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013337if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
Matthias Kloseb9621712010-04-24 17:59:49 +000013339$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013340
13341fi
13342
Matthias Kloseb9621712010-04-24 17:59:49 +000013343ac_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 +000013344#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Matthias Kloseb9621712010-04-24 17:59:49 +000013346"
Victor Stinnere0be4232011-10-25 13:06:09 +020013347if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
13349cat >>confdefs.h <<_ACEOF
13350#define HAVE_STRUCT_TM_TM_ZONE 1
13351_ACEOF
13352
13353
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013355
Martin v. Löwis11437992002-04-12 09:54:03 +000013356if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359
13360else
Matthias Kloseb9621712010-04-24 17:59:49 +000013361 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13362"
Victor Stinnere0be4232011-10-25 13:06:09 +020013363if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013364 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365else
Matthias Kloseb9621712010-04-24 17:59:49 +000013366 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013367fi
13368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013369cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013371_ACEOF
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13374$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013375if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013376 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377else
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013379/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013380#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013381#if !HAVE_DECL_TZNAME
13382extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385int
13386main ()
13387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013388return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ;
13390 return 0;
13391}
13392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013394 ac_cv_var_tzname=yes
13395else
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013398rm -f core conftest.err conftest.$ac_objext \
13399 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13402$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013403 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013407 fi
13408fi
13409
Matthias Kloseb9621712010-04-24 17:59:49 +000013410ac_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 +020013411if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
13413cat >>confdefs.h <<_ACEOF
13414#define HAVE_STRUCT_STAT_ST_RDEV 1
13415_ACEOF
13416
13417
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013418fi
13419
Matthias Kloseb9621712010-04-24 17:59:49 +000013420ac_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 +020013421if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013422
Martin v. Löwis11437992002-04-12 09:54:03 +000013423cat >>confdefs.h <<_ACEOF
13424#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13425_ACEOF
13426
13427
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013428fi
13429
Matthias Kloseb9621712010-04-24 17:59:49 +000013430ac_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 +020013431if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013432
13433cat >>confdefs.h <<_ACEOF
13434#define HAVE_STRUCT_STAT_ST_FLAGS 1
13435_ACEOF
13436
13437
13438fi
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440ac_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 +020013441if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013442
13443cat >>confdefs.h <<_ACEOF
13444#define HAVE_STRUCT_STAT_ST_GEN 1
13445_ACEOF
13446
13447
13448fi
13449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450ac_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 +020013451if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013452
13453cat >>confdefs.h <<_ACEOF
13454#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13455_ACEOF
13456
13457
13458fi
13459
Matthias Kloseb9621712010-04-24 17:59:49 +000013460ac_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 +020013461if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013462
Martin v. Löwis11437992002-04-12 09:54:03 +000013463cat >>confdefs.h <<_ACEOF
13464#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13465_ACEOF
13466
13467
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013468fi
13469
Stefan Krah267b6392016-04-26 01:09:18 +020013470ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13471 #include <sys/types.h>
13472 #include <pwd.h>
13473
13474"
13475if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13476
13477cat >>confdefs.h <<_ACEOF
13478#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13479_ACEOF
13480
13481
13482fi
13483ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13484 #include <sys/types.h>
13485 #include <pwd.h>
13486
13487"
13488if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13489
13490cat >>confdefs.h <<_ACEOF
13491#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13492_ACEOF
13493
13494
13495fi
13496
Zachary Ware6a6967e2016-10-01 00:47:27 -050013497# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13498ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13499"
13500if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13501
13502cat >>confdefs.h <<_ACEOF
13503#define HAVE_SIGINFO_T_SI_BAND 1
13504_ACEOF
13505
13506
13507fi
13508
Michael W. Hudson54241132001-12-07 15:38:26 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13511$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013512if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514else
Matthias Kloseb159a552010-04-25 21:00:44 +000013515
Matthias Kloseb9621712010-04-24 17:59:49 +000013516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013517/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013518#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013519int
13520main ()
13521{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013522return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 ;
13524 return 0;
13525}
13526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013527if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528 ac_cv_header_time_altzone=yes
13529else
Matthias Kloseb9621712010-04-24 17:59:49 +000013530 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013534fi
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13537$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013538if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013541
13542fi
13543
Guido van Rossumda88dad1995-01-26 00:46:29 +000013544was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13546$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013548/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013549
13550#include <sys/types.h>
13551#include <sys/select.h>
13552#include <sys/time.h>
13553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554int
13555main ()
13556{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013557;
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 ;
13559 return 0;
13560}
13561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013563
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013566
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013567 was_it_defined=yes
13568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13572$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573
Matthias Kloseb9621712010-04-24 17:59:49 +000013574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13575$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013576if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578else
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013581#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013582int
13583main ()
13584{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013585struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013586 ;
13587 return 0;
13588}
13589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013591 ac_cv_struct_addrinfo=yes
13592else
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13596fi
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13599$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Matthias Kloseb9621712010-04-24 17:59:49 +000013602$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603
13604fi
13605
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13607$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013608if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013612/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013613
13614# include <sys/types.h>
13615# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013616int
13617main ()
13618{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013619struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013620 ;
13621 return 0;
13622}
13623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013624if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013625 ac_cv_struct_sockaddr_storage=yes
13626else
Matthias Kloseb9621712010-04-24 17:59:49 +000013627 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13630fi
13631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13633$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013635
Matthias Kloseb9621712010-04-24 17:59:49 +000013636$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013637
13638fi
13639
Christian Heimesdffa3942016-09-05 23:54:41 +020013640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13641$as_echo_n "checking for sockaddr_alg... " >&6; }
13642if ${ac_cv_struct_sockaddr_alg+:} false; then :
13643 $as_echo_n "(cached) " >&6
13644else
13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13646/* end confdefs.h. */
13647
13648# include <sys/types.h>
13649# include <sys/socket.h>
13650# include <linux/if_alg.h>
13651int
13652main ()
13653{
13654struct sockaddr_alg s
13655 ;
13656 return 0;
13657}
13658_ACEOF
13659if ac_fn_c_try_compile "$LINENO"; then :
13660 ac_cv_struct_sockaddr_alg=yes
13661else
13662 ac_cv_struct_sockaddr_alg=no
13663fi
13664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13665fi
13666
13667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13668$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13669if test $ac_cv_struct_sockaddr_alg = yes; then
13670
13671$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13672
13673fi
13674
Guido van Rossum627b2d71993-12-24 10:39:16 +000013675# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13678$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013679if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013684$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
13688static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013689test_array [0] = 0;
13690return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013691
13692 ;
13693 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013694}
Martin v. Löwis11437992002-04-12 09:54:03 +000013695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013696if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013697 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013700fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013702fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13704$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013705if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013707
13708fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13711$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013712if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013716/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718int
13719main ()
13720{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013723 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013725 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013726 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727 char const *const *pcpcc;
13728 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 /* NEC SVR4.0.2 mips cc rejects this. */
13730 struct point {int x, y;};
13731 static struct point const zero = {0,0};
13732 /* AIX XL C 1.02.0.0 rejects this.
13733 It does not let you subtract one const X* pointer from another in
13734 an arm of an if-expression whose if-part is not a constant
13735 expression */
13736 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013737 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013738 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013739 ++pcpcc;
13740 ppc = (char**) pcpcc;
13741 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013742 { /* SCO 3.2v4 cc rejects this sort of thing. */
13743 char tx;
13744 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013749 }
13750 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13751 int x[] = {25, 17};
13752 const int *foo = &x[0];
13753 ++foo;
13754 }
13755 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13756 typedef const int *iptr;
13757 iptr p = 0;
13758 ++p;
13759 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013760 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013762 struct s { int j; const int *ap[3]; } bx;
13763 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 }
13765 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13766 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013767 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013768 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013770#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013771
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ;
13773 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013774}
Martin v. Löwis11437992002-04-12 09:54:03 +000013775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013776if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777 ac_cv_c_const=yes
13778else
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13784$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013786
Matthias Kloseb9621712010-04-24 17:59:49 +000013787$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013788
13789fi
13790
Michael W. Hudson54241132001-12-07 15:38:26 +000013791
Guido van Rossumda88dad1995-01-26 00:46:29 +000013792works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13794$as_echo_n "checking for working signed char... " >&6; }
13795cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013796/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013797
Martin v. Löwis11437992002-04-12 09:54:03 +000013798int
13799main ()
13800{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013801signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013802 ;
13803 return 0;
13804}
13805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013806if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013807 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013808else
Skip Montanaro6dead952003-09-25 14:50:04 +000013809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013811
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013812
Guido van Rossum7f43da71994-08-01 12:15:30 +000013813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13816$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013817
Guido van Rossumda88dad1995-01-26 00:46:29 +000013818have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13820$as_echo_n "checking for prototypes... " >&6; }
13821cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013822/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013823int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013824int
13825main ()
13826{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013827return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 ;
13829 return 0;
13830}
13831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013832if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013835
Matthias Kloseb159a552010-04-25 21:00:44 +000013836 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13840$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013841
Guido van Rossumda88dad1995-01-26 00:46:29 +000013842works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13844$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013846/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013847
13848#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013849int foo(int x, ...) {
13850 va_list va;
13851 va_start(va, x);
13852 va_arg(va, int);
13853 va_arg(va, char *);
13854 va_arg(va, double);
13855 return 0;
13856}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013857
Martin v. Löwis11437992002-04-12 09:54:03 +000013858int
13859main ()
13860{
Guido van Rossum90eea071996-08-30 20:58:57 +000013861return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 ;
13863 return 0;
13864}
13865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013867
13868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013870
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013871 works=yes
13872
Guido van Rossum627b2d71993-12-24 10:39:16 +000013873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13876$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013877
Martin v. Löwisd6320502004-08-12 13:45:08 +000013878# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13880$as_echo_n "checking for socketpair... " >&6; }
13881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013882/* end confdefs.h. */
13883
13884#include <sys/types.h>
13885#include <sys/socket.h>
13886
13887int
13888main ()
13889{
13890void *x=socketpair
13891 ;
13892 return 0;
13893}
13894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013898
Matthias Kloseb159a552010-04-25 21:00:44 +000013899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013900$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013901else
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13903$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013904
13905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013907
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013908# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13910$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013912/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013913#include <sys/types.h>
13914#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013915int
13916main ()
13917{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013918struct sockaddr x;
13919x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013920 ;
13921 return 0;
13922}
13923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013924if ac_fn_c_try_compile "$LINENO"; then :
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13926$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013927
Matthias Kloseb9621712010-04-24 17:59:49 +000013928$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013929
13930else
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013933
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013936
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013937# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
13939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013941if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013944
Matthias Kloseb9621712010-04-24 17:59:49 +000013945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13946$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013947 OLD_CFLAGS=$CFLAGS
13948 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013950/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013951
13952# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013953
Martin v. Löwis11437992002-04-12 09:54:03 +000013954int
13955main ()
13956{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013957
13958 char *name;
13959 struct hostent *he, *res;
13960 char buffer[2048];
13961 int buflen = 2048;
13962 int h_errnop;
13963
13964 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
13966 ;
13967 return 0;
13968}
13969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013970if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013973
Martin v. Löwis11437992002-04-12 09:54:03 +000013974
Matthias Kloseb9621712010-04-24 17:59:49 +000013975$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13978$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980else
Skip Montanaro6dead952003-09-25 14:50:04 +000013981
Matthias Kloseb9621712010-04-24 17:59:49 +000013982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13983$as_echo "no" >&6; }
13984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13985$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013987/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013989# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013990
Martin v. Löwis11437992002-04-12 09:54:03 +000013991int
13992main ()
13993{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013994
13995 char *name;
13996 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013997 char buffer[2048];
13998 int buflen = 2048;
13999 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014000
Matthias Kloseb159a552010-04-25 21:00:44 +000014001 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014002
14003 ;
14004 return 0;
14005}
14006_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014007if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Matthias Kloseb159a552010-04-25 21:00:44 +000014012$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014013
Matthias Kloseb9621712010-04-24 17:59:49 +000014014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14015$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014016
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017else
Skip Montanaro6dead952003-09-25 14:50:04 +000014018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14020$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14022$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14024/* end confdefs.h. */
14025
14026# include <netdb.h>
14027
14028int
14029main ()
14030{
14031
14032 char *name;
14033 struct hostent *he;
14034 struct hostent_data data;
14035
14036 (void) gethostbyname_r(name, he, &data);
14037
14038 ;
14039 return 0;
14040}
14041_ACEOF
14042if ac_fn_c_try_compile "$LINENO"; then :
14043
14044 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14045
14046
14047$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14048
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14050$as_echo "yes" >&6; }
14051
14052else
14053
14054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14055$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014056
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014059
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014062
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014065 CFLAGS=$OLD_CFLAGS
14066
14067else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 for ac_func in gethostbyname
14070do :
14071 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014072if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014074#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014075_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014077fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014078done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014079
Michael W. Hudson54241132001-12-07 15:38:26 +000014080
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014081fi
14082
Michael W. Hudson54241132001-12-07 15:38:26 +000014083
14084
14085
14086
14087
14088
Guido van Rossum627b2d71993-12-24 10:39:16 +000014089# checks for system services
14090# (none yet)
14091
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014093ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014094if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014095
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014096else
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14098$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014099if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101else
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014103LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107/* Override any GCC internal prototype to avoid an error.
14108 Use char because int might match the return type of a GCC
14109 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014110#ifdef __cplusplus
14111extern "C"
14112#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014113char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014114int
14115main ()
14116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014118 ;
14119 return 0;
14120}
14121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014124else
Matthias Kloseb9621712010-04-24 17:59:49 +000014125 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014127rm -f core conftest.err conftest.$ac_objext \
14128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014129LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14132$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014133if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 cat >>confdefs.h <<_ACEOF
14135#define HAVE_LIBIEEE 1
14136_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014137
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014138 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014139
Guido van Rossum627b2d71993-12-24 10:39:16 +000014140fi
14141
Michael W. Hudson54241132001-12-07 15:38:26 +000014142
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014143fi
14144
Michael W. Hudson54241132001-12-07 15:38:26 +000014145
Guido van Rossum7f43da71994-08-01 12:15:30 +000014146# check for --with-libm=...
14147
Guido van Rossum563e7081996-09-10 18:20:48 +000014148case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014149Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014150*) LIBM=-lm
14151esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14153$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014155# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014157 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014158if test "$withval" = no
14159then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14161$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014162elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014163then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14165$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014166else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014167fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14170$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171fi
14172
Guido van Rossum7f43da71994-08-01 12:15:30 +000014173
14174# check for --with-libc=...
14175
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14177$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014179# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014180if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014182if test "$withval" = no
14183then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14185$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014186elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014187then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14189$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014190else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014191fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14194$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195fi
14196
Guido van Rossum7f43da71994-08-01 12:15:30 +000014197
Stefan Krah1919b7e2012-03-21 18:25:23 +010014198# **************************************
14199# * Check for gcc x64 inline assembler *
14200# **************************************
14201
14202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14203$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14205/* end confdefs.h. */
14206
14207int
14208main ()
14209{
14210
14211 __asm__ __volatile__ ("movq %rcx, %rax");
14212
14213 ;
14214 return 0;
14215}
14216_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014217if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014218 have_gcc_asm_for_x64=yes
14219else
14220 have_gcc_asm_for_x64=no
14221fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014222rm -f core conftest.err conftest.$ac_objext \
14223 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14225$as_echo "$have_gcc_asm_for_x64" >&6; }
14226if test "$have_gcc_asm_for_x64" = yes
14227then
14228
14229$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14230
14231fi
14232
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014233# **************************************************
14234# * Check for various properties of floating point *
14235# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014236
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14238$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14239if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241else
14242
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014243
14244ax_cv_c_float_words_bigendian=unknown
14245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014246/* end confdefs.h. */
14247
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014248
14249double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14250
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014251
14252_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014253if ac_fn_c_try_compile "$LINENO"; then :
14254
14255
14256if grep noonsees conftest.$ac_objext >/dev/null ; then
14257 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014258fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014259if grep seesnoon conftest.$ac_objext >/dev/null ; then
14260 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14261 ax_cv_c_float_words_bigendian=no
14262 else
14263 ax_cv_c_float_words_bigendian=unknown
14264 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265fi
14266
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014267
14268fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014270fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14272$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014273
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014274case $ax_cv_c_float_words_bigendian in
14275 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014276
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014277$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14278 ;;
14279 no)
14280 ;;
14281 *)
14282 as_fn_error $? "
14283
14284Unknown float word ordering. You need to manually preset
14285ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14286
14287 " "$LINENO" 5 ;;
14288esac
14289
14290
14291if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014292then
14293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014295
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014296elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014297then
14298
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014299$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14300
14301else
14302 # Some ARM platforms use a mixed-endian representation for doubles.
14303 # While Python doesn't currently have full support for these platforms
14304 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14305 # conversions work.
14306 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14307 # or little, then it must be this?
14308
Matthias Kloseb9621712010-04-24 17:59:49 +000014309$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310
14311fi
14312
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014313# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014314# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014315# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014316# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014317# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014318# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014319
14320# This inline assembler syntax may also work for suncc and icc,
14321# so we try it on all platforms.
14322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14324$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014326/* end confdefs.h. */
14327
14328int
14329main ()
14330{
14331
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014332 unsigned short cw;
14333 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14334 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014335
14336 ;
14337 return 0;
14338}
14339_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014340if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014341 have_gcc_asm_for_x87=yes
14342else
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014344fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014345rm -f core conftest.err conftest.$ac_objext \
14346 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14348$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014349if test "$have_gcc_asm_for_x87" = yes
14350then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014351
Matthias Kloseb9621712010-04-24 17:59:49 +000014352$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014353
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014354fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14357$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14359/* end confdefs.h. */
14360
14361int
14362main ()
14363{
14364
14365 unsigned int fpcr;
14366 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14367 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14368
14369 ;
14370 return 0;
14371}
14372_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014373if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014374 have_gcc_asm_for_mc68881=yes
14375else
14376 have_gcc_asm_for_mc68881=no
14377fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014378rm -f core conftest.err conftest.$ac_objext \
14379 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14381$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14382if test "$have_gcc_asm_for_mc68881" = yes
14383then
14384
14385$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14386
14387fi
14388
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014389# Detect whether system arithmetic is subject to x87-style double
14390# rounding issues. The result of this test has little meaning on non
14391# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14392# mode is round-to-nearest and double rounding issues are present, and
14393# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14395$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014396# $BASECFLAGS may affect the result
14397ac_save_cc="$CC"
14398CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014399if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014400 ac_cv_x87_double_rounding=no
14401else
Matthias Kloseb9621712010-04-24 17:59:49 +000014402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014403/* end confdefs.h. */
14404
14405#include <stdlib.h>
14406#include <math.h>
14407int main() {
14408 volatile double x, y, z;
14409 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14410 x = 0.99999999999999989; /* 1-2**-53 */
14411 y = 1./x;
14412 if (y != 1.)
14413 exit(0);
14414 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14415 x = 1e16;
14416 y = 2.99999;
14417 z = x + y;
14418 if (z != 1e16+4.)
14419 exit(0);
14420 /* both tests show evidence of double rounding */
14421 exit(1);
14422}
14423
14424_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014425if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014426 ac_cv_x87_double_rounding=no
14427else
Matthias Kloseb9621712010-04-24 17:59:49 +000014428 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14431 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014432fi
14433
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014434CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14436$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014437if test "$ac_cv_x87_double_rounding" = yes
14438then
14439
Matthias Kloseb9621712010-04-24 17:59:49 +000014440$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014441
14442fi
14443
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014444# ************************************
14445# * Check for mathematical functions *
14446# ************************************
14447
14448LIBS_SAVE=$LIBS
14449LIBS="$LIBS $LIBM"
14450
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014451for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14452do :
14453 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14454ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014455if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014456 cat >>confdefs.h <<_ACEOF
14457#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14458_ACEOF
14459
14460fi
14461done
14462
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014463for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014464do :
14465 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14466ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014467if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014468 cat >>confdefs.h <<_ACEOF
14469#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14470_ACEOF
14471
14472fi
14473done
14474
14475ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14476"
Victor Stinnere0be4232011-10-25 13:06:09 +020014477if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014478 ac_have_decl=1
14479else
14480 ac_have_decl=0
14481fi
14482
14483cat >>confdefs.h <<_ACEOF
14484#define HAVE_DECL_ISINF $ac_have_decl
14485_ACEOF
14486ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14487"
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014489 ac_have_decl=1
14490else
14491 ac_have_decl=0
14492fi
14493
14494cat >>confdefs.h <<_ACEOF
14495#define HAVE_DECL_ISNAN $ac_have_decl
14496_ACEOF
14497ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14498"
Victor Stinnere0be4232011-10-25 13:06:09 +020014499if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014500 ac_have_decl=1
14501else
14502 ac_have_decl=0
14503fi
14504
14505cat >>confdefs.h <<_ACEOF
14506#define HAVE_DECL_ISFINITE $ac_have_decl
14507_ACEOF
14508
14509
Mark Dickinsona614f042009-11-28 12:48:43 +000014510# For multiprocessing module, check that sem_open
14511# actually works. For FreeBSD versions <= 7.2,
14512# the kernel module that provides POSIX semaphores
14513# isn't loaded by default, so an attempt to call
14514# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14516$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014517if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014521 ac_cv_posix_semaphores_enabled=yes
14522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014524/* end confdefs.h. */
14525
14526#include <unistd.h>
14527#include <fcntl.h>
14528#include <stdio.h>
14529#include <semaphore.h>
14530#include <sys/stat.h>
14531
14532int main(void) {
14533 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14534 if (a == SEM_FAILED) {
14535 perror("sem_open");
14536 return 1;
14537 }
14538 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014539 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014540 return 0;
14541}
14542
14543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014544if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014545 ac_cv_posix_semaphores_enabled=yes
14546else
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014551fi
14552
14553
Mark Dickinsona614f042009-11-28 12:48:43 +000014554fi
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14557$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014558if test $ac_cv_posix_semaphores_enabled = no
14559then
14560
Matthias Kloseb9621712010-04-24 17:59:49 +000014561$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014562
14563fi
14564
Mark Dickinson10683072009-04-18 21:18:19 +000014565# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14567$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014568if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014570else
Matthias Kloseb9621712010-04-24 17:59:49 +000014571 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014572 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014573else
Matthias Kloseb9621712010-04-24 17:59:49 +000014574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014575/* end confdefs.h. */
14576
14577#include <unistd.h>
14578#include <fcntl.h>
14579#include <stdio.h>
14580#include <semaphore.h>
14581#include <sys/stat.h>
14582
14583int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014584 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014585 int count;
14586 int res;
14587 if(a==SEM_FAILED){
14588 perror("sem_open");
14589 return 1;
14590
14591 }
14592 res = sem_getvalue(a, &count);
14593 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014594 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014595 return res==-1 ? 1 : 0;
14596}
14597
Mark Dickinson10683072009-04-18 21:18:19 +000014598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014600 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014606fi
14607
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014608
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014609fi
14610
Matthias Kloseb9621712010-04-24 17:59:49 +000014611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14612$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014613if test $ac_cv_broken_sem_getvalue = yes
14614then
14615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014617
14618fi
14619
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014620ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14621"
14622if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14623 ac_have_decl=1
14624else
14625 ac_have_decl=0
14626fi
14627
14628cat >>confdefs.h <<_ACEOF
14629#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14630_ACEOF
14631ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14632"
14633if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14634 ac_have_decl=1
14635else
14636 ac_have_decl=0
14637fi
14638
14639cat >>confdefs.h <<_ACEOF
14640#define HAVE_DECL_RTLD_NOW $ac_have_decl
14641_ACEOF
14642ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14643"
14644if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14645 ac_have_decl=1
14646else
14647 ac_have_decl=0
14648fi
14649
14650cat >>confdefs.h <<_ACEOF
14651#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14652_ACEOF
14653ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14654"
14655if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14656 ac_have_decl=1
14657else
14658 ac_have_decl=0
14659fi
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14663_ACEOF
14664ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14665"
14666if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14667 ac_have_decl=1
14668else
14669 ac_have_decl=0
14670fi
14671
14672cat >>confdefs.h <<_ACEOF
14673#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14674_ACEOF
14675ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14676"
14677if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14678 ac_have_decl=1
14679else
14680 ac_have_decl=0
14681fi
14682
14683cat >>confdefs.h <<_ACEOF
14684#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14685_ACEOF
14686ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14687"
14688if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14689 ac_have_decl=1
14690else
14691 ac_have_decl=0
14692fi
14693
14694cat >>confdefs.h <<_ACEOF
14695#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14696_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014697ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14698"
14699if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14700 ac_have_decl=1
14701else
14702 ac_have_decl=0
14703fi
14704
14705cat >>confdefs.h <<_ACEOF
14706#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14707_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014708
14709
Mark Dickinsonbd792642009-03-18 20:06:12 +000014710# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14712$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014713# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014714if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014715 enableval=$enable_big_digits; case $enable_big_digits in
14716yes)
14717 enable_big_digits=30 ;;
14718no)
14719 enable_big_digits=15 ;;
1472015|30)
14721 ;;
14722*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014723 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 +000014724esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14726$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014727
14728cat >>confdefs.h <<_ACEOF
14729#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14730_ACEOF
14731
14732
14733else
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14735$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014736fi
14737
14738
Guido van Rossumef2255b2000-03-10 22:30:29 +000014739# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014740ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014742
14743
Matthias Kloseb9621712010-04-24 17:59:49 +000014744$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014745
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014746 wchar_h="yes"
14747
Guido van Rossumef2255b2000-03-10 22:30:29 +000014748else
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014750
14751fi
14752
Michael W. Hudson54241132001-12-07 15:38:26 +000014753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014755# determine wchar_t size
14756if test "$wchar_h" = yes
14757then
Matthias Kloseb9621712010-04-24 17:59:49 +000014758 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14760# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14761# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14763$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014764if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014765 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014766else
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14768"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
Martin v. Löwis11437992002-04-12 09:54:03 +000014770else
Matthias Kloseb9621712010-04-24 17:59:49 +000014771 if test "$ac_cv_type_wchar_t" = yes; then
14772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014774as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014775See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014776 else
14777 ac_cv_sizeof_wchar_t=0
14778 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014779fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014780
Martin v. Löwis11437992002-04-12 09:54:03 +000014781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14783$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784
14785
14786
Martin v. Löwis11437992002-04-12 09:54:03 +000014787cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014788#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014789_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014790
Michael W. Hudson54241132001-12-07 15:38:26 +000014791
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014792fi
14793
Matthias Kloseb9621712010-04-24 17:59:49 +000014794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14795$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014796have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014798/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014799
14800#include <tcl.h>
14801#if TCL_UTF_MAX != 6
14802# error "NOT UCS4_TCL"
14803#endif
14804int
14805main ()
14806{
14807
14808 ;
14809 return 0;
14810}
14811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014813
14814
Matthias Kloseb9621712010-04-24 17:59:49 +000014815$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014816
14817 have_ucs4_tcl=yes
14818
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14822$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014823
Skip Montanaro6dead952003-09-25 14:50:04 +000014824# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014825if test "$wchar_h" = yes
14826then
14827 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14829$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014830 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014832else
14833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014835 ac_cv_wchar_t_signed=yes
14836else
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014839
14840 #include <wchar.h>
14841 int main()
14842 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014843 /* Success: exit code 0 */
14844 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014845 }
14846
14847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014848if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014849 ac_cv_wchar_t_signed=yes
14850else
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14854 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014855fi
14856
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014857fi
14858
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14860$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861fi
14862
Michael Osipov3738fad2018-08-24 18:17:19 +020014863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14864$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014865# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014866if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014867 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014868then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014871
Michael Osipov3738fad2018-08-24 18:17:19 +020014872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14873$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014874else
Michael Osipov3738fad2018-08-24 18:17:19 +020014875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14876$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014877fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014878
14879# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14881$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014882if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014883 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014884else
Matthias Kloseb9621712010-04-24 17:59:49 +000014885 ac_cv_c_bigendian=unknown
14886 # See if we're dealing with a universal compiler.
14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14888/* end confdefs.h. */
14889#ifndef __APPLE_CC__
14890 not a universal capable compiler
14891 #endif
14892 typedef int dummy;
14893
Skip Montanaro6dead952003-09-25 14:50:04 +000014894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if ac_fn_c_try_compile "$LINENO"; then :
14896
14897 # Check for potential -arch flags. It is not universal unless
14898 # there are at least two -arch flags with different values.
14899 ac_arch=
14900 ac_prev=
14901 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14902 if test -n "$ac_prev"; then
14903 case $ac_word in
14904 i?86 | x86_64 | ppc | ppc64)
14905 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14906 ac_arch=$ac_word
14907 else
14908 ac_cv_c_bigendian=universal
14909 break
14910 fi
14911 ;;
14912 esac
14913 ac_prev=
14914 elif test "x$ac_word" = "x-arch"; then
14915 ac_prev=arch
14916 fi
14917 done
14918fi
14919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14920 if test $ac_cv_c_bigendian = unknown; then
14921 # See if sys/param.h defines the BYTE_ORDER macro.
14922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014923/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014924#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014926
Martin v. Löwis11437992002-04-12 09:54:03 +000014927int
14928main ()
14929{
Matthias Kloseb9621712010-04-24 17:59:49 +000014930#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14931 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14932 && LITTLE_ENDIAN)
14933 bogus endian macros
14934 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014935
14936 ;
14937 return 0;
14938}
14939_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014940if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014943/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014944#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014946
Martin v. Löwis11437992002-04-12 09:54:03 +000014947int
14948main ()
14949{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014950#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 not big endian
14952 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014953
14954 ;
14955 return 0;
14956}
14957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014958if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014959 ac_cv_c_bigendian=yes
14960else
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014964fi
14965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14966 fi
14967 if test $ac_cv_c_bigendian = unknown; then
14968 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014971#include <limits.h>
14972
Martin v. Löwis11437992002-04-12 09:54:03 +000014973int
14974main ()
14975{
Matthias Kloseb9621712010-04-24 17:59:49 +000014976#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14977 bogus endian macros
14978 #endif
14979
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 ;
14981 return 0;
14982}
14983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014984if ac_fn_c_try_compile "$LINENO"; then :
14985 # It does; now see whether it defined to _BIG_ENDIAN or not.
14986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987/* end confdefs.h. */
14988#include <limits.h>
14989
14990int
14991main ()
14992{
14993#ifndef _BIG_ENDIAN
14994 not big endian
14995 #endif
14996
14997 ;
14998 return 0;
14999}
15000_ACEOF
15001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015003else
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015005fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15007fi
15008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15009 fi
15010 if test $ac_cv_c_bigendian = unknown; then
15011 # Compile a test program.
15012 if test "$cross_compiling" = yes; then :
15013 # Try to guess by grepping values from an object file.
15014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15015/* end confdefs.h. */
15016short int ascii_mm[] =
15017 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15018 short int ascii_ii[] =
15019 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15020 int use_ascii (int i) {
15021 return ascii_mm[i] + ascii_ii[i];
15022 }
15023 short int ebcdic_ii[] =
15024 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15025 short int ebcdic_mm[] =
15026 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15027 int use_ebcdic (int i) {
15028 return ebcdic_mm[i] + ebcdic_ii[i];
15029 }
15030 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015031
Matthias Kloseb9621712010-04-24 17:59:49 +000015032int
15033main ()
15034{
15035return use_ascii (foo) == use_ebcdic (foo);
15036 ;
15037 return 0;
15038}
15039_ACEOF
15040if ac_fn_c_try_compile "$LINENO"; then :
15041 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15042 ac_cv_c_bigendian=yes
15043 fi
15044 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15045 if test "$ac_cv_c_bigendian" = unknown; then
15046 ac_cv_c_bigendian=no
15047 else
15048 # finding both strings is unlikely to happen, but who knows?
15049 ac_cv_c_bigendian=unknown
15050 fi
15051 fi
15052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015054else
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015056/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015058int
15059main ()
15060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062 /* Are we little or big endian? From Harbison&Steele. */
15063 union
15064 {
15065 long int l;
15066 char c[sizeof (long int)];
15067 } u;
15068 u.l = 1;
15069 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015070
15071 ;
15072 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015073}
Martin v. Löwis11437992002-04-12 09:54:03 +000015074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015075if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015076 ac_cv_c_bigendian=no
15077else
Matthias Kloseb9621712010-04-24 17:59:49 +000015078 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015080rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15081 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015083
Matthias Kloseb9621712010-04-24 17:59:49 +000015084 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15087$as_echo "$ac_cv_c_bigendian" >&6; }
15088 case $ac_cv_c_bigendian in #(
15089 yes)
15090 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15091;; #(
15092 no)
15093 ;; #(
15094 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015095
Matthias Kloseb9621712010-04-24 17:59:49 +000015096$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015097
Matthias Kloseb9621712010-04-24 17:59:49 +000015098 ;; #(
15099 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015100 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015101 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015102 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015103
Michael W. Hudson54241132001-12-07 15:38:26 +000015104
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015105# ABI version string for Python extension modules. This appears between the
15106# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15107# from the following attributes which affect the ABI of this Python build (in
15108# this order):
15109#
15110# * The Python implementation (always 'cpython-' for us)
15111# * The major and minor version numbers
15112# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015113#
15114# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015115# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15116# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015117#
15118# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15119# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015120
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15122$as_echo_n "checking ABIFLAGS... " >&6; }
15123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15124$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15126$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015127SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15129$as_echo "$SOABI" >&6; }
15130
Victor Stinner5422e3c2019-04-26 01:40:00 +020015131if test "$Py_DEBUG" = 'true'; then
15132 # Similar to SOABI but remove "d" flag from ABIFLAGS
15133
15134 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15135
15136cat >>confdefs.h <<_ACEOF
15137#define ALT_SOABI "${ALT_SOABI}"
15138_ACEOF
15139
15140fi
15141
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015142
15143case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015144 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015145 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15146 *)
15147 EXT_SUFFIX=${SHLIB_SUFFIX};;
15148esac
15149
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15151$as_echo_n "checking LDVERSION... " >&6; }
15152LDVERSION='$(VERSION)$(ABIFLAGS)'
15153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15154$as_echo "$LDVERSION" >&6; }
15155
doko@python.org87421192013-01-26 11:39:31 +010015156
doko@ubuntu.com55532312016-06-14 08:55:19 +020015157if test x$PLATFORM_TRIPLET = x; then
15158 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15159else
15160 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15161fi
doko@python.org87421192013-01-26 11:39:31 +010015162
15163
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015164# Check whether right shifting a negative integer extends the sign bit
15165# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15167$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015168if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015170else
Martin v. Löwis11437992002-04-12 09:54:03 +000015171
Matthias Kloseb9621712010-04-24 17:59:49 +000015172if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015173 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015176/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015177
15178int main()
15179{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015180 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015181}
15182
Martin v. Löwis11437992002-04-12 09:54:03 +000015183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015184if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015185 ac_cv_rshift_extends_sign=yes
15186else
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015191fi
15192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193fi
15194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15196$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015197if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015198then
Martin v. Löwis11437992002-04-12 09:54:03 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015201
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015202fi
15203
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015204# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15206$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015207if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015209else
Martin v. Löwis11437992002-04-12 09:54:03 +000015210
Matthias Kloseb9621712010-04-24 17:59:49 +000015211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015212/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015213#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015214int
15215main ()
15216{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015217
15218 FILE *f = fopen("/dev/null", "r");
15219 flockfile(f);
15220 getc_unlocked(f);
15221 funlockfile(f);
15222
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ;
15224 return 0;
15225}
15226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015227if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015228 ac_cv_have_getc_unlocked=yes
15229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 ac_cv_have_getc_unlocked=no
15231fi
15232rm -f core conftest.err conftest.$ac_objext \
15233 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15237$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015238if test "$ac_cv_have_getc_unlocked" = yes
15239then
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
Matthias Kloseb9621712010-04-24 17:59:49 +000015241$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015242
15243fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015244
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015245# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015246# save the value of LIBS so we don't actually link Python with readline
15247LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015248
Gregory P. Smith18820942008-09-07 06:24:49 +000015249# On some systems we need to link readline to a termcap compatible
15250# library. NOTE: Keep the precedence of listed libraries synchronised
15251# with setup.py.
15252py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15254$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015255for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015256 if test -z "$py_libtermcap"; then
15257 READLINE_LIBS="-lreadline"
15258 else
15259 READLINE_LIBS="-lreadline -l$py_libtermcap"
15260 fi
15261 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015263/* end confdefs.h. */
15264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265/* Override any GCC internal prototype to avoid an error.
15266 Use char because int might match the return type of a GCC
15267 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015268#ifdef __cplusplus
15269extern "C"
15270#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015271char readline ();
15272int
15273main ()
15274{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015276 ;
15277 return 0;
15278}
15279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015280if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015281 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015283rm -f core conftest.err conftest.$ac_objext \
15284 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015285 if test $py_cv_lib_readline = yes; then
15286 break
15287 fi
15288done
15289# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15290#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015291if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15293$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015294else
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15296$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015299
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015300fi
15301
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015302# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015304/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015305#include <readline/readline.h>
15306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015307if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015308 have_readline=yes
15309else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015310 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015311
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015312fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015313rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015314if test $have_readline = yes
15315then
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015317/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015318#include <readline/readline.h>
15319
15320_ACEOF
15321if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015323
Matthias Kloseb9621712010-04-24 17:59:49 +000015324$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015325
15326fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015327rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015328
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015330/* end confdefs.h. */
15331#include <readline/readline.h>
15332
15333_ACEOF
15334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015336
Matthias Kloseb9621712010-04-24 17:59:49 +000015337$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015338
15339fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015340rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015341
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015342fi
15343
Martin v. Löwis0daad592001-09-30 21:09:59 +000015344# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15346$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015347if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015349else
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015351LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015353/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015355/* Override any GCC internal prototype to avoid an error.
15356 Use char because int might match the return type of a GCC
15357 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015358#ifdef __cplusplus
15359extern "C"
15360#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015361char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015362int
15363main ()
15364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ;
15367 return 0;
15368}
15369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015375rm -f core conftest.err conftest.$ac_objext \
15376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015377LIBS=$ac_check_lib_save_LIBS
15378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15380$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015381if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015382
Matthias Kloseb9621712010-04-24 17:59:49 +000015383$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015384
Martin v. Löwis0daad592001-09-30 21:09:59 +000015385fi
15386
Michael W. Hudson54241132001-12-07 15:38:26 +000015387
Thomas Wouters89d996e2007-09-08 17:39:28 +000015388# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15390$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015391if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015393else
15394 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015395LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015397/* end confdefs.h. */
15398
15399/* Override any GCC internal prototype to avoid an error.
15400 Use char because int might match the return type of a GCC
15401 builtin and then its argument prototype would still apply. */
15402#ifdef __cplusplus
15403extern "C"
15404#endif
15405char rl_completion_display_matches_hook ();
15406int
15407main ()
15408{
15409return rl_completion_display_matches_hook ();
15410 ;
15411 return 0;
15412}
15413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015414if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015415 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015419rm -f core conftest.err conftest.$ac_objext \
15420 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015421LIBS=$ac_check_lib_save_LIBS
15422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15424$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015425if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015426
Matthias Kloseb9621712010-04-24 17:59:49 +000015427$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015428
15429fi
15430
15431
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015432# also in 4.0, but not in editline
15433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15434$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15435if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15436 $as_echo_n "(cached) " >&6
15437else
15438 ac_check_lib_save_LIBS=$LIBS
15439LIBS="-lreadline $READLINE_LIBS $LIBS"
15440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441/* end confdefs.h. */
15442
15443/* Override any GCC internal prototype to avoid an error.
15444 Use char because int might match the return type of a GCC
15445 builtin and then its argument prototype would still apply. */
15446#ifdef __cplusplus
15447extern "C"
15448#endif
15449char rl_resize_terminal ();
15450int
15451main ()
15452{
15453return rl_resize_terminal ();
15454 ;
15455 return 0;
15456}
15457_ACEOF
15458if ac_fn_c_try_link "$LINENO"; then :
15459 ac_cv_lib_readline_rl_resize_terminal=yes
15460else
15461 ac_cv_lib_readline_rl_resize_terminal=no
15462fi
15463rm -f core conftest.err conftest.$ac_objext \
15464 conftest$ac_exeext conftest.$ac_ext
15465LIBS=$ac_check_lib_save_LIBS
15466fi
15467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15468$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15469if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15470
15471$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15472
15473fi
15474
15475
Martin v. Löwis0daad592001-09-30 21:09:59 +000015476# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15478$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015479if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015480 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015481else
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015483LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015487/* Override any GCC internal prototype to avoid an error.
15488 Use char because int might match the return type of a GCC
15489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015490#ifdef __cplusplus
15491extern "C"
15492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015493char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015494int
15495main ()
15496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015497return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 ;
15499 return 0;
15500}
15501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015504else
Matthias Kloseb9621712010-04-24 17:59:49 +000015505 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015507rm -f core conftest.err conftest.$ac_objext \
15508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015509LIBS=$ac_check_lib_save_LIBS
15510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15512$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015513if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015514
Matthias Kloseb9621712010-04-24 17:59:49 +000015515$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015516
Guido van Rossum353ae582001-07-10 16:45:32 +000015517fi
15518
Jack Jansendd19cf82001-12-06 22:36:17 +000015519
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015520# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015522/* end confdefs.h. */
15523#include <readline/readline.h>
15524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015525if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015526 have_readline=yes
15527else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015528 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015529
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015530fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015531rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015532if test $have_readline = yes
15533then
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015535/* end confdefs.h. */
15536#include <readline/readline.h>
15537
15538_ACEOF
15539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015540 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015541
Matthias Kloseb9621712010-04-24 17:59:49 +000015542$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015543
15544fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015545rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015546
15547fi
15548
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15550$as_echo_n "checking for append_history in -lreadline... " >&6; }
15551if ${ac_cv_lib_readline_append_history+:} false; then :
15552 $as_echo_n "(cached) " >&6
15553else
15554 ac_check_lib_save_LIBS=$LIBS
15555LIBS="-lreadline $READLINE_LIBS $LIBS"
15556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15557/* end confdefs.h. */
15558
15559/* Override any GCC internal prototype to avoid an error.
15560 Use char because int might match the return type of a GCC
15561 builtin and then its argument prototype would still apply. */
15562#ifdef __cplusplus
15563extern "C"
15564#endif
15565char append_history ();
15566int
15567main ()
15568{
15569return append_history ();
15570 ;
15571 return 0;
15572}
15573_ACEOF
15574if ac_fn_c_try_link "$LINENO"; then :
15575 ac_cv_lib_readline_append_history=yes
15576else
15577 ac_cv_lib_readline_append_history=no
15578fi
15579rm -f core conftest.err conftest.$ac_objext \
15580 conftest$ac_exeext conftest.$ac_ext
15581LIBS=$ac_check_lib_save_LIBS
15582fi
15583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15584$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15585if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15586
15587$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15588
15589fi
15590
15591
Martin v. Löwis82bca632006-02-10 20:49:30 +000015592# End of readline checks: restore LIBS
15593LIBS=$LIBS_no_readline
15594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15596$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015597if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015599else
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015602 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015603else
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015605/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015606
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015607#include <stdlib.h>
15608#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015609int main()
15610{
15611 int val1 = nice(1);
15612 if (val1 != -1 && val1 == nice(2))
15613 exit(0);
15614 exit(1);
15615}
15616
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015618if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015619 ac_cv_broken_nice=yes
15620else
Matthias Kloseb9621712010-04-24 17:59:49 +000015621 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015625fi
15626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015627fi
15628
Matthias Kloseb9621712010-04-24 17:59:49 +000015629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15630$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015631if test "$ac_cv_broken_nice" = yes
15632then
Martin v. Löwis11437992002-04-12 09:54:03 +000015633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015635
15636fi
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15639$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015640if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015642else
Matthias Kloseb9621712010-04-24 17:59:49 +000015643 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015644 ac_cv_broken_poll=no
15645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015647/* end confdefs.h. */
15648
15649#include <poll.h>
15650
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015651int main()
15652{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015653 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015654 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015655
15656 close (42);
15657
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015658 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015660 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015661 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015662 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015663 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015664 return 1;
15665}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015666
15667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015668if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669 ac_cv_broken_poll=yes
15670else
Matthias Kloseb9621712010-04-24 17:59:49 +000015671 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015672fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015673rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15674 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015676
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015677fi
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15680$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015681if test "$ac_cv_broken_poll" = yes
15682then
15683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015685
15686fi
15687
Martin v. Löwis1d459062005-03-14 21:23:33 +000015688# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15690$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015691if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015692 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015693else
15694
Matthias Kloseb9621712010-04-24 17:59:49 +000015695if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015696 ac_cv_working_tzset=no
15697else
Matthias Kloseb9621712010-04-24 17:59:49 +000015698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015699/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015700
15701#include <stdlib.h>
15702#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015703#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015704
15705#if HAVE_TZNAME
15706extern char *tzname[];
15707#endif
15708
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015709int main()
15710{
Brett Cannon18367812003-09-19 00:59:16 +000015711 /* Note that we need to ensure that not only does tzset(3)
15712 do 'something' with localtime, but it works as documented
15713 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015714 This includes making sure that tzname is set properly if
15715 tm->tm_zone does not exist since it is the alternative way
15716 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015717
15718 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015719 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015720 */
15721
Martin v. Löwis1d459062005-03-14 21:23:33 +000015722 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015723 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15724
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015725 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015726 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015727 if (localtime(&groundhogday)->tm_hour != 0)
15728 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015729#if HAVE_TZNAME
15730 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15731 if (strcmp(tzname[0], "UTC") ||
15732 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15733 exit(1);
15734#endif
Brett Cannon18367812003-09-19 00:59:16 +000015735
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015736 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015737 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015738 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015739 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015740#if HAVE_TZNAME
15741 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15742 exit(1);
15743#endif
Brett Cannon18367812003-09-19 00:59:16 +000015744
15745 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15746 tzset();
15747 if (localtime(&groundhogday)->tm_hour != 11)
15748 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015749#if HAVE_TZNAME
15750 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15751 exit(1);
15752#endif
15753
15754#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015755 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15756 exit(1);
15757 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15758 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015759#endif
Brett Cannon18367812003-09-19 00:59:16 +000015760
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015761 exit(0);
15762}
15763
15764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015765if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015766 ac_cv_working_tzset=yes
15767else
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015772fi
15773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774fi
15775
Matthias Kloseb9621712010-04-24 17:59:49 +000015776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15777$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015778if test "$ac_cv_working_tzset" = yes
15779then
15780
Matthias Kloseb9621712010-04-24 17:59:49 +000015781$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015782
15783fi
15784
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015785# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15787$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015788if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015790else
Matthias Kloseb9621712010-04-24 17:59:49 +000015791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015792/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015793#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015794int
15795main ()
15796{
15797
15798struct stat st;
15799st.st_mtim.tv_nsec = 1;
15800
15801 ;
15802 return 0;
15803}
15804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015805if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015806 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015807else
Matthias Kloseb9621712010-04-24 17:59:49 +000015808 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15811fi
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15814$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015815if test "$ac_cv_stat_tv_nsec" = yes
15816then
15817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015819
15820fi
15821
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015822# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15824$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015825if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015829/* end confdefs.h. */
15830#include <sys/stat.h>
15831int
15832main ()
15833{
15834
15835struct stat st;
15836st.st_mtimespec.tv_nsec = 1;
15837
15838 ;
15839 return 0;
15840}
15841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015842if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015843 ac_cv_stat_tv_nsec2=yes
15844else
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15848fi
15849
Matthias Kloseb9621712010-04-24 17:59:49 +000015850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15851$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015852if test "$ac_cv_stat_tv_nsec2" = yes
15853then
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015856
15857fi
15858
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015859# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015860ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015861if test "$cross_compiling" = no; then
15862 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15863fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015864
15865for ac_header in curses.h ncurses.h
15866do :
15867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15868ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15869if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15870 cat >>confdefs.h <<_ACEOF
15871#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15872_ACEOF
15873
15874fi
15875
15876done
15877
15878
15879# On Solaris, term.h requires curses.h
15880for ac_header in term.h
15881do :
15882 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15883#ifdef HAVE_CURSES_H
15884#include <curses.h>
15885#endif
15886
15887"
15888if test "x$ac_cv_header_term_h" = xyes; then :
15889 cat >>confdefs.h <<_ACEOF
15890#define HAVE_TERM_H 1
15891_ACEOF
15892
15893fi
15894
15895done
15896
15897
Jack Jansen666b1e72001-10-31 12:11:48 +000015898# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15900$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015901if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015903else
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015906#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015907int
15908main ()
15909{
Jack Jansen666b1e72001-10-31 12:11:48 +000015910
15911 int rtn;
15912 rtn = mvwdelch(0,0,0);
15913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914 ;
15915 return 0;
15916}
15917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015918if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015919 ac_cv_mvwdelch_is_expression=yes
15920else
Matthias Kloseb9621712010-04-24 17:59:49 +000015921 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15924fi
15925
Matthias Kloseb9621712010-04-24 17:59:49 +000015926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15927$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015928
15929if test "$ac_cv_mvwdelch_is_expression" = yes
15930then
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015933
15934fi
15935
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015936# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15937# structs since version 5.7. If the macro is defined as zero before including
15938# [n]curses.h, ncurses will expose fields of the structs regardless of the
15939# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15941$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015942if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015943 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015944else
Matthias Kloseb9621712010-04-24 17:59:49 +000015945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015946/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015947
15948 #define NCURSES_OPAQUE 0
15949 #include <curses.h>
15950
Martin v. Löwis11437992002-04-12 09:54:03 +000015951int
15952main ()
15953{
Jack Jansen666b1e72001-10-31 12:11:48 +000015954
15955 WINDOW *w;
15956 w->_flags = 0;
15957
Martin v. Löwis11437992002-04-12 09:54:03 +000015958 ;
15959 return 0;
15960}
15961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015962if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015963 ac_cv_window_has_flags=yes
15964else
Matthias Kloseb9621712010-04-24 17:59:49 +000015965 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015966fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15968fi
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15971$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015972
Jack Jansen666b1e72001-10-31 12:11:48 +000015973
15974if test "$ac_cv_window_has_flags" = yes
15975then
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
Matthias Kloseb9621712010-04-24 17:59:49 +000015977$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015978
15979fi
15980
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15982$as_echo_n "checking for is_pad... " >&6; }
15983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15984/* end confdefs.h. */
15985#include <curses.h>
15986int
15987main ()
15988{
15989
15990#ifndef is_pad
15991void *x=is_pad
15992#endif
15993
15994 ;
15995 return 0;
15996}
15997_ACEOF
15998if ac_fn_c_try_compile "$LINENO"; then :
15999
16000$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
16001
16002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16003$as_echo "yes" >&6; }
16004else
16005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16006$as_echo "no" >&6; }
16007
16008fi
16009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16012$as_echo_n "checking for is_term_resized... " >&6; }
16013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014/* end confdefs.h. */
16015#include <curses.h>
16016int
16017main ()
16018{
16019void *x=is_term_resized
16020 ;
16021 return 0;
16022}
16023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016024if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016025
Matthias Kloseb9621712010-04-24 17:59:49 +000016026$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016027
Matthias Kloseb159a552010-04-25 21:00:44 +000016028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016029$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016030else
Matthias Kloseb9621712010-04-24 17:59:49 +000016031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16032$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016033
16034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16038$as_echo_n "checking for resize_term... " >&6; }
16039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040/* end confdefs.h. */
16041#include <curses.h>
16042int
16043main ()
16044{
16045void *x=resize_term
16046 ;
16047 return 0;
16048}
16049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016050if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016053
Matthias Kloseb159a552010-04-25 21:00:44 +000016054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016055$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016056else
Matthias Kloseb9621712010-04-24 17:59:49 +000016057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16058$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016059
16060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16062
Matthias Kloseb9621712010-04-24 17:59:49 +000016063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16064$as_echo_n "checking for resizeterm... " >&6; }
16065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066/* end confdefs.h. */
16067#include <curses.h>
16068int
16069main ()
16070{
16071void *x=resizeterm
16072 ;
16073 return 0;
16074}
16075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016076if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016079
Matthias Kloseb159a552010-04-25 21:00:44 +000016080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016082else
Matthias Kloseb9621712010-04-24 17:59:49 +000016083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16084$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016085
16086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016088
16089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16090$as_echo_n "checking for immedok... " >&6; }
16091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16092/* end confdefs.h. */
16093#include <curses.h>
16094int
16095main ()
16096{
16097
16098#ifndef immedok
16099void *x=immedok
16100#endif
16101
16102 ;
16103 return 0;
16104}
16105_ACEOF
16106if ac_fn_c_try_compile "$LINENO"; then :
16107
16108$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16109
16110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16111$as_echo "yes" >&6; }
16112else
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16114$as_echo "no" >&6; }
16115
16116fi
16117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16118
16119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16120$as_echo_n "checking for syncok... " >&6; }
16121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122/* end confdefs.h. */
16123#include <curses.h>
16124int
16125main ()
16126{
16127
16128#ifndef syncok
16129void *x=syncok
16130#endif
16131
16132 ;
16133 return 0;
16134}
16135_ACEOF
16136if ac_fn_c_try_compile "$LINENO"; then :
16137
16138$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16139
16140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16141$as_echo "yes" >&6; }
16142else
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16144$as_echo "no" >&6; }
16145
16146fi
16147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16148
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16150$as_echo_n "checking for wchgat... " >&6; }
16151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16152/* end confdefs.h. */
16153#include <curses.h>
16154int
16155main ()
16156{
16157
16158#ifndef wchgat
16159void *x=wchgat
16160#endif
16161
16162 ;
16163 return 0;
16164}
16165_ACEOF
16166if ac_fn_c_try_compile "$LINENO"; then :
16167
16168$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16169
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16171$as_echo "yes" >&6; }
16172else
16173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16174$as_echo "no" >&6; }
16175
16176fi
16177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16178
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16180$as_echo_n "checking for filter... " >&6; }
16181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16182/* end confdefs.h. */
16183#include <curses.h>
16184int
16185main ()
16186{
16187
16188#ifndef filter
16189void *x=filter
16190#endif
16191
16192 ;
16193 return 0;
16194}
16195_ACEOF
16196if ac_fn_c_try_compile "$LINENO"; then :
16197
16198$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16199
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16201$as_echo "yes" >&6; }
16202else
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16204$as_echo "no" >&6; }
16205
16206fi
16207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16208
16209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16210$as_echo_n "checking for has_key... " >&6; }
16211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212/* end confdefs.h. */
16213#include <curses.h>
16214int
16215main ()
16216{
16217
16218#ifndef has_key
16219void *x=has_key
16220#endif
16221
16222 ;
16223 return 0;
16224}
16225_ACEOF
16226if ac_fn_c_try_compile "$LINENO"; then :
16227
16228$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16229
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16231$as_echo "yes" >&6; }
16232else
16233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16234$as_echo "no" >&6; }
16235
16236fi
16237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16238
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16240$as_echo_n "checking for typeahead... " >&6; }
16241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16242/* end confdefs.h. */
16243#include <curses.h>
16244int
16245main ()
16246{
16247
16248#ifndef typeahead
16249void *x=typeahead
16250#endif
16251
16252 ;
16253 return 0;
16254}
16255_ACEOF
16256if ac_fn_c_try_compile "$LINENO"; then :
16257
16258$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16259
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16261$as_echo "yes" >&6; }
16262else
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16264$as_echo "no" >&6; }
16265
16266fi
16267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16268
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16270$as_echo_n "checking for use_env... " >&6; }
16271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272/* end confdefs.h. */
16273#include <curses.h>
16274int
16275main ()
16276{
16277
16278#ifndef use_env
16279void *x=use_env
16280#endif
16281
16282 ;
16283 return 0;
16284}
16285_ACEOF
16286if ac_fn_c_try_compile "$LINENO"; then :
16287
16288$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16289
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16291$as_echo "yes" >&6; }
16292else
16293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16294$as_echo "no" >&6; }
16295
16296fi
16297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016298# last curses configure check
16299CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16302$as_echo "$as_me: checking for device files" >&6;}
16303
16304if test "x$cross_compiling" = xyes; then
16305 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16307$as_echo_n "checking for /dev/ptmx... " >&6; }
16308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16309$as_echo "not set" >&6; }
16310 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16311 fi
16312 if test "${ac_cv_file__dev_ptc+set}" != set; then
16313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16314$as_echo_n "checking for /dev/ptc... " >&6; }
16315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16316$as_echo "not set" >&6; }
16317 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16318 fi
16319fi
16320
Matthias Kloseb9621712010-04-24 17:59:49 +000016321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16322$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016323if ${ac_cv_file__dev_ptmx+:} false; then :
16324 $as_echo_n "(cached) " >&6
16325else
16326 test "$cross_compiling" = yes &&
16327 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16328if test -r "/dev/ptmx"; then
16329 ac_cv_file__dev_ptmx=yes
16330else
16331 ac_cv_file__dev_ptmx=no
16332fi
16333fi
16334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16335$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16336if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016337
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016338fi
16339
16340if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016341
Matthias Kloseb9621712010-04-24 17:59:49 +000016342$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016343
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016344fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16346$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016347if ${ac_cv_file__dev_ptc+:} false; then :
16348 $as_echo_n "(cached) " >&6
16349else
16350 test "$cross_compiling" = yes &&
16351 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16352if test -r "/dev/ptc"; then
16353 ac_cv_file__dev_ptc=yes
16354else
16355 ac_cv_file__dev_ptc=no
16356fi
16357fi
16358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16359$as_echo "$ac_cv_file__dev_ptc" >&6; }
16360if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016361
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016362fi
16363
16364if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016365
Matthias Kloseb9621712010-04-24 17:59:49 +000016366$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016367
Neal Norwitz865400f2003-03-21 01:42:58 +000016368fi
16369
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016370if test $ac_sys_system = Darwin
16371then
16372 LIBS="$LIBS -framework CoreFoundation"
16373fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016374
Matthias Kloseb9621712010-04-24 17:59:49 +000016375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16376$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016377if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016378 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379else
Matthias Kloseb9621712010-04-24 17:59:49 +000016380 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016381 ac_cv_have_size_t_format="cross -- assuming yes"
16382
Thomas Wouters477c8d52006-05-27 19:21:47 +000016383else
Matthias Kloseb9621712010-04-24 17:59:49 +000016384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016385/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016386
Thomas Wouters477c8d52006-05-27 19:21:47 +000016387#include <stdio.h>
16388#include <stddef.h>
16389#include <string.h>
16390
Christian Heimes2c181612007-12-17 20:04:13 +000016391#ifdef HAVE_SYS_TYPES_H
16392#include <sys/types.h>
16393#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016394
16395#ifdef HAVE_SSIZE_T
16396typedef ssize_t Py_ssize_t;
16397#elif SIZEOF_VOID_P == SIZEOF_LONG
16398typedef long Py_ssize_t;
16399#else
16400typedef int Py_ssize_t;
16401#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016402
Christian Heimes2c181612007-12-17 20:04:13 +000016403int main()
16404{
16405 char buffer[256];
16406
Thomas Wouters477c8d52006-05-27 19:21:47 +000016407 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16408 return 1;
16409
Thomas Wouters89f507f2006-12-13 04:49:30 +000016410 if (strcmp(buffer, "123"))
16411 return 1;
16412
16413 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16414 return 1;
16415
16416 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016417 return 1;
16418
16419 return 0;
16420}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016421
Thomas Wouters477c8d52006-05-27 19:21:47 +000016422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016423if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016424 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016425else
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016430fi
16431
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16434$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016435if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016436
Matthias Kloseb9621712010-04-24 17:59:49 +000016437$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016438
16439fi
16440
Matthias Kloseb9621712010-04-24 17:59:49 +000016441ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016442#ifdef HAVE_SYS_TYPES_H
16443#include <sys/types.h>
16444#endif
16445#ifdef HAVE_SYS_SOCKET_H
16446#include <sys/socket.h>
16447#endif
16448
Matthias Kloseb9621712010-04-24 17:59:49 +000016449"
Victor Stinnere0be4232011-10-25 13:06:09 +020016450if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016451
Martin v. Löwis11437992002-04-12 09:54:03 +000016452else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016453
Matthias Kloseb9621712010-04-24 17:59:49 +000016454$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016455
16456fi
16457
Michael W. Hudson54241132001-12-07 15:38:26 +000016458
Matthias Kloseb9621712010-04-24 17:59:49 +000016459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16460$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016461if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016462 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016463else
Matthias Kloseb9621712010-04-24 17:59:49 +000016464 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016465 ac_cv_broken_mbstowcs=no
16466else
Matthias Kloseb9621712010-04-24 17:59:49 +000016467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016468/* end confdefs.h. */
16469
Stefan Krah19c21392012-11-22 23:47:32 +010016470#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016471#include<stdlib.h>
16472int main() {
16473 size_t len = -1;
16474 const char *str = "text";
16475 len = mbstowcs(NULL, str, 0);
16476 return (len != 4);
16477}
16478
16479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016480if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016481 ac_cv_broken_mbstowcs=no
16482else
Matthias Kloseb9621712010-04-24 17:59:49 +000016483 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16486 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016487fi
16488
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016489fi
16490
Matthias Kloseb9621712010-04-24 17:59:49 +000016491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16492$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016493if test "$ac_cv_broken_mbstowcs" = yes
16494then
16495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016497
16498fi
16499
Antoine Pitroub52ec782009-01-25 16:34:23 +000016500# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16502$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016503
16504# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016505if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016506 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016507if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016508then
16509
Matthias Kloseb9621712010-04-24 17:59:49 +000016510$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016511
Matthias Kloseb9621712010-04-24 17:59:49 +000016512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16513$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016514fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016515if test "$withval" = no
16516then
16517
16518$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16521$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016522fi
16523
Antoine Pitrou042b1282010-08-13 21:15:58 +000016524else
16525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16526$as_echo "no value specified" >&6; }
16527fi
16528
Antoine Pitroub52ec782009-01-25 16:34:23 +000016529
Matthias Kloseb17289e2012-03-15 19:51:34 +010016530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16531$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16532if ${ac_cv_computed_gotos+:} false; then :
16533 $as_echo_n "(cached) " >&6
16534else
16535 if test "$cross_compiling" = yes; then :
16536 if test "${with_computed_gotos+set}" = set; then
16537 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16538 else
16539 ac_cv_computed_gotos=no
16540 fi
16541else
16542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16543/* end confdefs.h. */
16544
16545int main(int argc, char **argv)
16546{
16547 static void *targets[1] = { &&LABEL1 };
16548 goto LABEL2;
16549LABEL1:
16550 return 0;
16551LABEL2:
16552 goto *targets[0];
16553 return 1;
16554}
16555
16556_ACEOF
16557if ac_fn_c_try_run "$LINENO"; then :
16558 ac_cv_computed_gotos=yes
16559else
16560 ac_cv_computed_gotos=no
16561fi
16562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16563 conftest.$ac_objext conftest.beam conftest.$ac_ext
16564fi
16565
16566fi
16567
16568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16569$as_echo "$ac_cv_computed_gotos" >&6; }
16570case "$ac_cv_computed_gotos" in yes*)
16571
16572$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16573
16574esac
16575
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016576case $ac_sys_system in
16577AIX*)
16578
16579$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16580 ;;
16581esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016582
Michael W. Hudson54241132001-12-07 15:38:26 +000016583
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016584
16585
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016586for h in `(cd $srcdir;echo Python/thread_*.h)`
16587do
16588 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16589done
16590
Michael W. Hudson54241132001-12-07 15:38:26 +000016591
Victor Stinner21a74a92019-04-11 22:28:12 +020016592SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16594$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016595for dir in $SRCDIRS; do
16596 if test ! -d $dir; then
16597 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016598 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016599done
Matthias Kloseb9621712010-04-24 17:59:49 +000016600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16601$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016602
Stefan Krah1919b7e2012-03-21 18:25:23 +010016603# Availability of -O2:
16604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16605$as_echo_n "checking for -O2... " >&6; }
16606saved_cflags="$CFLAGS"
16607CFLAGS="-O2"
16608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16609/* end confdefs.h. */
16610
16611int
16612main ()
16613{
16614
16615
16616 ;
16617 return 0;
16618}
16619_ACEOF
16620if ac_fn_c_try_compile "$LINENO"; then :
16621 have_O2=yes
16622else
16623 have_O2=no
16624fi
16625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16627$as_echo "$have_O2" >&6; }
16628CFLAGS="$saved_cflags"
16629
16630# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16631# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16633$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16634saved_cflags="$CFLAGS"
16635CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16636if test "$have_O2" = no; then
16637 CFLAGS=""
16638fi
16639if test "$cross_compiling" = yes; then :
16640 have_glibc_memmove_bug=undefined
16641else
16642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16643/* end confdefs.h. */
16644
16645#include <stdio.h>
16646#include <stdlib.h>
16647#include <string.h>
16648void foo(void *p, void *q) { memmove(p, q, 19); }
16649int main() {
16650 char a[32] = "123456789000000000";
16651 foo(&a[9], a);
16652 if (strcmp(a, "123456789123456789000000000") != 0)
16653 return 1;
16654 foo(a, &a[9]);
16655 if (strcmp(a, "123456789000000000") != 0)
16656 return 1;
16657 return 0;
16658}
16659
16660_ACEOF
16661if ac_fn_c_try_run "$LINENO"; then :
16662 have_glibc_memmove_bug=no
16663else
16664 have_glibc_memmove_bug=yes
16665fi
16666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16667 conftest.$ac_objext conftest.beam conftest.$ac_ext
16668fi
16669
16670CFLAGS="$saved_cflags"
16671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16672$as_echo "$have_glibc_memmove_bug" >&6; }
16673if test "$have_glibc_memmove_bug" = yes; then
16674
16675$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16676
16677fi
16678
16679if test "$have_gcc_asm_for_x87" = yes; then
16680 # Some versions of gcc miscompile inline asm:
16681 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16682 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16683 case $CC in
16684 *gcc*)
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16686$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16687 saved_cflags="$CFLAGS"
16688 CFLAGS="-O2"
16689 if test "$cross_compiling" = yes; then :
16690 have_ipa_pure_const_bug=undefined
16691else
16692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16693/* end confdefs.h. */
16694
16695 __attribute__((noinline)) int
16696 foo(int *p) {
16697 int r;
16698 asm ( "movl \$6, (%1)\n\t"
16699 "xorl %0, %0\n\t"
16700 : "=r" (r) : "r" (p) : "memory"
16701 );
16702 return r;
16703 }
16704 int main() {
16705 int p = 8;
16706 if ((foo(&p) ? : p) != 6)
16707 return 1;
16708 return 0;
16709 }
16710
16711_ACEOF
16712if ac_fn_c_try_run "$LINENO"; then :
16713 have_ipa_pure_const_bug=no
16714else
16715 have_ipa_pure_const_bug=yes
16716fi
16717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16718 conftest.$ac_objext conftest.beam conftest.$ac_ext
16719fi
16720
16721 CFLAGS="$saved_cflags"
16722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16723$as_echo "$have_ipa_pure_const_bug" >&6; }
16724 if test "$have_ipa_pure_const_bug" = yes; then
16725
16726$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16727
16728 fi
16729 ;;
16730 esac
16731fi
16732
Victor Stinner4f5366e2015-01-09 02:13:19 +010016733# Check for stdatomic.h
16734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16735$as_echo_n "checking for stdatomic.h... " >&6; }
16736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16737/* end confdefs.h. */
16738
16739
16740 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016741 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016742 int main() {
16743 int loaded_value = atomic_load(&value);
16744 return 0;
16745 }
16746
16747
16748_ACEOF
16749if ac_fn_c_try_link "$LINENO"; then :
16750 have_stdatomic_h=yes
16751else
16752 have_stdatomic_h=no
16753fi
16754rm -f core conftest.err conftest.$ac_objext \
16755 conftest$ac_exeext conftest.$ac_ext
16756
16757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16758$as_echo "$have_stdatomic_h" >&6; }
16759
16760if test "$have_stdatomic_h" = yes; then
16761
16762$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16763
16764fi
16765
16766# Check for GCC >= 4.7 __atomic builtins
16767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16768$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16770/* end confdefs.h. */
16771
16772
16773 volatile int val = 1;
16774 int main() {
16775 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16776 return 0;
16777 }
16778
16779
16780_ACEOF
16781if ac_fn_c_try_link "$LINENO"; then :
16782 have_builtin_atomic=yes
16783else
16784 have_builtin_atomic=no
16785fi
16786rm -f core conftest.err conftest.$ac_objext \
16787 conftest$ac_exeext conftest.$ac_ext
16788
16789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16790$as_echo "$have_builtin_atomic" >&6; }
16791
16792if test "$have_builtin_atomic" = yes; then
16793
16794$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16795
16796fi
16797
Ned Deily322f5ba2013-11-21 23:01:59 -080016798# ensurepip option
16799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16800$as_echo_n "checking for ensurepip... " >&6; }
16801
16802# Check whether --with-ensurepip was given.
16803if test "${with_ensurepip+set}" = set; then :
16804 withval=$with_ensurepip;
16805else
16806 with_ensurepip=upgrade
16807fi
16808
16809case $with_ensurepip in #(
16810 yes|upgrade) :
16811 ENSUREPIP=upgrade ;; #(
16812 install) :
16813 ENSUREPIP=install ;; #(
16814 no) :
16815 ENSUREPIP=no ;; #(
16816 *) :
16817 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16818esac
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16820$as_echo "$ENSUREPIP" >&6; }
16821
16822
Victor Stinner35a97c02015-03-08 02:59:09 +010016823# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16825$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16827/* end confdefs.h. */
16828
16829
16830 #include <dirent.h>
16831
16832 int main() {
16833 struct dirent entry;
16834 return entry.d_type == DT_UNKNOWN;
16835 }
16836
16837
16838_ACEOF
16839if ac_fn_c_try_link "$LINENO"; then :
16840 have_dirent_d_type=yes
16841else
16842 have_dirent_d_type=no
16843fi
16844rm -f core conftest.err conftest.$ac_objext \
16845 conftest$ac_exeext conftest.$ac_ext
16846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16847$as_echo "$have_dirent_d_type" >&6; }
16848
16849if test "$have_dirent_d_type" = yes; then
16850
16851$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16852
16853fi
16854
Victor Stinner9eb57c52015-03-19 22:21:49 +010016855# check if the Linux getrandom() syscall is available
16856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16857$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16859/* end confdefs.h. */
16860
16861
Victor Stinner1b80b242016-04-12 22:34:58 +020016862 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016863 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016864 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016865
16866 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016867 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016868 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016869 const int flags = GRND_NONBLOCK;
16870 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016871 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016872 return 0;
16873 }
16874
16875
16876_ACEOF
16877if ac_fn_c_try_link "$LINENO"; then :
16878 have_getrandom_syscall=yes
16879else
16880 have_getrandom_syscall=no
16881fi
16882rm -f core conftest.err conftest.$ac_objext \
16883 conftest$ac_exeext conftest.$ac_ext
16884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16885$as_echo "$have_getrandom_syscall" >&6; }
16886
16887if test "$have_getrandom_syscall" = yes; then
16888
16889$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16890
16891fi
16892
Victor Stinner3abf44e2015-09-18 15:38:37 +020016893# check if the getrandom() function is available
16894# the test was written for the Solaris function of <sys/random.h>
16895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16896$as_echo_n "checking for the getrandom() function... " >&6; }
16897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16898/* end confdefs.h. */
16899
16900
16901 #include <sys/random.h>
16902
16903 int main() {
16904 char buffer[1];
16905 const size_t buflen = sizeof(buffer);
16906 const int flags = 0;
16907 /* ignore the result, Python checks for ENOSYS at runtime */
16908 (void)getrandom(buffer, buflen, flags);
16909 return 0;
16910 }
16911
16912
16913_ACEOF
16914if ac_fn_c_try_link "$LINENO"; then :
16915 have_getrandom=yes
16916else
16917 have_getrandom=no
16918fi
16919rm -f core conftest.err conftest.$ac_objext \
16920 conftest$ac_exeext conftest.$ac_ext
16921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16922$as_echo "$have_getrandom" >&6; }
16923
16924if test "$have_getrandom" = yes; then
16925
16926$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16927
16928fi
16929
Neil Schemenauer5741c452019-02-08 10:48:46 -080016930# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16931# shm_* may only be available if linking against librt
16932save_LIBS="$LIBS"
16933save_includes_default="$ac_includes_default"
16934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16935$as_echo_n "checking for library containing shm_open... " >&6; }
16936if ${ac_cv_search_shm_open+:} false; then :
16937 $as_echo_n "(cached) " >&6
16938else
16939 ac_func_search_save_LIBS=$LIBS
16940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16941/* end confdefs.h. */
16942
16943/* Override any GCC internal prototype to avoid an error.
16944 Use char because int might match the return type of a GCC
16945 builtin and then its argument prototype would still apply. */
16946#ifdef __cplusplus
16947extern "C"
16948#endif
16949char shm_open ();
16950int
16951main ()
16952{
16953return shm_open ();
16954 ;
16955 return 0;
16956}
16957_ACEOF
16958for ac_lib in '' rt; do
16959 if test -z "$ac_lib"; then
16960 ac_res="none required"
16961 else
16962 ac_res=-l$ac_lib
16963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16964 fi
16965 if ac_fn_c_try_link "$LINENO"; then :
16966 ac_cv_search_shm_open=$ac_res
16967fi
16968rm -f core conftest.err conftest.$ac_objext \
16969 conftest$ac_exeext
16970 if ${ac_cv_search_shm_open+:} false; then :
16971 break
16972fi
16973done
16974if ${ac_cv_search_shm_open+:} false; then :
16975
16976else
16977 ac_cv_search_shm_open=no
16978fi
16979rm conftest.$ac_ext
16980LIBS=$ac_func_search_save_LIBS
16981fi
16982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16983$as_echo "$ac_cv_search_shm_open" >&6; }
16984ac_res=$ac_cv_search_shm_open
16985if test "$ac_res" != no; then :
16986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16987
16988fi
16989
16990if test "$ac_cv_search_shm_open" = "-lrt"; then
16991
16992$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16993
16994fi
16995for ac_header in sys/mman.h
16996do :
16997 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16998if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16999 cat >>confdefs.h <<_ACEOF
17000#define HAVE_SYS_MMAN_H 1
17001_ACEOF
17002
17003fi
17004
17005done
17006
17007# temporarily override ac_includes_default for AC_CHECK_FUNCS below
17008ac_includes_default="\
17009${ac_includes_default}
17010#ifndef __cplusplus
17011# ifdef HAVE_SYS_MMAN_H
17012# include <sys/mman.h>
17013# endif
17014#endif
17015"
17016for ac_func in shm_open shm_unlink
17017do :
17018 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17019ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17020if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17021 cat >>confdefs.h <<_ACEOF
17022#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17023_ACEOF
17024
17025fi
17026done
17027
17028# we don't want to link with librt always, restore LIBS
17029LIBS="$save_LIBS"
17030ac_includes_default="$save_includes_default"
17031
Christian Heimesff5be6e2018-01-20 13:19:21 +010017032# Check for usable OpenSSL
17033
17034 found=false
17035
17036# Check whether --with-openssl was given.
17037if test "${with_openssl+set}" = set; then :
17038 withval=$with_openssl;
17039 case "$withval" in
17040 "" | y | ye | yes | n | no)
17041 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17042 ;;
17043 *) ssldirs="$withval"
17044 ;;
17045 esac
17046
17047else
17048
17049 # if pkg-config is installed and openssl has installed a .pc file,
17050 # then use that information and don't search ssldirs
17051 if test -n "$ac_tool_prefix"; then
17052 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17053set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17055$as_echo_n "checking for $ac_word... " >&6; }
17056if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17057 $as_echo_n "(cached) " >&6
17058else
17059 if test -n "$PKG_CONFIG"; then
17060 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17061else
17062as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17063for as_dir in $PATH
17064do
17065 IFS=$as_save_IFS
17066 test -z "$as_dir" && as_dir=.
17067 for ac_exec_ext in '' $ac_executable_extensions; do
17068 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17069 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17070 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17071 break 2
17072 fi
17073done
17074 done
17075IFS=$as_save_IFS
17076
17077fi
17078fi
17079PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17080if test -n "$PKG_CONFIG"; then
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17082$as_echo "$PKG_CONFIG" >&6; }
17083else
17084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17085$as_echo "no" >&6; }
17086fi
17087
17088
17089fi
17090if test -z "$ac_cv_prog_PKG_CONFIG"; then
17091 ac_ct_PKG_CONFIG=$PKG_CONFIG
17092 # Extract the first word of "pkg-config", so it can be a program name with args.
17093set dummy pkg-config; ac_word=$2
17094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095$as_echo_n "checking for $ac_word... " >&6; }
17096if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17097 $as_echo_n "(cached) " >&6
17098else
17099 if test -n "$ac_ct_PKG_CONFIG"; then
17100 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17101else
17102as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17103for as_dir in $PATH
17104do
17105 IFS=$as_save_IFS
17106 test -z "$as_dir" && as_dir=.
17107 for ac_exec_ext in '' $ac_executable_extensions; do
17108 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17109 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17110 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17111 break 2
17112 fi
17113done
17114 done
17115IFS=$as_save_IFS
17116
17117fi
17118fi
17119ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17120if test -n "$ac_ct_PKG_CONFIG"; then
17121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17122$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17123else
17124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17125$as_echo "no" >&6; }
17126fi
17127
17128 if test "x$ac_ct_PKG_CONFIG" = x; then
17129 PKG_CONFIG=""
17130 else
17131 case $cross_compiling:$ac_tool_warned in
17132yes:)
17133{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17134$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17135ac_tool_warned=yes ;;
17136esac
17137 PKG_CONFIG=$ac_ct_PKG_CONFIG
17138 fi
17139else
17140 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17141fi
17142
17143 if test x"$PKG_CONFIG" != x""; then
17144 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17145 if test $? = 0; then
17146 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17147 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17148 found=true
17149 fi
17150 fi
17151
17152 # no such luck; use some default ssldirs
17153 if ! $found; then
17154 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17155 fi
17156
17157
17158fi
17159
17160
17161
17162 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17163 # an 'openssl' subdirectory
17164
17165 if ! $found; then
17166 OPENSSL_INCLUDES=
17167 for ssldir in $ssldirs; do
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17169$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17170 if test -f "$ssldir/include/openssl/ssl.h"; then
17171 OPENSSL_INCLUDES="-I$ssldir/include"
17172 OPENSSL_LDFLAGS="-L$ssldir/lib"
17173 OPENSSL_LIBS="-lssl -lcrypto"
17174 found=true
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17176$as_echo "yes" >&6; }
17177 break
17178 else
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17180$as_echo "no" >&6; }
17181 fi
17182 done
17183
17184 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17185 # it will just work!
17186 fi
17187
17188 # try the preprocessor and linker with our new flags,
17189 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17190
17191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17192$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17193 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17194 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17195
17196 save_LIBS="$LIBS"
17197 save_LDFLAGS="$LDFLAGS"
17198 save_CPPFLAGS="$CPPFLAGS"
17199 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17200 LIBS="$OPENSSL_LIBS $LIBS"
17201 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17203/* end confdefs.h. */
17204#include <openssl/ssl.h>
17205int
17206main ()
17207{
17208SSL_new(NULL)
17209 ;
17210 return 0;
17211}
17212_ACEOF
17213if ac_fn_c_try_link "$LINENO"; then :
17214
17215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17216$as_echo "yes" >&6; }
17217 have_openssl=yes
17218
17219else
17220
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17222$as_echo "no" >&6; }
17223 have_openssl=no
17224
17225fi
17226rm -f core conftest.err conftest.$ac_objext \
17227 conftest$ac_exeext conftest.$ac_ext
17228 CPPFLAGS="$save_CPPFLAGS"
17229 LDFLAGS="$save_LDFLAGS"
17230 LIBS="$save_LIBS"
17231
17232
17233
17234
17235
17236
17237if test "$have_openssl" = yes; then
17238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17239$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17240
17241 save_LIBS="$LIBS"
17242 save_LDFLAGS="$LDFLAGS"
17243 save_CPPFLAGS="$CPPFLAGS"
17244 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17245 LIBS="$OPENSSL_LIBS $LIBS"
17246 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17247
17248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17249/* end confdefs.h. */
17250
17251 #include <openssl/x509_vfy.h>
17252
17253int
17254main ()
17255{
17256
17257 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17258 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17259 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17260 X509_VERIFY_PARAM_set_hostflags(p, 0);
17261
17262 ;
17263 return 0;
17264}
17265
17266_ACEOF
17267if ac_fn_c_try_link "$LINENO"; then :
17268
17269 ac_cv_has_x509_verify_param_set1_host=yes
17270
17271else
17272
17273 ac_cv_has_x509_verify_param_set1_host=no
17274
17275fi
17276rm -f core conftest.err conftest.$ac_objext \
17277 conftest$ac_exeext conftest.$ac_ext
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17279$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17280 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17281
17282$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17283
17284 fi
17285
17286 CPPFLAGS="$save_CPPFLAGS"
17287 LDFLAGS="$save_LDFLAGS"
17288 LIBS="$save_LIBS"
17289fi
17290
Christian Heimes892d66e2018-01-29 14:10:18 +010017291# ssl module default cipher suite string
17292
17293
17294
17295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17296$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17297
17298# Check whether --with-ssl-default-suites was given.
17299if test "${with_ssl_default_suites+set}" = set; then :
17300 withval=$with_ssl_default_suites;
17301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17302$as_echo "$withval" >&6; }
17303case "$withval" in
17304 python)
17305 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17306
17307 ;;
17308 openssl)
17309 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17310
17311 ;;
17312 *)
17313 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17314
17315 cat >>confdefs.h <<_ACEOF
17316#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17317_ACEOF
17318
17319 ;;
17320esac
17321
17322else
17323
17324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17325$as_echo "python" >&6; }
17326$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17327
17328
17329fi
17330
17331
17332
Guido van Rossum627b2d71993-12-24 10:39:16 +000017333# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017334ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017335
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017336ac_config_files="$ac_config_files Modules/ld_so_aix"
17337
Martin v. Löwis11437992002-04-12 09:54:03 +000017338cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017339# This file is a shell script that caches the results of configure
17340# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017341# scripts and configure runs, see configure's option --config-cache.
17342# It is not useful on other systems. If it contains results you don't
17343# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017344#
Martin v. Löwis11437992002-04-12 09:54:03 +000017345# config.status only pays attention to the cache file if you give it
17346# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017347#
Skip Montanaro6dead952003-09-25 14:50:04 +000017348# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017349# loading this file, other *unset* `ac_cv_foo' will be assigned the
17350# following values.
17351
17352_ACEOF
17353
Guido van Rossumf78abae1997-01-21 22:02:36 +000017354# The following way of writing the cache mishandles newlines in values,
17355# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017357# Ultrix sh set writes to stderr and can't be redirected directly,
17358# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359(
17360 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17361 eval ac_val=\$$ac_var
17362 case $ac_val in #(
17363 *${as_nl}*)
17364 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017365 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17366$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367 esac
17368 case $ac_var in #(
17369 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017370 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17371 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 esac ;;
17373 esac
17374 done
17375
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17378 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017379 # `set' does not quote correctly, so add quotes: double-quote
17380 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017381 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017382 "s/'/'\\\\''/g;
17383 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017385 *)
17386 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017387 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017388 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017389 esac |
17390 sort
17391) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017392 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017394 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017396 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17397 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17399 :end' >>confcache
17400if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17401 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017402 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17404$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017405 if test ! -f "$cache_file" || test -h "$cache_file"; then
17406 cat confcache >"$cache_file"
17407 else
17408 case $cache_file in #(
17409 */* | ?:*)
17410 mv -f confcache "$cache_file"$$ &&
17411 mv -f "$cache_file"$$ "$cache_file" ;; #(
17412 *)
17413 mv -f confcache "$cache_file" ;;
17414 esac
17415 fi
17416 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017417 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017418 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17419$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017420 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017421fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017422rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017423
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017424test "x$prefix" = xNONE && prefix=$ac_default_prefix
17425# Let make expand exec_prefix.
17426test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017427
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017428DEFS=-DHAVE_CONFIG_H
17429
Skip Montanaro6dead952003-09-25 14:50:04 +000017430ac_libobjs=
17431ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017432U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017433for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17434 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017436 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17438 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017439 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17440 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017441done
17442LIBOBJS=$ac_libobjs
17443
17444LTLIBOBJS=$ac_ltlibobjs
17445
17446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447
Matthias Kloseb9621712010-04-24 17:59:49 +000017448
Victor Stinnere0be4232011-10-25 13:06:09 +020017449: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017450ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017451ac_clean_files_save=$ac_clean_files
17452ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017453{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17454$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17455as_write_fail=0
17456cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017457#! $SHELL
17458# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017459# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017460# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017461# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017462
Martin v. Löwis11437992002-04-12 09:54:03 +000017463debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017464ac_cs_recheck=false
17465ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017466
Matthias Kloseb9621712010-04-24 17:59:49 +000017467SHELL=\${CONFIG_SHELL-$SHELL}
17468export SHELL
17469_ASEOF
17470cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17471## -------------------- ##
17472## M4sh Initialization. ##
17473## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475# Be more Bourne compatible
17476DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017477if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 emulate sh
17479 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017480 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017481 # is contrary to our usage. Disable this feature.
17482 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017484else
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 case `(set -o) 2>/dev/null` in #(
17486 *posix*) :
17487 set -o posix ;; #(
17488 *) :
17489 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017491fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017492
17493
Matthias Kloseb9621712010-04-24 17:59:49 +000017494as_nl='
17495'
17496export as_nl
17497# Printing a long string crashes Solaris 7 /usr/bin/printf.
17498as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17499as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17500as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17501# Prefer a ksh shell builtin over an external printf program on Solaris,
17502# but without wasting forks for bash or zsh.
17503if test -z "$BASH_VERSION$ZSH_VERSION" \
17504 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17505 as_echo='print -r --'
17506 as_echo_n='print -rn --'
17507elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17508 as_echo='printf %s\n'
17509 as_echo_n='printf %s'
17510else
17511 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17512 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17513 as_echo_n='/usr/ucb/echo -n'
17514 else
17515 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17516 as_echo_n_body='eval
17517 arg=$1;
17518 case $arg in #(
17519 *"$as_nl"*)
17520 expr "X$arg" : "X\\(.*\\)$as_nl";
17521 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17522 esac;
17523 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17524 '
17525 export as_echo_n_body
17526 as_echo_n='sh -c $as_echo_n_body as_echo'
17527 fi
17528 export as_echo_body
17529 as_echo='sh -c $as_echo_body as_echo'
17530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017531
17532# The user is always right.
17533if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 PATH_SEPARATOR=:
17535 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17536 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17537 PATH_SEPARATOR=';'
17538 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541
17542# IFS
17543# We need space, tab and new line, in precisely that order. Quoting is
17544# there to prevent editors from complaining about space-tab.
17545# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17546# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547IFS=" "" $as_nl"
17548
17549# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017550as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017551case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552 *[\\/]* ) as_myself=$0 ;;
17553 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017554for as_dir in $PATH
17555do
17556 IFS=$as_save_IFS
17557 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17559 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017562 ;;
17563esac
17564# We did not find ourselves, most probably we were run as `sh COMMAND'
17565# in which case we are not to be found in the path.
17566if test "x$as_myself" = x; then
17567 as_myself=$0
17568fi
17569if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17571 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572fi
17573
Matthias Kloseb9621712010-04-24 17:59:49 +000017574# Unset variables that we do not need and which cause bugs (e.g. in
17575# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17576# suppresses any "Segmentation fault" message there. '((' could
17577# trigger a bug in pdksh 5.2.14.
17578for as_var in BASH_ENV ENV MAIL MAILPATH
17579do eval test x\${$as_var+set} = xset \
17580 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581done
17582PS1='$ '
17583PS2='> '
17584PS4='+ '
17585
17586# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017587LC_ALL=C
17588export LC_ALL
17589LANGUAGE=C
17590export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591
Matthias Kloseb9621712010-04-24 17:59:49 +000017592# CDPATH.
17593(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17594
17595
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017596# as_fn_error STATUS ERROR [LINENO LOG_FD]
17597# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017598# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17599# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017600# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017601as_fn_error ()
17602{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017603 as_status=$1; test $as_status -eq 0 && as_status=1
17604 if test "$4"; then
17605 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17606 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017607 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017608 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 as_fn_exit $as_status
17610} # as_fn_error
17611
17612
17613# as_fn_set_status STATUS
17614# -----------------------
17615# Set $? to STATUS, without forking.
17616as_fn_set_status ()
17617{
17618 return $1
17619} # as_fn_set_status
17620
17621# as_fn_exit STATUS
17622# -----------------
17623# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17624as_fn_exit ()
17625{
17626 set +e
17627 as_fn_set_status $1
17628 exit $1
17629} # as_fn_exit
17630
17631# as_fn_unset VAR
17632# ---------------
17633# Portably unset VAR.
17634as_fn_unset ()
17635{
17636 { eval $1=; unset $1;}
17637}
17638as_unset=as_fn_unset
17639# as_fn_append VAR VALUE
17640# ----------------------
17641# Append the text in VALUE to the end of the definition contained in VAR. Take
17642# advantage of any shell optimizations that allow amortized linear growth over
17643# repeated appends, instead of the typical quadratic growth present in naive
17644# implementations.
17645if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17646 eval 'as_fn_append ()
17647 {
17648 eval $1+=\$2
17649 }'
17650else
17651 as_fn_append ()
17652 {
17653 eval $1=\$$1\$2
17654 }
17655fi # as_fn_append
17656
17657# as_fn_arith ARG...
17658# ------------------
17659# Perform arithmetic evaluation on the ARGs, and store the result in the
17660# global $as_val. Take advantage of shells that can avoid forks. The arguments
17661# must be portable across $(()) and expr.
17662if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17663 eval 'as_fn_arith ()
17664 {
17665 as_val=$(( $* ))
17666 }'
17667else
17668 as_fn_arith ()
17669 {
17670 as_val=`expr "$@" || test $? -eq 1`
17671 }
17672fi # as_fn_arith
17673
17674
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675if expr a : '\(a\)' >/dev/null 2>&1 &&
17676 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17677 as_expr=expr
17678else
17679 as_expr=false
17680fi
17681
17682if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17683 as_basename=basename
17684else
17685 as_basename=false
17686fi
17687
Matthias Kloseb9621712010-04-24 17:59:49 +000017688if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17689 as_dirname=dirname
17690else
17691 as_dirname=false
17692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694as_me=`$as_basename -- "$0" ||
17695$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17696 X"$0" : 'X\(//\)$' \| \
17697 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017698$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699 sed '/^.*\/\([^/][^/]*\)\/*$/{
17700 s//\1/
17701 q
17702 }
17703 /^X\/\(\/\/\)$/{
17704 s//\1/
17705 q
17706 }
17707 /^X\/\(\/\).*/{
17708 s//\1/
17709 q
17710 }
17711 s/.*/./; q'`
17712
Matthias Kloseb9621712010-04-24 17:59:49 +000017713# Avoid depending upon Character Ranges.
17714as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17715as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17716as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17717as_cr_digits='0123456789'
17718as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017719
17720ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017721case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017725 xy) ECHO_C='\c';;
17726 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17727 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 esac;;
17729*)
17730 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017731esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017732
Martin v. Löwis11437992002-04-12 09:54:03 +000017733rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017734if test -d conf$$.dir; then
17735 rm -f conf$$.dir/conf$$.file
17736else
17737 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017738 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017740if (echo >conf$$.file) 2>/dev/null; then
17741 if ln -s conf$$.file conf$$ 2>/dev/null; then
17742 as_ln_s='ln -s'
17743 # ... but there are two gotchas:
17744 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17745 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017746 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017747 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017748 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017749 elif ln conf$$.file conf$$ 2>/dev/null; then
17750 as_ln_s=ln
17751 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017752 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017754else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017755 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17758rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017759
Matthias Kloseb9621712010-04-24 17:59:49 +000017760
17761# as_fn_mkdir_p
17762# -------------
17763# Create "$as_dir" as a directory, including parents if necessary.
17764as_fn_mkdir_p ()
17765{
17766
17767 case $as_dir in #(
17768 -*) as_dir=./$as_dir;;
17769 esac
17770 test -d "$as_dir" || eval $as_mkdir_p || {
17771 as_dirs=
17772 while :; do
17773 case $as_dir in #(
17774 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17775 *) as_qdir=$as_dir;;
17776 esac
17777 as_dirs="'$as_qdir' $as_dirs"
17778 as_dir=`$as_dirname -- "$as_dir" ||
17779$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17780 X"$as_dir" : 'X\(//\)[^/]' \| \
17781 X"$as_dir" : 'X\(//\)$' \| \
17782 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17783$as_echo X"$as_dir" |
17784 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17785 s//\1/
17786 q
17787 }
17788 /^X\(\/\/\)[^/].*/{
17789 s//\1/
17790 q
17791 }
17792 /^X\(\/\/\)$/{
17793 s//\1/
17794 q
17795 }
17796 /^X\(\/\).*/{
17797 s//\1/
17798 q
17799 }
17800 s/.*/./; q'`
17801 test -d "$as_dir" && break
17802 done
17803 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017804 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017805
17806
17807} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017808if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017809 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017810else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017811 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017812 as_mkdir_p=false
17813fi
17814
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017815
17816# as_fn_executable_p FILE
17817# -----------------------
17818# Test if FILE is an executable regular file.
17819as_fn_executable_p ()
17820{
17821 test -f "$1" && test -x "$1"
17822} # as_fn_executable_p
17823as_test_x='test -x'
17824as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017825
17826# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017827as_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 +000017828
17829# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017830as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
17832
Martin v. Löwis11437992002-04-12 09:54:03 +000017833exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017834## ----------------------------------- ##
17835## Main body of $CONFIG_STATUS script. ##
17836## ----------------------------------- ##
17837_ASEOF
17838test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017839
Matthias Kloseb9621712010-04-24 17:59:49 +000017840cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17841# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017842# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843# values after options handling.
17844ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017845This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017846generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017847
17848 CONFIG_FILES = $CONFIG_FILES
17849 CONFIG_HEADERS = $CONFIG_HEADERS
17850 CONFIG_LINKS = $CONFIG_LINKS
17851 CONFIG_COMMANDS = $CONFIG_COMMANDS
17852 $ $0 $@
17853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017854on `(hostname || uname -n) 2>/dev/null | sed 1q`
17855"
17856
Martin v. Löwis11437992002-04-12 09:54:03 +000017857_ACEOF
17858
Matthias Kloseb9621712010-04-24 17:59:49 +000017859case $ac_config_files in *"
17860"*) set x $ac_config_files; shift; ac_config_files=$*;;
17861esac
17862
17863case $ac_config_headers in *"
17864"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17865esac
17866
17867
17868cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017869# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017870config_files="$ac_config_files"
17871config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017874
Matthias Kloseb9621712010-04-24 17:59:49 +000017875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017876ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017877\`$as_me' instantiates files and other configuration actions
17878from templates according to the current configuration. Unless the files
17879and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017880
Matthias Kloseb9621712010-04-24 17:59:49 +000017881Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017882
17883 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017885 --config print configuration, then exit
17886 -q, --quiet, --silent
17887 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017888 -d, --debug don't remove temporary files
17889 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017890 --file=FILE[:TEMPLATE]
17891 instantiate the configuration file FILE
17892 --header=FILE[:TEMPLATE]
17893 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
17895Configuration files:
17896$config_files
17897
17898Configuration headers:
17899$config_headers
17900
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017901Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017904cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17905ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017906ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017907python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017908configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017910
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017911Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017912This config.status script is free software; the Free Software Foundation
17913gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914
17915ac_pwd='$ac_pwd'
17916srcdir='$srcdir'
17917INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017918MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017919test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017920_ACEOF
17921
Matthias Kloseb9621712010-04-24 17:59:49 +000017922cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17923# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017924ac_need_defaults=:
17925while test $# != 0
17926do
17927 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017928 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17930 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017931 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017932 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017933 --*=)
17934 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17935 ac_optarg=
17936 ac_shift=:
17937 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017939 ac_option=$1
17940 ac_optarg=$2
17941 ac_shift=shift
17942 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 esac
17944
Skip Montanaro6dead952003-09-25 14:50:04 +000017945 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017947 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17948 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017950 $as_echo "$ac_cs_version"; exit ;;
17951 --config | --confi | --conf | --con | --co | --c )
17952 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017953 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017954 debug=: ;;
17955 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017956 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017957 case $ac_optarg in
17958 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017959 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017960 esac
17961 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017962 ac_need_defaults=false;;
17963 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017964 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 case $ac_optarg in
17966 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17967 esac
17968 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017969 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970 --he | --h)
17971 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017972 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017973Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017974 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017975 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017976 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17977 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17978 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
17980 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017981 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017982Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
Matthias Kloseb9621712010-04-24 17:59:49 +000017984 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017986
17987 esac
17988 shift
17989done
17990
Skip Montanaro6dead952003-09-25 14:50:04 +000017991ac_configure_extra_args=
17992
17993if $ac_cs_silent; then
17994 exec 6>/dev/null
17995 ac_configure_extra_args="$ac_configure_extra_args --silent"
17996fi
17997
17998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017999cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000018000if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000018001 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000018002 shift
18003 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18004 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018005 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000018006 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000018007fi
18008
Martin v. Löwis11437992002-04-12 09:54:03 +000018009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018010cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018011exec 5>>config.log
18012{
18013 echo
18014 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18015## Running $as_me. ##
18016_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018017 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018021cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
Matthias Kloseb9621712010-04-24 17:59:49 +000018024cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025
18026# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018027for ac_config_target in $ac_config_targets
18028do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029 case $ac_config_target in
18030 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18031 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18032 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018033 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18034 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018036 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018037 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018038 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039
Victor Stinnere0be4232011-10-25 13:06:09 +020018040 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018041 esac
18042done
18043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044
Martin v. Löwis11437992002-04-12 09:54:03 +000018045# If the user did not use the arguments to specify the items to instantiate,
18046# then the envvar interface is used. Set only those that are not.
18047# We use the long form for the default assignment because of an extremely
18048# bizarre bug on SunOS 4.1.3.
18049if $ac_need_defaults; then
18050 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18051 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18052fi
18053
Skip Montanaro6dead952003-09-25 14:50:04 +000018054# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018056# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057# Hook for its removal unless debugging.
18058# Note that there is a small window in which the directory will not be cleaned:
18059# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018060$debug ||
18061{
Victor Stinnere0be4232011-10-25 13:06:09 +020018062 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018064 : "${ac_tmp:=$tmp}"
18065 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018066' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018067 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018068}
Martin v. Löwis11437992002-04-12 09:54:03 +000018069# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018070
Martin v. Löwis11437992002-04-12 09:54:03 +000018071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018073 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018074} ||
18075{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076 tmp=./conf$$-$RANDOM
18077 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018078} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018079ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018080
Matthias Kloseb9621712010-04-24 17:59:49 +000018081# Set up the scripts for CONFIG_FILES section.
18082# No need to generate them if there are no CONFIG_FILES.
18083# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018085
Matthias Kloseb9621712010-04-24 17:59:49 +000018086
18087ac_cr=`echo X | tr X '\015'`
18088# On cygwin, bash can eat \r inside `` if the user requested igncr.
18089# But we know of no other shell where ac_cr would be empty at this
18090# point, so we can use a bashism as a fallback.
18091if test "x$ac_cr" = x; then
18092 eval ac_cr=\$\'\\r\'
18093fi
18094ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18095if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018096 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018097else
18098 ac_cs_awk_cr=$ac_cr
18099fi
18100
Victor Stinnere0be4232011-10-25 13:06:09 +020018101echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018102_ACEOF
18103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105{
18106 echo "cat >conf$$subs.awk <<_ACEOF" &&
18107 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18108 echo "_ACEOF"
18109} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018110 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18111ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112ac_delim='%!_!# '
18113for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018114 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018115 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018116
Matthias Kloseb9621712010-04-24 17:59:49 +000018117 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18118 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018119 break
18120 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018121 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122 else
18123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125done
Matthias Kloseb9621712010-04-24 17:59:49 +000018126rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018127
Matthias Kloseb9621712010-04-24 17:59:49 +000018128cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018129cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018131sed -n '
18132h
18133s/^/S["/; s/!.*/"]=/
18134p
18135g
18136s/^[^!]*!//
18137:repl
18138t repl
18139s/'"$ac_delim"'$//
18140t delim
18141:nl
18142h
18143s/\(.\{148\}\)..*/\1/
18144t more1
18145s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18146p
18147n
18148b repl
18149:more1
18150s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18151p
18152g
18153s/.\{148\}//
18154t nl
18155:delim
18156h
18157s/\(.\{148\}\)..*/\1/
18158t more2
18159s/["\\]/\\&/g; s/^/"/; s/$/"/
18160p
18161b
18162:more2
18163s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18164p
18165g
18166s/.\{148\}//
18167t delim
18168' <conf$$subs.awk | sed '
18169/^[^""]/{
18170 N
18171 s/\n//
18172}
18173' >>$CONFIG_STATUS || ac_write_fail=1
18174rm -f conf$$subs.awk
18175cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18176_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018177cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018178 for (key in S) S_is_set[key] = 1
18179 FS = ""
18180
18181}
18182{
18183 line = $ 0
18184 nfields = split(line, field, "@")
18185 substed = 0
18186 len = length(field[1])
18187 for (i = 2; i < nfields; i++) {
18188 key = field[i]
18189 keylen = length(key)
18190 if (S_is_set[key]) {
18191 value = S[key]
18192 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18193 len += length(value) + length(field[++i])
18194 substed = 1
18195 } else
18196 len += 1 + keylen
18197 }
18198
18199 print line
18200}
18201
18202_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18205if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18206 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18207else
18208 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018209fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018210 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018211_ACEOF
18212
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018213# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18214# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215# trailing colons and then remove the whole line if VPATH becomes empty
18216# (actually we leave an empty line to preserve line numbers).
18217if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018218 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18219h
18220s///
18221s/^/:/
18222s/[ ]*$/:/
18223s/:\$(srcdir):/:/g
18224s/:\${srcdir}:/:/g
18225s/:@srcdir@:/:/g
18226s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018227s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018228x
18229s/\(=[ ]*\).*/\1/
18230G
18231s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232s/^[^=]*=[ ]*$//
18233}'
18234fi
18235
Matthias Kloseb9621712010-04-24 17:59:49 +000018236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018237fi # test -n "$CONFIG_FILES"
18238
Matthias Kloseb9621712010-04-24 17:59:49 +000018239# Set up the scripts for CONFIG_HEADERS section.
18240# No need to generate them if there are no CONFIG_HEADERS.
18241# This happens for instance with `./config.status Makefile'.
18242if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018243cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018244BEGIN {
18245_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246
Matthias Kloseb9621712010-04-24 17:59:49 +000018247# Transform confdefs.h into an awk script `defines.awk', embedded as
18248# here-document in config.status, that substitutes the proper values into
18249# config.h.in to produce config.h.
18250
18251# Create a delimiter string that does not exist in confdefs.h, to ease
18252# handling of long lines.
18253ac_delim='%!_!# '
18254for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018255 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18256 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018257 break
18258 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018259 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018260 else
18261 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18262 fi
18263done
18264
18265# For the awk script, D is an array of macro values keyed by name,
18266# likewise P contains macro parameters if any. Preserve backslash
18267# newline sequences.
18268
18269ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18270sed -n '
18271s/.\{148\}/&'"$ac_delim"'/g
18272t rset
18273:rset
18274s/^[ ]*#[ ]*define[ ][ ]*/ /
18275t def
18276d
18277:def
18278s/\\$//
18279t bsnl
18280s/["\\]/\\&/g
18281s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18282D["\1"]=" \3"/p
18283s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18284d
18285:bsnl
18286s/["\\]/\\&/g
18287s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18288D["\1"]=" \3\\\\\\n"\\/p
18289t cont
18290s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18291t cont
18292d
18293:cont
18294n
18295s/.\{148\}/&'"$ac_delim"'/g
18296t clear
18297:clear
18298s/\\$//
18299t bsnlc
18300s/["\\]/\\&/g; s/^/"/; s/$/"/p
18301d
18302:bsnlc
18303s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18304b cont
18305' <confdefs.h | sed '
18306s/'"$ac_delim"'/"\\\
18307"/g' >>$CONFIG_STATUS || ac_write_fail=1
18308
18309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18310 for (key in D) D_is_set[key] = 1
18311 FS = ""
18312}
18313/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18314 line = \$ 0
18315 split(line, arg, " ")
18316 if (arg[1] == "#") {
18317 defundef = arg[2]
18318 mac1 = arg[3]
18319 } else {
18320 defundef = substr(arg[1], 2)
18321 mac1 = arg[2]
18322 }
18323 split(mac1, mac2, "(") #)
18324 macro = mac2[1]
18325 prefix = substr(line, 1, index(line, defundef) - 1)
18326 if (D_is_set[macro]) {
18327 # Preserve the white space surrounding the "#".
18328 print prefix "define", macro P[macro] D[macro]
18329 next
18330 } else {
18331 # Replace #undef with comments. This is necessary, for example,
18332 # in the case of _POSIX_SOURCE, which is predefined and required
18333 # on some systems where configure will not decide to define it.
18334 if (defundef == "undef") {
18335 print "/*", prefix defundef, macro, "*/"
18336 next
18337 }
18338 }
18339}
18340{ print }
18341_ACAWK
18342_ACEOF
18343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018344 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018345fi # test -n "$CONFIG_HEADERS"
18346
18347
18348eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18349shift
18350for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018351do
18352 case $ac_tag in
18353 :[FHLC]) ac_mode=$ac_tag; continue;;
18354 esac
18355 case $ac_mode$ac_tag in
18356 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018357 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018358 :[FH]-) ac_tag=-:-;;
18359 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18360 esac
18361 ac_save_IFS=$IFS
18362 IFS=:
18363 set x $ac_tag
18364 IFS=$ac_save_IFS
18365 shift
18366 ac_file=$1
18367 shift
18368
18369 case $ac_mode in
18370 :L) ac_source=$1;;
18371 :[FH])
18372 ac_file_inputs=
18373 for ac_f
18374 do
18375 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018376 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 *) # Look for the file first in the build tree, then in the source tree
18378 # (if the path is not absolute). The absolute path cannot be DOS-style,
18379 # because $ac_f cannot contain `:'.
18380 test -f "$ac_f" ||
18381 case $ac_f in
18382 [\\/$]*) false;;
18383 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18384 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018385 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018387 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18388 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 done
18390
18391 # Let's still pretend it is `configure' which instantiates (i.e., don't
18392 # use $as_me), people would be surprised to read:
18393 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018394 configure_input='Generated from '`
18395 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18396 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397 if test x"$ac_file" != x-; then
18398 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018399 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18400$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018402 # Neutralize special characters interpreted by sed in replacement strings.
18403 case $configure_input in #(
18404 *\&* | *\|* | *\\* )
18405 ac_sed_conf_input=`$as_echo "$configure_input" |
18406 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18407 *) ac_sed_conf_input=$configure_input;;
18408 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409
18410 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018411 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18412 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018413 esac
18414 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018415 esac
18416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018418$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018419 X"$ac_file" : 'X\(//\)[^/]' \| \
18420 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018422$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18424 s//\1/
18425 q
18426 }
18427 /^X\(\/\/\)[^/].*/{
18428 s//\1/
18429 q
18430 }
18431 /^X\(\/\/\)$/{
18432 s//\1/
18433 q
18434 }
18435 /^X\(\/\).*/{
18436 s//\1/
18437 q
18438 }
18439 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018440 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 ac_builddir=.
18442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443case "$ac_dir" in
18444.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18445*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018446 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018448 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449 case $ac_top_builddir_sub in
18450 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18451 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18452 esac ;;
18453esac
18454ac_abs_top_builddir=$ac_pwd
18455ac_abs_builddir=$ac_pwd$ac_dir_suffix
18456# for backward compatibility:
18457ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018458
18459case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462 ac_top_srcdir=$ac_top_builddir_sub
18463 ac_abs_top_srcdir=$ac_pwd ;;
18464 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018465 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018466 ac_top_srcdir=$srcdir
18467 ac_abs_top_srcdir=$srcdir ;;
18468 *) # Relative name.
18469 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18470 ac_top_srcdir=$ac_top_build_prefix$srcdir
18471 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018472esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018474
Martin v. Löwis11437992002-04-12 09:54:03 +000018475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 case $ac_mode in
18477 :F)
18478 #
18479 # CONFIG_FILE
18480 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018481
18482 case $INSTALL in
18483 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018486 ac_MKDIR_P=$MKDIR_P
18487 case $MKDIR_P in
18488 [\\/$]* | ?:[\\/]* ) ;;
18489 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18490 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018491_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492
Matthias Kloseb9621712010-04-24 17:59:49 +000018493cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494# If the template does not know about datarootdir, expand it.
18495# FIXME: This hack should be removed a few years after 2.60.
18496ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018497ac_sed_dataroot='
18498/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499 p
18500 q
18501}
18502/@datadir@/p
18503/@docdir@/p
18504/@infodir@/p
18505/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018506/@mandir@/p'
18507case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018508*datarootdir*) ac_datarootdir_seen=yes;;
18509*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18511$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514 ac_datarootdir_hack='
18515 s&@datadir@&$datadir&g
18516 s&@docdir@&$docdir&g
18517 s&@infodir@&$infodir&g
18518 s&@localedir@&$localedir&g
18519 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018520 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521esac
18522_ACEOF
18523
18524# Neutralize VPATH when `$srcdir' = `.'.
18525# Shell code in configure.ac might set extrasub.
18526# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018527cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18528ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018529$extrasub
18530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018531cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018532:t
18533/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018534s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018536s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537s&@srcdir@&$ac_srcdir&;t t
18538s&@abs_srcdir@&$ac_abs_srcdir&;t t
18539s&@top_srcdir@&$ac_top_srcdir&;t t
18540s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18541s&@builddir@&$ac_builddir&;t t
18542s&@abs_builddir@&$ac_abs_builddir&;t t
18543s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18544s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018545s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018546$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018547"
Victor Stinnere0be4232011-10-25 13:06:09 +020018548eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18549 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018552 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18553 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18554 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018555 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018556which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018557$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018558which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018559
Victor Stinnere0be4232011-10-25 13:06:09 +020018560 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018562 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18563 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018564 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018565 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018566 ;;
18567 :H)
18568 #
18569 # CONFIG_HEADER
18570 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018572 {
18573 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018574 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18575 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018576 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018577 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018578 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18579$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018581 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018582 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018583 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018584 fi
18585 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018586 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018587 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018588 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018589 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018590 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018591
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018592
18593 esac
18594
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018595
18596 case $ac_file$ac_mode in
18597 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18598
18599 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018600done # for ac_tag
18601
Guido van Rossum627b2d71993-12-24 10:39:16 +000018602
Matthias Kloseb9621712010-04-24 17:59:49 +000018603as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018604_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018605ac_clean_files=$ac_clean_files_save
18606
Matthias Kloseb9621712010-04-24 17:59:49 +000018607test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018608 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018609
Martin v. Löwis11437992002-04-12 09:54:03 +000018610
18611# configure is writing to config.log, and then calls config.status.
18612# config.status does its own redirection, appending to config.log.
18613# Unfortunately, on DOS this fails, as config.log is still kept open
18614# by configure, so config.status won't be able to write to it; its
18615# output is simply discarded. So we exec the FD to /dev/null,
18616# effectively closing config.log, so it can be properly (re)opened and
18617# appended to by config.status. When coming back to configure, we
18618# need to make the FD available again.
18619if test "$no_create" != yes; then
18620 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018621 ac_config_status_args=
18622 test "$silent" = yes &&
18623 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018624 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018625 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 exec 5>>config.log
18627 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18628 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018629 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018630fi
18631if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18632 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18633$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018634fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018635
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018636
Christian Heimes75ed8902013-11-20 01:11:18 +010018637echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018638if test ! -f Modules/Setup.local
18639then
18640 echo "# Edit this file for local setup changes" >Modules/Setup.local
18641fi
18642
Christian Heimes75ed8902013-11-20 01:11:18 +010018643echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018644$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018645 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018646 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018647mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018648
18649if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18650 echo "" >&6
18651 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018652 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 +000018653 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018654 echo "" >&6
18655 echo "" >&6
18656fi
18657