blob: 2f45c17852e56497a0d8a3163c07351078b40527 [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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700684DEF_MAKE_RULE
685DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000686ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000687LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100688MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000689INSTALL_DATA
690INSTALL_SCRIPT
691INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200692ac_ct_READELF
693READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000694ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200695ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000696AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697GNULD
698LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000699LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000700RUNSHARED
701INSTSONAME
702LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000703PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000704BLDLIBRARY
705DLLLIBRARY
706LDLIBRARY
707LIBRARY
708BUILDEXEEXT
709EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200710NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200711MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200712PLATFORM_TRIPLET
713MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200714ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000715MAINCC
716CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700717SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200718GREP
719CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000720OBJEXT
721EXEEXT
722ac_ct_CC
723CPPFLAGS
724LDFLAGS
725CFLAGS
726CC
727EXPORT_MACOSX_DEPLOYMENT_TARGET
728CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200729_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000730MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000731FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000732FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800733FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKALTINSTALLLAST
735FRAMEWORKALTINSTALLFIRST
736FRAMEWORKINSTALLLAST
737FRAMEWORKINSTALLFIRST
738PYTHONFRAMEWORKINSTALLDIR
739PYTHONFRAMEWORKPREFIX
740PYTHONFRAMEWORKDIR
741PYTHONFRAMEWORKIDENTIFIER
742PYTHONFRAMEWORK
743LIPO_32BIT_FLAGS
744ARCH_RUN_32BIT
745UNIVERSALSDK
746CONFIG_ARGS
747SOVERSION
748VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200749PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200750PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100751host_os
752host_vendor
753host_cpu
754host
755build_os
756build_vendor
757build_cpu
758build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500759HAS_GIT
760GITBRANCH
761GITTAG
762GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400763BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000764target_alias
765host_alias
766build_alias
767LIBS
768ECHO_T
769ECHO_N
770ECHO_C
771DEFS
772mandir
773localedir
774libdir
775psdir
776pdfdir
777dvidir
778htmldir
779infodir
780docdir
781oldincludedir
782includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300783runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000784localstatedir
785sharedstatedir
786sysconfdir
787datadir
788datarootdir
789libexecdir
790sbindir
791bindir
792program_transform_name
793prefix
794exec_prefix
795PACKAGE_URL
796PACKAGE_BUGREPORT
797PACKAGE_STRING
798PACKAGE_VERSION
799PACKAGE_TARNAME
800PACKAGE_NAME
801PATH_SEPARATOR
802SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000803ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000804ac_user_opts='
805enable_option_checking
806enable_universalsdk
807with_universal_archs
808with_framework_name
809enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000810with_cxx_main
811with_suffix
812enable_shared
813enable_profiling
814with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200815with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000816enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700817with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100818with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100819with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000820with_libs
821with_system_expat
822with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100823with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000824enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700825with_tcltk_includes
826with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000828enable_ipv6
829with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000831with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700833with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100839with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100840with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000841'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842 ac_precious_vars='build_alias
843host_alias
844target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100845MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846CC
847CFLAGS
848LDFLAGS
849LIBS
850CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800851CPP
852PKG_CONFIG
853PKG_CONFIG_PATH
854PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000855
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000858ac_init_help=
859ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000860ac_unrecognized_opts=
861ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# The variables have the same names as the options, with
863# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000864cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867no_recursion=
868prefix=NONE
869program_prefix=NONE
870program_suffix=NONE
871program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876x_includes=NONE
877x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879# Installation directory options.
880# These are left unexpanded so users can "make install exec_prefix=/foo"
881# and all the variables that are supposed to be based on exec_prefix
882# by default will actually change.
883# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885bindir='${exec_prefix}/bin'
886sbindir='${exec_prefix}/sbin'
887libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888datarootdir='${prefix}/share'
889datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890sysconfdir='${prefix}/etc'
891sharedstatedir='${prefix}/com'
892localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300893runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894includedir='${prefix}/include'
895oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
897infodir='${datarootdir}/info'
898htmldir='${docdir}'
899dvidir='${docdir}'
900pdfdir='${docdir}'
901psdir='${docdir}'
902libdir='${exec_prefix}/lib'
903localedir='${datarootdir}/locale'
904mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 # If the previous option needs an argument, assign it.
911 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 ac_prev=
914 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200918 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
919 *=) ac_optarg= ;;
920 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000923 # Accept the important Cygnus configure options, so we can diagnose typos.
924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 case $ac_dashdash$ac_option in
926 --)
927 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929 -bindir | --bindir | --bindi | --bind | --bin | --bi)
930 ac_prev=bindir ;;
931 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933
934 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000938
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000939 -cache-file | --cache-file | --cache-fil | --cache-fi \
940 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
941 ac_prev=cache_file ;;
942 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
943 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000944 cache_file=$ac_optarg ;;
945
946 --config-cache | -C)
947 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
955 | --dataroo | --dataro | --datar)
956 ac_prev=datarootdir ;;
957 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
958 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
959 datarootdir=$ac_optarg ;;
960
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200965 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt_orig=$ac_useropt
967 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
968 case $ac_user_opts in
969 *"
970"enable_$ac_useropt"
971"*) ;;
972 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
973 ac_unrecognized_sep=', ';;
974 esac
975 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976
977 -docdir | --docdir | --docdi | --doc | --do)
978 ac_prev=docdir ;;
979 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
980 docdir=$ac_optarg ;;
981
982 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
983 ac_prev=dvidir ;;
984 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
985 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000989 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200991 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
995 *"
996"enable_$ac_useropt"
997"*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1004 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1005 | --exec | --exe | --ex)
1006 ac_prev=exec_prefix ;;
1007 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1008 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1009 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
1012 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 # Obsolete; use --with-gas.
1014 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 -help | --help | --hel | --he | -h)
1017 ac_init_help=long ;;
1018 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1019 ac_init_help=recursive ;;
1020 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1021 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
1023 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001024 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001028 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1029 ac_prev=htmldir ;;
1030 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1031 | --ht=*)
1032 htmldir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -includedir | --includedir | --includedi | --included | --include \
1035 | --includ | --inclu | --incl | --inc)
1036 ac_prev=includedir ;;
1037 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1038 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -infodir | --infodir | --infodi | --infod | --info | --inf)
1042 ac_prev=infodir ;;
1043 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libdir | --libdir | --libdi | --libd)
1047 ac_prev=libdir ;;
1048 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1052 | --libexe | --libex | --libe)
1053 ac_prev=libexecdir ;;
1054 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1055 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 -localedir | --localedir | --localedi | --localed | --locale)
1059 ac_prev=localedir ;;
1060 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1061 localedir=$ac_optarg ;;
1062
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 ac_prev=localstatedir ;;
1066 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
1070 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1071 ac_prev=mandir ;;
1072 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001076 # Obsolete; use --without-fp.
1077 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 no_create=yes ;;
1082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001083 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1084 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1085 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001087 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1088 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1089 | --oldin | --oldi | --old | --ol | --o)
1090 ac_prev=oldincludedir ;;
1091 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1092 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1093 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001095
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1097 ac_prev=prefix ;;
1098 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1102 | --program-pre | --program-pr | --program-p)
1103 ac_prev=program_prefix ;;
1104 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1105 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001106 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107
1108 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1109 | --program-suf | --program-su | --program-s)
1110 ac_prev=program_suffix ;;
1111 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1112 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
1115 -program-transform-name | --program-transform-name \
1116 | --program-transform-nam | --program-transform-na \
1117 | --program-transform-n | --program-transform- \
1118 | --program-transform | --program-transfor \
1119 | --program-transfo | --program-transf \
1120 | --program-trans | --program-tran \
1121 | --progr-tra | --program-tr | --program-t)
1122 ac_prev=program_transform_name ;;
1123 -program-transform-name=* | --program-transform-name=* \
1124 | --program-transform-nam=* | --program-transform-na=* \
1125 | --program-transform-n=* | --program-transform-=* \
1126 | --program-transform=* | --program-transfor=* \
1127 | --program-transfo=* | --program-transf=* \
1128 | --program-trans=* | --program-tran=* \
1129 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001132 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1133 ac_prev=pdfdir ;;
1134 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1135 pdfdir=$ac_optarg ;;
1136
1137 -psdir | --psdir | --psdi | --psd | --ps)
1138 ac_prev=psdir ;;
1139 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1140 psdir=$ac_optarg ;;
1141
Guido van Rossum7f43da71994-08-01 12:15:30 +00001142 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1143 | -silent | --silent | --silen | --sile | --sil)
1144 silent=yes ;;
1145
William Grzybowski23e65b22018-09-07 09:06:15 -03001146 -runstatedir | --runstatedir | --runstatedi | --runstated \
1147 | --runstate | --runstat | --runsta | --runst | --runs \
1148 | --run | --ru | --r)
1149 ac_prev=runstatedir ;;
1150 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1151 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1152 | --run=* | --ru=* | --r=*)
1153 runstatedir=$ac_optarg ;;
1154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1156 ac_prev=sbindir ;;
1157 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1158 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
1161 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1162 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1163 | --sharedst | --shareds | --shared | --share | --shar \
1164 | --sha | --sh)
1165 ac_prev=sharedstatedir ;;
1166 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1167 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1168 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1169 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 -site | --site | --sit)
1173 ac_prev=site ;;
1174 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1178 ac_prev=srcdir ;;
1179 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1183 | --syscon | --sysco | --sysc | --sys | --sy)
1184 ac_prev=sysconfdir ;;
1185 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1186 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001188
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1195 verbose=yes ;;
1196
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 -version | --version | --versio | --versi | --vers | -V)
1198 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001199
1200 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001202 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt_orig=$ac_useropt
1206 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1207 case $ac_user_opts in
1208 *"
1209"with_$ac_useropt"
1210"*) ;;
1211 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1212 ac_unrecognized_sep=', ';;
1213 esac
1214 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215
1216 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001220 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 ac_useropt_orig=$ac_useropt
1222 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1223 case $ac_user_opts in
1224 *"
1225"with_$ac_useropt"
1226"*) ;;
1227 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1228 ac_unrecognized_sep=', ';;
1229 esac
1230 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 --x)
1233 # Obsolete; use --with-x.
1234 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
1236 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1237 | --x-incl | --x-inc | --x-in | --x-i)
1238 ac_prev=x_includes ;;
1239 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1240 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001241 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242
1243 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1244 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1245 ac_prev=x_libraries ;;
1246 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1247 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001250 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1251Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001252 ;;
1253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254 *=*)
1255 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1256 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 case $ac_envvar in #(
1258 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001259 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001261 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 export $ac_envvar ;;
1263
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001264 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001265 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001266 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001269 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270 ;;
1271
1272 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001273done
1274
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001278fi
1279
Matthias Kloseb9621712010-04-24 17:59:49 +00001280if test -n "$ac_unrecognized_opts"; then
1281 case $enable_option_checking in
1282 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001283 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001284 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1285 esac
1286fi
1287
1288# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1290 datadir sysconfdir sharedstatedir localstatedir includedir \
1291 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001292 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001295 # Remove trailing slashes.
1296 case $ac_val in
1297 */ )
1298 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1299 eval $ac_var=\$ac_val;;
1300 esac
1301 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001302 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 [\\/$]* | ?:[\\/]* ) continue;;
1304 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001305 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001306 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001307done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001308
Martin v. Löwis11437992002-04-12 09:54:03 +00001309# There might be people who depend on the old broken behavior: `$host'
1310# used to hold the argument of --host etc.
1311# FIXME: To remove some day.
1312build=$build_alias
1313host=$host_alias
1314target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Martin v. Löwis11437992002-04-12 09:54:03 +00001316# FIXME: To remove some day.
1317if test "x$host_alias" != x; then
1318 if test "x$build_alias" = x; then
1319 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001320 elif test "x$build_alias" != "x$host_alias"; then
1321 cross_compiling=yes
1322 fi
1323fi
1324
1325ac_tool_prefix=
1326test -n "$host_alias" && ac_tool_prefix=$host_alias-
1327
1328test "$silent" = yes && exec 6>/dev/null
1329
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_pwd=`pwd` && test -n "$ac_pwd" &&
1332ac_ls_di=`ls -di .` &&
1333ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001334 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337
1338
Guido van Rossum627b2d71993-12-24 10:39:16 +00001339# Find the source files, if location was not specified.
1340if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001343 ac_confdir=`$as_dirname -- "$as_myself" ||
1344$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1345 X"$as_myself" : 'X\(//\)[^/]' \| \
1346 X"$as_myself" : 'X\(//\)$' \| \
1347 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1348$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001349 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)[^/].*/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\/\)$/{
1358 s//\1/
1359 q
1360 }
1361 /^X\(\/\).*/{
1362 s//\1/
1363 q
1364 }
1365 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001366 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368 srcdir=..
1369 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001370else
1371 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373if test ! -r "$srcdir/$ac_unique_file"; then
1374 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1378ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001380 pwd)`
1381# When building in place, set srcdir=.
1382if test "$ac_abs_confdir" = "$ac_pwd"; then
1383 srcdir=.
1384fi
1385# Remove unnecessary trailing slashes from srcdir.
1386# Double slashes in file names in object file debugging info
1387# mess up M-x gdb in Emacs.
1388case $srcdir in
1389*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1390esac
1391for ac_var in $ac_precious_vars; do
1392 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1393 eval ac_env_${ac_var}_value=\$${ac_var}
1394 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1396done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001397
Martin v. Löwis11437992002-04-12 09:54:03 +00001398#
1399# Report the --help message.
1400#
1401if test "$ac_init_help" = "long"; then
1402 # Omit some internal or obsolete options to make the list less imposing.
1403 # This message is too long to be a string in the A/UX 3.1 sh.
1404 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001405\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001406
1407Usage: $0 [OPTION]... [VAR=VALUE]...
1408
1409To assign environment variables (e.g., CC, CFLAGS...), specify them as
1410VAR=VALUE. See below for descriptions of some of the useful variables.
1411
1412Defaults for the options are specified in brackets.
1413
1414Configuration:
1415 -h, --help display this help and exit
1416 --help=short display options specific to this package
1417 --help=recursive display the short help of all the included packages
1418 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001419 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --cache-file=FILE cache test results in FILE [disabled]
1421 -C, --config-cache alias for \`--cache-file=config.cache'
1422 -n, --no-create do not create output files
1423 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1424
Martin v. Löwis11437992002-04-12 09:54:03 +00001425Installation directories:
1426 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430
1431By default, \`make install' will install all the files in
1432\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1433an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1434for instance \`--prefix=\$HOME'.
1435
1436For better control, use the options below.
1437
1438Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001439 --bindir=DIR user executables [EPREFIX/bin]
1440 --sbindir=DIR system admin executables [EPREFIX/sbin]
1441 --libexecdir=DIR program executables [EPREFIX/libexec]
1442 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1443 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1444 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001445 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001446 --libdir=DIR object code libraries [EPREFIX/lib]
1447 --includedir=DIR C header files [PREFIX/include]
1448 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1449 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1450 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1451 --infodir=DIR info documentation [DATAROOTDIR/info]
1452 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1453 --mandir=DIR man documentation [DATAROOTDIR/man]
1454 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1455 --htmldir=DIR html documentation [DOCDIR]
1456 --dvidir=DIR dvi documentation [DOCDIR]
1457 --pdfdir=DIR pdf documentation [DOCDIR]
1458 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001459_ACEOF
1460
1461 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001462
1463System types:
1464 --build=BUILD configure for building on BUILD [guessed]
1465 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001466 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001467_ACEOF
1468fi
1469
1470if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001472 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 cat <<\_ACEOF
1475
1476Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001478 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1479 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001480 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001481 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --enable-framework[=INSTALLDIR]
1483 Build (MacOSX|Darwin) framework
1484 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001485 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001486 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1487 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001488 --enable-loadable-sqlite-extensions
1489 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --enable-ipv6 Enable ipv6 (with ipv4) support
1491 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001492 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001493 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001494
1495Optional Packages:
1496 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1497 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001498 --with-universal-archs=ARCH
1499 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001500 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1501 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001502 --with-framework-name=FRAMEWORK
1503 specify an alternate name of the framework built
1504 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001505 --with-cxx-main=<compiler>
1506 compile main() and link python executable with C++
1507 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001508 --with-suffix=.exe set executable suffix
1509 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001510 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001511 --with-lto Enable Link Time Optimization in any build. Disabled
1512 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001513 --with-hash-algorithm=[fnv|siphash24]
1514 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001515 --with-address-sanitizer
1516 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001536 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001537 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-libm=STRING math library
1539 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001540 --with(out)-computed-gotos
1541 Use computed gotos in evaluation loop (enabled by
1542 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001543 --with(out)-ensurepip=[=upgrade]
1544 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001545 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001546 --with-ssl-default-suites=[python|openssl|STRING]
1547 Override default cipher suites string, python: use
1548 Python's preferred selection (default), openssl:
1549 leave OpenSSL's defaults untouched, STRING: use a
1550 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001634python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily5489bda2018-01-31 17:44:09 -05002343It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Christian Heimesff5be6e2018-01-20 13:19:21 +01002693
2694
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002695if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696 # If we're building out-of-tree, we need to make sure the following
2697 # resources get picked up before their $srcdir counterparts.
2698 # Objects/ -> typeslots.inc
2699 # Include/ -> Python-ast.h, graminit.h
2700 # Python/ -> importlib.h
2701 # (A side effect of this is that these resources will automatically be
2702 # regenerated when building out-of-tree, regardless of whether or not
2703 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2704 # off.)
2705 BASECPPFLAGS="-IObjects -IInclude -IPython"
2706else
2707 BASECPPFLAGS=""
2708fi
2709
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710
2711
2712
2713
Victor Stinner9ed34a82017-05-02 22:35:58 +02002714if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716# Extract the first word of "git", so it can be a program name with args.
2717set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $as_echo_n "(cached) " >&6
2722else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 if test -n "$HAS_GIT"; then
2724 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725else
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
2738 done
2739IFS=$as_save_IFS
2740
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742fi
2743fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=$ac_cv_prog_HAS_GIT
2745if test -n "$HAS_GIT"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2747$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753
2754else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Xiang Zhang4c855572018-08-20 22:36:19 +08002759 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2760 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2761 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763 GITVERSION=""
2764 GITTAG=""
2765 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766fi
2767
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
doko@python.orga10e4a92013-01-25 18:45:12 +01002873
2874
Ned Deilyfcbc2462014-08-22 13:32:49 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878for ac_prog in python$PACKAGE_VERSION python3 python
2879do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885 $as_echo_n "(cached) " >&6
2886else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 if test -n "$PYTHON_FOR_REGEN"; then
2888 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889else
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901done
2902 done
2903IFS=$as_save_IFS
2904
2905fi
2906fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2908if test -n "$PYTHON_FOR_REGEN"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2910$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
2914fi
2915
2916
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
2922
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923if test "$cross_compiling" = yes; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2925$as_echo_n "checking for python interpreter for cross build... " >&6; }
2926 if test -z "$PYTHON_FOR_BUILD"; then
2927 for interp in python$PACKAGE_VERSION python3 python; do
2928 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002929 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002930 break
2931 fi
2932 interp=
2933 done
2934 if test x$interp = x; then
2935 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2936 fi
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2938$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002939 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002940 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Benjamin Petersond23f8222009-04-05 19:13:16 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Ned Deily5489bda2018-01-31 17:44:09 -05002963VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002965# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002966
2967SOVERSION=1.0
2968
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969# The later defininition of _XOPEN_SOURCE disables certain features
2970# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973
2974
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980
2981
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987
2988
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994
2995
2996
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002997define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002999# Arguments passed to configure.
3000
3001CONFIG_ARGS="$ac_configure_args"
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3004$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003006if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003008 case $enableval in
3009 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003010 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 # information
3012 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003013 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003014 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 ;;
3022 esac
3023 case $enableval in
3024 no)
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027 ;;
3028 *)
3029 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 if test ! -d "${UNIVERSALSDK}"
3031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003032 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038else
3039
3040 UNIVERSALSDK=
3041 enable_universalsdk=
3042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045if test -n "${UNIVERSALSDK}"
3046then
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3048$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049else
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deily87adb6e2013-10-18 21:09:56 -07003056ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058# For backward compatibility reasons we prefer to select '32-bit' if available,
3059# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061if test "`uname -s`" = "Darwin"
3062then
3063 if test -n "${UNIVERSALSDK}"
3064 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003065 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066 then
3067 UNIVERSAL_ARCHS="intel"
3068 fi
3069 fi
3070fi
3071
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003072
Matthias Kloseb9621712010-04-24 17:59:49 +00003073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3074$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075
3076# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 UNIVERSAL_ARCHS="$withval"
3080
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081fi
3082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083if test -n "${UNIVERSALSDK}"
3084then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3086$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3087else
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
3090fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092
3093# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095 withval=$with_framework_name;
3096 PYTHONFRAMEWORK=${withval}
3097 PYTHONFRAMEWORKDIR=${withval}.framework
3098 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3099
3100else
3101
3102 PYTHONFRAMEWORK=Python
3103 PYTHONFRAMEWORKDIR=Python.framework
3104 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3105
3106fi
3107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003109if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003111 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003112 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003113 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 esac
3115 case $enableval in
3116 no)
3117 PYTHONFRAMEWORK=
3118 PYTHONFRAMEWORKDIR=no-framework
3119 PYTHONFRAMEWORKPREFIX=
3120 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST=
3122 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 FRAMEWORKALTINSTALLFIRST=
3124 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003125 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 if test "x${prefix}" = "xNONE"; then
3127 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3128 else
3129 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3130 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003132 ;;
3133 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003137 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003138 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3139 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003140 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 if test "x${prefix}" = "xNONE" ; then
3144 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 else
3147 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3148 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
3150 case "${enableval}" in
3151 /System*)
3152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3153 if test "${prefix}" = "NONE" ; then
3154 # See below
3155 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3156 fi
3157 ;;
3158
3159 /Library*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 ;;
3162
3163 */Library/Frameworks)
3164 MDIR="`dirname "${enableval}"`"
3165 MDIR="`dirname "${MDIR}"`"
3166 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3167
3168 if test "${prefix}" = "NONE"; then
3169 # User hasn't specified the
3170 # --prefix option, but wants to install
3171 # the framework in a non-default location,
3172 # ensure that the compatibility links get
3173 # installed relative to that prefix as well
3174 # instead of in /usr/local.
3175 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3176 fi
3177 ;;
3178
3179 *)
3180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3181 ;;
3182 esac
3183
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003186 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3193
3194 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3195
Jack Jansene578a632001-08-15 01:27:14 +00003196 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Guido van Rossum563e7081996-09-10 18:20:48 +00003198else
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003201 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORKPREFIX=
3203 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST=
3205 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 FRAMEWORKALTINSTALLFIRST=
3207 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 if test "x${prefix}" = "xNONE" ; then
3210 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3211 else
3212 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3213 fi
Jack Jansene578a632001-08-15 01:27:14 +00003214 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217fi
3218
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219
3220
Michael W. Hudson54241132001-12-07 15:38:26 +00003221
3222
3223
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003226
3227
3228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003230
Ned Deilyb8f944f2013-11-21 22:42:25 -08003231
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232
3233cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003234#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003235_ACEOF
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003239## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003240## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003241##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242# Set name for machine-dependent library files
3243
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3245$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246if test -z "$MACHDEP"
3247then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 # avoid using uname for cross builds
3249 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003250 # ac_sys_system and ac_sys_release are used for setting
3251 # a lot of different things including 'define_xopen_source'
3252 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003254 *-*-linux-android*)
3255 ac_sys_system=Linux-android
3256 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 *-*-linux*)
3258 ac_sys_system=Linux
3259 ;;
3260 *-*-cygwin*)
3261 ac_sys_system=Cygwin
3262 ;;
3263 *)
3264 # for now, limit cross builds to known configurations
3265 MACHDEP="unknown"
3266 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3267 esac
3268 ac_sys_release=
3269 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003270 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003271 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003272 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003274 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 fi
3278 ac_md_system=`echo $ac_sys_system |
3279 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3280 ac_md_release=`echo $ac_sys_release |
3281 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3282 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003283
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003284 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003285 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003286 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003287 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3369 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3370 # identifies itself as Darwin/7.*
3371 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3372 # disables platform specific features beyond repair.
3373 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3374 # has no effect, don't bother defining them
3375 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003376 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003377 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003378 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003379 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3380 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3381 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003382 AIX/4)
3383 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003384 AIX/5)
3385 if test `uname -r` -eq 1; then
3386 define_xopen_source=no
3387 fi
3388 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003389 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3390 # defining NI_NUMERICHOST.
3391 QNX/6.3.2)
3392 define_xopen_source=no
3393 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003394
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003395esac
3396
3397if test $define_xopen_source = yes
3398then
Victor Stinner14d098d2011-09-07 22:29:43 +02003399 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
Victor Stinner14d098d2011-09-07 22:29:43 +02003401$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003402
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003403
3404 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3405 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3406 # several APIs are not declared. Since this is also needed in some
3407 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Matthias Kloseb9621712010-04-24 17:59:49 +00003409$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
3411
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003412
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003413$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415fi
3416
Christian Heimes647cd872013-12-07 23:39:33 +01003417# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3418case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003419 hp*|HP*)
3420 define_stdc_a1=yes;;
3421 *)
3422 define_stdc_a1=no;;
3423esac
3424
3425if test $define_stdc_a1 = yes
3426then
Christian Heimes647cd872013-12-07 23:39:33 +01003427
3428$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3429
Christian Heimesb02bcae2013-12-08 15:21:08 +01003430fi
Christian Heimes647cd872013-12-07 23:39:33 +01003431
Jack Jansen6b08a402004-06-03 12:41:45 +00003432# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3433# it may influence the way we can build extensions, so distutils
3434# needs to check it
3435
Thomas Wouters477c8d52006-05-27 19:21:47 +00003436
Jack Jansen6b08a402004-06-03 12:41:45 +00003437CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003438EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003439
Guido van Rossum627b2d71993-12-24 10:39:16 +00003440# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003441
3442# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3443# for debug/optimization stuff. BASECFLAGS is for flags that are required
3444# just to get things to compile and link. Users are free to override OPT
3445# when running configure or make. The build should not break if they do.
3446# BASECFLAGS should generally not be messed with, however.
3447
Guido van Rossum8b131c51995-03-09 14:10:13 +00003448# If the user switches compilers, we can't believe the cache
3449if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3450then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003451 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003452(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003453fi
3454
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003455# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3456# when the compiler supports them, but we don't always want -O2, and
3457# we set -g later.
3458if test -z "$CFLAGS"; then
3459 CFLAGS=
3460fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003461
3462if test "$ac_sys_system" = "Darwin"
3463then
3464 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003465 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003466 # information
3467 if test -z "${CC}"
3468 then
3469 found_gcc=
3470 found_clang=
3471 as_save_IFS=$IFS; IFS=:
3472 for as_dir in $PATH
3473 do
3474 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003475 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003476 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003477 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 fi
3479 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003480 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003481 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003482 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003483 fi
3484 fi
3485 done
3486 IFS=$as_save_IFS
3487
3488 if test -n "$found_gcc" -a -n "$found_clang"
3489 then
3490 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3491 then
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3493$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3494 CC="$found_clang"
3495 CXX="$found_clang++"
3496 fi
3497
3498
3499 elif test -z "$found_gcc" -a -n "$found_clang"
3500 then
3501 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3502$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3503 CC="$found_clang"
3504 CXX="$found_clang++"
3505
3506 elif test -z "$found_gcc" -a -z "$found_clang"
3507 then
3508 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3509 if test -n "${found_clang}"
3510 then
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3512$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3513 CC="${found_clang}"
3514 CXX="`/usr/bin/xcrun -find clang++`"
3515
3516 # else: use default behaviour
3517 fi
3518 fi
3519 fi
3520fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003521ac_ext=c
3522ac_cpp='$CPP $CPPFLAGS'
3523ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3524ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3525ac_compiler_gnu=$ac_cv_c_compiler_gnu
3526if test -n "$ac_tool_prefix"; then
3527 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3528set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3530$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003531if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003532 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003533else
3534 if test -n "$CC"; then
3535 ac_cv_prog_CC="$CC" # Let the user override the test.
3536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3538for as_dir in $PATH
3539do
3540 IFS=$as_save_IFS
3541 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003545 $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 +00003546 break 2
3547 fi
3548done
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003550IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003551
Jack Jansendd19cf82001-12-06 22:36:17 +00003552fi
3553fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003554CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003555if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3557$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003558else
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3560$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003561fi
3562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003563
Martin v. Löwis11437992002-04-12 09:54:03 +00003564fi
3565if test -z "$ac_cv_prog_CC"; then
3566 ac_ct_CC=$CC
3567 # Extract the first word of "gcc", so it can be a program name with args.
3568set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3570$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003571if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003573else
3574 if test -n "$ac_ct_CC"; then
3575 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3576else
3577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003585 $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 +00003586 break 2
3587 fi
3588done
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003591
3592fi
3593fi
3594ac_ct_CC=$ac_cv_prog_ac_ct_CC
3595if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3597$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003598else
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3600$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003601fi
3602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 if test "x$ac_ct_CC" = x; then
3604 CC=""
3605 else
3606 case $cross_compiling:$ac_tool_warned in
3607yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003608{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3609$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610ac_tool_warned=yes ;;
3611esac
3612 CC=$ac_ct_CC
3613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003614else
3615 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003616fi
3617
Jack Jansendd19cf82001-12-06 22:36:17 +00003618if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619 if test -n "$ac_tool_prefix"; then
3620 # 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 +00003621set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3623$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003624if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003626else
3627 if test -n "$CC"; then
3628 ac_cv_prog_CC="$CC" # Let the user override the test.
3629else
Martin v. Löwis11437992002-04-12 09:54:03 +00003630as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3631for as_dir in $PATH
3632do
3633 IFS=$as_save_IFS
3634 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 $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 +00003639 break 2
3640 fi
3641done
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003643IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003644
3645fi
3646fi
3647CC=$ac_cv_prog_CC
3648if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3650$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651else
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3653$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654fi
3655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003658fi
3659if test -z "$CC"; then
3660 # Extract the first word of "cc", so it can be a program name with args.
3661set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003664if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
3667 if test -n "$CC"; then
3668 ac_cv_prog_CC="$CC" # Let the user override the test.
3669else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003670 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3679 ac_prog_rejected=yes
3680 continue
3681 fi
3682 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 $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 +00003684 break 2
3685 fi
3686done
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003688IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003689
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003690if test $ac_prog_rejected = yes; then
3691 # We found a bogon in the path, so make sure we never use it.
3692 set dummy $ac_cv_prog_CC
3693 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003695 # We chose a different compiler from the bogus one.
3696 # However, it has the same basename, so the bogon will be chosen
3697 # first if we set CC to just the basename; use the full file name.
3698 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003699 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700 fi
3701fi
3702fi
3703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003704CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3707$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708else
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3710$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711fi
3712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003713
Martin v. Löwis11437992002-04-12 09:54:03 +00003714fi
3715if test -z "$CC"; then
3716 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 do
3719 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3720set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003723if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003725else
3726 if test -n "$CC"; then
3727 ac_cv_prog_CC="$CC" # Let the user override the test.
3728else
Martin v. Löwis11437992002-04-12 09:54:03 +00003729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3730for as_dir in $PATH
3731do
3732 IFS=$as_save_IFS
3733 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 $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 +00003738 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003739 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003740done
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003742IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003743
3744fi
3745fi
3746CC=$ac_cv_prog_CC
3747if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3749$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750else
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3752$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003753fi
3754
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 test -n "$CC" && break
3757 done
3758fi
3759if test -z "$CC"; then
3760 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003762do
3763 # Extract the first word of "$ac_prog", so it can be a program name with args.
3764set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3766$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003767if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003769else
3770 if test -n "$ac_ct_CC"; then
3771 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3772else
3773as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3774for as_dir in $PATH
3775do
3776 IFS=$as_save_IFS
3777 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003779 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 $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 +00003782 break 2
3783 fi
3784done
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003786IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789fi
3790ac_ct_CC=$ac_cv_prog_ac_ct_CC
3791if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3793$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003794else
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3796$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003798
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800 test -n "$ac_ct_CC" && break
3801done
Michael W. Hudson54241132001-12-07 15:38:26 +00003802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003803 if test "x$ac_ct_CC" = x; then
3804 CC=""
3805 else
3806 case $cross_compiling:$ac_tool_warned in
3807yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810ac_tool_warned=yes ;;
3811esac
3812 CC=$ac_ct_CC
3813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814fi
3815
3816fi
3817
3818
Matthias Kloseb9621712010-04-24 17:59:49 +00003819test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003821as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003822See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003823
3824# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003825$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3826set X $ac_compile
3827ac_compiler=$2
3828for ac_option in --version -v -V -qversion; do
3829 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830case "(($ac_try" in
3831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3832 *) ac_try_echo=$ac_try;;
3833esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003834eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3835$as_echo "$ac_try_echo"; } >&5
3836 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003837 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003838 if test -s conftest.err; then
3839 sed '10a\
3840... rest of stderr output deleted ...
3841 10q' conftest.err >conftest.er1
3842 cat conftest.er1 >&5
3843 fi
3844 rm -f conftest.er1 conftest.err
3845 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3846 test $ac_status = 0; }
3847done
Martin v. Löwis11437992002-04-12 09:54:03 +00003848
Matthias Kloseb9621712010-04-24 17:59:49 +00003849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003850/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852int
3853main ()
3854{
3855
3856 ;
3857 return 0;
3858}
3859_ACEOF
3860ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003861ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003862# Try to create an executable without -o first, disregard a.out.
3863# It will help us diagnose broken compilers, and finding out an intuition
3864# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3866$as_echo_n "checking whether the C compiler works... " >&6; }
3867ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3868
3869# The possible output files:
3870ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3871
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872ac_rmfiles=
3873for ac_file in $ac_files
3874do
3875 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3878 esac
3879done
3880rm -f $ac_rmfiles
3881
Matthias Kloseb9621712010-04-24 17:59:49 +00003882if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003883case "(($ac_try" in
3884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3885 *) ac_try_echo=$ac_try;;
3886esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3888$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003890 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3892 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3894# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3895# in a Makefile. We should not override ac_cv_exeext if it was cached,
3896# so that the user can short-circuit this test for compilers unknown to
3897# Autoconf.
3898for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003899do
3900 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003901 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003902 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003903 ;;
3904 [ab].out )
3905 # We found the default executable, but exeext='' is most
3906 # certainly right.
3907 break;;
3908 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910 then :; else
3911 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3912 fi
3913 # We set ac_cv_exeext here because the later test for it is not
3914 # safe: cross compilers may not add the suffix if given an `-o'
3915 # argument, so we may need to know it at that point already.
3916 # Even if this section looks crufty: it has the advantage of
3917 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003918 break;;
3919 * )
3920 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 esac
3922done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923test "$ac_cv_exeext" = no && ac_cv_exeext=
3924
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003925else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 ac_file=''
3927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003928if test -z "$ac_file"; then :
3929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3930$as_echo "no" >&6; }
3931$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003932sed 's/^/| /' conftest.$ac_ext >&5
3933
Matthias Kloseb9621712010-04-24 17:59:49 +00003934{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003936as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003937See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003938else
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3940$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3943$as_echo_n "checking for C compiler default output file name... " >&6; }
3944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3945$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003946ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003947
Matthias Kloseb9621712010-04-24 17:59:49 +00003948rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3951$as_echo_n "checking for suffix of executables... " >&6; }
3952if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003953case "(($ac_try" in
3954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3955 *) ac_try_echo=$ac_try;;
3956esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003957eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3958$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003960 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003961 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3962 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003963 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3964# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3965# work properly (i.e., refer to `conftest.exe'), while it won't with
3966# `rm'.
3967for ac_file in conftest.exe conftest conftest.*; do
3968 test -f "$ac_file" || continue
3969 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003970 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3972 break;;
3973 * ) break;;
3974 esac
3975done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003976else
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003979as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003980See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003982rm -f conftest conftest$ac_cv_exeext
3983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3984$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985
3986rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003987EXEEXT=$ac_cv_exeext
3988ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3990/* end confdefs.h. */
3991#include <stdio.h>
3992int
3993main ()
3994{
3995FILE *f = fopen ("conftest.out", "w");
3996 return ferror (f) || fclose (f) != 0;
3997
3998 ;
3999 return 0;
4000}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004002ac_clean_files="$ac_clean_files conftest.out"
4003# Check that the compiler produces executables we can run. If not, either
4004# the compiler is broken, or we cross compile.
4005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4006$as_echo_n "checking whether we are cross compiling... " >&6; }
4007if test "$cross_compiling" != yes; then
4008 { { ac_try="$ac_link"
4009case "(($ac_try" in
4010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4011 *) ac_try_echo=$ac_try;;
4012esac
4013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4014$as_echo "$ac_try_echo"; } >&5
4015 (eval "$ac_link") 2>&5
4016 ac_status=$?
4017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4018 test $ac_status = 0; }
4019 if { ac_try='./conftest$ac_cv_exeext'
4020 { { case "(($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_try") 2>&5
4027 ac_status=$?
4028 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4029 test $ac_status = 0; }; }; then
4030 cross_compiling=no
4031 else
4032 if test "$cross_compiling" = maybe; then
4033 cross_compiling=yes
4034 else
4035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004037as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004038If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004039See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004040 fi
4041 fi
4042fi
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4044$as_echo "$cross_compiling" >&6; }
4045
4046rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4047ac_clean_files=$ac_clean_files_save
4048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4049$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004050if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 $as_echo_n "(cached) " >&6
4052else
4053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054/* end confdefs.h. */
4055
4056int
4057main ()
4058{
4059
4060 ;
4061 return 0;
4062}
4063_ACEOF
4064rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004065if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004070eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4071$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004072 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004073 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004074 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4075 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 for ac_file in conftest.o conftest.obj conftest.*; do
4077 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004078 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4081 break;;
4082 esac
4083done
4084else
Matthias Kloseb9621712010-04-24 17:59:49 +00004085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004086sed 's/^/| /' conftest.$ac_ext >&5
4087
Matthias Kloseb9621712010-04-24 17:59:49 +00004088{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4089$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004090as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004091See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004092fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004093rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4096$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004097OBJEXT=$ac_cv_objext
4098ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4100$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004101if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004103else
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004106
Martin v. Löwis11437992002-04-12 09:54:03 +00004107int
4108main ()
4109{
4110#ifndef __GNUC__
4111 choke me
4112#endif
4113
4114 ;
4115 return 0;
4116}
4117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 ac_compiler_gnu=yes
4120else
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004122fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004124ac_cv_c_compiler_gnu=$ac_compiler_gnu
4125
4126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4128$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4129if test $ac_compiler_gnu = yes; then
4130 GCC=yes
4131else
4132 GCC=
4133fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004134ac_test_CFLAGS=${CFLAGS+set}
4135ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4137$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004138if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004139 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004140else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141 ac_save_c_werror_flag=$ac_c_werror_flag
4142 ac_c_werror_flag=yes
4143 ac_cv_prog_cc_g=no
4144 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004147
Martin v. Löwis11437992002-04-12 09:54:03 +00004148int
4149main ()
4150{
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004156if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004157 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 CFLAGS=""
4160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161/* end confdefs.h. */
4162
4163int
4164main ()
4165{
4166
4167 ;
4168 return 0;
4169}
4170_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004171if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172
Matthias Kloseb9621712010-04-24 17:59:49 +00004173else
4174 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004175 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177/* end confdefs.h. */
4178
4179int
4180main ()
4181{
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004188 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4195 ac_c_werror_flag=$ac_save_c_werror_flag
4196fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4198$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004199if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004200 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004201elif test $ac_cv_prog_cc_g = yes; then
4202 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004203 CFLAGS="-g -O2"
4204 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004205 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206 fi
4207else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004208 if test "$GCC" = yes; then
4209 CFLAGS="-O2"
4210 else
4211 CFLAGS=
4212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4215$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004216if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004218else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004219 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004220ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004221cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004222/* end confdefs.h. */
4223#include <stdarg.h>
4224#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004225struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004226/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4227struct buf { int x; };
4228FILE * (*rcsopen) (struct buf *, struct stat *, int);
4229static char *e (p, i)
4230 char **p;
4231 int i;
4232{
4233 return p[i];
4234}
4235static char *f (char * (*g) (char **, int), char **p, ...)
4236{
4237 char *s;
4238 va_list v;
4239 va_start (v,p);
4240 s = g (p, va_arg (v,int));
4241 va_end (v);
4242 return s;
4243}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004244
4245/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4246 function prototypes and stuff, but not '\xHH' hex character constants.
4247 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004248 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004249 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4250 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4255 inside strings and character constants. */
4256#define FOO(x) 'x'
4257int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4258
Skip Montanaro6dead952003-09-25 14:50:04 +00004259int test (int i, double x);
4260struct s1 {int (*f) (int a);};
4261struct s2 {int (*f) (double a);};
4262int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4263int argc;
4264char **argv;
4265int
4266main ()
4267{
4268return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4269 ;
4270 return 0;
4271}
4272_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4274 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004275do
4276 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004277 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004278 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280rm -f core conftest.err conftest.$ac_objext
4281 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004282done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284CC=$ac_save_CC
4285
4286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287# AC_CACHE_VAL
4288case "x$ac_cv_prog_cc_c89" in
4289 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4291$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4294$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004295 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004296 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4298$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004299esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004300if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004301
Matthias Kloseb9621712010-04-24 17:59:49 +00004302fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004303
Martin v. Löwis11437992002-04-12 09:54:03 +00004304ac_ext=c
4305ac_cpp='$CPP $CPPFLAGS'
4306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4308ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004310ac_ext=c
4311ac_cpp='$CPP $CPPFLAGS'
4312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4314ac_compiler_gnu=$ac_cv_c_compiler_gnu
4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4316$as_echo_n "checking how to run the C preprocessor... " >&6; }
4317# On Suns, sometimes $CPP names a directory.
4318if test -n "$CPP" && test -d "$CPP"; then
4319 CPP=
4320fi
4321if test -z "$CPP"; then
4322 if ${ac_cv_prog_CPP+:} false; then :
4323 $as_echo_n "(cached) " >&6
4324else
4325 # Double quotes because CPP needs to be expanded
4326 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4327 do
4328 ac_preproc_ok=false
4329for ac_c_preproc_warn_flag in '' yes
4330do
4331 # Use a header file that comes with gcc, so configuring glibc
4332 # with a fresh cross-compiler works.
4333 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4334 # <limits.h> exists even on freestanding compilers.
4335 # On the NeXT, cc -E runs the code through the compiler's parser,
4336 # not just through cpp. "Syntax error" is here to catch this case.
4337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4338/* end confdefs.h. */
4339#ifdef __STDC__
4340# include <limits.h>
4341#else
4342# include <assert.h>
4343#endif
4344 Syntax error
4345_ACEOF
4346if ac_fn_c_try_cpp "$LINENO"; then :
4347
4348else
4349 # Broken: fails on valid input.
4350continue
4351fi
4352rm -f conftest.err conftest.i conftest.$ac_ext
4353
4354 # OK, works on sane cases. Now check whether nonexistent headers
4355 # can be detected and how.
4356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4357/* end confdefs.h. */
4358#include <ac_nonexistent.h>
4359_ACEOF
4360if ac_fn_c_try_cpp "$LINENO"; then :
4361 # Broken: success on invalid input.
4362continue
4363else
4364 # Passes both tests.
4365ac_preproc_ok=:
4366break
4367fi
4368rm -f conftest.err conftest.i conftest.$ac_ext
4369
4370done
4371# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4372rm -f conftest.i conftest.err conftest.$ac_ext
4373if $ac_preproc_ok; then :
4374 break
4375fi
4376
4377 done
4378 ac_cv_prog_CPP=$CPP
4379
4380fi
4381 CPP=$ac_cv_prog_CPP
4382else
4383 ac_cv_prog_CPP=$CPP
4384fi
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4386$as_echo "$CPP" >&6; }
4387ac_preproc_ok=false
4388for ac_c_preproc_warn_flag in '' yes
4389do
4390 # Use a header file that comes with gcc, so configuring glibc
4391 # with a fresh cross-compiler works.
4392 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4393 # <limits.h> exists even on freestanding compilers.
4394 # On the NeXT, cc -E runs the code through the compiler's parser,
4395 # not just through cpp. "Syntax error" is here to catch this case.
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397/* end confdefs.h. */
4398#ifdef __STDC__
4399# include <limits.h>
4400#else
4401# include <assert.h>
4402#endif
4403 Syntax error
4404_ACEOF
4405if ac_fn_c_try_cpp "$LINENO"; then :
4406
4407else
4408 # Broken: fails on valid input.
4409continue
4410fi
4411rm -f conftest.err conftest.i conftest.$ac_ext
4412
4413 # OK, works on sane cases. Now check whether nonexistent headers
4414 # can be detected and how.
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416/* end confdefs.h. */
4417#include <ac_nonexistent.h>
4418_ACEOF
4419if ac_fn_c_try_cpp "$LINENO"; then :
4420 # Broken: success on invalid input.
4421continue
4422else
4423 # Passes both tests.
4424ac_preproc_ok=:
4425break
4426fi
4427rm -f conftest.err conftest.i conftest.$ac_ext
4428
4429done
4430# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4431rm -f conftest.i conftest.err conftest.$ac_ext
4432if $ac_preproc_ok; then :
4433
4434else
4435 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4436$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4437as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4438See \`config.log' for more details" "$LINENO" 5; }
4439fi
4440
4441ac_ext=c
4442ac_cpp='$CPP $CPPFLAGS'
4443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4445ac_compiler_gnu=$ac_cv_c_compiler_gnu
4446
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4448$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4449if ${ac_cv_path_GREP+:} false; then :
4450 $as_echo_n "(cached) " >&6
4451else
4452 if test -z "$GREP"; then
4453 ac_path_GREP_found=false
4454 # Loop through the user's path and test for each of PROGNAME-LIST
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
4460 for ac_prog in grep ggrep; do
4461 for ac_exec_ext in '' $ac_executable_extensions; do
4462 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4463 as_fn_executable_p "$ac_path_GREP" || continue
4464# Check for GNU ac_path_GREP and select it if it is found.
4465 # Check for GNU $ac_path_GREP
4466case `"$ac_path_GREP" --version 2>&1` in
4467*GNU*)
4468 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4469*)
4470 ac_count=0
4471 $as_echo_n 0123456789 >"conftest.in"
4472 while :
4473 do
4474 cat "conftest.in" "conftest.in" >"conftest.tmp"
4475 mv "conftest.tmp" "conftest.in"
4476 cp "conftest.in" "conftest.nl"
4477 $as_echo 'GREP' >> "conftest.nl"
4478 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4479 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4480 as_fn_arith $ac_count + 1 && ac_count=$as_val
4481 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4482 # Best one so far, save it but keep looking for a better one
4483 ac_cv_path_GREP="$ac_path_GREP"
4484 ac_path_GREP_max=$ac_count
4485 fi
4486 # 10*(2^10) chars as input seems more than enough
4487 test $ac_count -gt 10 && break
4488 done
4489 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4490esac
4491
4492 $ac_path_GREP_found && break 3
4493 done
4494 done
4495 done
4496IFS=$as_save_IFS
4497 if test -z "$ac_cv_path_GREP"; then
4498 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4499 fi
4500else
4501 ac_cv_path_GREP=$GREP
4502fi
4503
4504fi
4505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4506$as_echo "$ac_cv_path_GREP" >&6; }
4507 GREP="$ac_cv_path_GREP"
4508
4509
Łukasz Langaa785c872016-09-09 17:37:37 -07004510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4511$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4512if ${ac_cv_path_SED+:} false; then :
4513 $as_echo_n "(cached) " >&6
4514else
4515 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4516 for ac_i in 1 2 3 4 5 6 7; do
4517 ac_script="$ac_script$as_nl$ac_script"
4518 done
4519 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4520 { ac_script=; unset ac_script;}
4521 if test -z "$SED"; then
4522 ac_path_SED_found=false
4523 # Loop through the user's path and test for each of PROGNAME-LIST
4524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4525for as_dir in $PATH
4526do
4527 IFS=$as_save_IFS
4528 test -z "$as_dir" && as_dir=.
4529 for ac_prog in sed gsed; do
4530 for ac_exec_ext in '' $ac_executable_extensions; do
4531 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4532 as_fn_executable_p "$ac_path_SED" || continue
4533# Check for GNU ac_path_SED and select it if it is found.
4534 # Check for GNU $ac_path_SED
4535case `"$ac_path_SED" --version 2>&1` in
4536*GNU*)
4537 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4538*)
4539 ac_count=0
4540 $as_echo_n 0123456789 >"conftest.in"
4541 while :
4542 do
4543 cat "conftest.in" "conftest.in" >"conftest.tmp"
4544 mv "conftest.tmp" "conftest.in"
4545 cp "conftest.in" "conftest.nl"
4546 $as_echo '' >> "conftest.nl"
4547 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4548 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4549 as_fn_arith $ac_count + 1 && ac_count=$as_val
4550 if test $ac_count -gt ${ac_path_SED_max-0}; then
4551 # Best one so far, save it but keep looking for a better one
4552 ac_cv_path_SED="$ac_path_SED"
4553 ac_path_SED_max=$ac_count
4554 fi
4555 # 10*(2^10) chars as input seems more than enough
4556 test $ac_count -gt 10 && break
4557 done
4558 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4559esac
4560
4561 $ac_path_SED_found && break 3
4562 done
4563 done
4564 done
4565IFS=$as_save_IFS
4566 if test -z "$ac_cv_path_SED"; then
4567 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4568 fi
4569else
4570 ac_cv_path_SED=$SED
4571fi
4572
4573fi
4574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4575$as_echo "$ac_cv_path_SED" >&6; }
4576 SED="$ac_cv_path_SED"
4577 rm -f conftest.sed
4578
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004579
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004580
4581
Matthias Kloseb9621712010-04-24 17:59:49 +00004582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4583$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004585# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004586if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589 case $withval in
4590 no) with_cxx_main=no
4591 MAINCC='$(CC)';;
4592 yes) with_cxx_main=yes
4593 MAINCC='$(CXX)';;
4594 *) with_cxx_main=yes
4595 MAINCC=$withval
4596 if test -z "$CXX"
4597 then
4598 CXX=$withval
4599 fi;;
4600 esac
4601else
4602
4603 with_cxx_main=no
4604 MAINCC='$(CC)'
4605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004606fi
4607
Matthias Kloseb9621712010-04-24 17:59:49 +00004608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4609$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004610
4611preset_cxx="$CXX"
4612if test -z "$CXX"
4613then
4614 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004615 gcc) if test -n "$ac_tool_prefix"; then
4616 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4617set dummy ${ac_tool_prefix}g++; ac_word=$2
4618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4619$as_echo_n "checking for $ac_word... " >&6; }
4620if ${ac_cv_path_CXX+:} false; then :
4621 $as_echo_n "(cached) " >&6
4622else
4623 case $CXX in
4624 [\\/]* | ?:[\\/]*)
4625 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4626 ;;
4627 *)
4628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4629for as_dir in notfound
4630do
4631 IFS=$as_save_IFS
4632 test -z "$as_dir" && as_dir=.
4633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004635 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4637 break 2
4638 fi
4639done
4640 done
4641IFS=$as_save_IFS
4642
4643 ;;
4644esac
4645fi
4646CXX=$ac_cv_path_CXX
4647if test -n "$CXX"; then
4648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4649$as_echo "$CXX" >&6; }
4650else
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4652$as_echo "no" >&6; }
4653fi
4654
4655
4656fi
4657if test -z "$ac_cv_path_CXX"; then
4658 ac_pt_CXX=$CXX
4659 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004660set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4662$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004663if ${ac_cv_path_ac_pt_CXX+:} false; then :
4664 $as_echo_n "(cached) " >&6
4665else
4666 case $ac_pt_CXX in
4667 [\\/]* | ?:[\\/]*)
4668 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4669 ;;
4670 *)
4671 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4672for as_dir in notfound
4673do
4674 IFS=$as_save_IFS
4675 test -z "$as_dir" && as_dir=.
4676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004678 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4679 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4680 break 2
4681 fi
4682done
4683 done
4684IFS=$as_save_IFS
4685
4686 ;;
4687esac
4688fi
4689ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4690if test -n "$ac_pt_CXX"; then
4691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4692$as_echo "$ac_pt_CXX" >&6; }
4693else
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4695$as_echo "no" >&6; }
4696fi
4697
4698 if test "x$ac_pt_CXX" = x; then
4699 CXX="g++"
4700 else
4701 case $cross_compiling:$ac_tool_warned in
4702yes:)
4703{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4704$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4705ac_tool_warned=yes ;;
4706esac
4707 CXX=$ac_pt_CXX
4708 fi
4709else
4710 CXX="$ac_cv_path_CXX"
4711fi
4712 ;;
4713 cc) if test -n "$ac_tool_prefix"; then
4714 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4715set dummy ${ac_tool_prefix}c++; ac_word=$2
4716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4717$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004718if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004719 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720else
4721 case $CXX in
4722 [\\/]* | ?:[\\/]*)
4723 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4724 ;;
4725 *)
4726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4727for as_dir in notfound
4728do
4729 IFS=$as_save_IFS
4730 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735 break 2
4736 fi
4737done
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004739IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ;;
4742esac
4743fi
4744CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004745if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4747$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004748else
Matthias Kloseb9621712010-04-24 17:59:49 +00004749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4750$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004752
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753
4754fi
4755if test -z "$ac_cv_path_CXX"; then
4756 ac_pt_CXX=$CXX
4757 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004762 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004764 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 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 +00004767 ;;
4768 *)
4769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in notfound
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004778 break 2
4779 fi
4780done
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004782IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 ;;
4785esac
4786fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004787ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4788if test -n "$ac_pt_CXX"; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4790$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791else
Matthias Kloseb9621712010-04-24 17:59:49 +00004792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004796 if test "x$ac_pt_CXX" = x; then
4797 CXX="c++"
4798 else
4799 case $cross_compiling:$ac_tool_warned in
4800yes:)
4801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4803ac_tool_warned=yes ;;
4804esac
4805 CXX=$ac_pt_CXX
4806 fi
4807else
4808 CXX="$ac_cv_path_CXX"
4809fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004811 clang|*/clang) if test -n "$ac_tool_prefix"; then
4812 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4813set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CXX+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818else
4819 case $CXX in
4820 [\\/]* | ?:[\\/]*)
4821 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4822 ;;
4823 *)
4824 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in notfound
4826do
4827 IFS=$as_save_IFS
4828 test -z "$as_dir" && as_dir=.
4829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004831 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833 break 2
4834 fi
4835done
4836 done
4837IFS=$as_save_IFS
4838
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ;;
4840esac
4841fi
4842CXX=$ac_cv_path_CXX
4843if test -n "$CXX"; then
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4845$as_echo "$CXX" >&6; }
4846else
4847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851
4852fi
4853if test -z "$ac_cv_path_CXX"; then
4854 ac_pt_CXX=$CXX
4855 # Extract the first word of "clang++", so it can be a program name with args.
4856set dummy clang++; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if ${ac_cv_path_ac_pt_CXX+:} false; then :
4860 $as_echo_n "(cached) " >&6
4861else
4862 case $ac_pt_CXX in
4863 [\\/]* | ?:[\\/]*)
4864 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4865 ;;
4866 *)
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in notfound
4869do
4870 IFS=$as_save_IFS
4871 test -z "$as_dir" && as_dir=.
4872 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004873 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004874 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4875 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876 break 2
4877 fi
4878done
4879 done
4880IFS=$as_save_IFS
4881
4882 ;;
4883esac
4884fi
4885ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4886if test -n "$ac_pt_CXX"; then
4887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4888$as_echo "$ac_pt_CXX" >&6; }
4889else
4890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894 if test "x$ac_pt_CXX" = x; then
4895 CXX="clang++"
4896 else
4897 case $cross_compiling:$ac_tool_warned in
4898yes:)
4899{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4900$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4901ac_tool_warned=yes ;;
4902esac
4903 CXX=$ac_pt_CXX
4904 fi
4905else
4906 CXX="$ac_cv_path_CXX"
4907fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004908 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004909 icc|*/icc) if test -n "$ac_tool_prefix"; then
4910 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4911set dummy ${ac_tool_prefix}icpc; ac_word=$2
4912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4913$as_echo_n "checking for $ac_word... " >&6; }
4914if ${ac_cv_path_CXX+:} false; then :
4915 $as_echo_n "(cached) " >&6
4916else
4917 case $CXX in
4918 [\\/]* | ?:[\\/]*)
4919 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4920 ;;
4921 *)
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in notfound
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 for ac_exec_ext in '' $ac_executable_extensions; do
4928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4929 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4931 break 2
4932 fi
4933done
4934 done
4935IFS=$as_save_IFS
4936
4937 ;;
4938esac
4939fi
4940CXX=$ac_cv_path_CXX
4941if test -n "$CXX"; then
4942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4943$as_echo "$CXX" >&6; }
4944else
4945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4946$as_echo "no" >&6; }
4947fi
4948
4949
4950fi
4951if test -z "$ac_cv_path_CXX"; then
4952 ac_pt_CXX=$CXX
4953 # Extract the first word of "icpc", so it can be a program name with args.
4954set dummy icpc; ac_word=$2
4955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_ac_pt_CXX+:} false; then :
4958 $as_echo_n "(cached) " >&6
4959else
4960 case $ac_pt_CXX in
4961 [\\/]* | ?:[\\/]*)
4962 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4963 ;;
4964 *)
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in notfound
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
4970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4972 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4974 break 2
4975 fi
4976done
4977 done
4978IFS=$as_save_IFS
4979
4980 ;;
4981esac
4982fi
4983ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4984if test -n "$ac_pt_CXX"; then
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4986$as_echo "$ac_pt_CXX" >&6; }
4987else
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
4990fi
4991
4992 if test "x$ac_pt_CXX" = x; then
4993 CXX="icpc"
4994 else
4995 case $cross_compiling:$ac_tool_warned in
4996yes:)
4997{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4998$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4999ac_tool_warned=yes ;;
5000esac
5001 CXX=$ac_pt_CXX
5002 fi
5003else
5004 CXX="$ac_cv_path_CXX"
5005fi
5006 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005007 esac
5008 if test "$CXX" = "notfound"
5009 then
5010 CXX=""
5011 fi
5012fi
5013if test -z "$CXX"
5014then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005015 if test -n "$ac_tool_prefix"; then
5016 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5017 do
5018 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5019set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5021$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005022if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005023 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005024else
5025 if test -n "$CXX"; then
5026 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5027else
5028as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005034 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005035 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005036 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005037 break 2
5038 fi
5039done
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005041IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042
5043fi
5044fi
5045CXX=$ac_cv_prog_CXX
5046if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5048$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052fi
5053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005055 test -n "$CXX" && break
5056 done
5057fi
5058if test -z "$CXX"; then
5059 ac_ct_CXX=$CXX
5060 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5061do
5062 # Extract the first word of "$ac_prog", so it can be a program name with args.
5063set dummy $ac_prog; ac_word=$2
5064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5065$as_echo_n "checking for $ac_word... " >&6; }
5066if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5067 $as_echo_n "(cached) " >&6
5068else
5069 if test -n "$ac_ct_CXX"; then
5070 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5071else
5072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075 IFS=$as_save_IFS
5076 test -z "$as_dir" && as_dir=.
5077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 ac_cv_prog_ac_ct_CXX="$ac_prog"
5080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081 break 2
5082 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005083done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 done
5085IFS=$as_save_IFS
5086
5087fi
5088fi
5089ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5090if test -n "$ac_ct_CXX"; then
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5092$as_echo "$ac_ct_CXX" >&6; }
5093else
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5095$as_echo "no" >&6; }
5096fi
5097
5098
5099 test -n "$ac_ct_CXX" && break
5100done
5101
5102 if test "x$ac_ct_CXX" = x; then
5103 CXX="notfound"
5104 else
5105 case $cross_compiling:$ac_tool_warned in
5106yes:)
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5108$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5109ac_tool_warned=yes ;;
5110esac
5111 CXX=$ac_ct_CXX
5112 fi
5113fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005114
5115 if test "$CXX" = "notfound"
5116 then
5117 CXX=""
5118 fi
5119fi
5120if test "$preset_cxx" != "$CXX"
5121then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005122 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005123
5124 By default, distutils will build C++ extension modules with \"$CXX\".
5125 If this is not intended, then set CXX on the configure command line.
5126 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005131 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132fi
5133
5134
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005135MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5136
5137
5138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5139$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5140cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef bfin
5142#undef cris
5143#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005145#undef hppa
5146#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005149#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005152#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005153 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005154#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155# if defined(__x86_64__) && defined(__LP64__)
5156 x86_64-linux-gnu
5157# elif defined(__x86_64__) && defined(__ILP32__)
5158 x86_64-linux-gnux32
5159# elif defined(__i386__)
5160 i386-linux-gnu
5161# elif defined(__aarch64__) && defined(__AARCH64EL__)
5162# if defined(__ILP32__)
5163 aarch64_ilp32-linux-gnu
5164# else
5165 aarch64-linux-gnu
5166# endif
5167# elif defined(__aarch64__) && defined(__AARCH64EB__)
5168# if defined(__ILP32__)
5169 aarch64_be_ilp32-linux-gnu
5170# else
5171 aarch64_be-linux-gnu
5172# endif
5173# elif defined(__alpha__)
5174 alpha-linux-gnu
5175# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5176# if defined(__ARMEL__)
5177 arm-linux-gnueabihf
5178# else
5179 armeb-linux-gnueabihf
5180# endif
5181# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5182# if defined(__ARMEL__)
5183 arm-linux-gnueabi
5184# else
5185 armeb-linux-gnueabi
5186# endif
5187# elif defined(__hppa__)
5188 hppa-linux-gnu
5189# elif defined(__ia64__)
5190 ia64-linux-gnu
5191# elif defined(__m68k__) && !defined(__mcoldfire__)
5192 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005193# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5194# if _MIPS_SIM == _ABIO32
5195 mipsisa32r6el-linux-gnu
5196# elif _MIPS_SIM == _ABIN32
5197 mipsisa64r6el-linux-gnuabin32
5198# elif _MIPS_SIM == _ABI64
5199 mipsisa64r6el-linux-gnuabi64
5200# else
5201# error unknown platform triplet
5202# endif
5203# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5204# if _MIPS_SIM == _ABIO32
5205 mipsisa32r6-linux-gnu
5206# elif _MIPS_SIM == _ABIN32
5207 mipsisa64r6-linux-gnuabin32
5208# elif _MIPS_SIM == _ABI64
5209 mipsisa64r6-linux-gnuabi64
5210# else
5211# error unknown platform triplet
5212# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005213# elif defined(__mips_hard_float) && defined(_MIPSEL)
5214# if _MIPS_SIM == _ABIO32
5215 mipsel-linux-gnu
5216# elif _MIPS_SIM == _ABIN32
5217 mips64el-linux-gnuabin32
5218# elif _MIPS_SIM == _ABI64
5219 mips64el-linux-gnuabi64
5220# else
5221# error unknown platform triplet
5222# endif
5223# elif defined(__mips_hard_float)
5224# if _MIPS_SIM == _ABIO32
5225 mips-linux-gnu
5226# elif _MIPS_SIM == _ABIN32
5227 mips64-linux-gnuabin32
5228# elif _MIPS_SIM == _ABI64
5229 mips64-linux-gnuabi64
5230# else
5231# error unknown platform triplet
5232# endif
5233# elif defined(__or1k__)
5234 or1k-linux-gnu
5235# elif defined(__powerpc__) && defined(__SPE__)
5236 powerpc-linux-gnuspe
5237# elif defined(__powerpc64__)
5238# if defined(__LITTLE_ENDIAN__)
5239 powerpc64le-linux-gnu
5240# else
5241 powerpc64-linux-gnu
5242# endif
5243# elif defined(__powerpc__)
5244 powerpc-linux-gnu
5245# elif defined(__s390x__)
5246 s390x-linux-gnu
5247# elif defined(__s390__)
5248 s390-linux-gnu
5249# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5250 sh4-linux-gnu
5251# elif defined(__sparc__) && defined(__arch64__)
5252 sparc64-linux-gnu
5253# elif defined(__sparc__)
5254 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005255# elif defined(__riscv)
5256# if __riscv_xlen == 32
5257 riscv32-linux-gnu
5258# elif __riscv_xlen == 64
5259 riscv64-linux-gnu
5260# else
5261# error unknown platform triplet
5262# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005263# else
5264# error unknown platform triplet
5265# endif
5266#elif defined(__FreeBSD_kernel__)
5267# if defined(__LP64__)
5268 x86_64-kfreebsd-gnu
5269# elif defined(__i386__)
5270 i386-kfreebsd-gnu
5271# else
5272# error unknown platform triplet
5273# endif
5274#elif defined(__gnu_hurd__)
5275 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005276#elif defined(__APPLE__)
5277 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005278#else
5279# error unknown platform triplet
5280#endif
5281
5282EOF
5283
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005284if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005285 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5287$as_echo "$PLATFORM_TRIPLET" >&6; }
5288else
5289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5290$as_echo "none" >&6; }
5291fi
5292rm -f conftest.c conftest.out
5293
5294if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5295 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5296 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5297 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005298elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5299 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005300fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005301
doko@ubuntu.com55532312016-06-14 08:55:19 +02005302if test x$MULTIARCH != x; then
5303 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5308$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5309save_LDFLAGS="$LDFLAGS"
5310LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313/* end confdefs.h. */
5314
5315int
5316main ()
5317{
5318
5319 ;
5320 return 0;
5321}
5322_ACEOF
5323if ac_fn_c_try_link "$LINENO"; then :
5324 NO_AS_NEEDED="-Wl,--no-as-needed"
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5326$as_echo "yes" >&6; }
5327else
5328 NO_AS_NEEDED=""
5329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5330$as_echo "no" >&6; }
5331fi
5332rm -f core conftest.err conftest.$ac_objext \
5333 conftest$ac_exeext conftest.$ac_ext
5334LDFLAGS="$save_LDFLAGS"
5335
5336
5337
5338# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005339
Matthias Kloseb9621712010-04-24 17:59:49 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5341$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005342if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344else
5345 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5346 then ac_cv_path_EGREP="$GREP -E"
5347 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 # Loop through the user's path and test for each of PROGNAME-LIST
5351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5353do
5354 IFS=$as_save_IFS
5355 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 for ac_prog in egrep; do
5357 for ac_exec_ext in '' $ac_executable_extensions; do
5358 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005359 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005360# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 # Check for GNU $ac_path_EGREP
5362case `"$ac_path_EGREP" --version 2>&1` in
5363*GNU*)
5364 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5365*)
5366 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005367 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005368 while :
5369 do
5370 cat "conftest.in" "conftest.in" >"conftest.tmp"
5371 mv "conftest.tmp" "conftest.in"
5372 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005373 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005374 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5375 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5378 # Best one so far, save it but keep looking for a better one
5379 ac_cv_path_EGREP="$ac_path_EGREP"
5380 ac_path_EGREP_max=$ac_count
5381 fi
5382 # 10*(2^10) chars as input seems more than enough
5383 test $ac_count -gt 10 && break
5384 done
5385 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5386esac
5387
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $ac_path_EGREP_found && break 3
5389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005390 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005394 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 +00005395 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005396else
5397 ac_cv_path_EGREP=$EGREP
5398fi
5399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 fi
5401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5403$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005405
5406
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5408$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005409if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005410 $as_echo_n "(cached) " >&6
5411else
5412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005413/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005414#include <stdlib.h>
5415#include <stdarg.h>
5416#include <string.h>
5417#include <float.h>
5418
5419int
5420main ()
5421{
5422
5423 ;
5424 return 0;
5425}
5426_ACEOF
5427if ac_fn_c_try_compile "$LINENO"; then :
5428 ac_cv_header_stdc=yes
5429else
5430 ac_cv_header_stdc=no
5431fi
5432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5433
5434if test $ac_cv_header_stdc = yes; then
5435 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5437/* end confdefs.h. */
5438#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005439
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005442 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005444else
Matthias Kloseb9621712010-04-24 17:59:49 +00005445 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005447rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449fi
5450
5451if test $ac_cv_header_stdc = yes; then
5452 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5454/* end confdefs.h. */
5455#include <stdlib.h>
5456
5457_ACEOF
5458if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5459 $EGREP "free" >/dev/null 2>&1; then :
5460
5461else
5462 ac_cv_header_stdc=no
5463fi
5464rm -f conftest*
5465
5466fi
5467
5468if test $ac_cv_header_stdc = yes; then
5469 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5470 if test "$cross_compiling" = yes; then :
5471 :
5472else
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#include <ctype.h>
5476#include <stdlib.h>
5477#if ((' ' & 0x0FF) == 0x020)
5478# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5479# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5480#else
5481# define ISLOWER(c) \
5482 (('a' <= (c) && (c) <= 'i') \
5483 || ('j' <= (c) && (c) <= 'r') \
5484 || ('s' <= (c) && (c) <= 'z'))
5485# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5486#endif
5487
5488#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5489int
5490main ()
5491{
5492 int i;
5493 for (i = 0; i < 256; i++)
5494 if (XOR (islower (i), ISLOWER (i))
5495 || toupper (i) != TOUPPER (i))
5496 return 2;
5497 return 0;
5498}
5499_ACEOF
5500if ac_fn_c_try_run "$LINENO"; then :
5501
5502else
5503 ac_cv_header_stdc=no
5504fi
5505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5506 conftest.$ac_objext conftest.beam conftest.$ac_ext
5507fi
5508
5509fi
5510fi
5511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5512$as_echo "$ac_cv_header_stdc" >&6; }
5513if test $ac_cv_header_stdc = yes; then
5514
5515$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5516
5517fi
5518
5519# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5520for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5521 inttypes.h stdint.h unistd.h
5522do :
5523 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5524ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5525"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005526if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005527 cat >>confdefs.h <<_ACEOF
5528#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5529_ACEOF
5530
5531fi
5532
5533done
5534
5535
5536
5537 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 +02005538if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 MINIX=yes
5540else
5541 MINIX=
5542fi
5543
5544
5545 if test "$MINIX" = yes; then
5546
5547$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5548
5549
5550$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5551
5552
5553$as_echo "#define _MINIX 1" >>confdefs.h
5554
5555 fi
5556
5557
5558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5559$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005560if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005561 $as_echo_n "(cached) " >&6
5562else
5563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5564/* end confdefs.h. */
5565
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005566# define __EXTENSIONS__ 1
5567 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005568int
5569main ()
5570{
5571
5572 ;
5573 return 0;
5574}
5575_ACEOF
5576if ac_fn_c_try_compile "$LINENO"; then :
5577 ac_cv_safe_to_define___extensions__=yes
5578else
5579 ac_cv_safe_to_define___extensions__=no
5580fi
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582fi
5583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5584$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5585 test $ac_cv_safe_to_define___extensions__ = yes &&
5586 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5587
5588 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5589
5590 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5591
5592 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5593
5594 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5595
5596
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597
Xavier de Gaye95750b12016-07-09 11:05:42 +02005598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5599$as_echo_n "checking for the Android API level... " >&6; }
5600cat >> conftest.c <<EOF
5601#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005602android_api = __ANDROID_API__
5603arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005604#else
5605#error not Android
5606#endif
5607EOF
5608
5609if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005610 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5611 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5613$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005614 if test -z "$ANDROID_API_LEVEL"; then
5615 echo 'Fatal: you must define __ANDROID_API__'
5616 exit 1
5617 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618
5619cat >>confdefs.h <<_ACEOF
5620#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5621_ACEOF
5622
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005623
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5625$as_echo_n "checking for the Android arm ABI... " >&6; }
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5627$as_echo "$_arm_arch" >&6; }
5628 if test "$_arm_arch" = 7; then
5629 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5630 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5631 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632else
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5634$as_echo "not Android" >&6; }
5635fi
5636rm -f conftest.c conftest.out
5637
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638# Check for unsupported systems
5639case $ac_sys_system/$ac_sys_release in
5640atheos*|Linux*/1*)
5641 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5642 echo See README for details.
5643 exit 1;;
5644esac
5645
5646
Matthias Kloseb9621712010-04-24 17:59:49 +00005647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5648$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005649
5650# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005651if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 withval=$with_suffix;
5653 case $withval in
5654 no) EXEEXT=;;
5655 yes) EXEEXT=.exe;;
5656 *) EXEEXT=$withval;;
5657 esac
5658fi
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5661$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663# Test whether we're running on a non-case-sensitive system, in which
5664# case we give a warning if no ext is given
5665
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5667$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668if test ! -d CaseSensitiveTestDir; then
5669mkdir CaseSensitiveTestDir
5670fi
5671
5672if test -d casesensitivetestdir
5673then
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5675$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676 BUILDEXEEXT=.exe
5677else
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680 BUILDEXEEXT=$EXEEXT
5681fi
5682rmdir CaseSensitiveTestDir
5683
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684case $ac_sys_system in
5685hp*|HP*)
5686 case $CC in
5687 cc|*/cc) CC="$CC -Ae";;
5688 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689esac
5690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691
Matthias Kloseb9621712010-04-24 17:59:49 +00005692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5693$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694if test -z "$LIBRARY"
5695then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005696 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5699$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
5701# LDLIBRARY is the name of the library to link against (as opposed to the
5702# name of the library into which to insert object files). BLDLIBRARY is also
5703# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5704# is blank as the main program is not linked directly against LDLIBRARY.
5705# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5706# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5707# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5708# DLLLIBRARY is the shared (i.e., DLL) library.
5709#
5710# RUNSHARED is used to run shared python without installed libraries
5711#
5712# INSTSONAME is the name of the shared library that will be use to install
5713# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005714#
5715# LDVERSION is the shared library version number, normally the Python version
5716# with the ABI build flags appended.
5717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719
5720
5721
5722
5723
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005725LDLIBRARY="$LIBRARY"
5726BLDLIBRARY='$(LDLIBRARY)'
5727INSTSONAME='$(LDLIBRARY)'
5728DLLLIBRARY=''
5729LDLIBRARYDIR=''
5730RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005731LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733# LINKCC is the command that links the python executable -- default is $(CC).
5734# If CXX is set, and if it is needed to link a main function that was
5735# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5736# python might then depend on the C++ runtime
5737# This is altered for AIX in order to build the export list before
5738# linking.
5739
Matthias Kloseb9621712010-04-24 17:59:49 +00005740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5741$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742if test -z "$LINKCC"
5743then
5744 LINKCC='$(PURIFY) $(MAINCC)'
5745 case $ac_sys_system in
5746 AIX*)
5747 exp_extra="\"\""
5748 if test $ac_sys_release -ge 5 -o \
5749 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5750 exp_extra="."
5751 fi
5752 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753 QNX*)
5754 # qcc must be used because the other compilers do not
5755 # support -N.
5756 LINKCC=qcc;;
5757 esac
5758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5760$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761
5762# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5763# make sure we default having it set to "no": this is used by
5764# distutils.unixccompiler to know if it should add --enable-new-dtags
5765# to linker command lines, and failing to detect GNU ld simply results
5766# in the same bahaviour as before.
5767
Matthias Kloseb9621712010-04-24 17:59:49 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5769$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770ac_prog=ld
5771if test "$GCC" = yes; then
5772 ac_prog=`$CC -print-prog-name=ld`
5773fi
5774case `"$ac_prog" -V 2>&1 < /dev/null` in
5775 *GNU*)
5776 GNULD=yes;;
5777 *)
5778 GNULD=no;;
5779esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5781$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
Matthias Kloseb9621712010-04-24 17:59:49 +00005783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5784$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005785# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005786if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787 enableval=$enable_shared;
5788fi
5789
5790
5791if test -z "$enable_shared"
5792then
5793 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005794 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 enable_shared="yes";;
5796 *)
5797 enable_shared="no";;
5798 esac
5799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5801$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005802
Matthias Kloseb9621712010-04-24 17:59:49 +00005803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5804$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005806if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005807 enableval=$enable_profiling;
5808fi
5809
5810if test "x$enable_profiling" = xyes; then
5811 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005812 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814/* end confdefs.h. */
5815int main() { return 0; }
5816_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005817if ac_fn_c_try_link "$LINENO"; then :
5818
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005820 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005822rm -f core conftest.err conftest.$ac_objext \
5823 conftest$ac_exeext conftest.$ac_ext
5824 CC="$ac_save_cc"
5825else
5826 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5829$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831if test "x$enable_profiling" = xyes; then
5832 BASECFLAGS="-pg $BASECFLAGS"
5833 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834fi
5835
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5837$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
5839# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5840# library that we build, but we do not want to link against it (we
5841# will find it with a -framework option). For this reason there is an
5842# extra variable BLDLIBRARY against which Python and the extension
5843# modules are linked, BLDLIBRARY. This is normally the same as
5844# LDLIBRARY, but empty for MacOSX framework builds.
5845if test "$enable_framework"
5846then
5847 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005848 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849 BLDLIBRARY=''
5850else
5851 BLDLIBRARY='$(LDLIBRARY)'
5852fi
5853
5854# Other platforms follow
5855if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005856 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857
Matthias Kloseb9621712010-04-24 17:59:49 +00005858$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859
5860 case $ac_sys_system in
5861 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005862 LDLIBRARY='libpython$(LDVERSION).dll.a'
5863 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864 ;;
5865 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005866 LDLIBRARY='libpython$(LDVERSION).so'
5867 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005868 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005870 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005871 then
5872 PY3LIBRARY=libpython3.so
5873 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005875 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).so'
5877 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005878 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005880 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005881 then
5882 PY3LIBRARY=libpython3.so
5883 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
5885 hp*|HP*)
5886 case `uname -m` in
5887 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 ;;
5890 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005891 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ;;
5893 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005894 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005895 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).dylib'
5899 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005900 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005902 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005905 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906
5907 esac
5908else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005909 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 case $ac_sys_system in
5911 CYGWIN*)
5912 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914 ;;
5915 esac
5916fi
5917
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005918if test "$cross_compiling" = yes; then
5919 RUNSHARED=
5920fi
5921
Matthias Kloseb9621712010-04-24 17:59:49 +00005922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5923$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005926if test -n "$ac_tool_prefix"; then
5927 for ac_prog in ar aal
5928 do
5929 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5930set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5932$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005933if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005934 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935else
5936 if test -n "$AR"; then
5937 ac_cv_prog_AR="$AR" # Let the user override the test.
5938else
5939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5940for as_dir in $PATH
5941do
5942 IFS=$as_save_IFS
5943 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005945 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005946 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005947 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 break 2
5949 fi
5950done
Matthias Kloseb9621712010-04-24 17:59:49 +00005951 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952IFS=$as_save_IFS
5953
5954fi
5955fi
5956AR=$ac_cv_prog_AR
5957if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5959$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960else
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963fi
5964
5965
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005966 test -n "$AR" && break
5967 done
5968fi
5969if test -z "$AR"; then
5970 ac_ct_AR=$AR
5971 for ac_prog in ar aal
5972do
5973 # Extract the first word of "$ac_prog", so it can be a program name with args.
5974set dummy $ac_prog; ac_word=$2
5975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5976$as_echo_n "checking for $ac_word... " >&6; }
5977if ${ac_cv_prog_ac_ct_AR+:} false; then :
5978 $as_echo_n "(cached) " >&6
5979else
5980 if test -n "$ac_ct_AR"; then
5981 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5982else
5983as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986 IFS=$as_save_IFS
5987 test -z "$as_dir" && as_dir=.
5988 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005990 ac_cv_prog_ac_ct_AR="$ac_prog"
5991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992 break 2
5993 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005994done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005995 done
5996IFS=$as_save_IFS
5997
5998fi
5999fi
6000ac_ct_AR=$ac_cv_prog_ac_ct_AR
6001if test -n "$ac_ct_AR"; then
6002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6003$as_echo "$ac_ct_AR" >&6; }
6004else
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010 test -n "$ac_ct_AR" && break
6011done
6012
6013 if test "x$ac_ct_AR" = x; then
6014 AR="ar"
6015 else
6016 case $cross_compiling:$ac_tool_warned in
6017yes:)
6018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6020ac_tool_warned=yes ;;
6021esac
6022 AR=$ac_ct_AR
6023 fi
6024fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025
6026
6027# tweak ARFLAGS only if the user didn't set it on the command line
6028
6029if test -z "$ARFLAGS"
6030then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006031 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032fi
6033
doko@ubuntu.com58844492012-06-30 18:25:32 +02006034if test -n "$ac_tool_prefix"; then
6035 for ac_prog in readelf
6036 do
6037 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6040$as_echo_n "checking for $ac_word... " >&6; }
6041if ${ac_cv_prog_READELF+:} false; then :
6042 $as_echo_n "(cached) " >&6
6043else
6044 if test -n "$READELF"; then
6045 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6046else
6047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050 IFS=$as_save_IFS
6051 test -z "$as_dir" && as_dir=.
6052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006054 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056 break 2
6057 fi
6058done
6059 done
6060IFS=$as_save_IFS
6061
6062fi
6063fi
6064READELF=$ac_cv_prog_READELF
6065if test -n "$READELF"; then
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6067$as_echo "$READELF" >&6; }
6068else
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
6071fi
6072
6073
6074 test -n "$READELF" && break
6075 done
6076fi
6077if test -z "$READELF"; then
6078 ac_ct_READELF=$READELF
6079 for ac_prog in readelf
6080do
6081 # Extract the first word of "$ac_prog", so it can be a program name with args.
6082set dummy $ac_prog; ac_word=$2
6083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6084$as_echo_n "checking for $ac_word... " >&6; }
6085if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6086 $as_echo_n "(cached) " >&6
6087else
6088 if test -n "$ac_ct_READELF"; then
6089 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6090else
6091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6092for as_dir in $PATH
6093do
6094 IFS=$as_save_IFS
6095 test -z "$as_dir" && as_dir=.
6096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006098 ac_cv_prog_ac_ct_READELF="$ac_prog"
6099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6100 break 2
6101 fi
6102done
6103 done
6104IFS=$as_save_IFS
6105
6106fi
6107fi
6108ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6109if test -n "$ac_ct_READELF"; then
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6111$as_echo "$ac_ct_READELF" >&6; }
6112else
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6114$as_echo "no" >&6; }
6115fi
6116
6117
6118 test -n "$ac_ct_READELF" && break
6119done
6120
6121 if test "x$ac_ct_READELF" = x; then
6122 READELF=":"
6123 else
6124 case $cross_compiling:$ac_tool_warned in
6125yes:)
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6128ac_tool_warned=yes ;;
6129esac
6130 READELF=$ac_ct_READELF
6131 fi
6132fi
6133
6134if test "$cross_compiling" = yes; then
6135 case "$READELF" in
6136 readelf|:)
6137 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6138 ;;
6139 esac
6140fi
6141
6142
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006145hp*|HP*)
6146 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147 if test -z "$INSTALL"
6148 then
6149 INSTALL="${srcdir}/install-sh -c"
6150 fi
6151esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152# Find a good install program. We prefer a C program (faster),
6153# so one script is as good as another. But avoid the broken or
6154# incompatible versions:
6155# SysV /etc/install, /usr/sbin/install
6156# SunOS /usr/etc/install
6157# IRIX /sbin/install
6158# AIX /bin/install
6159# AmigaOS /C/install, which installs bootblocks on floppy discs
6160# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6161# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6162# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6163# OS/2's system install, which has a completely different semantic
6164# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006165# Reject install programs that cannot install multiple files.
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6167$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006169if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006170 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006171else
6172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173for as_dir in $PATH
6174do
6175 IFS=$as_save_IFS
6176 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006177 # Account for people who put trailing slashes in PATH elements.
6178case $as_dir/ in #((
6179 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182 /usr/ucb/* ) ;;
6183 *)
6184 # OSF1 and SCO ODT 3.0 have their own names for install.
6185 # Don't use installbsd from OSF since it installs stuff as root
6186 # by default.
6187 for ac_prog in ginstall scoinst install; do
6188 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006189 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 if test $ac_prog = install &&
6191 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6192 # AIX install. It has an incompatible calling convention.
6193 :
6194 elif test $ac_prog = install &&
6195 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6196 # program-specific install script used by HP pwplus--don't use.
6197 :
6198 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006199 rm -rf conftest.one conftest.two conftest.dir
6200 echo one > conftest.one
6201 echo two > conftest.two
6202 mkdir conftest.dir
6203 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6204 test -s conftest.one && test -s conftest.two &&
6205 test -s conftest.dir/conftest.one &&
6206 test -s conftest.dir/conftest.two
6207 then
6208 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6209 break 3
6210 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 fi
6212 fi
6213 done
6214 done
6215 ;;
6216esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006217
6218 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219IFS=$as_save_IFS
6220
Matthias Kloseb9621712010-04-24 17:59:49 +00006221rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222
6223fi
6224 if test "${ac_cv_path_install+set}" = set; then
6225 INSTALL=$ac_cv_path_install
6226 else
6227 # As a last resort, use the slow shell script. Don't cache a
6228 # value for INSTALL within a source directory, because that will
6229 # break other packages using the cache if that directory is
6230 # removed, or if the value is a relative name.
6231 INSTALL=$ac_install_sh
6232 fi
6233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6235$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236
6237# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6238# It thinks the first close brace ends the variable substitution.
6239test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6240
6241test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6242
6243test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6244
Matthias Klose93a0ef12012-03-15 18:08:34 +01006245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6246$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6247if test -z "$MKDIR_P"; then
6248 if ${ac_cv_path_mkdir+:} false; then :
6249 $as_echo_n "(cached) " >&6
6250else
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6253do
6254 IFS=$as_save_IFS
6255 test -z "$as_dir" && as_dir=.
6256 for ac_prog in mkdir gmkdir; do
6257 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006258 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006259 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6260 'mkdir (GNU coreutils) '* | \
6261 'mkdir (coreutils) '* | \
6262 'mkdir (fileutils) '4.1*)
6263 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6264 break 3;;
6265 esac
6266 done
6267 done
6268 done
6269IFS=$as_save_IFS
6270
6271fi
6272
6273 test -d ./--version && rmdir ./--version
6274 if test "${ac_cv_path_mkdir+set}" = set; then
6275 MKDIR_P="$ac_cv_path_mkdir -p"
6276 else
6277 # As a last resort, use the slow shell script. Don't cache a
6278 # value for MKDIR_P within a source directory, because that will
6279 # break other packages using the cache if that directory is
6280 # removed, or if the value is a relative name.
6281 MKDIR_P="$ac_install_sh -d"
6282 fi
6283fi
6284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6285$as_echo "$MKDIR_P" >&6; }
6286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287
6288# Not every filesystem supports hard links
6289
6290if test -z "$LN" ; then
6291 case $ac_sys_system in
6292 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006293 *) LN=ln;;
6294 esac
6295fi
6296
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006297# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006298
6299ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6303$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006304
6305# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006306if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307 withval=$with_pydebug;
6308if test "$withval" != no
6309then
6310
Matthias Kloseb9621712010-04-24 17:59:49 +00006311$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312
Matthias Kloseb9621712010-04-24 17:59:49 +00006313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6314$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006316 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006317else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319fi
6320else
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323fi
6324
6325
T. Woutersddbfa2c2017-05-23 01:30:49 +02006326# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6327# the ABI. This allows enabling assertions without changing the ABI.
6328assertions='false'
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6330$as_echo_n "checking for --with-assertions... " >&6; }
6331
6332# Check whether --with-assertions was given.
6333if test "${with_assertions+set}" = set; then :
6334 withval=$with_assertions;
6335if test "$withval" != no
6336then
6337 assertions='true'
6338fi
6339fi
6340
6341if test "$assertions" = 'true'; then
6342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6343$as_echo "yes" >&6; }
6344elif test "$Py_DEBUG" = 'true'; then
6345 assertions='true'
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6347$as_echo "implied by --with-pydebug" >&6; }
6348else
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350$as_echo "no" >&6; }
6351fi
6352
Brett Cannon63d98bc2016-09-06 17:12:40 -07006353# Enable optimization flags
6354
6355
6356Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6358$as_echo_n "checking for --enable-optimizations... " >&6; }
6359# Check whether --enable-optimizations was given.
6360if test "${enable_optimizations+set}" = set; then :
6361 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006362if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006363then
6364 Py_OPT='true'
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6366$as_echo "yes" >&6; };
6367else
6368 Py_OPT='false'
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6370$as_echo "no" >&6; };
6371fi
6372else
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374$as_echo "no" >&6; }
6375fi
6376
6377if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006378 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6379 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006380 # 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 +00006381 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006382 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006383 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006384 DEF_MAKE_RULE="build_all"
6385else
6386 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006387 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006388 DEF_MAKE_RULE="all"
6389fi
6390
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006391# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6393$as_echo_n "checking for --with-lto... " >&6; }
6394
6395# Check whether --with-lto was given.
6396if test "${with_lto+set}" = set; then :
6397 withval=$with_lto;
6398if test "$withval" != no
6399then
6400 Py_LTO='true'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; };
6403else
6404 Py_LTO='false'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; };
6407fi
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413if test "$Py_LTO" = 'true' ; then
6414 case $CC in
6415 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006416 case $ac_sys_system in
6417 Darwin*)
6418 # Any changes made here should be reflected in the GCC+Darwin case below
6419 LTOFLAGS="-flto -Wl,-export_dynamic"
6420 ;;
6421 *)
6422 LTOFLAGS="-flto"
6423 ;;
6424 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006425 ;;
6426 *gcc*)
6427 case $ac_sys_system in
6428 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006429 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006430 ;;
6431 *)
6432 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6433 ;;
6434 esac
6435 ;;
6436 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006437
6438 if test "$ac_cv_prog_cc_g" = "yes"
6439 then
6440 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6441 # to get debug symbols.
6442 LTOFLAGS="$LTOFLAGS -g"
6443 fi
6444
octaviansoldea4c814012017-09-08 12:14:33 -07006445 CFLAGS="$CFLAGS $LTOFLAGS"
6446 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447fi
6448
Brett Cannon7188a3e2015-09-18 15:13:44 -07006449# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006450
6451
6452
6453
6454
Gregory P. Smith799520c2016-09-07 16:10:00 -07006455# Make this work on systems where llvm tools are not installed with their
6456# normal names in the default $PATH (ie: Ubuntu). They exist under the
6457# non-suffixed name in their versioned llvm directory.
6458llvm_bin_dir=''
6459llvm_path="${PATH}"
6460if test "${CC}" = "clang"
6461then
6462 clang_bin=`which clang`
6463 # Some systems install clang elsewhere as a symlink to the real path
6464 # which is where the related llvm tools are located.
6465 if test -L "${clang_bin}"
6466 then
6467 clang_dir=`dirname "${clang_bin}"`
6468 clang_bin=`readlink "${clang_bin}"`
6469 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6470 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6471 fi
6472fi
Zachary Ware5af85642015-12-21 12:09:17 -06006473
Gregory P. Smith799520c2016-09-07 16:10:00 -07006474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6475$as_echo_n "checking target system type... " >&6; }
6476if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006477 $as_echo_n "(cached) " >&6
6478else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006479 if test "x$target_alias" = x; then
6480 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006481else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006482 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6483 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6484fi
6485
6486fi
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6488$as_echo "$ac_cv_target" >&6; }
6489case $ac_cv_target in
6490*-*-*) ;;
6491*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6492esac
6493target=$ac_cv_target
6494ac_save_IFS=$IFS; IFS='-'
6495set x $ac_cv_target
6496shift
6497target_cpu=$1
6498target_vendor=$2
6499shift; shift
6500# Remember, the first character of IFS is used to create $*,
6501# except with old shells:
6502target_os=$*
6503IFS=$ac_save_IFS
6504case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6505
6506
6507# The aliases save the names the user supplied, while $host etc.
6508# will get canonicalized.
6509test -n "$target_alias" &&
6510 test "$program_prefix$program_suffix$program_transform_name" = \
6511 NONENONEs,x,x, &&
6512 program_prefix=${target_alias}-
6513# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6514set dummy $target_alias-llvm-profdata; ac_word=$2
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6516$as_echo_n "checking for $ac_word... " >&6; }
6517if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6518 $as_echo_n "(cached) " >&6
6519else
6520 case $LLVM_PROFDATA in
6521 [\\/]* | ?:[\\/]*)
6522 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6523 ;;
6524 *)
6525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6526for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006527do
6528 IFS=$as_save_IFS
6529 test -z "$as_dir" && as_dir=.
6530 for ac_exec_ext in '' $ac_executable_extensions; do
6531 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006532 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006533 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6534 break 2
6535 fi
6536done
6537 done
6538IFS=$as_save_IFS
6539
Gregory P. Smith799520c2016-09-07 16:10:00 -07006540 ;;
6541esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006542fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006543LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6544if test -n "$LLVM_PROFDATA"; then
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6546$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006547else
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6549$as_echo "no" >&6; }
6550fi
6551
6552
Gregory P. Smith799520c2016-09-07 16:10:00 -07006553if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6554 if test "$build" = "$target"; then
6555 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6556 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6557set dummy llvm-profdata; ac_word=$2
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6561 $as_echo_n "(cached) " >&6
6562else
6563 case $ac_pt_LLVM_PROFDATA in
6564 [\\/]* | ?:[\\/]*)
6565 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6566 ;;
6567 *)
6568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in ${llvm_path}
6570do
6571 IFS=$as_save_IFS
6572 test -z "$as_dir" && as_dir=.
6573 for ac_exec_ext in '' $ac_executable_extensions; do
6574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577 break 2
6578 fi
6579done
6580 done
6581IFS=$as_save_IFS
6582
6583 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6584 ;;
6585esac
6586fi
6587ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6588if test -n "$ac_pt_LLVM_PROFDATA"; then
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6590$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6591else
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6593$as_echo "no" >&6; }
6594fi
6595
6596 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6597 else
6598 LLVM_PROFDATA="''"
6599 fi
6600else
6601 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6602fi
6603
6604
6605if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6606then
6607 LLVM_PROF_FOUND="found"
6608else
6609 LLVM_PROF_FOUND="not-found"
6610fi
6611if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6612then
6613 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6614 if test -n "${found_llvm_profdata}"
6615 then
6616 # llvm-profdata isn't directly in $PATH in some cases.
6617 # https://apple.stackexchange.com/questions/197053/
6618 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6619 LLVM_PROF_FOUND=found
6620 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6621$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6622 fi
6623fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006624LLVM_PROF_ERR=no
6625case $CC in
6626 *clang*)
6627 # Any changes made here should be reflected in the GCC+Darwin case below
6628 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6629 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006630 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006631 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6632 if test $LLVM_PROF_FOUND = not-found
6633 then
6634 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635 if test "${REQUIRE_PGO}" = "yes"
6636 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006637 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 -07006638 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639 fi
6640 ;;
6641 *gcc*)
6642 case $ac_sys_system in
6643 Darwin*)
6644 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6645 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006646 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006647 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006648 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006649 then
6650 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006651 if test "${REQUIRE_PGO}" = "yes"
6652 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006653 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 -07006654 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655 fi
6656 ;;
6657 *)
6658 PGO_PROF_GEN_FLAG="-fprofile-generate"
6659 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6660 LLVM_PROF_MERGER="true"
6661 LLVM_PROF_FILE=""
6662 ;;
6663 esac
6664 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006665 *icc*)
6666 PGO_PROF_GEN_FLAG="-prof-gen"
6667 PGO_PROF_USE_FLAG="-prof-use"
6668 LLVM_PROF_MERGER="true"
6669 LLVM_PROF_FILE=""
6670 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006671esac
6672
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006673# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6674# merged with this chunk of code?
6675
6676# Optimizer/debugger flags
6677# ------------------------
6678# (The following bit of code is complicated enough - please keep things
6679# indented properly. Just pretend you're editing Python code. ;-)
6680
6681# There are two parallel sets of case statements below, one that checks to
6682# see if OPT was set and one that does BASECFLAGS setting based upon
6683# compiler and platform. BASECFLAGS tweaks need to be made even if the
6684# user set OPT.
6685
6686# tweak OPT based on compiler and platform, only if the user didn't set
6687# it on the command line
6688
Victor Stinner9ed34a82017-05-02 22:35:58 +02006689
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006690if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691then
6692 case $GCC in
6693 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6695 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6696 WRAP="-fwrapv"
6697 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006698
Stefan Krahaf04ff22011-12-08 22:20:31 +01006699 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006700 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006701 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006702 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006703 *)
6704 if $CC --version 2>&1 | grep -q clang
6705 then
6706 cc_is_clang=1
6707 else
6708 cc_is_clang=
6709 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006710 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006711
Victor Stinner35f3d242017-04-21 12:35:24 +02006712 if test -n "${cc_is_clang}"
6713 then
6714 # Clang also needs -fwrapv
6715 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006716 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6717 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006718 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006719 fi
6720
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721 case $ac_cv_prog_cc_g in
6722 yes)
6723 if test "$Py_DEBUG" = 'true' ; then
6724 # Optimization messes up debuggers, so turn it off for
6725 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006726 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006727 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006728 else
Victor Stinner28205b22017-04-21 11:24:34 +02006729 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006730 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731 else
Victor Stinner28205b22017-04-21 11:24:34 +02006732 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 fi
6734 ;;
6735 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006736 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 ;;
6738 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006739
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740 case $ac_sys_system in
6741 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6742 ;;
6743 esac
6744 ;;
6745
6746 *)
6747 OPT="-O"
6748 ;;
6749 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750fi
6751
6752
6753
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755# The -arch flags for universal builds on OSX
6756UNIVERSAL_ARCH_FLAGS=
6757
6758
6759# tweak BASECFLAGS based on compiler and platform
6760case $GCC in
6761yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006762 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006763
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6765$as_echo_n "checking for -Wextra... " >&6; }
6766 ac_save_cc="$CC"
6767 CC="$CC -Wextra -Werror"
6768 if ${ac_cv_extra_warnings+:} false; then :
6769 $as_echo_n "(cached) " >&6
6770else
6771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6772/* end confdefs.h. */
6773
6774
6775int
6776main ()
6777{
6778
6779 ;
6780 return 0;
6781}
6782
6783_ACEOF
6784if ac_fn_c_try_compile "$LINENO"; then :
6785
6786 ac_cv_extra_warnings=yes
6787
6788else
6789
6790 ac_cv_extra_warnings=no
6791
6792fi
6793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6794fi
6795
6796 CC="$ac_save_cc"
6797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6798$as_echo "$ac_cv_extra_warnings" >&6; }
6799
6800 if test $ac_cv_extra_warnings = yes
6801 then
6802 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6803 fi
6804
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006805 # Python doesn't violate C99 aliasing rules, but older versions of
6806 # GCC produce warnings for legal Python code. Enable
6807 # -fno-strict-aliasing on versions of GCC that support but produce
6808 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6810$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811 ac_save_cc="$CC"
6812 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006813 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006814 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006815 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006816else
Matthias Kloseb9621712010-04-24 17:59:49 +00006817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006819
Matthias Kloseb159a552010-04-25 21:00:44 +00006820
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006821int
6822main ()
6823{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006824
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006825 ;
6826 return 0;
6827}
Matthias Kloseb159a552010-04-25 21:00:44 +00006828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006830if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006831
6832 CC="$ac_save_cc -fstrict-aliasing"
6833 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006835/* end confdefs.h. */
6836
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006837 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006838int
6839main ()
6840{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006841double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006842 ;
6843 return 0;
6844}
Matthias Kloseb159a552010-04-25 21:00:44 +00006845
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006847if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006848
6849 ac_cv_no_strict_aliasing=no
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851else
Matthias Kloseb159a552010-04-25 21:00:44 +00006852
6853 ac_cv_no_strict_aliasing=yes
6854
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006855fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006857
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006858else
Matthias Kloseb159a552010-04-25 21:00:44 +00006859
6860 ac_cv_no_strict_aliasing=no
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006864fi
6865
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006866 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6869$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006870 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871 then
6872 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6873 fi
6874
Zachary Ware5af85642015-12-21 12:09:17 -06006875 # ICC doesn't recognize the option, but only emits a warning
6876 ## XXX does it emit an unused result warning and can it be disabled?
6877 case "$CC" in
6878 *icc*)
6879 ac_cv_disable_unused_result_warning=no
6880 ;;
6881 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6883$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6884 ac_save_cc="$CC"
6885 CC="$CC -Wunused-result -Werror"
6886 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006887 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006888 $as_echo_n "(cached) " >&6
6889else
6890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6891/* end confdefs.h. */
6892
6893
6894int
6895main ()
6896{
6897
6898 ;
6899 return 0;
6900}
6901
6902_ACEOF
6903if ac_fn_c_try_compile "$LINENO"; then :
6904
6905 ac_cv_disable_unused_result_warning=yes
6906
6907else
6908
6909 ac_cv_disable_unused_result_warning=no
6910
6911fi
6912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6913fi
6914
6915 CFLAGS="$save_CFLAGS"
6916 CC="$ac_save_cc"
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6918$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006919 ;;
6920 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006921
6922 if test $ac_cv_disable_unused_result_warning = yes
6923 then
6924 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006925 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6926 fi
6927
6928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6929$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6930 ac_save_cc="$CC"
6931 CC="$CC -Wunused-parameter -Werror"
6932 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6933 $as_echo_n "(cached) " >&6
6934else
6935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6936/* end confdefs.h. */
6937
6938
6939int
6940main ()
6941{
6942
6943 ;
6944 return 0;
6945}
6946
6947_ACEOF
6948if ac_fn_c_try_compile "$LINENO"; then :
6949
6950 ac_cv_disable_unused_parameter_warning=yes
6951
6952else
6953
6954 ac_cv_disable_unused_parameter_warning=no
6955
6956fi
6957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6958fi
6959
6960 CC="$ac_save_cc"
6961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6962$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6963
6964 if test $ac_cv_disable_unused_parameter_warning = yes
6965 then
6966 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6967 fi
6968
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6970$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6971 ac_save_cc="$CC"
6972 CC="$CC -Wmissing-field-initializers -Werror"
6973 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6974 $as_echo_n "(cached) " >&6
6975else
6976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6977/* end confdefs.h. */
6978
6979
6980int
6981main ()
6982{
6983
6984 ;
6985 return 0;
6986}
6987
6988_ACEOF
6989if ac_fn_c_try_compile "$LINENO"; then :
6990
6991 ac_cv_disable_missing_field_initializers=yes
6992
6993else
6994
6995 ac_cv_disable_missing_field_initializers=no
6996
6997fi
6998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6999fi
7000
7001 CC="$ac_save_cc"
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7003$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7004
7005 if test $ac_cv_disable_missing_field_initializers = yes
7006 then
7007 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007008 fi
7009
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7011$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7012 ac_save_cc="$CC"
7013 CC="$CC -Wsign-compare"
7014 save_CFLAGS="$CFLAGS"
7015 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7016 $as_echo_n "(cached) " >&6
7017else
7018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7019/* end confdefs.h. */
7020
7021
7022int
7023main ()
7024{
7025
7026 ;
7027 return 0;
7028}
7029
7030_ACEOF
7031if ac_fn_c_try_compile "$LINENO"; then :
7032
7033 ac_cv_enable_sign_compare_warning=yes
7034
7035else
7036
7037 ac_cv_enable_sign_compare_warning=no
7038
7039fi
7040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7041fi
7042
7043 CFLAGS="$save_CFLAGS"
7044 CC="$ac_save_cc"
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7046$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7047
7048 if test $ac_cv_enable_sign_compare_warning = yes
7049 then
7050 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7051 fi
7052
7053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7054$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7055 ac_save_cc="$CC"
7056 CC="$CC -Wunreachable-code"
7057 save_CFLAGS="$CFLAGS"
7058 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7059 $as_echo_n "(cached) " >&6
7060else
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7062/* end confdefs.h. */
7063
7064
7065int
7066main ()
7067{
7068
7069 ;
7070 return 0;
7071}
7072
7073_ACEOF
7074if ac_fn_c_try_compile "$LINENO"; then :
7075
7076 ac_cv_enable_unreachable_code_warning=yes
7077
7078else
7079
7080 ac_cv_enable_unreachable_code_warning=no
7081
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7084fi
7085
7086 CFLAGS="$save_CFLAGS"
7087 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007088
7089 # Don't enable unreachable code warning in debug mode, since it usually
7090 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007091 # Issue #24324: Unfortunately, the unreachable code warning does not work
7092 # correctly on gcc and has been silently removed from the compiler.
7093 # It is supported on clang but on OS X systems gcc may be an alias
7094 # for clang. Try to determine if the compiler is not really gcc and,
7095 # if so, only then enable the warning.
7096 if test $ac_cv_enable_unreachable_code_warning = yes && \
7097 test "$Py_DEBUG" != "true" && \
7098 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007099 then
7100 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007101 else
7102 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007103 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7105$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007106
INADA Naokie3364842018-06-05 20:40:53 +09007107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7108$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7109 ac_save_cc="$CC"
7110 CC="$CC -Werror -Wstrict-prototypes"
7111 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7112 $as_echo_n "(cached) " >&6
7113else
7114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7115/* end confdefs.h. */
7116
7117
7118int
7119main ()
7120{
7121
7122 ;
7123 return 0;
7124}
7125
7126_ACEOF
7127if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 ac_cv_enable_strict_prototypes_warning=yes
7130
7131else
7132
7133 ac_cv_enable_strict_prototypes_warning=no
7134
7135fi
7136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7137fi
7138
7139 CC="$ac_save_cc"
7140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7141$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7142
7143 if test $ac_cv_enable_strict_prototypes_warning = yes
7144 then
7145 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7146 fi
7147
Victor Stinner193ee0a2017-02-06 14:24:00 +01007148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7149$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7150 ac_save_cc="$CC"
7151 CC="$CC -Werror=implicit-function-declaration"
7152 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7153 $as_echo_n "(cached) " >&6
7154else
7155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7156/* end confdefs.h. */
7157
7158
7159int
7160main ()
7161{
7162
7163 ;
7164 return 0;
7165}
7166
7167_ACEOF
7168if ac_fn_c_try_compile "$LINENO"; then :
7169
7170 ac_cv_enable_implicit_function_declaration_error=yes
7171
7172else
7173
7174 ac_cv_enable_implicit_function_declaration_error=no
7175
7176fi
7177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7178fi
7179
7180 CC="$ac_save_cc"
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7182$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7183
7184 if test $ac_cv_enable_implicit_function_declaration_error = yes
7185 then
7186 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7187 fi
7188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007189 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7190 # support. Without this, treatment of subnormals doesn't follow
7191 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007192 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007193 alpha*)
7194 BASECFLAGS="$BASECFLAGS -mieee"
7195 ;;
7196 esac
7197
7198 case $ac_sys_system in
7199 SCO_SV*)
7200 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7201 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007202
Ned Deily87adb6e2013-10-18 21:09:56 -07007203 Darwin*)
7204 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7205 # used to be here, but non-Apple gcc doesn't accept them.
7206 if test "${CC}" = gcc
7207 then
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007209$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007210 case "${UNIVERSALSDK}" in
7211 */MacOSX10.4u.sdk)
7212 # Build using 10.4 SDK, force usage of gcc when the
7213 # compiler is gcc, otherwise the user will get very
7214 # confusing error messages when building on OSX 10.6
7215 CC=gcc-4.0
7216 CPP=cpp-4.0
7217 ;;
7218 esac
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007220$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007221 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222
Ned Deily87adb6e2013-10-18 21:09:56 -07007223 if test "${enable_universalsdk}"
7224 then
7225 case "$UNIVERSAL_ARCHS" in
7226 32-bit)
7227 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7228 LIPO_32BIT_FLAGS=""
7229 ARCH_RUN_32BIT=""
7230 ;;
7231 64-bit)
7232 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7233 LIPO_32BIT_FLAGS=""
7234 ARCH_RUN_32BIT="true"
7235 ;;
7236 all)
7237 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7238 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7239 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7240 ;;
7241 intel)
7242 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7243 LIPO_32BIT_FLAGS="-extract i386"
7244 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7245 ;;
7246 intel-32)
7247 UNIVERSAL_ARCH_FLAGS="-arch i386"
7248 LIPO_32BIT_FLAGS=""
7249 ARCH_RUN_32BIT=""
7250 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007251 intel-64)
7252 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7253 LIPO_32BIT_FLAGS=""
7254 ARCH_RUN_32BIT="true"
7255 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007256 3-way)
7257 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7258 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7259 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7260 ;;
7261 *)
7262 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7263 ;;
7264 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265
Ned Deily87adb6e2013-10-18 21:09:56 -07007266 if test "${UNIVERSALSDK}" != "/"
7267 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007268 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7269 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007270 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007271 else
7272 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7273 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007274 fi
7275 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007276
Ned Deily87adb6e2013-10-18 21:09:56 -07007277 # Calculate an appropriate deployment target for this build:
7278 # The deployment target value is used explicitly to enable certain
7279 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007280 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007281 # component of the string returned by distutils.get_platform().
7282 #
7283 # Use the value from:
7284 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7285 # 2. the operating system version of the build machine if >= 10.6
7286 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7287 # below to pick either 10.3, 10.4, or 10.5 as the target.
7288 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007289
Ned Deily87adb6e2013-10-18 21:09:56 -07007290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7291$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007292 cur_target_major=`sw_vers -productVersion | \
7293 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7294 cur_target_minor=`sw_vers -productVersion | \
7295 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7296 cur_target="${cur_target_major}.${cur_target_minor}"
7297 if test ${cur_target_major} -eq 10 && \
7298 test ${cur_target_minor} -ge 3 && \
7299 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007300 then
Ned Deily36820b62014-06-25 13:44:22 -07007301 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007302 cur_target=10.3
7303 if test ${enable_universalsdk}
7304 then
7305 case "$UNIVERSAL_ARCHS" in
7306 all|3-way|intel|64-bit)
7307 # These configurations were first supported in 10.5
7308 cur_target='10.5'
7309 ;;
7310 esac
7311 else
7312 if test `/usr/bin/arch` = "i386"
7313 then
7314 # 10.4 was the first release to support Intel archs
7315 cur_target="10.4"
7316 fi
7317 fi
7318 fi
7319 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007320
Ned Deily87adb6e2013-10-18 21:09:56 -07007321 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7322 # environment with a value that is the same as what we'll use
7323 # in the Makefile to ensure that we'll get the same compiler
7324 # environment during configure and build time.
7325 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7326 export MACOSX_DEPLOYMENT_TARGET
7327 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7329$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007330
Ned Deily87adb6e2013-10-18 21:09:56 -07007331 # end of Darwin* tests
7332 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333 esac
7334 ;;
7335
7336*)
7337 case $ac_sys_system in
7338 OpenUNIX*|UnixWare*)
7339 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7340 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341 SCO_SV*)
7342 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7343 ;;
7344 esac
7345 ;;
7346esac
7347
Zachary Ware5af85642015-12-21 12:09:17 -06007348# ICC needs -fp-model strict or floats behave badly
7349case "$CC" in
7350*icc*)
7351 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7352 ;;
7353esac
7354
T. Woutersddbfa2c2017-05-23 01:30:49 +02007355if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356 :
7357else
7358 OPT="-DNDEBUG $OPT"
7359fi
7360
7361if test "$ac_arch_flags"
7362then
7363 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7364fi
7365
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366# On some compilers, pthreads are available without further options
7367# (e.g. MacOS X). On some of these systems, the compiler will not
7368# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7369# So we have to see first whether pthreads are available without
7370# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7372$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007373if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007374 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375else
Matthias Kloseb9621712010-04-24 17:59:49 +00007376 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007377 ac_cv_pthread_is_default=no
7378else
Matthias Kloseb9621712010-04-24 17:59:49 +00007379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007380/* end confdefs.h. */
7381
Stefan Krah7dba5942012-11-22 22:49:11 +01007382#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383#include <pthread.h>
7384
7385void* routine(void* p){return NULL;}
7386
7387int main(){
7388 pthread_t p;
7389 if(pthread_create(&p,NULL,routine,NULL)!=0)
7390 return 1;
7391 (void)pthread_detach(p);
7392 return 0;
7393}
7394
7395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007396if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397
7398 ac_cv_pthread_is_default=yes
7399 ac_cv_kthread=no
7400 ac_cv_pthread=no
7401
7402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407fi
7408
7409
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410fi
7411
Matthias Kloseb9621712010-04-24 17:59:49 +00007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7413$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007414
7415
7416if test $ac_cv_pthread_is_default = yes
7417then
7418 ac_cv_kpthread=no
7419else
7420# -Kpthread, if available, provides the right #defines
7421# and linker options to make pthread_create available
7422# Some compilers won't report that they do not support -Kpthread,
7423# so we need to run a program to see whether it really made the
7424# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7426$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007427if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429else
7430 ac_save_cc="$CC"
7431CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007432if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433 ac_cv_kpthread=no
7434else
Matthias Kloseb9621712010-04-24 17:59:49 +00007435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007436/* end confdefs.h. */
7437
Stefan Krah7dba5942012-11-22 22:49:11 +01007438#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439#include <pthread.h>
7440
7441void* routine(void* p){return NULL;}
7442
7443int main(){
7444 pthread_t p;
7445 if(pthread_create(&p,NULL,routine,NULL)!=0)
7446 return 1;
7447 (void)pthread_detach(p);
7448 return 0;
7449}
7450
7451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007452if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007453 ac_cv_kpthread=yes
7454else
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007457rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7458 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459fi
7460
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007461CC="$ac_save_cc"
7462fi
7463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7465$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466fi
7467
7468if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7469then
7470# -Kthread, if available, provides the right #defines
7471# and linker options to make pthread_create available
7472# Some compilers won't report that they do not support -Kthread,
7473# so we need to run a program to see whether it really made the
7474# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7476$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007477if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007478 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479else
7480 ac_save_cc="$CC"
7481CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007482if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483 ac_cv_kthread=no
7484else
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486/* end confdefs.h. */
7487
Stefan Krah7dba5942012-11-22 22:49:11 +01007488#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489#include <pthread.h>
7490
7491void* routine(void* p){return NULL;}
7492
7493int main(){
7494 pthread_t p;
7495 if(pthread_create(&p,NULL,routine,NULL)!=0)
7496 return 1;
7497 (void)pthread_detach(p);
7498 return 0;
7499}
7500
7501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007502if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007503 ac_cv_kthread=yes
7504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7508 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509fi
7510
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511CC="$ac_save_cc"
7512fi
7513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7515$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516fi
7517
7518if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7519then
7520# -pthread, if available, provides the right #defines
7521# and linker options to make pthread_create available
7522# Some compilers won't report that they do not support -pthread,
7523# so we need to run a program to see whether it really made the
7524# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7526$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007527if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007528 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529else
7530 ac_save_cc="$CC"
7531CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007532if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533 ac_cv_pthread=no
7534else
Matthias Kloseb9621712010-04-24 17:59:49 +00007535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536/* end confdefs.h. */
7537
Stefan Krah7dba5942012-11-22 22:49:11 +01007538#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539#include <pthread.h>
7540
7541void* routine(void* p){return NULL;}
7542
7543int main(){
7544 pthread_t p;
7545 if(pthread_create(&p,NULL,routine,NULL)!=0)
7546 return 1;
7547 (void)pthread_detach(p);
7548 return 0;
7549}
7550
7551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007552if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553 ac_cv_pthread=yes
7554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559fi
7560
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561CC="$ac_save_cc"
7562fi
7563
Matthias Kloseb9621712010-04-24 17:59:49 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7565$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566fi
7567
7568# If we have set a CC compiler flag for thread support then
7569# check if it works for CXX, too.
7570ac_cv_cxx_thread=no
7571if test ! -z "$CXX"
7572then
Matthias Kloseb9621712010-04-24 17:59:49 +00007573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7574$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575ac_save_cxx="$CXX"
7576
7577if test "$ac_cv_kpthread" = "yes"
7578then
7579 CXX="$CXX -Kpthread"
7580 ac_cv_cxx_thread=yes
7581elif test "$ac_cv_kthread" = "yes"
7582then
7583 CXX="$CXX -Kthread"
7584 ac_cv_cxx_thread=yes
7585elif test "$ac_cv_pthread" = "yes"
7586then
7587 CXX="$CXX -pthread"
7588 ac_cv_cxx_thread=yes
7589fi
7590
7591if test $ac_cv_cxx_thread = yes
7592then
7593 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7594 $CXX -c conftest.$ac_ext 2>&5
7595 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7596 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7597 then
7598 ac_cv_cxx_thread=yes
7599 else
7600 ac_cv_cxx_thread=no
7601 fi
7602 rm -fr conftest*
7603fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7605$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007606fi
7607CXX="$ac_save_cxx"
7608
7609
7610# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7612$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007613if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007617/* end confdefs.h. */
7618#include <stdlib.h>
7619#include <stdarg.h>
7620#include <string.h>
7621#include <float.h>
7622
7623int
7624main ()
7625{
7626
7627 ;
7628 return 0;
7629}
7630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007631if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632 ac_cv_header_stdc=yes
7633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7637
7638if test $ac_cv_header_stdc = yes; then
7639 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641/* end confdefs.h. */
7642#include <string.h>
7643
7644_ACEOF
7645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 $EGREP "memchr" >/dev/null 2>&1; then :
7647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648else
7649 ac_cv_header_stdc=no
7650fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007651rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652
7653fi
7654
7655if test $ac_cv_header_stdc = yes; then
7656 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658/* end confdefs.h. */
7659#include <stdlib.h>
7660
7661_ACEOF
7662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007663 $EGREP "free" >/dev/null 2>&1; then :
7664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665else
7666 ac_cv_header_stdc=no
7667fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007668rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669
7670fi
7671
7672if test $ac_cv_header_stdc = yes; then
7673 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675 :
7676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678/* end confdefs.h. */
7679#include <ctype.h>
7680#include <stdlib.h>
7681#if ((' ' & 0x0FF) == 0x020)
7682# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7683# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7684#else
7685# define ISLOWER(c) \
7686 (('a' <= (c) && (c) <= 'i') \
7687 || ('j' <= (c) && (c) <= 'r') \
7688 || ('s' <= (c) && (c) <= 'z'))
7689# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7690#endif
7691
7692#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7693int
7694main ()
7695{
7696 int i;
7697 for (i = 0; i < 256; i++)
7698 if (XOR (islower (i), ISLOWER (i))
7699 || toupper (i) != TOUPPER (i))
7700 return 2;
7701 return 0;
7702}
7703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704if ac_fn_c_try_run "$LINENO"; then :
7705
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711fi
7712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713fi
7714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7716$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717if test $ac_cv_header_stdc = yes; then
7718
Matthias Kloseb9621712010-04-24 17:59:49 +00007719$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007720
7721fi
7722
stratakise768c862018-01-23 16:11:24 +01007723for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007724fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007725ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007726sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007727utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007728poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007729sys/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 +01007730sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007731sys/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 +01007732sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007733sys/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 -07007734libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007735linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007736sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007737do :
7738 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7739ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007740if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007742#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007743_ACEOF
7744
7745fi
7746
Guido van Rossum627b2d71993-12-24 10:39:16 +00007747done
7748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007749ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007750for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007751 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7753$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007754if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007755 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007756else
Matthias Kloseb9621712010-04-24 17:59:49 +00007757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007758/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007759#include <sys/types.h>
7760#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007761
Martin v. Löwis11437992002-04-12 09:54:03 +00007762int
7763main ()
7764{
7765if ((DIR *) 0)
7766return 0;
7767 ;
7768 return 0;
7769}
7770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007771if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007773else
Matthias Kloseb9621712010-04-24 17:59:49 +00007774 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778eval ac_res=\$$as_ac_Header
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7780$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007781if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007783#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007784_ACEOF
7785
7786ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007788
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007789done
7790# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7791if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7793$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007794if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007796else
Martin v. Löwis11437992002-04-12 09:54:03 +00007797 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007801/* Override any GCC internal prototype to avoid an error.
7802 Use char because int might match the return type of a GCC
7803 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007804#ifdef __cplusplus
7805extern "C"
7806#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007807char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007808int
7809main ()
7810{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007811return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ;
7813 return 0;
7814}
7815_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007816for ac_lib in '' dir; do
7817 if test -z "$ac_lib"; then
7818 ac_res="none required"
7819 else
7820 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007821 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007822 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007824 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007826rm -f core conftest.err conftest.$ac_objext \
7827 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007828 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007829 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007831done
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007833
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007834else
7835 ac_cv_search_opendir=no
7836fi
7837rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007838LIBS=$ac_func_search_save_LIBS
7839fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7841$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007842ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007843if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007844 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007846fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007847
Michael W. Hudson54241132001-12-07 15:38:26 +00007848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7850$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007851if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007853else
7854 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007858/* Override any GCC internal prototype to avoid an error.
7859 Use char because int might match the return type of a GCC
7860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007861#ifdef __cplusplus
7862extern "C"
7863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007864char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007865int
7866main ()
7867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007868return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007869 ;
7870 return 0;
7871}
7872_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007873for ac_lib in '' x; do
7874 if test -z "$ac_lib"; then
7875 ac_res="none required"
7876 else
7877 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007879 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007881 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007883rm -f core conftest.err conftest.$ac_objext \
7884 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007885 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007888done
Victor Stinnere0be4232011-10-25 13:06:09 +02007889if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891else
7892 ac_cv_search_opendir=no
7893fi
7894rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007895LIBS=$ac_func_search_save_LIBS
7896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7898$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007899ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007902
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007903fi
7904
7905fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7908$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007909if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007913/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007914#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007915int
7916main ()
7917{
7918return makedev(0, 0);
7919 ;
7920 return 0;
7921}
7922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007924 ac_cv_header_sys_types_h_makedev=yes
7925else
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007927fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007928rm -f core conftest.err conftest.$ac_objext \
7929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007930
7931fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7933$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007934
7935if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007936ac_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 +02007937if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007938
Matthias Kloseb9621712010-04-24 17:59:49 +00007939$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007940
7941fi
7942
7943
7944
7945 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 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 +02007947if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007948
Matthias Kloseb9621712010-04-24 17:59:49 +00007949$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007950
7951fi
7952
7953
7954 fi
7955fi
7956
Michael W. Hudson54241132001-12-07 15:38:26 +00007957
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007958# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7959# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7960SAVE_CFLAGS=$CFLAGS
7961CFLAGS="-std=c99 $CFLAGS"
7962for ac_header in bluetooth/bluetooth.h
7963do :
7964 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7965if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7966 cat >>confdefs.h <<_ACEOF
7967#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7968_ACEOF
7969
7970fi
7971
7972done
7973
7974CFLAGS=$SAVE_CFLAGS
7975
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007976# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7977for ac_header in net/if.h
7978do :
7979 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7980#ifdef STDC_HEADERS
7981# include <stdlib.h>
7982# include <stddef.h>
7983#else
7984# ifdef HAVE_STDLIB_H
7985# include <stdlib.h>
7986# endif
7987#endif
7988#ifdef HAVE_SYS_SOCKET_H
7989# include <sys/socket.h>
7990#endif
7991
7992"
Victor Stinnere0be4232011-10-25 13:06:09 +02007993if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007994 cat >>confdefs.h <<_ACEOF
7995#define HAVE_NET_IF_H 1
7996_ACEOF
7997
7998fi
7999
8000done
8001
8002
Martin v. Löwis11017b12006-01-14 18:12:57 +00008003# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008004for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008005do :
8006 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 +00008007#ifdef HAVE_ASM_TYPES_H
8008#include <asm/types.h>
8009#endif
8010#ifdef HAVE_SYS_SOCKET_H
8011#include <sys/socket.h>
8012#endif
8013
Matthias Kloseb9621712010-04-24 17:59:49 +00008014"
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008016 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008017#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008018_ACEOF
8019
8020fi
8021
8022done
8023
8024
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008025# On Linux, qrtr.h requires asm/types.h
8026for ac_header in linux/qrtr.h
8027do :
8028 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8029#ifdef HAVE_ASM_TYPES_H
8030#include <asm/types.h>
8031#endif
8032#ifdef HAVE_SYS_SOCKET_H
8033#include <sys/socket.h>
8034#endif
8035
8036"
8037if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8038 cat >>confdefs.h <<_ACEOF
8039#define HAVE_LINUX_QRTR_H 1
8040_ACEOF
8041
8042fi
8043
8044done
8045
8046
caaveryeffc12f2017-09-06 18:18:10 -04008047for ac_header in linux/vm_sockets.h
8048do :
8049 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8050#ifdef HAVE_SYS_SOCKET_H
8051#include <sys/socket.h>
8052#endif
8053
8054"
8055if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8056 cat >>confdefs.h <<_ACEOF
8057#define HAVE_LINUX_VM_SOCKETS_H 1
8058_ACEOF
8059
8060fi
8061
8062done
8063
8064
Charles-François Natali47413c12011-10-06 19:47:44 +02008065# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008066for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008067do :
8068 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8069ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8070#ifdef HAVE_SYS_SOCKET_H
8071#include <sys/socket.h>
8072#endif
8073
8074"
8075if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8076 cat >>confdefs.h <<_ACEOF
8077#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8078_ACEOF
8079
8080fi
8081
8082done
8083
8084
Guido van Rossum627b2d71993-12-24 10:39:16 +00008085# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008086was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8088$as_echo_n "checking for clock_t in time.h... " >&6; }
8089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008090/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008091#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
8093_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008095 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008096 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008097else
Martin v. Löwis11437992002-04-12 09:54:03 +00008098
8099
Matthias Kloseb9621712010-04-24 17:59:49 +00008100$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008101
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008102
Guido van Rossum627b2d71993-12-24 10:39:16 +00008103fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008104rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8107$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008108
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8110$as_echo_n "checking for makedev... " >&6; }
8111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008113
Jesus Cea740f53a2010-04-28 11:35:30 +00008114#if defined(MAJOR_IN_MKDEV)
8115#include <sys/mkdev.h>
8116#elif defined(MAJOR_IN_SYSMACROS)
8117#include <sys/sysmacros.h>
8118#else
8119#include <sys/types.h>
8120#endif
8121
Neal Norwitz11690112002-07-30 01:08:28 +00008122int
8123main ()
8124{
Jesus Cea740f53a2010-04-28 11:35:30 +00008125
8126 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008127 ;
8128 return 0;
8129}
Matthias Kloseb159a552010-04-25 21:00:44 +00008130
Neal Norwitz11690112002-07-30 01:08:28 +00008131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008132if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008133 ac_cv_has_makedev=yes
8134else
Matthias Kloseb9621712010-04-24 17:59:49 +00008135 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008137rm -f core conftest.err conftest.$ac_objext \
8138 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8140$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008141if test "$ac_cv_has_makedev" = "yes"; then
8142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008144
8145fi
8146
Christian Heimes985ecdc2013-11-20 11:46:18 +01008147# byte swapping
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8149$as_echo_n "checking for le64toh... " >&6; }
8150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8151/* end confdefs.h. */
8152
8153#ifdef HAVE_ENDIAN_H
8154#include <endian.h>
8155#elif defined(HAVE_SYS_ENDIAN_H)
8156#include <sys/endian.h>
8157#endif
8158
8159int
8160main ()
8161{
8162
8163 le64toh(1)
8164 ;
8165 return 0;
8166}
8167
8168_ACEOF
8169if ac_fn_c_try_link "$LINENO"; then :
8170 ac_cv_has_le64toh=yes
8171else
8172 ac_cv_has_le64toh=no
8173fi
8174rm -f core conftest.err conftest.$ac_objext \
8175 conftest$ac_exeext conftest.$ac_ext
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8177$as_echo "$ac_cv_has_le64toh" >&6; }
8178if test "$ac_cv_has_le64toh" = "yes"; then
8179
8180$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8181
8182fi
8183
Martin v. Löwis399a6892002-10-04 10:22:02 +00008184use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008185# Don't use largefile support for GNU/Hurd
8186case $ac_sys_system in GNU*)
8187 use_lfs=no
8188esac
8189
Martin v. Löwis399a6892002-10-04 10:22:02 +00008190if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008191# Two defines needed to enable largefile support on various platforms
8192# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008193case $ac_sys_system/$ac_sys_release in
8194AIX*)
8195
8196$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8197
8198 ;;
8199esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008200
Matthias Kloseb9621712010-04-24 17:59:49 +00008201$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
8203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008205
Martin v. Löwis399a6892002-10-04 10:22:02 +00008206fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008207
Guido van Rossum84e7b241996-08-19 21:59:00 +00008208# Add some code to confdefs.h so that the test for off_t works on SCO
8209cat >> confdefs.h <<\EOF
8210#if defined(SCO_DS)
8211#undef _OFF_T
8212#endif
8213EOF
8214
Guido van Rossumef2255b2000-03-10 22:30:29 +00008215# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008216ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008217if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008218
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008219else
Martin v. Löwis11437992002-04-12 09:54:03 +00008220
8221cat >>confdefs.h <<_ACEOF
8222#define mode_t int
8223_ACEOF
8224
8225fi
8226
Matthias Kloseb9621712010-04-24 17:59:49 +00008227ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008228if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008229
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008230else
Martin v. Löwis11437992002-04-12 09:54:03 +00008231
8232cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008234_ACEOF
8235
8236fi
8237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008239if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008240
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008241else
Martin v. Löwis11437992002-04-12 09:54:03 +00008242
8243cat >>confdefs.h <<_ACEOF
8244#define pid_t int
8245_ACEOF
8246
8247fi
8248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008249
Martin v. Löwis11437992002-04-12 09:54:03 +00008250cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008251#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008252_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008253
Matthias Kloseb9621712010-04-24 17:59:49 +00008254ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008255if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008256
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008257else
Martin v. Löwis11437992002-04-12 09:54:03 +00008258
8259cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008261_ACEOF
8262
8263fi
8264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8266$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008267if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008268 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008271/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008272#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
8274_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008276 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008277 ac_cv_type_uid_t=yes
8278else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008279 ac_cv_type_uid_t=no
8280fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008281rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008283fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8285$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008286if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008287
Matthias Kloseb9621712010-04-24 17:59:49 +00008288$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008289
8290
Matthias Kloseb9621712010-04-24 17:59:49 +00008291$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008292
8293fi
8294
Mark Dickinson983bc162012-12-02 12:11:38 +00008295
Matthias Kloseb9621712010-04-24 17:59:49 +00008296ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008297if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298
Matthias Kloseb9621712010-04-24 17:59:49 +00008299$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008300
8301fi
8302
Stefan Krah1919b7e2012-03-21 18:25:23 +01008303ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8304if test "x$ac_cv_type___uint128_t" = xyes; then :
8305
8306$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8307
8308fi
8309
Jack Jansendd19cf82001-12-06 22:36:17 +00008310
Michael W. Hudson54241132001-12-07 15:38:26 +00008311# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008312# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008313# The cast to long int works around a bug in the HP C Compiler
8314# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8315# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8316# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8318$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008319if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008320 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008321else
Matthias Kloseb9621712010-04-24 17:59:49 +00008322 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 +00008323
Martin v. Löwis11437992002-04-12 09:54:03 +00008324else
Matthias Kloseb9621712010-04-24 17:59:49 +00008325 if test "$ac_cv_type_int" = yes; then
8326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8327$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008328as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008329See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330 else
8331 ac_cv_sizeof_int=0
8332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008333fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008334
Martin v. Löwis11437992002-04-12 09:54:03 +00008335fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8337$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008338
8339
8340
Martin v. Löwis11437992002-04-12 09:54:03 +00008341cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008342#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008343_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008344
8345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008346# The cast to long int works around a bug in the HP C Compiler
8347# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8348# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8349# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8351$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008352if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008353 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008354else
Matthias Kloseb9621712010-04-24 17:59:49 +00008355 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 +00008356
Martin v. Löwis11437992002-04-12 09:54:03 +00008357else
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 if test "$ac_cv_type_long" = yes; then
8359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008361as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008362See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363 else
8364 ac_cv_sizeof_long=0
8365 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008366fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008367
Martin v. Löwis11437992002-04-12 09:54:03 +00008368fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8370$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008371
8372
8373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008375#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008376_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008377
8378
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379# The cast to long int works around a bug in the HP C Compiler
8380# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8381# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8382# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8384$as_echo_n "checking size of long long... " >&6; }
8385if ${ac_cv_sizeof_long_long+:} false; then :
8386 $as_echo_n "(cached) " >&6
8387else
8388 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8389
8390else
8391 if test "$ac_cv_type_long_long" = yes; then
8392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8393$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8394as_fn_error 77 "cannot compute sizeof (long long)
8395See \`config.log' for more details" "$LINENO" 5; }
8396 else
8397 ac_cv_sizeof_long_long=0
8398 fi
8399fi
8400
8401fi
8402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8403$as_echo "$ac_cv_sizeof_long_long" >&6; }
8404
8405
8406
8407cat >>confdefs.h <<_ACEOF
8408#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8409_ACEOF
8410
8411
8412# The cast to long int works around a bug in the HP C Compiler
8413# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8414# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8415# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8417$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008418if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008419 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008420else
Matthias Kloseb9621712010-04-24 17:59:49 +00008421 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 +00008422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423else
Matthias Kloseb9621712010-04-24 17:59:49 +00008424 if test "$ac_cv_type_void_p" = yes; then
8425 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8426$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008427as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008428See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008429 else
8430 ac_cv_sizeof_void_p=0
8431 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008433
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8436$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008437
8438
8439
Martin v. Löwis11437992002-04-12 09:54:03 +00008440cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008441#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008442_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008443
8444
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008445# The cast to long int works around a bug in the HP C Compiler
8446# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8447# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8448# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8450$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008451if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 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 +00008455
Martin v. Löwis11437992002-04-12 09:54:03 +00008456else
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 if test "$ac_cv_type_short" = yes; then
8458 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008460as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008461See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462 else
8463 ac_cv_sizeof_short=0
8464 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466
Martin v. Löwis11437992002-04-12 09:54:03 +00008467fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8469$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470
8471
8472
Martin v. Löwis11437992002-04-12 09:54:03 +00008473cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008474#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008475_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008476
8477
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008478# The cast to long int works around a bug in the HP C Compiler
8479# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8480# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8481# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8483$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008484if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 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 +00008488
Martin v. Löwis11437992002-04-12 09:54:03 +00008489else
Matthias Kloseb9621712010-04-24 17:59:49 +00008490 if test "$ac_cv_type_float" = yes; then
8491 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8492$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008493as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008494See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495 else
8496 ac_cv_sizeof_float=0
8497 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8502$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503
8504
8505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008507#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008508_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008509
8510
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008511# The cast to long int works around a bug in the HP C Compiler
8512# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8513# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8514# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8516$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008517if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008518 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008519else
Matthias Kloseb9621712010-04-24 17:59:49 +00008520 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 +00008521
Martin v. Löwis11437992002-04-12 09:54:03 +00008522else
Matthias Kloseb9621712010-04-24 17:59:49 +00008523 if test "$ac_cv_type_double" = yes; then
8524 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008526as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008527See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528 else
8529 ac_cv_sizeof_double=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008532
Martin v. Löwis11437992002-04-12 09:54:03 +00008533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8535$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536
8537
8538
Martin v. Löwis11437992002-04-12 09:54:03 +00008539cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008540#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008541_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542
8543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544# The cast to long int works around a bug in the HP C Compiler
8545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8547# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8549$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008550if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 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 +00008554
Martin v. Löwis11437992002-04-12 09:54:03 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 if test "$ac_cv_type_fpos_t" = yes; then
8557 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008559as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008560See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008561 else
8562 ac_cv_sizeof_fpos_t=0
8563 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565
Martin v. Löwis11437992002-04-12 09:54:03 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8568$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569
8570
8571
Martin v. Löwis11437992002-04-12 09:54:03 +00008572cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008573#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008574_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008575
Michael W. Hudson54241132001-12-07 15:38:26 +00008576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008577# The cast to long int works around a bug in the HP C Compiler
8578# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8579# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8580# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8582$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008583if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 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 +00008587
Martin v. Löwis18e16552006-02-15 17:27:45 +00008588else
Matthias Kloseb9621712010-04-24 17:59:49 +00008589 if test "$ac_cv_type_size_t" = yes; then
8590 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008592as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008593See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 else
8595 ac_cv_sizeof_size_t=0
8596 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598
Martin v. Löwis18e16552006-02-15 17:27:45 +00008599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8601$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602
8603
8604
Martin v. Löwis18e16552006-02-15 17:27:45 +00008605cat >>confdefs.h <<_ACEOF
8606#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8607_ACEOF
8608
8609
Christian Heimes400adb02008-02-01 08:12:03 +00008610# The cast to long int works around a bug in the HP C Compiler
8611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8613# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8615$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008616if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 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 +00008620
Christian Heimes400adb02008-02-01 08:12:03 +00008621else
Matthias Kloseb9621712010-04-24 17:59:49 +00008622 if test "$ac_cv_type_pid_t" = yes; then
8623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008625as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008626See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008627 else
8628 ac_cv_sizeof_pid_t=0
8629 fi
8630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631
Christian Heimes400adb02008-02-01 08:12:03 +00008632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8634$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008635
8636
8637
8638cat >>confdefs.h <<_ACEOF
8639#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8640_ACEOF
8641
8642
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008643# The cast to long int works around a bug in the HP C Compiler
8644# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8645# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8646# This bug is HP SR number 8606223364.
8647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8648$as_echo_n "checking size of uintptr_t... " >&6; }
8649if ${ac_cv_sizeof_uintptr_t+:} false; then :
8650 $as_echo_n "(cached) " >&6
8651else
8652 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8653
8654else
8655 if test "$ac_cv_type_uintptr_t" = yes; then
8656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8658as_fn_error 77 "cannot compute sizeof (uintptr_t)
8659See \`config.log' for more details" "$LINENO" 5; }
8660 else
8661 ac_cv_sizeof_uintptr_t=0
8662 fi
8663fi
8664
8665fi
8666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8667$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8668
8669
8670
8671cat >>confdefs.h <<_ACEOF
8672#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8673_ACEOF
8674
8675
Michael W. Hudson54241132001-12-07 15:38:26 +00008676
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008677
Eitan Adler3055c942018-05-15 22:58:09 -07008678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8679$as_echo_n "checking for long double... " >&6; }
8680if ${ac_cv_type_long_double+:} false; then :
8681 $as_echo_n "(cached) " >&6
8682else
8683 if test "$GCC" = yes; then
8684 ac_cv_type_long_double=yes
8685 else
8686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8687/* end confdefs.h. */
8688/* The Stardent Vistra knows sizeof (long double), but does
8689 not support it. */
8690 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008691int
8692main ()
8693{
Eitan Adler3055c942018-05-15 22:58:09 -07008694static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8695 sizeof (double) <= sizeof (long double))];
8696test_array [0] = 0;
8697return test_array [0];
8698
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008699 ;
8700 return 0;
8701}
8702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008703if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008704 ac_cv_type_long_double=yes
8705else
8706 ac_cv_type_long_double=no
8707fi
8708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8709 fi
8710fi
8711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8712$as_echo "$ac_cv_type_long_double" >&6; }
8713 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008714
Matthias Kloseb9621712010-04-24 17:59:49 +00008715$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008716
Eitan Adler3055c942018-05-15 22:58:09 -07008717 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008718
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8724$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008725if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 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 +00008729
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 if test "$ac_cv_type_long_double" = yes; then
8732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008734as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008735See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008736 else
8737 ac_cv_sizeof_long_double=0
8738 fi
8739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8743$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744
8745
8746
8747cat >>confdefs.h <<_ACEOF
8748#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8749_ACEOF
8750
8751
Travis E. Oliphant9b307842007-10-12 22:06:37 +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 _Bool" >&5
8758$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008759if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008760 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008761else
Matthias Kloseb9621712010-04-24 17:59:49 +00008762 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 +00008763
Thomas Woutersb2137042007-02-01 18:02:27 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 if test "$ac_cv_type__Bool" = 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 (_Bool)
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__Bool=0
8772 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008773fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008774
Thomas Woutersb2137042007-02-01 18:02:27 +00008775fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8777$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778
8779
8780
Thomas Woutersb2137042007-02-01 18:02:27 +00008781cat >>confdefs.h <<_ACEOF
8782#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8783_ACEOF
8784
8785
Thomas Woutersb2137042007-02-01 18:02:27 +00008786
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008787# The cast to long int works around a bug in the HP C Compiler
8788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8790# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8792$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008793if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008797#ifdef HAVE_SYS_TYPES_H
8798#include <sys/types.h>
8799#endif
8800
Matthias Kloseb9621712010-04-24 17:59:49 +00008801"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803else
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 if test "$ac_cv_type_off_t" = yes; then
8805 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8806$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008807as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008808See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008809 else
8810 ac_cv_sizeof_off_t=0
8811 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008812fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008813
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8816$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008817
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008818
8819
Martin v. Löwis11437992002-04-12 09:54:03 +00008820cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008821#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008822_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008823
Michael W. Hudson54241132001-12-07 15:38:26 +00008824
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8827$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008828if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008829 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008830
Matthias Kloseb9621712010-04-24 17:59:49 +00008831$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008832
Matthias Kloseb9621712010-04-24 17:59:49 +00008833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8834$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008835else
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008838fi
8839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008840# The cast to long int works around a bug in the HP C Compiler
8841# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8842# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8843# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8845$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008848else
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008850#ifdef HAVE_SYS_TYPES_H
8851#include <sys/types.h>
8852#endif
8853#ifdef HAVE_TIME_H
8854#include <time.h>
8855#endif
8856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008858
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if test "$ac_cv_type_time_t" = yes; then
8861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008863as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008864See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008865 else
8866 ac_cv_sizeof_time_t=0
8867 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8872$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008873
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008874
8875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008877#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008878_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008879
Michael W. Hudson54241132001-12-07 15:38:26 +00008880
8881
Trent Mick635f6fb2000-08-23 21:33:05 +00008882# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008883ac_save_cc="$CC"
8884if test "$ac_cv_kpthread" = "yes"
8885then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008886elif test "$ac_cv_kthread" = "yes"
8887then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008888elif test "$ac_cv_pthread" = "yes"
8889then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008890fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8893$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008894have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008896/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008897
8898 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008899int
8900main ()
8901{
Guido van Rossum12580492000-09-24 16:47:19 +00008902pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ;
8904 return 0;
8905}
Matthias Kloseb159a552010-04-25 21:00:44 +00008906
Martin v. Löwis11437992002-04-12 09:54:03 +00008907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008908if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008909 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8913$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008914if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008915 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8917# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8918# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8920$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008921if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008923else
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925#ifdef HAVE_PTHREAD_H
8926#include <pthread.h>
8927#endif
8928
Matthias Kloseb9621712010-04-24 17:59:49 +00008929"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008930
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931else
Matthias Kloseb9621712010-04-24 17:59:49 +00008932 if test "$ac_cv_type_pthread_t" = yes; then
8933 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8934$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008935as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008936See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008937 else
8938 ac_cv_sizeof_pthread_t=0
8939 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008940fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008941
Trent Mick635f6fb2000-08-23 21:33:05 +00008942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8944$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008945
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008946
8947
Martin v. Löwis11437992002-04-12 09:54:03 +00008948cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008949#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008951
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952
Trent Mick635f6fb2000-08-23 21:33:05 +00008953fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008954
8955# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8956# This checking will be unnecessary after removing deprecated TLS API.
8957# The cast to long int works around a bug in the HP C Compiler
8958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8960# This bug is HP SR number 8606223364.
8961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8962$as_echo_n "checking size of pthread_key_t... " >&6; }
8963if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8964 $as_echo_n "(cached) " >&6
8965else
8966 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8967"; then :
8968
8969else
8970 if test "$ac_cv_type_pthread_key_t" = yes; then
8971 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8973as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8974See \`config.log' for more details" "$LINENO" 5; }
8975 else
8976 ac_cv_sizeof_pthread_key_t=0
8977 fi
8978fi
8979
8980fi
8981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8982$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8983
8984
8985
8986cat >>confdefs.h <<_ACEOF
8987#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8988_ACEOF
8989
8990
8991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8992$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8993if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8995/* end confdefs.h. */
8996#include <pthread.h>
8997int
8998main ()
8999{
9000pthread_key_t k; k * 1;
9001 ;
9002 return 0;
9003}
9004_ACEOF
9005if ac_fn_c_try_compile "$LINENO"; then :
9006 ac_pthread_key_t_is_arithmetic_type=yes
9007else
9008 ac_pthread_key_t_is_arithmetic_type=no
9009
9010fi
9011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9013$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9014 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9015
9016$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9017
9018 fi
9019else
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9021$as_echo "no" >&6; }
9022fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009023CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009024
Michael W. Hudson54241132001-12-07 15:38:26 +00009025
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009026case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009027 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009028 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9029 ;;
9030 Darwin/*)
9031 OTHER_LIBTOOL_OPT=""
9032 ;;
9033esac
9034
9035
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009036
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009037case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009038 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009039 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9040 if test "${enable_universalsdk}"; then
9041 :
9042 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009043 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009044 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009045 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009046 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009047 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009048 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009049 if test ${gcc_version} '<' 4.0
9050 then
9051 LIBTOOL_CRUFT="-lcc_dynamic"
9052 else
9053 LIBTOOL_CRUFT=""
9054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009056 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057else
Matthias Kloseb9621712010-04-24 17:59:49 +00009058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009059/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009060
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009061 #include <unistd.h>
9062 int main(int argc, char*argv[])
9063 {
9064 if (sizeof(long) == 4) {
9065 return 0;
9066 } else {
9067 return 1;
9068 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009069 }
9070
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009072if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009073 ac_osx_32bit=yes
9074else
Matthias Kloseb9621712010-04-24 17:59:49 +00009075 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009076fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009077rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9078 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009079fi
9080
9081
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009082 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009083 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009084 i386)
9085 MACOSX_DEFAULT_ARCH="i386"
9086 ;;
9087 ppc)
9088 MACOSX_DEFAULT_ARCH="ppc"
9089 ;;
9090 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009091 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009092 ;;
9093 esac
9094 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009095 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009096 i386)
9097 MACOSX_DEFAULT_ARCH="x86_64"
9098 ;;
9099 ppc)
9100 MACOSX_DEFAULT_ARCH="ppc64"
9101 ;;
9102 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009103 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009104 ;;
9105 esac
9106
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009107 fi
9108
9109 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009110 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009111 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009112esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9114$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009115if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009116then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009117 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009119 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009120
Matthias Kloseb9621712010-04-24 17:59:49 +00009121$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009122
Matthias Kloseb9621712010-04-24 17:59:49 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9124$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009125 if test $enable_shared = "yes"
9126 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009127 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 +00009128 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009129else
Matthias Kloseb9621712010-04-24 17:59:49 +00009130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9131$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009132fi
9133
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9135$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009136case $ac_sys_system/$ac_sys_release in
9137 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009138
Matthias Kloseb9621712010-04-24 17:59:49 +00009139$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009140
Matthias Kloseb9621712010-04-24 17:59:49 +00009141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9142$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009143 ;;
9144 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9146$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009147 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009148esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009149
Guido van Rossum0a516c91994-09-12 10:58:40 +00009150# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151
Michael W. Hudson54241132001-12-07 15:38:26 +00009152
9153
9154
9155
Benjamin Peterson99f03762010-04-11 22:15:28 +00009156
Thomas Wouters477c8d52006-05-27 19:21:47 +00009157
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009158# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9159# -- usually .so, .sl on HP-UX, .dll on Cygwin
9160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9161$as_echo_n "checking the extension of shared libraries... " >&6; }
9162if test -z "$SHLIB_SUFFIX"; then
9163 case $ac_sys_system in
9164 hp*|HP*)
9165 case `uname -m` in
9166 ia64) SHLIB_SUFFIX=.so;;
9167 *) SHLIB_SUFFIX=.sl;;
9168 esac
9169 ;;
9170 CYGWIN*) SHLIB_SUFFIX=.dll;;
9171 *) SHLIB_SUFFIX=.so;;
9172 esac
9173fi
9174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9175$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009176
Guido van Rossum0a516c91994-09-12 10:58:40 +00009177# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009178# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009179# (Shared libraries in this instance are shared modules to be loaded into
9180# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9182$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009183if test -z "$LDSHARED"
9184then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009185 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009186 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009187 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009188 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009189 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009191 if test "$GCC" = "yes" ; then
9192 LDSHARED='$(CC) -shared'
9193 LDCXXSHARED='$(CXX) -shared'
9194 else
9195 LDSHARED='$(CC) -G'
9196 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009197 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009198 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199 if test "$GCC" = "yes" ; then
9200 LDSHARED='$(CC) -shared'
9201 LDCXXSHARED='$(CXX) -shared'
9202 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009203 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009204 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009205 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009206 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009207 LDSHARED='$(CC) -bundle'
9208 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009209 if test "$enable_framework" ; then
9210 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009211 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9212 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009214 else
9215 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009216 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009217 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009218 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009219 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009220 LDSHARED='$(CC) -bundle'
9221 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009222 if test "$enable_framework" ; then
9223 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009224 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9225 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009226 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009227 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009228 # No framework, use the Python app as bundle-loader
9229 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009230 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009231 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009232 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009233 Darwin/*)
9234 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9235 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009236
Ned Deily36820b62014-06-25 13:44:22 -07009237 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9238 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9239 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9240 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9241 if test ${dep_target_major} -eq 10 && \
9242 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009243 then
Ned Deily36820b62014-06-25 13:44:22 -07009244 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009245 LDSHARED='$(CC) -bundle'
9246 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009247 if test "$enable_framework" ; then
9248 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009249 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9250 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009251 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009252 else
9253 # No framework, use the Python app as bundle-loader
9254 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9255 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009256 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009257 fi
Ned Deily36820b62014-06-25 13:44:22 -07009258 else
9259 # building for OS X 10.3 and later
9260 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9261 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9262 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009263 fi
9264 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009265 Linux*|GNU*|QNX*)
9266 LDSHARED='$(CC) -shared'
9267 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009268 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009269 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009270 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009271 LDSHARED='$(CC) -shared'
9272 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009273 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009274 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009275 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009276 OpenBSD*)
9277 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9278 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009279 LDSHARED='$(CC) -shared $(CCSHARED)'
9280 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009281 else
9282 case `uname -r` in
9283 [01].* | 2.[0-7] | 2.[0-7].*)
9284 LDSHARED="ld -Bshareable ${LDFLAGS}"
9285 ;;
9286 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009287 LDSHARED='$(CC) -shared $(CCSHARED)'
9288 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009289 ;;
9290 esac
9291 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009292 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009293 LDSHARED='$(CC) -shared'
9294 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009295 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009296 if test "$GCC" = "yes" ; then
9297 LDSHARED='$(CC) -shared'
9298 LDCXXSHARED='$(CXX) -shared'
9299 else
9300 LDSHARED='$(CC) -G'
9301 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009302 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009303 SCO_SV*)
9304 LDSHARED='$(CC) -Wl,-G,-Bexport'
9305 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9306 CYGWIN*)
9307 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9308 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009309 *) LDSHARED="ld";;
9310 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9313$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009314LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009315BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009316# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009317# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9319$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009320if test -z "$CCSHARED"
9321then
Guido van Rossum07397971997-04-29 21:49:50 +00009322 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009323 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009324 then CCSHARED="-fPIC";
9325 elif test `uname -p` = sparc;
9326 then CCSHARED="-xcode=pic32";
9327 else CCSHARED="-Kpic";
9328 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009329 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009330 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009331 else CCSHARED="+z";
9332 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009333 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009334 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009335 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009336 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009337 if test "$GCC" = "yes"
9338 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009339 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009340 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009341 SCO_SV*)
9342 if test "$GCC" = "yes"
9343 then CCSHARED="-fPIC"
9344 else CCSHARED="-Kpic -belf"
9345 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009346 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9349$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009350# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009351# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9353$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009354if test -z "$LINKFORSHARED"
9355then
Guido van Rossum07397971997-04-29 21:49:50 +00009356 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009357 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009358 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009359 LINKFORSHARED="-Wl,-E -Wl,+s";;
9360# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009361 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009362 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009364 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009365 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009366
9367 # Issue #18075: the default maximum stack size (8MBytes) is too
9368 # small for the default recursion limit. Increase the stack size
9369 # to ensure that tests don't crash
9370 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9371
Jack Jansene578a632001-08-15 01:27:14 +00009372 if test "$enable_framework"
9373 then
Jack Jansenda49e192005-01-07 13:08:22 +00009374 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009375 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009376 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009377 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009378 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009379 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009380 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009381 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9382 then
9383 LINKFORSHARED="-Wl,--export-dynamic"
9384 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009385 SunOS/5*) case $CC in
9386 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009387 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009388 then
9389 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009390 fi;;
9391 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009392 CYGWIN*)
9393 if test $enable_shared = "no"
9394 then
9395 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9396 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009397 QNX*)
9398 # -Wl,-E causes the symbols to be added to the dynamic
9399 # symbol table so that they can be found when a module
9400 # is loaded. -N 2048K causes the stack size to be set
9401 # to 2048 kilobytes so that the stack doesn't overflow
9402 # when running test_compile.py.
9403 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009404 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9407$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009408
Michael W. Hudson54241132001-12-07 15:38:26 +00009409
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9412$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009413if test ! "$LIBRARY" = "$LDLIBRARY"
9414then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009415 case $ac_sys_system in
9416 CYGWIN*)
9417 # Cygwin needs CCSHARED when building extension DLLs
9418 # but not when building the interpreter DLL.
9419 CFLAGSFORSHARED='';;
9420 *)
9421 CFLAGSFORSHARED='$(CCSHARED)'
9422 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9425$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009426
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009427# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9428# library (with --enable-shared).
9429# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009430# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9431# if it is not required, since it creates a dependency of the shared library
9432# to LIBS. This, in turn, means that applications linking the shared libpython
9433# don't need to link LIBS explicitly. The default should be only changed
9434# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009435
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9437$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009438case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009439 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009440 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009441esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9443$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009444
9445
Guido van Rossum627b2d71993-12-24 10:39:16 +00009446# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9448$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009449if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009450 $as_echo_n "(cached) " >&6
9451else
9452 ac_check_lib_save_LIBS=$LIBS
9453LIBS="-lsendfile $LIBS"
9454cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9455/* end confdefs.h. */
9456
9457/* Override any GCC internal prototype to avoid an error.
9458 Use char because int might match the return type of a GCC
9459 builtin and then its argument prototype would still apply. */
9460#ifdef __cplusplus
9461extern "C"
9462#endif
9463char sendfile ();
9464int
9465main ()
9466{
9467return sendfile ();
9468 ;
9469 return 0;
9470}
9471_ACEOF
9472if ac_fn_c_try_link "$LINENO"; then :
9473 ac_cv_lib_sendfile_sendfile=yes
9474else
9475 ac_cv_lib_sendfile_sendfile=no
9476fi
9477rm -f core conftest.err conftest.$ac_objext \
9478 conftest$ac_exeext conftest.$ac_ext
9479LIBS=$ac_check_lib_save_LIBS
9480fi
9481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9482$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009483if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009484 cat >>confdefs.h <<_ACEOF
9485#define HAVE_LIBSENDFILE 1
9486_ACEOF
9487
9488 LIBS="-lsendfile $LIBS"
9489
9490fi
9491
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9493$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009494if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009495 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009496else
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009498LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009501
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502/* Override any GCC internal prototype to avoid an error.
9503 Use char because int might match the return type of a GCC
9504 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505#ifdef __cplusplus
9506extern "C"
9507#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009508char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009509int
9510main ()
9511{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513 ;
9514 return 0;
9515}
9516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009517if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009518 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009519else
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009521fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009522rm -f core conftest.err conftest.$ac_objext \
9523 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009524LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9527$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009528if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009529 cat >>confdefs.h <<_ACEOF
9530#define HAVE_LIBDL 1
9531_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009532
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009533 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009534
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009535fi
9536 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9538$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009539if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009541else
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009543LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547/* Override any GCC internal prototype to avoid an error.
9548 Use char because int might match the return type of a GCC
9549 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009550#ifdef __cplusplus
9551extern "C"
9552#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009553char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009554int
9555main ()
9556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009564else
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567rm -f core conftest.err conftest.$ac_objext \
9568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009569LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9572$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009573if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009574 cat >>confdefs.h <<_ACEOF
9575#define HAVE_LIBDLD 1
9576_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009577
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009578 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009579
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580fi
9581 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009582
Michael Felt0d3ccb42017-12-30 22:39:20 +01009583# checks for uuid.h location
9584for ac_header in uuid/uuid.h uuid.h
9585do :
9586 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9587ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9588if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9589 cat >>confdefs.h <<_ACEOF
9590#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9591_ACEOF
9592
9593fi
9594
9595done
9596
9597
Berker Peksag9a10ff42017-11-08 23:09:16 +03009598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9599$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9601/* end confdefs.h. */
9602#include <uuid/uuid.h>
9603int
9604main ()
9605{
9606
9607#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009608void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009609#endif
9610
9611 ;
9612 return 0;
9613}
9614_ACEOF
9615if ac_fn_c_try_compile "$LINENO"; then :
9616
9617$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9618
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9620$as_echo "yes" >&6; }
9621else
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9623$as_echo "no" >&6; }
9624
9625fi
9626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9627
Michael Felt0d3ccb42017-12-30 22:39:20 +01009628# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009629# FreeBSD and OpenBSD provides support as well
9630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9631$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9633/* end confdefs.h. */
9634#include <uuid.h>
9635int
9636main ()
9637{
9638
9639#ifndef uuid_create
9640void *x = uuid_create
9641#endif
9642
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647if ac_fn_c_try_compile "$LINENO"; then :
9648
9649$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9650
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9652$as_echo "yes" >&6; }
9653else
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655$as_echo "no" >&6; }
9656
9657fi
9658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9659
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009660# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9661# stream in big-endian byte-order
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9663$as_echo_n "checking for uuid_enc_be... " >&6; }
9664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9665/* end confdefs.h. */
9666#include <uuid.h>
9667int
9668main ()
9669{
9670
9671#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009672void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009673#endif
9674
9675 ;
9676 return 0;
9677}
9678_ACEOF
9679if ac_fn_c_try_compile "$LINENO"; then :
9680
9681$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9682
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9684$as_echo "yes" >&6; }
9685else
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687$as_echo "no" >&6; }
9688
9689fi
9690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9691
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009692# 'Real Time' functions on Solaris
9693# posix4 on Solaris 2.6
9694# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009696$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009697if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009698 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009699else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009700 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704/* Override any GCC internal prototype to avoid an error.
9705 Use char because int might match the return type of a GCC
9706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707#ifdef __cplusplus
9708extern "C"
9709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009710char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009711int
9712main ()
9713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009715 ;
9716 return 0;
9717}
9718_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719for ac_lib in '' pthread rt posix4; do
9720 if test -z "$ac_lib"; then
9721 ac_res="none required"
9722 else
9723 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009725 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009729rm -f core conftest.err conftest.$ac_objext \
9730 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009731 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734done
Victor Stinnere0be4232011-10-25 13:06:09 +02009735if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009736
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009737else
9738 ac_cv_search_sem_init=no
9739fi
9740rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009741LIBS=$ac_func_search_save_LIBS
9742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9744$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009745ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009746if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009748
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009749fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009750
Martin v. Löwis519adae2003-09-20 10:47:47 +00009751
Martin v. Löwis19d17342003-06-14 21:03:05 +00009752# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9754$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009755if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009756 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009757else
9758 ac_check_lib_save_LIBS=$LIBS
9759LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009761/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763/* Override any GCC internal prototype to avoid an error.
9764 Use char because int might match the return type of a GCC
9765 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009766#ifdef __cplusplus
9767extern "C"
9768#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009769char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009770int
9771main ()
9772{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009774 ;
9775 return 0;
9776}
9777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009779 ac_cv_lib_intl_textdomain=yes
9780else
Matthias Kloseb9621712010-04-24 17:59:49 +00009781 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009783rm -f core conftest.err conftest.$ac_objext \
9784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009785LIBS=$ac_check_lib_save_LIBS
9786fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9788$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009789if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009790
Matthias Kloseb9621712010-04-24 17:59:49 +00009791$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009792
Brett Cannonc6d936e2009-06-07 20:09:53 +00009793 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009794fi
9795
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009796
9797# checks for system dependent C++ extensions support
9798case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9800$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009803
Georg Brandl59e87bd2011-02-15 19:48:59 +00009804 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009805int
9806main ()
9807{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009808loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009809 ;
9810 return 0;
9811}
Matthias Kloseb159a552010-04-25 21:00:44 +00009812
Martin v. Löwis11437992002-04-12 09:54:03 +00009813_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009814if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009815
Matthias Kloseb159a552010-04-25 21:00:44 +00009816
Matthias Kloseb9621712010-04-24 17:59:49 +00009817$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009818
Matthias Kloseb159a552010-04-25 21:00:44 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009820$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009821
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009822else
Matthias Kloseb159a552010-04-25 21:00:44 +00009823
9824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009826
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009828rm -f core conftest.err conftest.$ac_objext \
9829 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009830 *) ;;
9831esac
9832
Christian Heimes985ecdc2013-11-20 11:46:18 +01009833# check for systems that require aligned memory access
9834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9835$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009836if ${ac_cv_aligned_required+:} false; then :
9837 $as_echo_n "(cached) " >&6
9838else
9839 if test "$cross_compiling" = yes; then :
9840 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009841else
9842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9843/* end confdefs.h. */
9844
9845int main()
9846{
9847 char s[16];
9848 int i, *p1, *p2;
9849 for (i=0; i < 16; i++)
9850 s[i] = i;
9851 p1 = (int*)(s+1);
9852 p2 = (int*)(s+2);
9853 if (*p1 == *p2)
9854 return 1;
9855 return 0;
9856}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009857_ACEOF
9858if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009859 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009860else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009861 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009862fi
9863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9864 conftest.$ac_objext conftest.beam conftest.$ac_ext
9865fi
9866
9867
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009868fi
9869
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9871$as_echo "$ac_cv_aligned_required" >&6; }
9872if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009873
9874$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9875
9876fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009877
9878# str, bytes and memoryview hash algorithm
9879
9880
9881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9882$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9883
9884# Check whether --with-hash_algorithm was given.
9885if test "${with_hash_algorithm+set}" = set; then :
9886 withval=$with_hash_algorithm;
9887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9888$as_echo "$withval" >&6; }
9889case "$withval" in
9890 siphash24)
9891 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9892
9893 ;;
9894 fnv)
9895 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9896
9897 ;;
9898 *)
9899 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9900 ;;
9901esac
9902
9903else
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9905$as_echo "default" >&6; }
9906fi
9907
9908
Charles-François Natalid30b0222014-05-08 23:08:51 +01009909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9910$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9911
9912# Check whether --with-address_sanitizer was given.
9913if test "${with_address_sanitizer+set}" = set; then :
9914 withval=$with_address_sanitizer;
9915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9916$as_echo "$withval" >&6; }
9917BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9918LDFLAGS="-fsanitize=address $LDFLAGS"
9919
9920else
9921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
9923fi
9924
9925
Guido van Rossum70c7f481998-03-26 18:44:10 +00009926# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9928$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009929if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009930 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009931else
Martin v. Löwis11437992002-04-12 09:54:03 +00009932 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009933LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009936
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009937/* Override any GCC internal prototype to avoid an error.
9938 Use char because int might match the return type of a GCC
9939 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009940#ifdef __cplusplus
9941extern "C"
9942#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009943char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009944int
9945main ()
9946{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009948 ;
9949 return 0;
9950}
9951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009952if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009954else
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009957rm -f core conftest.err conftest.$ac_objext \
9958 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009959LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9962$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009963if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009964 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009965fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009966 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9968$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009969if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009971else
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009973LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977/* Override any GCC internal prototype to avoid an error.
9978 Use char because int might match the return type of a GCC
9979 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009980#ifdef __cplusplus
9981extern "C"
9982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009983char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009984int
9985main ()
9986{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 ;
9989 return 0;
9990}
9991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009994else
Matthias Kloseb9621712010-04-24 17:59:49 +00009995 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009997rm -f core conftest.err conftest.$ac_objext \
9998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009999LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10002$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010003if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010004 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010005fi
10006 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010007
Matthias Kloseb9621712010-04-24 17:59:49 +000010008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10009$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010012if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010013 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10015$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010016LIBS="$withval $LIBS"
10017
10018else
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10020$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010021fi
10022
Guido van Rossum7f43da71994-08-01 12:15:30 +000010023
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010024
10025
10026
10027
10028
10029
10030
10031if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10032 if test -n "$ac_tool_prefix"; then
10033 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10034set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036$as_echo_n "checking for $ac_word... " >&6; }
10037if ${ac_cv_path_PKG_CONFIG+:} false; then :
10038 $as_echo_n "(cached) " >&6
10039else
10040 case $PKG_CONFIG in
10041 [\\/]* | ?:[\\/]*)
10042 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10043 ;;
10044 *)
10045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046for as_dir in $PATH
10047do
10048 IFS=$as_save_IFS
10049 test -z "$as_dir" && as_dir=.
10050 for ac_exec_ext in '' $ac_executable_extensions; do
10051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10052 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054 break 2
10055 fi
10056done
10057 done
10058IFS=$as_save_IFS
10059
10060 ;;
10061esac
10062fi
10063PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10064if test -n "$PKG_CONFIG"; then
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10066$as_echo "$PKG_CONFIG" >&6; }
10067else
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069$as_echo "no" >&6; }
10070fi
10071
10072
10073fi
10074if test -z "$ac_cv_path_PKG_CONFIG"; then
10075 ac_pt_PKG_CONFIG=$PKG_CONFIG
10076 # Extract the first word of "pkg-config", so it can be a program name with args.
10077set dummy pkg-config; ac_word=$2
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10079$as_echo_n "checking for $ac_word... " >&6; }
10080if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10081 $as_echo_n "(cached) " >&6
10082else
10083 case $ac_pt_PKG_CONFIG in
10084 [\\/]* | ?:[\\/]*)
10085 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10086 ;;
10087 *)
10088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10089for as_dir in $PATH
10090do
10091 IFS=$as_save_IFS
10092 test -z "$as_dir" && as_dir=.
10093 for ac_exec_ext in '' $ac_executable_extensions; do
10094 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10095 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10096 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10097 break 2
10098 fi
10099done
10100 done
10101IFS=$as_save_IFS
10102
10103 ;;
10104esac
10105fi
10106ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10107if test -n "$ac_pt_PKG_CONFIG"; then
10108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10109$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10110else
10111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10112$as_echo "no" >&6; }
10113fi
10114
10115 if test "x$ac_pt_PKG_CONFIG" = x; then
10116 PKG_CONFIG=""
10117 else
10118 case $cross_compiling:$ac_tool_warned in
10119yes:)
10120{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10121$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10122ac_tool_warned=yes ;;
10123esac
10124 PKG_CONFIG=$ac_pt_PKG_CONFIG
10125 fi
10126else
10127 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10128fi
10129
10130fi
10131if test -n "$PKG_CONFIG"; then
10132 _pkg_min_version=0.9.0
10133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10134$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10135 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10137$as_echo "yes" >&6; }
10138 else
10139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10140$as_echo "no" >&6; }
10141 PKG_CONFIG=""
10142 fi
10143fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010144
10145# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10147$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010148
10149# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010150if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010151 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010152else
10153 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010154fi
10155
10156
Matthias Kloseb9621712010-04-24 17:59:49 +000010157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10158$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010159
10160# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10162$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010163
10164# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010165if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010166 withval=$with_system_ffi;
10167fi
10168
10169
Zachary Waref40d4dd2016-09-17 01:25:24 -050010170if test "$ac_sys_system" = "Darwin"
10171then
10172 case "$with_system_ffi" in
10173 "")
10174 with_system_ffi="no"
10175 ;;
10176 yes|no)
10177 ;;
10178 *)
10179 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10180 ;;
10181 esac
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10183$as_echo "$with_system_ffi" >&6; }
10184else
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10186$as_echo "yes" >&6; }
10187 if test "$with_system_ffi" != ""
10188 then
10189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10190$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10191 fi
10192 with_system_ffi="yes"
10193fi
Zachary Ware935043d2016-09-09 17:01:21 -070010194
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010195if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010196 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10197else
10198 LIBFFI_INCLUDEDIR=""
10199fi
10200
10201
Stefan Krah60187b52012-03-23 19:06:27 +010010202# Check for use of the system libmpdec library
10203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10204$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10205
10206# Check whether --with-system_libmpdec was given.
10207if test "${with_system_libmpdec+set}" = set; then :
10208 withval=$with_system_libmpdec;
10209else
10210 with_system_libmpdec="no"
10211fi
10212
10213
10214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10215$as_echo "$with_system_libmpdec" >&6; }
10216
Benjamin Peterson076ed002010-10-31 17:11:02 +000010217# Check for support for loadable sqlite extensions
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10219$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10220# Check whether --enable-loadable-sqlite-extensions was given.
10221if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10222 enableval=$enable_loadable_sqlite_extensions;
10223else
10224 enable_loadable_sqlite_extensions="no"
10225fi
10226
10227
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10229$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10230
Ned Deilyd819b932013-09-06 01:07:05 -070010231# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10232
10233
10234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10235$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10236
10237# Check whether --with-tcltk-includes was given.
10238if test "${with_tcltk_includes+set}" = set; then :
10239 withval=$with_tcltk_includes;
10240else
10241 with_tcltk_includes="default"
10242fi
10243
10244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10245$as_echo "$with_tcltk_includes" >&6; }
10246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10247$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10248
10249# Check whether --with-tcltk-libs was given.
10250if test "${with_tcltk_libs+set}" = set; then :
10251 withval=$with_tcltk_libs;
10252else
10253 with_tcltk_libs="default"
10254fi
10255
10256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10257$as_echo "$with_tcltk_libs" >&6; }
10258if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10259then
10260 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10261 then
10262 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10263 fi
10264 TCLTK_INCLUDES=""
10265 TCLTK_LIBS=""
10266else
10267 TCLTK_INCLUDES="$with_tcltk_includes"
10268 TCLTK_LIBS="$with_tcltk_libs"
10269fi
10270
Matthias Klose55708cc2009-04-30 08:06:49 +000010271# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10273$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010274
10275# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010276if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010277 withval=$with_dbmliborder;
10278if test x$with_dbmliborder = xyes
10279then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010280as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010281else
10282 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10283 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10284 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010285 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010286 fi
10287 done
10288fi
10289fi
10290
Matthias Kloseb9621712010-04-24 17:59:49 +000010291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10292$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010293
Martin v. Löwis11437992002-04-12 09:54:03 +000010294# Templates for things AC_DEFINEd more than once.
10295# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010296
10297
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010298if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010299then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010300 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010301 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010302
10303 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010304elif test "$ac_cv_kpthread" = "yes"
10305then
10306 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010307 if test "$ac_cv_cxx_thread" = "yes"; then
10308 CXX="$CXX -Kpthread"
10309 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010310 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010311elif test "$ac_cv_kthread" = "yes"
10312then
10313 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010314 if test "$ac_cv_cxx_thread" = "yes"; then
10315 CXX="$CXX -Kthread"
10316 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010317 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010318elif test "$ac_cv_pthread" = "yes"
10319then
10320 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010321 if test "$ac_cv_cxx_thread" = "yes"; then
10322 CXX="$CXX -pthread"
10323 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010325else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010326 if test ! -z "$withval" -a -d "$withval"
10327 then LDFLAGS="$LDFLAGS -L$withval"
10328 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010329
10330 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010331 # define _POSIX_THREADS in unistd.h. Some apparently don't
10332 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10334$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010336/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010337
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010338#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010339#ifdef _POSIX_THREADS
10340yes
10341#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
10343_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010346 unistd_defines_pthreads=yes
10347else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010348 unistd_defines_pthreads=no
10349fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010350rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010351
Matthias Kloseb9621712010-04-24 17:59:49 +000010352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10353$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010356
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010357 # Just looking for pthread_create in libpthread is not enough:
10358 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10359 # So we really have to include pthread.h, and then link.
10360 _libs=$LIBS
10361 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10363$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010365/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010366
10367#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010368#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010369
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010370void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010371int
10372main ()
10373{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010374
10375pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010376 ;
10377 return 0;
10378}
10379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010381
Matthias Kloseb9621712010-04-24 17:59:49 +000010382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10383$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010384 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010385
Guido van Rossum02a1c402000-02-25 19:26:31 +000010386else
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010388 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010389 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010390if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010391
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010392 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010393
Guido van Rossumad678af1998-10-02 14:42:15 +000010394else
Guido van Rossumad678af1998-10-02 14:42:15 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10397$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010400else
Martin v. Löwis11437992002-04-12 09:54:03 +000010401 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010402LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010406/* Override any GCC internal prototype to avoid an error.
10407 Use char because int might match the return type of a GCC
10408 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409#ifdef __cplusplus
10410extern "C"
10411#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010412char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010413int
10414main ()
10415{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 ;
10418 return 0;
10419}
10420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010421if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010423else
Matthias Kloseb9621712010-04-24 17:59:49 +000010424 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010426rm -f core conftest.err conftest.$ac_objext \
10427 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010428LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010429fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10431$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010432if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010433
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010434 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010435 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010436
Greg Steinadf63d62000-07-05 10:38:09 +000010437else
Greg Steinadf63d62000-07-05 10:38:09 +000010438
Matthias Kloseb9621712010-04-24 17:59:49 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10440$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010441if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010443else
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010445LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010449/* Override any GCC internal prototype to avoid an error.
10450 Use char because int might match the return type of a GCC
10451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010452#ifdef __cplusplus
10453extern "C"
10454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010455char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010456int
10457main ()
10458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010465 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010469rm -f core conftest.err conftest.$ac_objext \
10470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10474$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010475if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010476
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010478 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010479
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010480else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010481
Matthias Kloseb9621712010-04-24 17:59:49 +000010482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10483$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010484if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010486else
Martin v. Löwis11437992002-04-12 09:54:03 +000010487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010488LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010492/* Override any GCC internal prototype to avoid an error.
10493 Use char because int might match the return type of a GCC
10494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010495#ifdef __cplusplus
10496extern "C"
10497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010498char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010499int
10500main ()
10501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010502return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ;
10504 return 0;
10505}
10506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010507if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010508 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010509else
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010512rm -f core conftest.err conftest.$ac_objext \
10513 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010514LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10517$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010518if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010521 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010522
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010523else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010524
Matthias Kloseb9621712010-04-24 17:59:49 +000010525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10526$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010527if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010529else
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010531LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535/* Override any GCC internal prototype to avoid an error.
10536 Use char because int might match the return type of a GCC
10537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538#ifdef __cplusplus
10539extern "C"
10540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010541char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010542int
10543main ()
10544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010545return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010546 ;
10547 return 0;
10548}
10549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010550if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010555rm -f core conftest.err conftest.$ac_objext \
10556 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010557LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10560$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010561if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010562
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010563 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010564 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010565
Guido van Rossumb93a8621998-05-07 13:27:32 +000010566else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010567
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010568 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10569
Guido van Rossum2d38f911996-06-26 19:47:01 +000010570fi
10571
Guido van Rossum627b2d71993-12-24 10:39:16 +000010572
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010573fi
10574
Guido van Rossum0be3e491997-05-22 20:33:33 +000010575fi
10576
Guido van Rossum49545951997-12-02 19:28:29 +000010577fi
10578
Guido van Rossumb93a8621998-05-07 13:27:32 +000010579fi
10580
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010584
Matthias Kloseb9621712010-04-24 17:59:49 +000010585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10586$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010587if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010589else
Martin v. Löwis11437992002-04-12 09:54:03 +000010590 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010591LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010595/* Override any GCC internal prototype to avoid an error.
10596 Use char because int might match the return type of a GCC
10597 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010598#ifdef __cplusplus
10599extern "C"
10600#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010601char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010602int
10603main ()
10604{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010605return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ;
10607 return 0;
10608}
10609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010610if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010612else
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010614fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010615rm -f core conftest.err conftest.$ac_objext \
10616 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010617LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10620$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010621if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010622
Martin v. Löwis130fb172001-07-19 11:00:41 +000010623 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010624
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625fi
10626
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010627
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010628fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010629
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010630if test "$posix_threads" = "yes"; then
10631 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010632
Matthias Kloseb9621712010-04-24 17:59:49 +000010633$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010634
10635 fi
10636
10637 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10638 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010639 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010640$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010641
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010642 ;;
10643 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010644$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645
10646 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010647 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010648$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010649
10650 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651 esac
10652
Matthias Kloseb9621712010-04-24 17:59:49 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10654$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010655 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010657else
Matthias Kloseb9621712010-04-24 17:59:49 +000010658 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010659 ac_cv_pthread_system_supported=no
10660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010663
10664 #include <stdio.h>
10665 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666 void *foo(void *parm) {
10667 return NULL;
10668 }
10669 main() {
10670 pthread_attr_t attr;
10671 pthread_t id;
10672 if (pthread_attr_init(&attr)) exit(-1);
10673 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10674 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10675 exit(0);
10676 }
10677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010678if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679 ac_cv_pthread_system_supported=yes
10680else
Matthias Kloseb9621712010-04-24 17:59:49 +000010681 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010683rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10684 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010687
Guido van Rossum627b2d71993-12-24 10:39:16 +000010688fi
10689
Matthias Kloseb9621712010-04-24 17:59:49 +000010690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10691$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010692 if test "$ac_cv_pthread_system_supported" = "yes"; then
10693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695
10696 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 for ac_func in pthread_sigmask
10698do :
10699 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010700if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010701 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010702#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010703_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010704 case $ac_sys_system in
10705 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010708
10709 ;;
10710 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010711fi
10712done
10713
pdoxe14679c2017-10-05 00:01:56 -070010714 for ac_func in pthread_getcpuclockid
10715do :
10716 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10717if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10718 cat >>confdefs.h <<_ACEOF
10719#define HAVE_PTHREAD_GETCPUCLOCKID 1
10720_ACEOF
10721
10722fi
10723done
10724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010725fi
10726
10727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10731$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010733if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010735 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10737$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 ipv6=no
10739 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10741$as_echo "yes" >&6; }
10742 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743
10744 ipv6=yes
10745 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010746 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747else
Martin v. Löwis11437992002-04-12 09:54:03 +000010748
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010751 /* AF_INET6 available check */
10752#include <sys/types.h>
10753#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010754int
10755main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010756{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010757int domain = AF_INET6;
10758 ;
10759 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010760}
Martin v. Löwis11437992002-04-12 09:54:03 +000010761_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010762if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010763
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10765$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010766 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010767
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768else
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10771$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010772 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010773
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010777if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10779$as_echo_n "checking if RFC2553 API is available... " >&6; }
10780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010782
10783 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010784#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010785int
10786main ()
10787{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010788struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010789 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ;
10791 return 0;
10792}
Matthias Kloseb159a552010-04-25 21:00:44 +000010793
Martin v. Löwis11437992002-04-12 09:54:03 +000010794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010795if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010796
10797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010798$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010799 ipv6=yes
10800
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010801else
Matthias Kloseb159a552010-04-25 21:00:44 +000010802
10803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010804$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010805 ipv6=no
10806
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010809fi
10810
10811if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010813
10814fi
10815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816fi
10817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010818
10819ipv6type=unknown
10820ipv6lib=none
10821ipv6trylibc=no
10822
10823if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10825$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010826 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10827 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828 case $i in
10829 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010831/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010832
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833#include <netinet/in.h>
10834#ifdef IPV6_INRIA_VERSION
10835yes
10836#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010837_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010839 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010840 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010842rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843
10844 ;;
10845 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010847/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010848
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849#include <netinet/in.h>
10850#ifdef __KAME__
10851yes
10852#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010853_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010856 ipv6type=$i;
10857 ipv6lib=inet6
10858 ipv6libdir=/usr/local/v6/lib
10859 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010861rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862
10863 ;;
10864 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010866/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010868#include <features.h>
10869#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10870yes
10871#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010872_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010875 ipv6type=$i;
10876 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010877fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010878rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879
10880 ;;
10881 linux-inet6)
10882 if test -d /usr/inet6; then
10883 ipv6type=$i
10884 ipv6lib=inet6
10885 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010886 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010887 fi
10888 ;;
10889 solaris)
10890 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010891 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010892 ipv6type=$i
10893 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894 fi
10895 fi
10896 ;;
10897 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010900
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010901#include <sys/param.h>
10902#ifdef _TOSHIBA_INET6
10903yes
10904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010905_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010908 ipv6type=$i;
10909 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010910 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010912rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913
10914 ;;
10915 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919#include </usr/local/v6/include/sys/v6config.h>
10920#ifdef __V6D__
10921yes
10922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010923_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6type=$i;
10927 ipv6lib=v6;
10928 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010929 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010931rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932
10933 ;;
10934 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010936/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010937
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938#include <sys/param.h>
10939#ifdef _ZETA_MINAMI_INET6
10940yes
10941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010942_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945 ipv6type=$i;
10946 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010947 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010949rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950
10951 ;;
10952 esac
10953 if test "$ipv6type" != "unknown"; then
10954 break
10955 fi
10956 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10958$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959fi
10960
10961if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10962 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10963 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10964 echo "using lib$ipv6lib"
10965 else
10966 if test $ipv6trylibc = "yes"; then
10967 echo "using libc"
10968 else
10969 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10970 echo "You need to fetch lib$ipv6lib.a from appropriate"
10971 echo 'ipv6 kit and compile beforehand.'
10972 exit 1
10973 fi
10974 fi
10975fi
10976
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10978$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10980/* end confdefs.h. */
10981 /* CAN_RAW_FD_FRAMES available check */
10982#include <linux/can/raw.h>
10983int
10984main ()
10985{
10986int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10987 ;
10988 return 0;
10989}
10990_ACEOF
10991if ac_fn_c_try_compile "$LINENO"; then :
10992
10993
10994$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10997$as_echo "yes" >&6; }
10998
10999else
11000
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11002$as_echo "no" >&6; }
11003
11004fi
11005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11006
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011007# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11009$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 withval=$with_doc_strings;
11014fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011015
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011016
11017if test -z "$with_doc_strings"
11018then with_doc_strings="yes"
11019fi
11020if test "$with_doc_strings" != "no"
11021then
11022
Matthias Kloseb9621712010-04-24 17:59:49 +000011023$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011024
11025fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11027$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011028
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011029# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11031$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011034if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011035 withval=$with_pymalloc;
11036fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011037
Neil Schemenauera35c6882001-02-27 04:45:05 +000011038
Neil Schemenauer16c22972002-03-22 15:34:49 +000011039if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011040then
11041 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011042fi
11043if test "$with_pymalloc" != "no"
11044then
Martin v. Löwis11437992002-04-12 09:54:03 +000011045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011047
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011048 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11051$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011052
Nick Coghlan6ea41862017-06-11 13:16:15 +100011053# Check for --with-c-locale-coercion
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11055$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11056
11057# Check whether --with-c-locale-coercion was given.
11058if test "${with_c_locale_coercion+set}" = set; then :
11059 withval=$with_c_locale_coercion;
11060fi
11061
11062
11063if test -z "$with_c_locale_coercion"
11064then
11065 with_c_locale_coercion="yes"
11066fi
11067if test "$with_c_locale_coercion" != "no"
11068then
11069
11070$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11071
11072fi
11073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11074$as_echo "$with_c_locale_coercion" >&6; }
11075
Benjamin Peterson05159c42009-12-03 03:01:27 +000011076# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11078$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079
11080# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011081if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011082 withval=$with_valgrind;
11083else
11084 with_valgrind=no
11085fi
11086
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11088$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011089if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011090 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 +020011091if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011094
11095else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011096 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011097
11098fi
11099
11100
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011101 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011102fi
11103
Łukasz Langaa785c872016-09-09 17:37:37 -070011104# Check for DTrace support
11105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11106$as_echo_n "checking for --with-dtrace... " >&6; }
11107
11108# Check whether --with-dtrace was given.
11109if test "${with_dtrace+set}" = set; then :
11110 withval=$with_dtrace;
11111else
11112 with_dtrace=no
11113fi
11114
11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11116$as_echo "$with_dtrace" >&6; }
11117
11118
11119
11120
11121
11122DTRACE=
11123DFLAGS=
11124DTRACE_HEADERS=
11125DTRACE_OBJS=
11126
11127if test "$with_dtrace" = "yes"
11128then
11129 # Extract the first word of "dtrace", so it can be a program name with args.
11130set dummy dtrace; ac_word=$2
11131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11132$as_echo_n "checking for $ac_word... " >&6; }
11133if ${ac_cv_path_DTRACE+:} false; then :
11134 $as_echo_n "(cached) " >&6
11135else
11136 case $DTRACE in
11137 [\\/]* | ?:[\\/]*)
11138 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11139 ;;
11140 *)
11141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11142for as_dir in $PATH
11143do
11144 IFS=$as_save_IFS
11145 test -z "$as_dir" && as_dir=.
11146 for ac_exec_ext in '' $ac_executable_extensions; do
11147 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11148 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11150 break 2
11151 fi
11152done
11153 done
11154IFS=$as_save_IFS
11155
11156 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11157 ;;
11158esac
11159fi
11160DTRACE=$ac_cv_path_DTRACE
11161if test -n "$DTRACE"; then
11162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11163$as_echo "$DTRACE" >&6; }
11164else
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11166$as_echo "no" >&6; }
11167fi
11168
11169
11170 if test "$DTRACE" = "not found"; then
11171 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11172 fi
11173
11174$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11175
11176 DTRACE_HEADERS="Include/pydtrace_probes.h"
11177
11178 # On OS X, DTrace providers do not need to be explicitly compiled and
11179 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11180 # generation flag '-G'. We check for presence of this flag, rather than
11181 # hardcoding support by OS, in the interest of robustness.
11182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11183$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11184if ${ac_cv_dtrace_link+:} false; then :
11185 $as_echo_n "(cached) " >&6
11186else
11187 ac_cv_dtrace_link=no
11188 echo 'BEGIN' > conftest.d
11189 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11190 ac_cv_dtrace_link=yes
11191
11192fi
11193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11194$as_echo "$ac_cv_dtrace_link" >&6; }
11195 if test "$ac_cv_dtrace_link" = "yes"; then
11196 DTRACE_OBJS="Python/pydtrace.o"
11197 fi
11198fi
11199
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011200# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011201
Guido van Rossum98935bf2001-09-05 19:13:16 +000011202DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011203
Guido van Rossume97ee181999-12-20 21:27:22 +000011204# the dlopen() function means we might want to use dynload_shlib.o. some
11205# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011206for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011207do :
11208 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011209if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011211#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011212_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011213
Guido van Rossume97ee181999-12-20 21:27:22 +000011214fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011215done
Guido van Rossume97ee181999-12-20 21:27:22 +000011216
Michael W. Hudson54241132001-12-07 15:38:26 +000011217
Guido van Rossume97ee181999-12-20 21:27:22 +000011218# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11219# loading of modules.
11220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11222$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011223if test -z "$DYNLOADFILE"
11224then
11225 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011226 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11227 if test "$ac_cv_func_dlopen" = yes
11228 then DYNLOADFILE="dynload_shlib.o"
11229 else DYNLOADFILE="dynload_aix.o"
11230 fi
11231 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011232 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011233 *)
11234 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11235 # out any dynamic loading
11236 if test "$ac_cv_func_dlopen" = yes
11237 then DYNLOADFILE="dynload_shlib.o"
11238 else DYNLOADFILE="dynload_stub.o"
11239 fi
11240 ;;
11241 esac
11242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11244$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011245if test "$DYNLOADFILE" != "dynload_stub.o"
11246then
Martin v. Löwis11437992002-04-12 09:54:03 +000011247
Matthias Kloseb9621712010-04-24 17:59:49 +000011248$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011249
11250fi
11251
Neil Schemenauer4e425612001-06-19 15:44:15 +000011252# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11253
Michael W. Hudson54241132001-12-07 15:38:26 +000011254
Matthias Kloseb9621712010-04-24 17:59:49 +000011255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11256$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011257if test -z "$MACHDEP_OBJS"
11258then
Jack Jansene578a632001-08-15 01:27:14 +000011259 MACHDEP_OBJS=$extra_machdep_objs
11260else
11261 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011262fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011263if test -z "$MACHDEP_OBJS"; then
11264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11265$as_echo "none" >&6; }
11266else
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11268$as_echo "$MACHDEP_OBJS" >&6; }
11269fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011270
Guido van Rossum627b2d71993-12-24 10:39:16 +000011271# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011272for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011273 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011274 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011275 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011276 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011277 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011278 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011279 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011280 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011281 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011282 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011283 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011284 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011285 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011286 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011287 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011288 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11289 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011290 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011291 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011292 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011293 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011294 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011295do :
11296 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11297ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011298if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011302
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011303fi
11304done
11305
Michael W. Hudson54241132001-12-07 15:38:26 +000011306
Benjamin Peterson40caa052018-09-12 15:52:40 -070011307# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11308# links. Some libc implementations have a stub lchmod implementation that always
11309# returns an error.
11310if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011311 for ac_func in lchmod
11312do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011313 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11314if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011315 cat >>confdefs.h <<_ACEOF
11316#define HAVE_LCHMOD 1
11317_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011318
11319fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011320done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011321
11322fi
11323
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011324ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11325 #include <dirent.h>
11326"
11327if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11328
11329$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11330
11331fi
11332
11333
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011334# For some functions, having a definition is not sufficient, since
11335# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11337$as_echo_n "checking for chroot... " >&6; }
11338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011340#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011341int
11342main ()
11343{
11344void *x=chroot
11345 ;
11346 return 0;
11347}
11348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011349if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011350
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352
Matthias Kloseb159a552010-04-25 21:00:44 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355else
Matthias Kloseb9621712010-04-24 17:59:49 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358
11359fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11362$as_echo_n "checking for link... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011364/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011365#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011366int
11367main ()
11368{
11369void *x=link
11370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011374if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011375
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011377
Matthias Kloseb159a552010-04-25 21:00:44 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380else
Matthias Kloseb9621712010-04-24 17:59:49 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011383
11384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11387$as_echo_n "checking for symlink... " >&6; }
11388cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011389/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011390#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011391int
11392main ()
11393{
11394void *x=symlink
11395 ;
11396 return 0;
11397}
11398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011400
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011402
Matthias Kloseb159a552010-04-25 21:00:44 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011405else
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11407$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011408
11409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11412$as_echo_n "checking for fchdir... " >&6; }
11413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011414/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011415#include <unistd.h>
11416int
11417main ()
11418{
11419void *x=fchdir
11420 ;
11421 return 0;
11422}
11423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011425
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427
Matthias Kloseb159a552010-04-25 21:00:44 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430else
Matthias Kloseb9621712010-04-24 17:59:49 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11432$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433
11434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11437$as_echo_n "checking for fsync... " >&6; }
11438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011439/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011440#include <unistd.h>
11441int
11442main ()
11443{
11444void *x=fsync
11445 ;
11446 return 0;
11447}
11448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011450
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011452
Matthias Kloseb159a552010-04-25 21:00:44 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011458
11459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11462$as_echo_n "checking for fdatasync... " >&6; }
11463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011464/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011465#include <unistd.h>
11466int
11467main ()
11468{
11469void *x=fdatasync
11470 ;
11471 return 0;
11472}
11473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011475
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011477
Matthias Kloseb159a552010-04-25 21:00:44 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011480else
Matthias Kloseb9621712010-04-24 17:59:49 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11482$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011483
11484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11487$as_echo_n "checking for epoll... " >&6; }
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011489/* end confdefs.h. */
11490#include <sys/epoll.h>
11491int
11492main ()
11493{
11494void *x=epoll_create
11495 ;
11496 return 0;
11497}
11498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011499if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011502
Matthias Kloseb159a552010-04-25 21:00:44 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508
11509fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11512$as_echo_n "checking for epoll_create1... " >&6; }
11513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514/* end confdefs.h. */
11515#include <sys/epoll.h>
11516int
11517main ()
11518{
11519void *x=epoll_create1
11520 ;
11521 return 0;
11522}
11523_ACEOF
11524if ac_fn_c_try_compile "$LINENO"; then :
11525
11526$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11527
11528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11529$as_echo "yes" >&6; }
11530else
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11532$as_echo "no" >&6; }
11533
11534fi
11535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11537$as_echo_n "checking for kqueue... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011539/* end confdefs.h. */
11540
11541#include <sys/types.h>
11542#include <sys/event.h>
11543
11544int
11545main ()
11546{
11547int x=kqueue()
11548 ;
11549 return 0;
11550}
11551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011552if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011553
Matthias Kloseb9621712010-04-24 17:59:49 +000011554$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011555
Matthias Kloseb159a552010-04-25 21:00:44 +000011556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011558else
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11560$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011561
11562fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11565$as_echo_n "checking for prlimit... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h. */
11568
11569#include <sys/time.h>
11570#include <sys/resource.h>
11571
11572int
11573main ()
11574{
11575void *x=prlimit
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580if ac_fn_c_try_compile "$LINENO"; then :
11581
11582$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11583
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11585$as_echo "yes" >&6; }
11586else
11587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11588$as_echo "no" >&6; }
11589
11590fi
11591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11592
Martin v. Löwisd5843682002-11-21 20:41:28 +000011593# On some systems (eg. FreeBSD 5), we would find a definition of the
11594# functions ctermid_r, setgroups in the library, but no prototype
11595# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11596# address to avoid compiler warnings and potential miscompilations
11597# because of the missing prototypes.
11598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11600$as_echo_n "checking for ctermid_r... " >&6; }
11601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011603
Martin v. Löwisd5843682002-11-21 20:41:28 +000011604#include <stdio.h>
11605
Martin v. Löwisd5843682002-11-21 20:41:28 +000011606int
11607main ()
11608{
11609void* p = ctermid_r
11610 ;
11611 return 0;
11612}
11613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011614if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011617
Matthias Kloseb159a552010-04-25 21:00:44 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011620else
Matthias Kloseb9621712010-04-24 17:59:49 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011623
11624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11626
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11628$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011629if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011630 $as_echo_n "(cached) " >&6
11631else
11632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011634#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011635int
11636main ()
11637{
11638void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011639
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011640 ;
11641 return 0;
11642}
11643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011644if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011645 ac_cv_flock_decl=yes
11646else
11647 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011648
11649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011651
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011652fi
11653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11654$as_echo "$ac_cv_flock_decl" >&6; }
11655if test "x${ac_cv_flock_decl}" = xyes; then
11656 for ac_func in flock
11657do :
11658 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011659if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011660 cat >>confdefs.h <<_ACEOF
11661#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011662_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011663
Antoine Pitroua3000072010-09-07 14:52:42 +000011664else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011666$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011667if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011668 $as_echo_n "(cached) " >&6
11669else
11670 ac_check_lib_save_LIBS=$LIBS
11671LIBS="-lbsd $LIBS"
11672cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673/* end confdefs.h. */
11674
11675/* Override any GCC internal prototype to avoid an error.
11676 Use char because int might match the return type of a GCC
11677 builtin and then its argument prototype would still apply. */
11678#ifdef __cplusplus
11679extern "C"
11680#endif
11681char flock ();
11682int
11683main ()
11684{
11685return flock ();
11686 ;
11687 return 0;
11688}
11689_ACEOF
11690if ac_fn_c_try_link "$LINENO"; then :
11691 ac_cv_lib_bsd_flock=yes
11692else
11693 ac_cv_lib_bsd_flock=no
11694fi
11695rm -f core conftest.err conftest.$ac_objext \
11696 conftest$ac_exeext conftest.$ac_ext
11697LIBS=$ac_check_lib_save_LIBS
11698fi
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11700$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011701if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011702 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011703
11704
11705$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11706
11707
11708fi
11709
11710
11711fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011712done
11713
Antoine Pitroua3000072010-09-07 14:52:42 +000011714fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715
Matthias Kloseb9621712010-04-24 17:59:49 +000011716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11717$as_echo_n "checking for getpagesize... " >&6; }
11718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011719/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011720
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011721#include <unistd.h>
11722
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011723int
11724main ()
11725{
11726void* p = getpagesize
11727 ;
11728 return 0;
11729}
11730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011731if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011732
Matthias Kloseb9621712010-04-24 17:59:49 +000011733$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011734
Matthias Kloseb159a552010-04-25 21:00:44 +000011735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011737else
Matthias Kloseb9621712010-04-24 17:59:49 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11739$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011740
11741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011743
Victor Stinner984890f2011-11-24 13:53:38 +010011744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11745$as_echo_n "checking for broken unsetenv... " >&6; }
11746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11747/* end confdefs.h. */
11748
11749#include <stdlib.h>
11750
11751int
11752main ()
11753{
11754int res = unsetenv("DUMMY")
11755 ;
11756 return 0;
11757}
11758_ACEOF
11759if ac_fn_c_try_compile "$LINENO"; then :
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
11762else
11763
11764$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11765
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11767$as_echo "yes" >&6; }
11768
11769fi
11770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11771
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011772for ac_prog in true
11773do
11774 # Extract the first word of "$ac_prog", so it can be a program name with args.
11775set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11777$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011778if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011779 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011780else
11781 if test -n "$TRUE"; then
11782 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11783else
11784as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11785for as_dir in $PATH
11786do
11787 IFS=$as_save_IFS
11788 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011791 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 $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 +000011793 break 2
11794 fi
11795done
Matthias Kloseb9621712010-04-24 17:59:49 +000011796 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011797IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011798
11799fi
11800fi
11801TRUE=$ac_cv_prog_TRUE
11802if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11804$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011808fi
11809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011811 test -n "$TRUE" && break
11812done
11813test -n "$TRUE" || TRUE="/bin/true"
11814
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11817$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011820else
11821 ac_check_lib_save_LIBS=$LIBS
11822LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011824/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826/* Override any GCC internal prototype to avoid an error.
11827 Use char because int might match the return type of a GCC
11828 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011829#ifdef __cplusplus
11830extern "C"
11831#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011833int
11834main ()
11835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011837 ;
11838 return 0;
11839}
11840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011842 ac_cv_lib_c_inet_aton=yes
11843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846rm -f core conftest.err conftest.$ac_objext \
11847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848LIBS=$ac_check_lib_save_LIBS
11849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11851$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011853 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11856$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011859else
11860 ac_check_lib_save_LIBS=$LIBS
11861LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865/* Override any GCC internal prototype to avoid an error.
11866 Use char because int might match the return type of a GCC
11867 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011868#ifdef __cplusplus
11869extern "C"
11870#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011871char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011872int
11873main ()
11874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011881 ac_cv_lib_resolv_inet_aton=yes
11882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core conftest.err conftest.$ac_objext \
11886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011887LIBS=$ac_check_lib_save_LIBS
11888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11890$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011892 cat >>confdefs.h <<_ACEOF
11893#define HAVE_LIBRESOLV 1
11894_ACEOF
11895
11896 LIBS="-lresolv $LIBS"
11897
11898fi
11899
11900
11901fi
11902
11903
Christian Heimesd0764e22007-12-04 15:00:33 +000011904# On Tru64, chflags seems to be present, but calling it will
11905# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11907$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011912 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011915/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011916
Christian Heimesd0764e22007-12-04 15:00:33 +000011917#include <sys/stat.h>
11918#include <unistd.h>
11919int main(int argc, char*argv[])
11920{
11921 if(chflags(argv[0], 0) != 0)
11922 return 1;
11923 return 0;
11924}
Ned Deily3eb67d52011-06-28 00:00:28 -070011925
Christian Heimesd0764e22007-12-04 15:00:33 +000011926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011927if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011928 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011929else
Matthias Kloseb9621712010-04-24 17:59:49 +000011930 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011931fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011932rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11933 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011934fi
11935
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011936
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11939$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011940if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011942if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011943 ac_cv_have_chflags="yes"
11944else
11945 ac_cv_have_chflags="no"
11946fi
11947
11948fi
11949if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011952
11953fi
11954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11956$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011957if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011961 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011964/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011965
Christian Heimesd0764e22007-12-04 15:00:33 +000011966#include <sys/stat.h>
11967#include <unistd.h>
11968int main(int argc, char*argv[])
11969{
11970 if(lchflags(argv[0], 0) != 0)
11971 return 1;
11972 return 0;
11973}
Ned Deily3eb67d52011-06-28 00:00:28 -070011974
Christian Heimesd0764e22007-12-04 15:00:33 +000011975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011976if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011977 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011978else
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011983fi
11984
11985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11988$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011989if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011991if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011992 ac_cv_have_lchflags="yes"
11993else
11994 ac_cv_have_lchflags="no"
11995fi
11996
11997fi
11998if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012001
12002fi
12003
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012004case $ac_sys_system/$ac_sys_release in
12005Darwin/*)
12006 _CUR_CFLAGS="${CFLAGS}"
12007 _CUR_LDFLAGS="${LDFLAGS}"
12008 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12009 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12010 ;;
12011esac
12012
Matthias Kloseb9621712010-04-24 17:59:49 +000012013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12014$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012015if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012016 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012017else
12018 ac_check_lib_save_LIBS=$LIBS
12019LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012021/* end confdefs.h. */
12022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012023/* Override any GCC internal prototype to avoid an error.
12024 Use char because int might match the return type of a GCC
12025 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012026#ifdef __cplusplus
12027extern "C"
12028#endif
12029char inflateCopy ();
12030int
12031main ()
12032{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012034 ;
12035 return 0;
12036}
12037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012038if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012039 ac_cv_lib_z_inflateCopy=yes
12040else
Matthias Kloseb9621712010-04-24 17:59:49 +000012041 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043rm -f core conftest.err conftest.$ac_objext \
12044 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012045LIBS=$ac_check_lib_save_LIBS
12046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12048$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012049if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012052
12053fi
12054
12055
12056case $ac_sys_system/$ac_sys_release in
12057Darwin/*)
12058 CFLAGS="${_CUR_CFLAGS}"
12059 LDFLAGS="${_CUR_LDFLAGS}"
12060 ;;
12061esac
12062
Matthias Kloseb9621712010-04-24 17:59:49 +000012063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12064$as_echo_n "checking for hstrerror... " >&6; }
12065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012066/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012067
Martin v. Löwise9416172003-05-03 10:12:45 +000012068#include <netdb.h>
12069
Martin v. Löwise9416172003-05-03 10:12:45 +000012070int
12071main ()
12072{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012074 ;
12075 return 0;
12076}
12077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012078if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012081
Matthias Kloseb159a552010-04-25 21:00:44 +000012082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012087
12088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012091
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12093$as_echo_n "checking for inet_aton... " >&6; }
12094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012095/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012096
Martin v. Löwis86d66262006-02-17 08:40:11 +000012097#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012098#include <sys/socket.h>
12099#include <netinet/in.h>
12100#include <arpa/inet.h>
12101
Martin v. Löwise9416172003-05-03 10:12:45 +000012102int
12103main ()
12104{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012105void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012106 ;
12107 return 0;
12108}
12109_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012110if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012113
Matthias Kloseb159a552010-04-25 21:00:44 +000012114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012115$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12118$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012119
12120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core conftest.err conftest.$ac_objext \
12122 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12125$as_echo_n "checking for inet_pton... " >&6; }
12126cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012127/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012128
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012129#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012130#include <sys/socket.h>
12131#include <netinet/in.h>
12132#include <arpa/inet.h>
12133
Martin v. Löwise9416172003-05-03 10:12:45 +000012134int
12135main ()
12136{
12137void* p = inet_pton
12138 ;
12139 return 0;
12140}
12141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012142if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012145
Matthias Kloseb159a552010-04-25 21:00:44 +000012146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012147$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12150$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012151
12152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012154
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012155# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12157$as_echo_n "checking for setgroups... " >&6; }
12158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012159/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012160
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012161#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012162#ifdef HAVE_GRP_H
12163#include <grp.h>
12164#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012165
Martin v. Löwisd5843682002-11-21 20:41:28 +000012166int
12167main ()
12168{
12169void* p = setgroups
12170 ;
12171 return 0;
12172}
12173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012175
Matthias Kloseb9621712010-04-24 17:59:49 +000012176$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012177
Matthias Kloseb159a552010-04-25 21:00:44 +000012178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012179$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012180else
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12182$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012183
12184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012186
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012187# check for openpty and forkpty
12188
12189for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012190do :
12191 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012192if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012194#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012195_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012196
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012197else
Matthias Kloseb9621712010-04-24 17:59:49 +000012198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12199$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012202else
Martin v. Löwis11437992002-04-12 09:54:03 +000012203 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012204LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208/* Override any GCC internal prototype to avoid an error.
12209 Use char because int might match the return type of a GCC
12210 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012211#ifdef __cplusplus
12212extern "C"
12213#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012214char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012215int
12216main ()
12217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228rm -f core conftest.err conftest.$ac_objext \
12229 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012230LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12233$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012235 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012236 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012237else
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12239$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012240if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012242else
12243 ac_check_lib_save_LIBS=$LIBS
12244LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012246/* end confdefs.h. */
12247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012248/* Override any GCC internal prototype to avoid an error.
12249 Use char because int might match the return type of a GCC
12250 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012251#ifdef __cplusplus
12252extern "C"
12253#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254char openpty ();
12255int
12256main ()
12257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012264 ac_cv_lib_bsd_openpty=yes
12265else
Matthias Kloseb9621712010-04-24 17:59:49 +000012266 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012268rm -f core conftest.err conftest.$ac_objext \
12269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012270LIBS=$ac_check_lib_save_LIBS
12271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12273$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012274if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012276 LIBS="$LIBS -lbsd"
12277fi
12278
12279
12280fi
12281
Fred Drake8cef4cf2000-06-28 16:40:38 +000012282
12283fi
12284done
12285
12286for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012287do :
12288 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012289if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012292_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012293
Fred Drake8cef4cf2000-06-28 16:40:38 +000012294else
Matthias Kloseb9621712010-04-24 17:59:49 +000012295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12296$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012297if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012299else
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012301LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012305/* Override any GCC internal prototype to avoid an error.
12306 Use char because int might match the return type of a GCC
12307 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012308#ifdef __cplusplus
12309extern "C"
12310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012311char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012312int
12313main ()
12314{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012315return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012316 ;
12317 return 0;
12318}
12319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012320if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012324fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012325rm -f core conftest.err conftest.$ac_objext \
12326 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012327LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12330$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012331if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012333 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012334else
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12336$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012337if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012339else
12340 ac_check_lib_save_LIBS=$LIBS
12341LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012343/* end confdefs.h. */
12344
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345/* Override any GCC internal prototype to avoid an error.
12346 Use char because int might match the return type of a GCC
12347 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012348#ifdef __cplusplus
12349extern "C"
12350#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012351char forkpty ();
12352int
12353main ()
12354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012355return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012356 ;
12357 return 0;
12358}
12359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012361 ac_cv_lib_bsd_forkpty=yes
12362else
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012365rm -f core conftest.err conftest.$ac_objext \
12366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012367LIBS=$ac_check_lib_save_LIBS
12368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12370$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012371if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012372 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012373 LIBS="$LIBS -lbsd"
12374fi
12375
12376
12377fi
12378
Fred Drake8cef4cf2000-06-28 16:40:38 +000012379
12380fi
12381done
12382
Jack Jansendd19cf82001-12-06 22:36:17 +000012383
Michael W. Hudson54241132001-12-07 15:38:26 +000012384# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012385for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012386do :
12387 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12388ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012389if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012390 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012393
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012395done
12396
Michael W. Hudson54241132001-12-07 15:38:26 +000012397
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012398ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012399if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012400 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012401
Martin v. Löwis1142de32002-03-29 16:28:31 +000012402else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012404 *" dup2.$ac_objext "* ) ;;
12405 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012407esac
12408
Martin v. Löwis1142de32002-03-29 16:28:31 +000012409fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012410
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012411ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012412if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012413 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12414
12415else
12416 case " $LIBOBJS " in
12417 *" strdup.$ac_objext "* ) ;;
12418 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12419 ;;
12420esac
12421
12422fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012423
12424
12425for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012426do :
12427 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012428if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012429 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012433/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012435int
12436main ()
12437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
Matthias Kloseb9621712010-04-24 17:59:49 +000012445$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012446
Guido van Rossum627b2d71993-12-24 10:39:16 +000012447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012449
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012451done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012452
Jack Jansen150753c2003-03-29 22:07:47 +000012453for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012454do :
12455 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012456if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012457 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012461/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012462#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012463int
12464main ()
12465{
12466setpgrp(0,0);
12467 ;
12468 return 0;
12469}
12470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
Matthias Kloseb9621712010-04-24 17:59:49 +000012473$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012474
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012477
12478fi
12479done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012480
Thomas Wouters3a584202000-08-05 23:28:51 +000012481for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012482do :
12483 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012484if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012486#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012490#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012491int
12492main ()
12493{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 ;
12496 return 0;
12497}
12498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012499if ac_fn_c_try_compile "$LINENO"; then :
12500
Guido van Rossum627b2d71993-12-24 10:39:16 +000012501else
Skip Montanaro6dead952003-09-25 14:50:04 +000012502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Guido van Rossum627b2d71993-12-24 10:39:16 +000012506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012508
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012510done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012511
Michael W. Hudson54241132001-12-07 15:38:26 +000012512
Victor Stinnere0be4232011-10-25 13:06:09 +020012513for ac_func in clock_gettime
12514do :
12515 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12516if test "x$ac_cv_func_clock_gettime" = xyes; then :
12517 cat >>confdefs.h <<_ACEOF
12518#define HAVE_CLOCK_GETTIME 1
12519_ACEOF
12520
12521else
12522
12523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12524$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12525if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12526 $as_echo_n "(cached) " >&6
12527else
12528 ac_check_lib_save_LIBS=$LIBS
12529LIBS="-lrt $LIBS"
12530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531/* end confdefs.h. */
12532
12533/* Override any GCC internal prototype to avoid an error.
12534 Use char because int might match the return type of a GCC
12535 builtin and then its argument prototype would still apply. */
12536#ifdef __cplusplus
12537extern "C"
12538#endif
12539char clock_gettime ();
12540int
12541main ()
12542{
12543return clock_gettime ();
12544 ;
12545 return 0;
12546}
12547_ACEOF
12548if ac_fn_c_try_link "$LINENO"; then :
12549 ac_cv_lib_rt_clock_gettime=yes
12550else
12551 ac_cv_lib_rt_clock_gettime=no
12552fi
12553rm -f core conftest.err conftest.$ac_objext \
12554 conftest$ac_exeext conftest.$ac_ext
12555LIBS=$ac_check_lib_save_LIBS
12556fi
12557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12558$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12559if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12560
Victor Stinner7efb8332014-08-29 15:41:08 +020012561 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012562 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12563
12564
12565$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12566
12567
12568fi
12569
12570
12571fi
12572done
12573
12574
12575for ac_func in clock_getres
12576do :
12577 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12578if test "x$ac_cv_func_clock_getres" = xyes; then :
12579 cat >>confdefs.h <<_ACEOF
12580#define HAVE_CLOCK_GETRES 1
12581_ACEOF
12582
12583else
12584
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12586$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12587if ${ac_cv_lib_rt_clock_getres+:} false; then :
12588 $as_echo_n "(cached) " >&6
12589else
12590 ac_check_lib_save_LIBS=$LIBS
12591LIBS="-lrt $LIBS"
12592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12593/* end confdefs.h. */
12594
12595/* Override any GCC internal prototype to avoid an error.
12596 Use char because int might match the return type of a GCC
12597 builtin and then its argument prototype would still apply. */
12598#ifdef __cplusplus
12599extern "C"
12600#endif
12601char clock_getres ();
12602int
12603main ()
12604{
12605return clock_getres ();
12606 ;
12607 return 0;
12608}
12609_ACEOF
12610if ac_fn_c_try_link "$LINENO"; then :
12611 ac_cv_lib_rt_clock_getres=yes
12612else
12613 ac_cv_lib_rt_clock_getres=no
12614fi
12615rm -f core conftest.err conftest.$ac_objext \
12616 conftest$ac_exeext conftest.$ac_ext
12617LIBS=$ac_check_lib_save_LIBS
12618fi
12619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12620$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12621if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12622
12623 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12624
12625
12626fi
12627
12628
12629fi
12630done
12631
12632
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012633for ac_func in clock_settime
12634do :
12635 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12636if test "x$ac_cv_func_clock_settime" = xyes; then :
12637 cat >>confdefs.h <<_ACEOF
12638#define HAVE_CLOCK_SETTIME 1
12639_ACEOF
12640
12641else
12642
12643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12644$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12645if ${ac_cv_lib_rt_clock_settime+:} false; then :
12646 $as_echo_n "(cached) " >&6
12647else
12648 ac_check_lib_save_LIBS=$LIBS
12649LIBS="-lrt $LIBS"
12650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12651/* end confdefs.h. */
12652
12653/* Override any GCC internal prototype to avoid an error.
12654 Use char because int might match the return type of a GCC
12655 builtin and then its argument prototype would still apply. */
12656#ifdef __cplusplus
12657extern "C"
12658#endif
12659char clock_settime ();
12660int
12661main ()
12662{
12663return clock_settime ();
12664 ;
12665 return 0;
12666}
12667_ACEOF
12668if ac_fn_c_try_link "$LINENO"; then :
12669 ac_cv_lib_rt_clock_settime=yes
12670else
12671 ac_cv_lib_rt_clock_settime=no
12672fi
12673rm -f core conftest.err conftest.$ac_objext \
12674 conftest$ac_exeext conftest.$ac_ext
12675LIBS=$ac_check_lib_save_LIBS
12676fi
12677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12678$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12679if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12680
12681 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12682
12683
12684fi
12685
12686
12687fi
12688done
12689
12690
Matthias Kloseb9621712010-04-24 17:59:49 +000012691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12692$as_echo_n "checking for major... " >&6; }
12693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012694/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012695
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012696#if defined(MAJOR_IN_MKDEV)
12697#include <sys/mkdev.h>
12698#elif defined(MAJOR_IN_SYSMACROS)
12699#include <sys/sysmacros.h>
12700#else
12701#include <sys/types.h>
12702#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012703
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012704int
12705main ()
12706{
12707
12708 makedev(major(0),minor(0));
12709
12710 ;
12711 return 0;
12712}
12713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012715
12716
Matthias Kloseb9621712010-04-24 17:59:49 +000012717$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12720$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012721
12722else
Skip Montanaro6dead952003-09-25 14:50:04 +000012723
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12725$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012726
12727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012728rm -f core conftest.err conftest.$ac_objext \
12729 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012730
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012731# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012732# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12734$as_echo_n "checking for getaddrinfo... " >&6; }
12735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012736/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012737
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012738#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012739#include <sys/socket.h>
12740#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012741#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012742
Martin v. Löwis11437992002-04-12 09:54:03 +000012743int
12744main ()
12745{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012746getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 ;
12748 return 0;
12749}
12750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012751if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012752 have_getaddrinfo=yes
12753else
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012756rm -f core conftest.err conftest.$ac_objext \
12757 conftest$ac_exeext conftest.$ac_ext
12758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12759$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012760if test $have_getaddrinfo = yes
12761then
Matthias Kloseb9621712010-04-24 17:59:49 +000012762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12763$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012764 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012766else
Matthias Kloseb9621712010-04-24 17:59:49 +000012767 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012768
12769if test "${enable_ipv6+set}" = set; then
12770 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12771else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012772 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012773fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012777
Stefan Krah19c21392012-11-22 23:47:32 +010012778#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012779#include <sys/types.h>
12780#include <netdb.h>
12781#include <string.h>
12782#include <sys/socket.h>
12783#include <netinet/in.h>
12784
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012785int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012786{
12787 int passive, gaierr, inet4 = 0, inet6 = 0;
12788 struct addrinfo hints, *ai, *aitop;
12789 char straddr[INET6_ADDRSTRLEN], strport[16];
12790
12791 for (passive = 0; passive <= 1; passive++) {
12792 memset(&hints, 0, sizeof(hints));
12793 hints.ai_family = AF_UNSPEC;
12794 hints.ai_flags = passive ? AI_PASSIVE : 0;
12795 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012796 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012797 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12798 (void)gai_strerror(gaierr);
12799 goto bad;
12800 }
12801 for (ai = aitop; ai; ai = ai->ai_next) {
12802 if (ai->ai_addr == NULL ||
12803 ai->ai_addrlen == 0 ||
12804 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12805 straddr, sizeof(straddr), strport, sizeof(strport),
12806 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12807 goto bad;
12808 }
12809 switch (ai->ai_family) {
12810 case AF_INET:
12811 if (strcmp(strport, "54321") != 0) {
12812 goto bad;
12813 }
12814 if (passive) {
12815 if (strcmp(straddr, "0.0.0.0") != 0) {
12816 goto bad;
12817 }
12818 } else {
12819 if (strcmp(straddr, "127.0.0.1") != 0) {
12820 goto bad;
12821 }
12822 }
12823 inet4++;
12824 break;
12825 case AF_INET6:
12826 if (strcmp(strport, "54321") != 0) {
12827 goto bad;
12828 }
12829 if (passive) {
12830 if (strcmp(straddr, "::") != 0) {
12831 goto bad;
12832 }
12833 } else {
12834 if (strcmp(straddr, "::1") != 0) {
12835 goto bad;
12836 }
12837 }
12838 inet6++;
12839 break;
12840 case AF_UNSPEC:
12841 goto bad;
12842 break;
12843 default:
12844 /* another family support? */
12845 break;
12846 }
12847 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012848 freeaddrinfo(aitop);
12849 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012850 }
12851
12852 if (!(inet4 == 0 || inet4 == 2))
12853 goto bad;
12854 if (!(inet6 == 0 || inet6 == 2))
12855 goto bad;
12856
12857 if (aitop)
12858 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012859 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012860
12861 bad:
12862 if (aitop)
12863 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012864 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012865}
12866
Martin v. Löwis11437992002-04-12 09:54:03 +000012867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012868if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012869 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012870else
Matthias Kloseb9621712010-04-24 17:59:49 +000012871 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012873rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12874 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012876
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012877fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012878
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012880
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12882$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12883
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012884if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012885then
12886 if test $ipv6 = yes
12887 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012888 echo 'Fatal: You must get working getaddrinfo() function.'
12889 echo ' or you can specify "--disable-ipv6"'.
12890 exit 1
12891 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012892else
Martin v. Löwis11437992002-04-12 09:54:03 +000012893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012895
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012897
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012898for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012899do :
12900 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012901if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012902 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012903#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012904_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012905
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012906fi
12907done
12908
Michael W. Hudson54241132001-12-07 15:38:26 +000012909
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012910# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12912$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012913if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012914 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012917/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918#include <sys/types.h>
12919#include <sys/time.h>
12920#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012921
Martin v. Löwis11437992002-04-12 09:54:03 +000012922int
12923main ()
12924{
12925if ((struct tm *) 0)
12926return 0;
12927 ;
12928 return 0;
12929}
12930_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012931if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012932 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012933else
Matthias Kloseb9621712010-04-24 17:59:49 +000012934 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12939$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012940if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012941
Matthias Kloseb9621712010-04-24 17:59:49 +000012942$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012943
12944fi
12945
Matthias Kloseb9621712010-04-24 17:59:49 +000012946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12947$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012948if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012949 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012950else
Matthias Kloseb9621712010-04-24 17:59:49 +000012951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012952/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953#include <sys/types.h>
12954#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956int
12957main ()
12958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959struct tm tm;
12960 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 ;
12963 return 0;
12964}
12965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967 ac_cv_struct_tm=time.h
12968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12974$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012975if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978
12979fi
12980
Matthias Kloseb9621712010-04-24 17:59:49 +000012981ac_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 +000012982#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984"
Victor Stinnere0be4232011-10-25 13:06:09 +020012985if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
12987cat >>confdefs.h <<_ACEOF
12988#define HAVE_STRUCT_TM_TM_ZONE 1
12989_ACEOF
12990
12991
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012992fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012993
Martin v. Löwis11437992002-04-12 09:54:03 +000012994if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012997
12998else
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13000"
Victor Stinnere0be4232011-10-25 13:06:09 +020013001if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005fi
13006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013008#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013009_ACEOF
13010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13012$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013013if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013017/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013018#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019#if !HAVE_DECL_TZNAME
13020extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Martin v. Löwis11437992002-04-12 09:54:03 +000013023int
13024main ()
13025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013026return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032 ac_cv_var_tzname=yes
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013036rm -f core conftest.err conftest.$ac_objext \
13037 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13040$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013041 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013044
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013045 fi
13046fi
13047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048ac_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 +020013049if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013050
13051cat >>confdefs.h <<_ACEOF
13052#define HAVE_STRUCT_STAT_ST_RDEV 1
13053_ACEOF
13054
13055
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013056fi
13057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058ac_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 +020013059if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013060
Martin v. Löwis11437992002-04-12 09:54:03 +000013061cat >>confdefs.h <<_ACEOF
13062#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13063_ACEOF
13064
13065
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013066fi
13067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068ac_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 +020013069if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013070
13071cat >>confdefs.h <<_ACEOF
13072#define HAVE_STRUCT_STAT_ST_FLAGS 1
13073_ACEOF
13074
13075
13076fi
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078ac_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 +020013079if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013080
13081cat >>confdefs.h <<_ACEOF
13082#define HAVE_STRUCT_STAT_ST_GEN 1
13083_ACEOF
13084
13085
13086fi
13087
Matthias Kloseb9621712010-04-24 17:59:49 +000013088ac_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 +020013089if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013090
13091cat >>confdefs.h <<_ACEOF
13092#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13093_ACEOF
13094
13095
13096fi
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098ac_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 +020013099if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013100
Martin v. Löwis11437992002-04-12 09:54:03 +000013101cat >>confdefs.h <<_ACEOF
13102#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13103_ACEOF
13104
13105
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013106fi
13107
Stefan Krah267b6392016-04-26 01:09:18 +020013108ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13109 #include <sys/types.h>
13110 #include <pwd.h>
13111
13112"
13113if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13117_ACEOF
13118
13119
13120fi
13121ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13122 #include <sys/types.h>
13123 #include <pwd.h>
13124
13125"
13126if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13127
13128cat >>confdefs.h <<_ACEOF
13129#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13130_ACEOF
13131
13132
13133fi
13134
Zachary Ware6a6967e2016-10-01 00:47:27 -050013135# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13136ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13137"
13138if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13139
13140cat >>confdefs.h <<_ACEOF
13141#define HAVE_SIGINFO_T_SI_BAND 1
13142_ACEOF
13143
13144
13145fi
13146
Michael W. Hudson54241132001-12-07 15:38:26 +000013147
Matthias Kloseb9621712010-04-24 17:59:49 +000013148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13149$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013150if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013151 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013152else
Matthias Kloseb159a552010-04-25 21:00:44 +000013153
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013155/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013156#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166 ac_cv_header_time_altzone=yes
13167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013172fi
13173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13175$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013177
Matthias Kloseb9621712010-04-24 17:59:49 +000013178$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179
13180fi
13181
Guido van Rossumda88dad1995-01-26 00:46:29 +000013182was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13184$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013186/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013187
13188#include <sys/types.h>
13189#include <sys/select.h>
13190#include <sys/time.h>
13191
Martin v. Löwis11437992002-04-12 09:54:03 +000013192int
13193main ()
13194{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013195;
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ;
13197 return 0;
13198}
13199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013200if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
13202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013205 was_it_defined=yes
13206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13210$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13213$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013214if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013215 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013218/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013219#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013220int
13221main ()
13222{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 ;
13225 return 0;
13226}
13227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229 ac_cv_struct_addrinfo=yes
13230else
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13234fi
13235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13237$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241
13242fi
13243
Matthias Kloseb9621712010-04-24 17:59:49 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13245$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013246if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251
13252# include <sys/types.h>
13253# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013254int
13255main ()
13256{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263 ac_cv_struct_sockaddr_storage=yes
13264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13271$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275
13276fi
13277
Christian Heimesdffa3942016-09-05 23:54:41 +020013278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13279$as_echo_n "checking for sockaddr_alg... " >&6; }
13280if ${ac_cv_struct_sockaddr_alg+:} false; then :
13281 $as_echo_n "(cached) " >&6
13282else
13283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13284/* end confdefs.h. */
13285
13286# include <sys/types.h>
13287# include <sys/socket.h>
13288# include <linux/if_alg.h>
13289int
13290main ()
13291{
13292struct sockaddr_alg s
13293 ;
13294 return 0;
13295}
13296_ACEOF
13297if ac_fn_c_try_compile "$LINENO"; then :
13298 ac_cv_struct_sockaddr_alg=yes
13299else
13300 ac_cv_struct_sockaddr_alg=no
13301fi
13302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303fi
13304
13305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13306$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13307if test $ac_cv_struct_sockaddr_alg = yes; then
13308
13309$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13310
13311fi
13312
Guido van Rossum627b2d71993-12-24 10:39:16 +000013313# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013314
Matthias Kloseb9621712010-04-24 17:59:49 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13316$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013317if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013318 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013319else
Matthias Kloseb9621712010-04-24 17:59:49 +000013320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013323int
13324main ()
13325{
13326static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013327test_array [0] = 0;
13328return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
13330 ;
13331 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013332}
Martin v. Löwis11437992002-04-12 09:54:03 +000013333_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013334if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013335 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013340fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13342$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345
13346fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13349$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013350if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013355
Martin v. Löwis11437992002-04-12 09:54:03 +000013356int
13357main ()
13358{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013361 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013363 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365 char const *const *pcpcc;
13366 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 /* NEC SVR4.0.2 mips cc rejects this. */
13368 struct point {int x, y;};
13369 static struct point const zero = {0,0};
13370 /* AIX XL C 1.02.0.0 rejects this.
13371 It does not let you subtract one const X* pointer from another in
13372 an arm of an if-expression whose if-part is not a constant
13373 expression */
13374 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013377 ++pcpcc;
13378 ppc = (char**) pcpcc;
13379 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013380 { /* SCO 3.2v4 cc rejects this sort of thing. */
13381 char tx;
13382 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013384
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013386 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 }
13388 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13389 int x[] = {25, 17};
13390 const int *foo = &x[0];
13391 ++foo;
13392 }
13393 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13394 typedef const int *iptr;
13395 iptr p = 0;
13396 ++p;
13397 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013398 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013399 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013400 struct s { int j; const int *ap[3]; } bx;
13401 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 }
13403 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13404 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013406 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013408#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 ;
13411 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013412}
Martin v. Löwis11437992002-04-12 09:54:03 +000013413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013414if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013415 ac_cv_c_const=yes
13416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13422$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426
13427fi
13428
Michael W. Hudson54241132001-12-07 15:38:26 +000013429
Guido van Rossumda88dad1995-01-26 00:46:29 +000013430works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13432$as_echo_n "checking for working signed char... " >&6; }
13433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013435
Martin v. Löwis11437992002-04-12 09:54:03 +000013436int
13437main ()
13438{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013439signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 ;
13441 return 0;
13442}
13443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013444if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013445 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013446else
Skip Montanaro6dead952003-09-25 14:50:04 +000013447
Matthias Kloseb9621712010-04-24 17:59:49 +000013448$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013449
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013450
Guido van Rossum7f43da71994-08-01 12:15:30 +000013451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13454$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013455
Guido van Rossumda88dad1995-01-26 00:46:29 +000013456have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13458$as_echo_n "checking for prototypes... " >&6; }
13459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013461int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Matthias Kloseb9621712010-04-24 17:59:49 +000013472$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013473
Matthias Kloseb159a552010-04-25 21:00:44 +000013474 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013475fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13478$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013479
Guido van Rossumda88dad1995-01-26 00:46:29 +000013480works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13482$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013485
13486#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013487int foo(int x, ...) {
13488 va_list va;
13489 va_start(va, x);
13490 va_arg(va, int);
13491 va_arg(va, char *);
13492 va_arg(va, double);
13493 return 0;
13494}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496int
13497main ()
13498{
Guido van Rossum90eea071996-08-30 20:58:57 +000013499return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013505
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013509 works=yes
13510
Guido van Rossum627b2d71993-12-24 10:39:16 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13514$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013515
Martin v. Löwisd6320502004-08-12 13:45:08 +000013516# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13518$as_echo_n "checking for socketpair... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013520/* end confdefs.h. */
13521
13522#include <sys/types.h>
13523#include <sys/socket.h>
13524
13525int
13526main ()
13527{
13528void *x=socketpair
13529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013536
Matthias Kloseb159a552010-04-25 21:00:44 +000013537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013539else
Matthias Kloseb9621712010-04-24 17:59:49 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13541$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013542
13543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013545
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013546# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13548$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013550/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013551#include <sys/types.h>
13552#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013556struct sockaddr x;
13557x.sa_len = 0;
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 :
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13564$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013567
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13570$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013571
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013574
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013575# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
13577
Matthias Kloseb9621712010-04-24 17:59:49 +000013578ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013579if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013582
Matthias Kloseb9621712010-04-24 17:59:49 +000013583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13584$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013585 OLD_CFLAGS=$CFLAGS
13586 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013588/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013589
13590# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013591
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013595
13596 char *name;
13597 struct hostent *he, *res;
13598 char buffer[2048];
13599 int buflen = 2048;
13600 int h_errnop;
13601
13602 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013603
13604 ;
13605 return 0;
13606}
13607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013608if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013614
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13616$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013617
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013618else
Skip Montanaro6dead952003-09-25 14:50:04 +000013619
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13621$as_echo "no" >&6; }
13622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13623$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013625/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013626
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013627# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013628
Martin v. Löwis11437992002-04-12 09:54:03 +000013629int
13630main ()
13631{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013632
13633 char *name;
13634 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013635 char buffer[2048];
13636 int buflen = 2048;
13637 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013638
Matthias Kloseb159a552010-04-25 21:00:44 +000013639 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
13641 ;
13642 return 0;
13643}
13644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb159a552010-04-25 21:00:44 +000013650$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13653$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013655else
Skip Montanaro6dead952003-09-25 14:50:04 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13658$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13660$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13662/* end confdefs.h. */
13663
13664# include <netdb.h>
13665
13666int
13667main ()
13668{
13669
13670 char *name;
13671 struct hostent *he;
13672 struct hostent_data data;
13673
13674 (void) gethostbyname_r(name, he, &data);
13675
13676 ;
13677 return 0;
13678}
13679_ACEOF
13680if ac_fn_c_try_compile "$LINENO"; then :
13681
13682 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13683
13684
13685$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13686
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13688$as_echo "yes" >&6; }
13689
13690else
13691
13692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13693$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013694
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013697
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013698fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013703 CFLAGS=$OLD_CFLAGS
13704
13705else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 for ac_func in gethostbyname
13708do :
13709 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013710if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013713_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013715fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013716done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013717
Michael W. Hudson54241132001-12-07 15:38:26 +000013718
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013719fi
13720
Michael W. Hudson54241132001-12-07 15:38:26 +000013721
13722
13723
13724
13725
13726
Guido van Rossum627b2d71993-12-24 10:39:16 +000013727# checks for system services
13728# (none yet)
13729
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013730# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013731ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013732if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013733
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13736$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013737if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013739else
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013741LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013744
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013745/* Override any GCC internal prototype to avoid an error.
13746 Use char because int might match the return type of a GCC
13747 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013748#ifdef __cplusplus
13749extern "C"
13750#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013751char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013752int
13753main ()
13754{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013755return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 ;
13757 return 0;
13758}
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core conftest.err conftest.$ac_objext \
13766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013767LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13770$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013771if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 cat >>confdefs.h <<_ACEOF
13773#define HAVE_LIBIEEE 1
13774_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013776 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013777
Guido van Rossum627b2d71993-12-24 10:39:16 +000013778fi
13779
Michael W. Hudson54241132001-12-07 15:38:26 +000013780
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013781fi
13782
Michael W. Hudson54241132001-12-07 15:38:26 +000013783
Guido van Rossum7f43da71994-08-01 12:15:30 +000013784# check for --with-libm=...
13785
Guido van Rossum563e7081996-09-10 18:20:48 +000013786case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013787Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013788*) LIBM=-lm
13789esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13791$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013795 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013796if test "$withval" = no
13797then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13799$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013800elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013801then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13803$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013804else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013805fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013806else
Matthias Kloseb9621712010-04-24 17:59:49 +000013807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13808$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809fi
13810
Guido van Rossum7f43da71994-08-01 12:15:30 +000013811
13812# check for --with-libc=...
13813
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13815$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013817# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013818if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013819 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013820if test "$withval" = no
13821then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13823$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013824elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013825then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13827$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013828else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013829fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013830else
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13832$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833fi
13834
Guido van Rossum7f43da71994-08-01 12:15:30 +000013835
Stefan Krah1919b7e2012-03-21 18:25:23 +010013836# **************************************
13837# * Check for gcc x64 inline assembler *
13838# **************************************
13839
13840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13841$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13843/* end confdefs.h. */
13844
13845int
13846main ()
13847{
13848
13849 __asm__ __volatile__ ("movq %rcx, %rax");
13850
13851 ;
13852 return 0;
13853}
13854_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013855if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013856 have_gcc_asm_for_x64=yes
13857else
13858 have_gcc_asm_for_x64=no
13859fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013860rm -f core conftest.err conftest.$ac_objext \
13861 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13863$as_echo "$have_gcc_asm_for_x64" >&6; }
13864if test "$have_gcc_asm_for_x64" = yes
13865then
13866
13867$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13868
13869fi
13870
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013871# **************************************************
13872# * Check for various properties of floating point *
13873# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013874
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
13876$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
13877if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013878 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013879else
13880
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013881
13882ax_cv_c_float_words_bigendian=unknown
13883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013884/* end confdefs.h. */
13885
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013886
13887double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
13888
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013889
13890_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013891if ac_fn_c_try_compile "$LINENO"; then :
13892
13893
13894if grep noonsees conftest.$ac_objext >/dev/null ; then
13895 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013896fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013897if grep seesnoon conftest.$ac_objext >/dev/null ; then
13898 if test "$ax_cv_c_float_words_bigendian" = unknown; then
13899 ax_cv_c_float_words_bigendian=no
13900 else
13901 ax_cv_c_float_words_bigendian=unknown
13902 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013903fi
13904
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013905
13906fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
13910$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013912case $ax_cv_c_float_words_bigendian in
13913 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013914
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013915$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
13916 ;;
13917 no)
13918 ;;
13919 *)
13920 as_fn_error $? "
13921
13922Unknown float word ordering. You need to manually preset
13923ax_cv_c_float_words_bigendian=no (or yes) according to your system.
13924
13925 " "$LINENO" 5 ;;
13926esac
13927
13928
13929if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013930then
13931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013934elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935then
13936
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013937$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
13938
13939else
13940 # Some ARM platforms use a mixed-endian representation for doubles.
13941 # While Python doesn't currently have full support for these platforms
13942 # (see e.g., issue 1762561), we can at least make sure that float <-> string
13943 # conversions work.
13944 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
13945 # or little, then it must be this?
13946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013948
13949fi
13950
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013951# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013952# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013953# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013954# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013955# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013956# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013957
13958# This inline assembler syntax may also work for suncc and icc,
13959# so we try it on all platforms.
13960
Matthias Kloseb9621712010-04-24 17:59:49 +000013961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13962$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013964/* end confdefs.h. */
13965
13966int
13967main ()
13968{
13969
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013970 unsigned short cw;
13971 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13972 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013973
13974 ;
13975 return 0;
13976}
13977_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013978if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013979 have_gcc_asm_for_x87=yes
13980else
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013983rm -f core conftest.err conftest.$ac_objext \
13984 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13986$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013987if test "$have_gcc_asm_for_x87" = yes
13988then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013991
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013993
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13995$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13997/* end confdefs.h. */
13998
13999int
14000main ()
14001{
14002
14003 unsigned int fpcr;
14004 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14005 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14006
14007 ;
14008 return 0;
14009}
14010_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014011if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014012 have_gcc_asm_for_mc68881=yes
14013else
14014 have_gcc_asm_for_mc68881=no
14015fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014016rm -f core conftest.err conftest.$ac_objext \
14017 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14019$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14020if test "$have_gcc_asm_for_mc68881" = yes
14021then
14022
14023$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14024
14025fi
14026
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014027# Detect whether system arithmetic is subject to x87-style double
14028# rounding issues. The result of this test has little meaning on non
14029# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14030# mode is round-to-nearest and double rounding issues are present, and
14031# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14033$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014034# $BASECFLAGS may affect the result
14035ac_save_cc="$CC"
14036CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014037if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014038 ac_cv_x87_double_rounding=no
14039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014041/* end confdefs.h. */
14042
14043#include <stdlib.h>
14044#include <math.h>
14045int main() {
14046 volatile double x, y, z;
14047 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14048 x = 0.99999999999999989; /* 1-2**-53 */
14049 y = 1./x;
14050 if (y != 1.)
14051 exit(0);
14052 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14053 x = 1e16;
14054 y = 2.99999;
14055 z = x + y;
14056 if (z != 1e16+4.)
14057 exit(0);
14058 /* both tests show evidence of double rounding */
14059 exit(1);
14060}
14061
14062_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014063if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014064 ac_cv_x87_double_rounding=no
14065else
Matthias Kloseb9621712010-04-24 17:59:49 +000014066 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014068rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14069 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014070fi
14071
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14074$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014075if test "$ac_cv_x87_double_rounding" = yes
14076then
14077
Matthias Kloseb9621712010-04-24 17:59:49 +000014078$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014079
14080fi
14081
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014082# ************************************
14083# * Check for mathematical functions *
14084# ************************************
14085
14086LIBS_SAVE=$LIBS
14087LIBS="$LIBS $LIBM"
14088
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014089for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14090do :
14091 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14092ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014093if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094 cat >>confdefs.h <<_ACEOF
14095#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14096_ACEOF
14097
14098fi
14099done
14100
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014101for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014102do :
14103 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14104ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014105if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014106 cat >>confdefs.h <<_ACEOF
14107#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14108_ACEOF
14109
14110fi
14111done
14112
14113ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14114"
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014116 ac_have_decl=1
14117else
14118 ac_have_decl=0
14119fi
14120
14121cat >>confdefs.h <<_ACEOF
14122#define HAVE_DECL_ISINF $ac_have_decl
14123_ACEOF
14124ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14125"
Victor Stinnere0be4232011-10-25 13:06:09 +020014126if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014127 ac_have_decl=1
14128else
14129 ac_have_decl=0
14130fi
14131
14132cat >>confdefs.h <<_ACEOF
14133#define HAVE_DECL_ISNAN $ac_have_decl
14134_ACEOF
14135ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14136"
Victor Stinnere0be4232011-10-25 13:06:09 +020014137if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014138 ac_have_decl=1
14139else
14140 ac_have_decl=0
14141fi
14142
14143cat >>confdefs.h <<_ACEOF
14144#define HAVE_DECL_ISFINITE $ac_have_decl
14145_ACEOF
14146
14147
Mark Dickinsona614f042009-11-28 12:48:43 +000014148# For multiprocessing module, check that sem_open
14149# actually works. For FreeBSD versions <= 7.2,
14150# the kernel module that provides POSIX semaphores
14151# isn't loaded by default, so an attempt to call
14152# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14154$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014159 ac_cv_posix_semaphores_enabled=yes
14160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014162/* end confdefs.h. */
14163
14164#include <unistd.h>
14165#include <fcntl.h>
14166#include <stdio.h>
14167#include <semaphore.h>
14168#include <sys/stat.h>
14169
14170int main(void) {
14171 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14172 if (a == SEM_FAILED) {
14173 perror("sem_open");
14174 return 1;
14175 }
14176 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014177 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014178 return 0;
14179}
14180
14181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014182if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014183 ac_cv_posix_semaphores_enabled=yes
14184else
Matthias Kloseb9621712010-04-24 17:59:49 +000014185 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014187rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14188 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014189fi
14190
14191
Mark Dickinsona614f042009-11-28 12:48:43 +000014192fi
14193
Matthias Kloseb9621712010-04-24 17:59:49 +000014194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14195$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014196if test $ac_cv_posix_semaphores_enabled = no
14197then
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014200
14201fi
14202
Mark Dickinson10683072009-04-18 21:18:19 +000014203# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14205$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014206if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014208else
Matthias Kloseb9621712010-04-24 17:59:49 +000014209 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014210 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014213/* end confdefs.h. */
14214
14215#include <unistd.h>
14216#include <fcntl.h>
14217#include <stdio.h>
14218#include <semaphore.h>
14219#include <sys/stat.h>
14220
14221int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014222 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014223 int count;
14224 int res;
14225 if(a==SEM_FAILED){
14226 perror("sem_open");
14227 return 1;
14228
14229 }
14230 res = sem_getvalue(a, &count);
14231 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014232 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014233 return res==-1 ? 1 : 0;
14234}
14235
Mark Dickinson10683072009-04-18 21:18:19 +000014236_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014237if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014239else
Matthias Kloseb9621712010-04-24 17:59:49 +000014240 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14243 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014244fi
14245
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247fi
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14250$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251if test $ac_cv_broken_sem_getvalue = yes
14252then
14253
Matthias Kloseb9621712010-04-24 17:59:49 +000014254$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255
14256fi
14257
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014258ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14259"
14260if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14261 ac_have_decl=1
14262else
14263 ac_have_decl=0
14264fi
14265
14266cat >>confdefs.h <<_ACEOF
14267#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14268_ACEOF
14269ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14270"
14271if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14272 ac_have_decl=1
14273else
14274 ac_have_decl=0
14275fi
14276
14277cat >>confdefs.h <<_ACEOF
14278#define HAVE_DECL_RTLD_NOW $ac_have_decl
14279_ACEOF
14280ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14281"
14282if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14283 ac_have_decl=1
14284else
14285 ac_have_decl=0
14286fi
14287
14288cat >>confdefs.h <<_ACEOF
14289#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14290_ACEOF
14291ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14292"
14293if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14294 ac_have_decl=1
14295else
14296 ac_have_decl=0
14297fi
14298
14299cat >>confdefs.h <<_ACEOF
14300#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14301_ACEOF
14302ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14303"
14304if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14305 ac_have_decl=1
14306else
14307 ac_have_decl=0
14308fi
14309
14310cat >>confdefs.h <<_ACEOF
14311#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14312_ACEOF
14313ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14314"
14315if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14316 ac_have_decl=1
14317else
14318 ac_have_decl=0
14319fi
14320
14321cat >>confdefs.h <<_ACEOF
14322#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14323_ACEOF
14324ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14325"
14326if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14327 ac_have_decl=1
14328else
14329 ac_have_decl=0
14330fi
14331
14332cat >>confdefs.h <<_ACEOF
14333#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14334_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014335ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14336"
14337if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14338 ac_have_decl=1
14339else
14340 ac_have_decl=0
14341fi
14342
14343cat >>confdefs.h <<_ACEOF
14344#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14345_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014346
14347
Mark Dickinsonbd792642009-03-18 20:06:12 +000014348# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14350$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014351# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014352if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014353 enableval=$enable_big_digits; case $enable_big_digits in
14354yes)
14355 enable_big_digits=30 ;;
14356no)
14357 enable_big_digits=15 ;;
1435815|30)
14359 ;;
14360*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014361 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 +000014362esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14364$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014365
14366cat >>confdefs.h <<_ACEOF
14367#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14368_ACEOF
14369
14370
14371else
Matthias Kloseb9621712010-04-24 17:59:49 +000014372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14373$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014374fi
14375
14376
Guido van Rossumef2255b2000-03-10 22:30:29 +000014377# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014378ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014379if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014380
14381
Matthias Kloseb9621712010-04-24 17:59:49 +000014382$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014384 wchar_h="yes"
14385
Guido van Rossumef2255b2000-03-10 22:30:29 +000014386else
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014388
14389fi
14390
Michael W. Hudson54241132001-12-07 15:38:26 +000014391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014393# determine wchar_t size
14394if test "$wchar_h" = yes
14395then
Matthias Kloseb9621712010-04-24 17:59:49 +000014396 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14399# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14401$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014402if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014404else
Matthias Kloseb9621712010-04-24 17:59:49 +000014405 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14406"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014407
Martin v. Löwis11437992002-04-12 09:54:03 +000014408else
Matthias Kloseb9621712010-04-24 17:59:49 +000014409 if test "$ac_cv_type_wchar_t" = yes; then
14410 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014412as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014413See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014414 else
14415 ac_cv_sizeof_wchar_t=0
14416 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014417fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014418
Martin v. Löwis11437992002-04-12 09:54:03 +000014419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14421$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014422
14423
14424
Martin v. Löwis11437992002-04-12 09:54:03 +000014425cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014426#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014427_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014428
Michael W. Hudson54241132001-12-07 15:38:26 +000014429
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014430fi
14431
Matthias Kloseb9621712010-04-24 17:59:49 +000014432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14433$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014434have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014436/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014437
14438#include <tcl.h>
14439#if TCL_UTF_MAX != 6
14440# error "NOT UCS4_TCL"
14441#endif
14442int
14443main ()
14444{
14445
14446 ;
14447 return 0;
14448}
14449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014450if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014451
14452
Matthias Kloseb9621712010-04-24 17:59:49 +000014453$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014454
14455 have_ucs4_tcl=yes
14456
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14460$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014461
Skip Montanaro6dead952003-09-25 14:50:04 +000014462# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014463if test "$wchar_h" = yes
14464then
14465 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14467$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014468 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014470else
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014473 ac_cv_wchar_t_signed=yes
14474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014476/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014477
14478 #include <wchar.h>
14479 int main()
14480 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014481 /* Success: exit code 0 */
14482 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014483 }
14484
14485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014486if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014487 ac_cv_wchar_t_signed=yes
14488else
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14492 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014493fi
14494
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014495fi
14496
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14498$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014499fi
14500
Michael Osipov3738fad2018-08-24 18:17:19 +020014501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14502$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014503# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014504if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014505 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014506then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014507
Matthias Kloseb9621712010-04-24 17:59:49 +000014508$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
Michael Osipov3738fad2018-08-24 18:17:19 +020014510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14511$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014512else
Michael Osipov3738fad2018-08-24 18:17:19 +020014513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14514$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014515fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014516
14517# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14519$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014520if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 ac_cv_c_bigendian=unknown
14524 # See if we're dealing with a universal compiler.
14525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14526/* end confdefs.h. */
14527#ifndef __APPLE_CC__
14528 not a universal capable compiler
14529 #endif
14530 typedef int dummy;
14531
Skip Montanaro6dead952003-09-25 14:50:04 +000014532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014533if ac_fn_c_try_compile "$LINENO"; then :
14534
14535 # Check for potential -arch flags. It is not universal unless
14536 # there are at least two -arch flags with different values.
14537 ac_arch=
14538 ac_prev=
14539 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14540 if test -n "$ac_prev"; then
14541 case $ac_word in
14542 i?86 | x86_64 | ppc | ppc64)
14543 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14544 ac_arch=$ac_word
14545 else
14546 ac_cv_c_bigendian=universal
14547 break
14548 fi
14549 ;;
14550 esac
14551 ac_prev=
14552 elif test "x$ac_word" = "x-arch"; then
14553 ac_prev=arch
14554 fi
14555 done
14556fi
14557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14558 if test $ac_cv_c_bigendian = unknown; then
14559 # See if sys/param.h defines the BYTE_ORDER macro.
14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014561/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014562#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014563 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565int
14566main ()
14567{
Matthias Kloseb9621712010-04-24 17:59:49 +000014568#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14569 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14570 && LITTLE_ENDIAN)
14571 bogus endian macros
14572 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
14574 ;
14575 return 0;
14576}
14577_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014578if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014579 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014581/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014584
Martin v. Löwis11437992002-04-12 09:54:03 +000014585int
14586main ()
14587{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014588#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 not big endian
14590 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014591
14592 ;
14593 return 0;
14594}
14595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014596if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597 ac_cv_c_bigendian=yes
14598else
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014602fi
14603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14604 fi
14605 if test $ac_cv_c_bigendian = unknown; then
14606 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014608/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014609#include <limits.h>
14610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611int
14612main ()
14613{
Matthias Kloseb9621712010-04-24 17:59:49 +000014614#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14615 bogus endian macros
14616 #endif
14617
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 ;
14619 return 0;
14620}
14621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014622if ac_fn_c_try_compile "$LINENO"; then :
14623 # It does; now see whether it defined to _BIG_ENDIAN or not.
14624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14625/* end confdefs.h. */
14626#include <limits.h>
14627
14628int
14629main ()
14630{
14631#ifndef _BIG_ENDIAN
14632 not big endian
14633 #endif
14634
14635 ;
14636 return 0;
14637}
14638_ACEOF
14639if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014640 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014641else
Matthias Kloseb9621712010-04-24 17:59:49 +000014642 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14645fi
14646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14647 fi
14648 if test $ac_cv_c_bigendian = unknown; then
14649 # Compile a test program.
14650 if test "$cross_compiling" = yes; then :
14651 # Try to guess by grepping values from an object file.
14652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14653/* end confdefs.h. */
14654short int ascii_mm[] =
14655 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14656 short int ascii_ii[] =
14657 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14658 int use_ascii (int i) {
14659 return ascii_mm[i] + ascii_ii[i];
14660 }
14661 short int ebcdic_ii[] =
14662 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14663 short int ebcdic_mm[] =
14664 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14665 int use_ebcdic (int i) {
14666 return ebcdic_mm[i] + ebcdic_ii[i];
14667 }
14668 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670int
14671main ()
14672{
14673return use_ascii (foo) == use_ebcdic (foo);
14674 ;
14675 return 0;
14676}
14677_ACEOF
14678if ac_fn_c_try_compile "$LINENO"; then :
14679 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14680 ac_cv_c_bigendian=yes
14681 fi
14682 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14683 if test "$ac_cv_c_bigendian" = unknown; then
14684 ac_cv_c_bigendian=no
14685 else
14686 # finding both strings is unlikely to happen, but who knows?
14687 ac_cv_c_bigendian=unknown
14688 fi
14689 fi
14690fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014692else
Matthias Kloseb9621712010-04-24 17:59:49 +000014693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014694/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014696int
14697main ()
14698{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014699
Matthias Kloseb9621712010-04-24 17:59:49 +000014700 /* Are we little or big endian? From Harbison&Steele. */
14701 union
14702 {
14703 long int l;
14704 char c[sizeof (long int)];
14705 } u;
14706 u.l = 1;
14707 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708
14709 ;
14710 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014711}
Martin v. Löwis11437992002-04-12 09:54:03 +000014712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014713if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714 ac_cv_c_bigendian=no
14715else
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014721
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14725$as_echo "$ac_cv_c_bigendian" >&6; }
14726 case $ac_cv_c_bigendian in #(
14727 yes)
14728 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14729;; #(
14730 no)
14731 ;; #(
14732 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 ;; #(
14737 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014738 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014739 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014741
Michael W. Hudson54241132001-12-07 15:38:26 +000014742
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014743# ABI version string for Python extension modules. This appears between the
14744# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14745# from the following attributes which affect the ABI of this Python build (in
14746# this order):
14747#
14748# * The Python implementation (always 'cpython-' for us)
14749# * The major and minor version numbers
14750# * --with-pydebug (adds a 'd')
14751# * --with-pymalloc (adds a 'm')
14752# * --with-wide-unicode (adds a 'u')
14753#
14754# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014755# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14756# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014757
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14759$as_echo_n "checking ABIFLAGS... " >&6; }
14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14761$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14763$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014764SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14766$as_echo "$SOABI" >&6; }
14767
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014768
14769case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014770 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014771 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14772 *)
14773 EXT_SUFFIX=${SHLIB_SUFFIX};;
14774esac
14775
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14777$as_echo_n "checking LDVERSION... " >&6; }
14778LDVERSION='$(VERSION)$(ABIFLAGS)'
14779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14780$as_echo "$LDVERSION" >&6; }
14781
doko@python.org87421192013-01-26 11:39:31 +010014782
doko@ubuntu.com55532312016-06-14 08:55:19 +020014783if test x$PLATFORM_TRIPLET = x; then
14784 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14785else
14786 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14787fi
doko@python.org87421192013-01-26 11:39:31 +010014788
14789
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014790# Check whether right shifting a negative integer extends the sign bit
14791# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14793$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014794if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014796else
Martin v. Löwis11437992002-04-12 09:54:03 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014799 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014800else
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014803
14804int main()
14805{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014806 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014807}
14808
Martin v. Löwis11437992002-04-12 09:54:03 +000014809_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014810if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014811 ac_cv_rshift_extends_sign=yes
14812else
Matthias Kloseb9621712010-04-24 17:59:49 +000014813 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014814fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14816 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014817fi
14818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819fi
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14822$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014823if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014824then
Martin v. Löwis11437992002-04-12 09:54:03 +000014825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014827
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014828fi
14829
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014830# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14832$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014833if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014835else
Martin v. Löwis11437992002-04-12 09:54:03 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014838/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014839#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014840int
14841main ()
14842{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014843
14844 FILE *f = fopen("/dev/null", "r");
14845 flockfile(f);
14846 getc_unlocked(f);
14847 funlockfile(f);
14848
Martin v. Löwis11437992002-04-12 09:54:03 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014854 ac_cv_have_getc_unlocked=yes
14855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ac_cv_have_getc_unlocked=no
14857fi
14858rm -f core conftest.err conftest.$ac_objext \
14859 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14863$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014864if test "$ac_cv_have_getc_unlocked" = yes
14865then
Martin v. Löwis11437992002-04-12 09:54:03 +000014866
Matthias Kloseb9621712010-04-24 17:59:49 +000014867$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014868
14869fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014870
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014871# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014872# save the value of LIBS so we don't actually link Python with readline
14873LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014874
Gregory P. Smith18820942008-09-07 06:24:49 +000014875# On some systems we need to link readline to a termcap compatible
14876# library. NOTE: Keep the precedence of listed libraries synchronised
14877# with setup.py.
14878py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14880$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014881for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014882 if test -z "$py_libtermcap"; then
14883 READLINE_LIBS="-lreadline"
14884 else
14885 READLINE_LIBS="-lreadline -l$py_libtermcap"
14886 fi
14887 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014889/* end confdefs.h. */
14890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014891/* Override any GCC internal prototype to avoid an error.
14892 Use char because int might match the return type of a GCC
14893 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014894#ifdef __cplusplus
14895extern "C"
14896#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014897char readline ();
14898int
14899main ()
14900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014902 ;
14903 return 0;
14904}
14905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014906if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014907 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014909rm -f core conftest.err conftest.$ac_objext \
14910 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014911 if test $py_cv_lib_readline = yes; then
14912 break
14913 fi
14914done
14915# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14916#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014917if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14919$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014920else
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14922$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014923
Matthias Kloseb9621712010-04-24 17:59:49 +000014924$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014925
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014926fi
14927
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014928# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014930/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014931#include <readline/readline.h>
14932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014933if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014934 have_readline=yes
14935else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014936 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014937
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014938fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014939rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014940if test $have_readline = yes
14941then
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 Rossumfaf5e4d2002-12-30 16:25:41 +000014944#include <readline/readline.h>
14945
14946_ACEOF
14947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014948 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014951
14952fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014953rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014956/* end confdefs.h. */
14957#include <readline/readline.h>
14958
14959_ACEOF
14960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014962
Matthias Kloseb9621712010-04-24 17:59:49 +000014963$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014964
14965fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014966rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014967
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014968fi
14969
Martin v. Löwis0daad592001-09-30 21:09:59 +000014970# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14972$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014973if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014974 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014975else
Martin v. Löwis11437992002-04-12 09:54:03 +000014976 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014977LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014981/* Override any GCC internal prototype to avoid an error.
14982 Use char because int might match the return type of a GCC
14983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014984#ifdef __cplusplus
14985extern "C"
14986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014987char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014988int
14989main ()
14990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014991return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ;
14993 return 0;
14994}
14995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014997 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014998else
Matthias Kloseb9621712010-04-24 17:59:49 +000014999 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015000fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015001rm -f core conftest.err conftest.$ac_objext \
15002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015003LIBS=$ac_check_lib_save_LIBS
15004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15006$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015007if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015008
Matthias Kloseb9621712010-04-24 17:59:49 +000015009$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015010
Martin v. Löwis0daad592001-09-30 21:09:59 +000015011fi
15012
Michael W. Hudson54241132001-12-07 15:38:26 +000015013
Thomas Wouters89d996e2007-09-08 17:39:28 +000015014# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15016$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015017if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015018 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015019else
15020 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015021LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015023/* end confdefs.h. */
15024
15025/* Override any GCC internal prototype to avoid an error.
15026 Use char because int might match the return type of a GCC
15027 builtin and then its argument prototype would still apply. */
15028#ifdef __cplusplus
15029extern "C"
15030#endif
15031char rl_completion_display_matches_hook ();
15032int
15033main ()
15034{
15035return rl_completion_display_matches_hook ();
15036 ;
15037 return 0;
15038}
15039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015040if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015041 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15042else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015045rm -f core conftest.err conftest.$ac_objext \
15046 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015047LIBS=$ac_check_lib_save_LIBS
15048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15050$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015051if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015052
Matthias Kloseb9621712010-04-24 17:59:49 +000015053$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015054
15055fi
15056
15057
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015058# also in 4.0, but not in editline
15059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15060$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15061if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15062 $as_echo_n "(cached) " >&6
15063else
15064 ac_check_lib_save_LIBS=$LIBS
15065LIBS="-lreadline $READLINE_LIBS $LIBS"
15066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15067/* end confdefs.h. */
15068
15069/* Override any GCC internal prototype to avoid an error.
15070 Use char because int might match the return type of a GCC
15071 builtin and then its argument prototype would still apply. */
15072#ifdef __cplusplus
15073extern "C"
15074#endif
15075char rl_resize_terminal ();
15076int
15077main ()
15078{
15079return rl_resize_terminal ();
15080 ;
15081 return 0;
15082}
15083_ACEOF
15084if ac_fn_c_try_link "$LINENO"; then :
15085 ac_cv_lib_readline_rl_resize_terminal=yes
15086else
15087 ac_cv_lib_readline_rl_resize_terminal=no
15088fi
15089rm -f core conftest.err conftest.$ac_objext \
15090 conftest$ac_exeext conftest.$ac_ext
15091LIBS=$ac_check_lib_save_LIBS
15092fi
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15094$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15095if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15096
15097$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15098
15099fi
15100
15101
Martin v. Löwis0daad592001-09-30 21:09:59 +000015102# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15104$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015105if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015107else
Martin v. Löwis11437992002-04-12 09:54:03 +000015108 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015109LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113/* Override any GCC internal prototype to avoid an error.
15114 Use char because int might match the return type of a GCC
15115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015116#ifdef __cplusplus
15117extern "C"
15118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015119char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015120int
15121main ()
15122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ;
15125 return 0;
15126}
15127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015128if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015130else
Matthias Kloseb9621712010-04-24 17:59:49 +000015131 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015133rm -f core conftest.err conftest.$ac_objext \
15134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015135LIBS=$ac_check_lib_save_LIBS
15136fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15138$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015139if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015140
Matthias Kloseb9621712010-04-24 17:59:49 +000015141$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015142
Guido van Rossum353ae582001-07-10 16:45:32 +000015143fi
15144
Jack Jansendd19cf82001-12-06 22:36:17 +000015145
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015146# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015148/* end confdefs.h. */
15149#include <readline/readline.h>
15150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015151if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015152 have_readline=yes
15153else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015154 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015155
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015156fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015157rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158if test $have_readline = yes
15159then
Matthias Kloseb9621712010-04-24 17:59:49 +000015160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161/* end confdefs.h. */
15162#include <readline/readline.h>
15163
15164_ACEOF
15165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015167
Matthias Kloseb9621712010-04-24 17:59:49 +000015168$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015169
15170fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015171rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172
15173fi
15174
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15176$as_echo_n "checking for append_history in -lreadline... " >&6; }
15177if ${ac_cv_lib_readline_append_history+:} false; then :
15178 $as_echo_n "(cached) " >&6
15179else
15180 ac_check_lib_save_LIBS=$LIBS
15181LIBS="-lreadline $READLINE_LIBS $LIBS"
15182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15183/* end confdefs.h. */
15184
15185/* Override any GCC internal prototype to avoid an error.
15186 Use char because int might match the return type of a GCC
15187 builtin and then its argument prototype would still apply. */
15188#ifdef __cplusplus
15189extern "C"
15190#endif
15191char append_history ();
15192int
15193main ()
15194{
15195return append_history ();
15196 ;
15197 return 0;
15198}
15199_ACEOF
15200if ac_fn_c_try_link "$LINENO"; then :
15201 ac_cv_lib_readline_append_history=yes
15202else
15203 ac_cv_lib_readline_append_history=no
15204fi
15205rm -f core conftest.err conftest.$ac_objext \
15206 conftest$ac_exeext conftest.$ac_ext
15207LIBS=$ac_check_lib_save_LIBS
15208fi
15209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15210$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15211if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15212
15213$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15214
15215fi
15216
15217
Martin v. Löwis82bca632006-02-10 20:49:30 +000015218# End of readline checks: restore LIBS
15219LIBS=$LIBS_no_readline
15220
Matthias Kloseb9621712010-04-24 17:59:49 +000015221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15222$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015223if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015224 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015225else
Martin v. Löwis11437992002-04-12 09:54:03 +000015226
Matthias Kloseb9621712010-04-24 17:59:49 +000015227if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015228 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015229else
Matthias Kloseb9621712010-04-24 17:59:49 +000015230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015231/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015232
15233int main()
15234{
15235 int val1 = nice(1);
15236 if (val1 != -1 && val1 == nice(2))
15237 exit(0);
15238 exit(1);
15239}
15240
Martin v. Löwis11437992002-04-12 09:54:03 +000015241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015242if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015243 ac_cv_broken_nice=yes
15244else
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015246fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15248 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015249fi
15250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015251fi
15252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15254$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015255if test "$ac_cv_broken_nice" = yes
15256then
Martin v. Löwis11437992002-04-12 09:54:03 +000015257
Matthias Kloseb9621712010-04-24 17:59:49 +000015258$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015259
15260fi
15261
Matthias Kloseb9621712010-04-24 17:59:49 +000015262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15263$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015264if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015266else
Matthias Kloseb9621712010-04-24 17:59:49 +000015267 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015268 ac_cv_broken_poll=no
15269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015271/* end confdefs.h. */
15272
15273#include <poll.h>
15274
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015275int main()
15276{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015277 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015278 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015279
15280 close (42);
15281
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015282 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015283 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015284 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015285 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015286 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015287 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015288 return 1;
15289}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015290
15291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015292if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015293 ac_cv_broken_poll=yes
15294else
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15298 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015300
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015301fi
15302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15304$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015305if test "$ac_cv_broken_poll" = yes
15306then
15307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015309
15310fi
15311
Martin v. Löwis1d459062005-03-14 21:23:33 +000015312# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15314$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015317else
15318
Matthias Kloseb9621712010-04-24 17:59:49 +000015319if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015320 ac_cv_working_tzset=no
15321else
Matthias Kloseb9621712010-04-24 17:59:49 +000015322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015323/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015324
15325#include <stdlib.h>
15326#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015327#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015328
15329#if HAVE_TZNAME
15330extern char *tzname[];
15331#endif
15332
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015333int main()
15334{
Brett Cannon18367812003-09-19 00:59:16 +000015335 /* Note that we need to ensure that not only does tzset(3)
15336 do 'something' with localtime, but it works as documented
15337 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015338 This includes making sure that tzname is set properly if
15339 tm->tm_zone does not exist since it is the alternative way
15340 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015341
15342 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015343 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015344 */
15345
Martin v. Löwis1d459062005-03-14 21:23:33 +000015346 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015347 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15348
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015349 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015350 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015351 if (localtime(&groundhogday)->tm_hour != 0)
15352 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015353#if HAVE_TZNAME
15354 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15355 if (strcmp(tzname[0], "UTC") ||
15356 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15357 exit(1);
15358#endif
Brett Cannon18367812003-09-19 00:59:16 +000015359
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015360 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015361 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015362 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015363 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015364#if HAVE_TZNAME
15365 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15366 exit(1);
15367#endif
Brett Cannon18367812003-09-19 00:59:16 +000015368
15369 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15370 tzset();
15371 if (localtime(&groundhogday)->tm_hour != 11)
15372 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015373#if HAVE_TZNAME
15374 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15375 exit(1);
15376#endif
15377
15378#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015379 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15380 exit(1);
15381 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15382 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015383#endif
Brett Cannon18367812003-09-19 00:59:16 +000015384
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015385 exit(0);
15386}
15387
15388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015389if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015390 ac_cv_working_tzset=yes
15391else
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15395 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015396fi
15397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015398fi
15399
Matthias Kloseb9621712010-04-24 17:59:49 +000015400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15401$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015402if test "$ac_cv_working_tzset" = yes
15403then
15404
Matthias Kloseb9621712010-04-24 17:59:49 +000015405$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015406
15407fi
15408
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015409# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15411$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015412if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015414else
Matthias Kloseb9621712010-04-24 17:59:49 +000015415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015416/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015417#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015418int
15419main ()
15420{
15421
15422struct stat st;
15423st.st_mtim.tv_nsec = 1;
15424
15425 ;
15426 return 0;
15427}
15428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015430 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015431else
Matthias Kloseb9621712010-04-24 17:59:49 +000015432 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15435fi
15436
Matthias Kloseb9621712010-04-24 17:59:49 +000015437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15438$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015439if test "$ac_cv_stat_tv_nsec" = yes
15440then
15441
Matthias Kloseb9621712010-04-24 17:59:49 +000015442$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015443
15444fi
15445
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015446# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15448$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015449if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015450 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015451else
Matthias Kloseb9621712010-04-24 17:59:49 +000015452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015453/* end confdefs.h. */
15454#include <sys/stat.h>
15455int
15456main ()
15457{
15458
15459struct stat st;
15460st.st_mtimespec.tv_nsec = 1;
15461
15462 ;
15463 return 0;
15464}
15465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015466if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015467 ac_cv_stat_tv_nsec2=yes
15468else
Matthias Kloseb9621712010-04-24 17:59:49 +000015469 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15472fi
15473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15475$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015476if test "$ac_cv_stat_tv_nsec2" = yes
15477then
15478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015480
15481fi
15482
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015483# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015484ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015485if test "$cross_compiling" = no; then
15486 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15487fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015488
15489for ac_header in curses.h ncurses.h
15490do :
15491 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15492ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15493if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15494 cat >>confdefs.h <<_ACEOF
15495#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15496_ACEOF
15497
15498fi
15499
15500done
15501
15502
15503# On Solaris, term.h requires curses.h
15504for ac_header in term.h
15505do :
15506 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15507#ifdef HAVE_CURSES_H
15508#include <curses.h>
15509#endif
15510
15511"
15512if test "x$ac_cv_header_term_h" = xyes; then :
15513 cat >>confdefs.h <<_ACEOF
15514#define HAVE_TERM_H 1
15515_ACEOF
15516
15517fi
15518
15519done
15520
15521
Jack Jansen666b1e72001-10-31 12:11:48 +000015522# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15524$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015525if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015526 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015527else
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015529/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015530#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015531int
15532main ()
15533{
Jack Jansen666b1e72001-10-31 12:11:48 +000015534
15535 int rtn;
15536 rtn = mvwdelch(0,0,0);
15537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ;
15539 return 0;
15540}
15541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015542if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015543 ac_cv_mvwdelch_is_expression=yes
15544else
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15548fi
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15551$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015552
15553if test "$ac_cv_mvwdelch_is_expression" = yes
15554then
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015557
15558fi
15559
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015560# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15561# structs since version 5.7. If the macro is defined as zero before including
15562# [n]curses.h, ncurses will expose fields of the structs regardless of the
15563# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15565$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015566if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015567 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015568else
Matthias Kloseb9621712010-04-24 17:59:49 +000015569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015570/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015571
15572 #define NCURSES_OPAQUE 0
15573 #include <curses.h>
15574
Martin v. Löwis11437992002-04-12 09:54:03 +000015575int
15576main ()
15577{
Jack Jansen666b1e72001-10-31 12:11:48 +000015578
15579 WINDOW *w;
15580 w->_flags = 0;
15581
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 ;
15583 return 0;
15584}
15585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015586if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015587 ac_cv_window_has_flags=yes
15588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15592fi
15593
Matthias Kloseb9621712010-04-24 17:59:49 +000015594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15595$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015596
Jack Jansen666b1e72001-10-31 12:11:48 +000015597
15598if test "$ac_cv_window_has_flags" = yes
15599then
Martin v. Löwis11437992002-04-12 09:54:03 +000015600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015602
15603fi
15604
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15606$as_echo_n "checking for is_pad... " >&6; }
15607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15608/* end confdefs.h. */
15609#include <curses.h>
15610int
15611main ()
15612{
15613
15614#ifndef is_pad
15615void *x=is_pad
15616#endif
15617
15618 ;
15619 return 0;
15620}
15621_ACEOF
15622if ac_fn_c_try_compile "$LINENO"; then :
15623
15624$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15625
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15627$as_echo "yes" >&6; }
15628else
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15630$as_echo "no" >&6; }
15631
15632fi
15633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634
Matthias Kloseb9621712010-04-24 17:59:49 +000015635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15636$as_echo_n "checking for is_term_resized... " >&6; }
15637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015638/* end confdefs.h. */
15639#include <curses.h>
15640int
15641main ()
15642{
15643void *x=is_term_resized
15644 ;
15645 return 0;
15646}
15647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015651
Matthias Kloseb159a552010-04-25 21:00:44 +000015652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15656$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015657
15658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15660
Matthias Kloseb9621712010-04-24 17:59:49 +000015661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15662$as_echo_n "checking for resize_term... " >&6; }
15663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015664/* end confdefs.h. */
15665#include <curses.h>
15666int
15667main ()
15668{
15669void *x=resize_term
15670 ;
15671 return 0;
15672}
15673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015674if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015675
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015677
Matthias Kloseb159a552010-04-25 21:00:44 +000015678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015679$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015680else
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15682$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015683
15684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15688$as_echo_n "checking for resizeterm... " >&6; }
15689cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015690/* end confdefs.h. */
15691#include <curses.h>
15692int
15693main ()
15694{
15695void *x=resizeterm
15696 ;
15697 return 0;
15698}
15699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015700if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015701
Matthias Kloseb9621712010-04-24 17:59:49 +000015702$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015703
Matthias Kloseb159a552010-04-25 21:00:44 +000015704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015705$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015706else
Matthias Kloseb9621712010-04-24 17:59:49 +000015707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15708$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015709
15710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015712
15713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15714$as_echo_n "checking for immedok... " >&6; }
15715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15716/* end confdefs.h. */
15717#include <curses.h>
15718int
15719main ()
15720{
15721
15722#ifndef immedok
15723void *x=immedok
15724#endif
15725
15726 ;
15727 return 0;
15728}
15729_ACEOF
15730if ac_fn_c_try_compile "$LINENO"; then :
15731
15732$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15733
15734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15735$as_echo "yes" >&6; }
15736else
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15738$as_echo "no" >&6; }
15739
15740fi
15741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15742
15743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15744$as_echo_n "checking for syncok... " >&6; }
15745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746/* end confdefs.h. */
15747#include <curses.h>
15748int
15749main ()
15750{
15751
15752#ifndef syncok
15753void *x=syncok
15754#endif
15755
15756 ;
15757 return 0;
15758}
15759_ACEOF
15760if ac_fn_c_try_compile "$LINENO"; then :
15761
15762$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15763
15764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15765$as_echo "yes" >&6; }
15766else
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15768$as_echo "no" >&6; }
15769
15770fi
15771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15772
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15774$as_echo_n "checking for wchgat... " >&6; }
15775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15776/* end confdefs.h. */
15777#include <curses.h>
15778int
15779main ()
15780{
15781
15782#ifndef wchgat
15783void *x=wchgat
15784#endif
15785
15786 ;
15787 return 0;
15788}
15789_ACEOF
15790if ac_fn_c_try_compile "$LINENO"; then :
15791
15792$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15793
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15795$as_echo "yes" >&6; }
15796else
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15798$as_echo "no" >&6; }
15799
15800fi
15801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15802
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15804$as_echo_n "checking for filter... " >&6; }
15805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15806/* end confdefs.h. */
15807#include <curses.h>
15808int
15809main ()
15810{
15811
15812#ifndef filter
15813void *x=filter
15814#endif
15815
15816 ;
15817 return 0;
15818}
15819_ACEOF
15820if ac_fn_c_try_compile "$LINENO"; then :
15821
15822$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15823
15824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15825$as_echo "yes" >&6; }
15826else
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15828$as_echo "no" >&6; }
15829
15830fi
15831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832
15833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15834$as_echo_n "checking for has_key... " >&6; }
15835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15836/* end confdefs.h. */
15837#include <curses.h>
15838int
15839main ()
15840{
15841
15842#ifndef has_key
15843void *x=has_key
15844#endif
15845
15846 ;
15847 return 0;
15848}
15849_ACEOF
15850if ac_fn_c_try_compile "$LINENO"; then :
15851
15852$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15853
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15855$as_echo "yes" >&6; }
15856else
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15858$as_echo "no" >&6; }
15859
15860fi
15861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15862
15863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15864$as_echo_n "checking for typeahead... " >&6; }
15865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866/* end confdefs.h. */
15867#include <curses.h>
15868int
15869main ()
15870{
15871
15872#ifndef typeahead
15873void *x=typeahead
15874#endif
15875
15876 ;
15877 return 0;
15878}
15879_ACEOF
15880if ac_fn_c_try_compile "$LINENO"; then :
15881
15882$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15883
15884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15885$as_echo "yes" >&6; }
15886else
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15888$as_echo "no" >&6; }
15889
15890fi
15891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15892
15893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15894$as_echo_n "checking for use_env... " >&6; }
15895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15896/* end confdefs.h. */
15897#include <curses.h>
15898int
15899main ()
15900{
15901
15902#ifndef use_env
15903void *x=use_env
15904#endif
15905
15906 ;
15907 return 0;
15908}
15909_ACEOF
15910if ac_fn_c_try_compile "$LINENO"; then :
15911
15912$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15913
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15915$as_echo "yes" >&6; }
15916else
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15918$as_echo "no" >&6; }
15919
15920fi
15921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015922# last curses configure check
15923CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15926$as_echo "$as_me: checking for device files" >&6;}
15927
15928if test "x$cross_compiling" = xyes; then
15929 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15931$as_echo_n "checking for /dev/ptmx... " >&6; }
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15933$as_echo "not set" >&6; }
15934 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15935 fi
15936 if test "${ac_cv_file__dev_ptc+set}" != set; then
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15938$as_echo_n "checking for /dev/ptc... " >&6; }
15939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15940$as_echo "not set" >&6; }
15941 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15942 fi
15943fi
15944
Matthias Kloseb9621712010-04-24 17:59:49 +000015945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15946$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015947if ${ac_cv_file__dev_ptmx+:} false; then :
15948 $as_echo_n "(cached) " >&6
15949else
15950 test "$cross_compiling" = yes &&
15951 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15952if test -r "/dev/ptmx"; then
15953 ac_cv_file__dev_ptmx=yes
15954else
15955 ac_cv_file__dev_ptmx=no
15956fi
15957fi
15958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15959$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15960if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015961
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015962fi
15963
15964if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015967
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15970$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015971if ${ac_cv_file__dev_ptc+:} false; then :
15972 $as_echo_n "(cached) " >&6
15973else
15974 test "$cross_compiling" = yes &&
15975 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15976if test -r "/dev/ptc"; then
15977 ac_cv_file__dev_ptc=yes
15978else
15979 ac_cv_file__dev_ptc=no
15980fi
15981fi
15982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15983$as_echo "$ac_cv_file__dev_ptc" >&6; }
15984if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015985
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015986fi
15987
15988if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015989
Matthias Kloseb9621712010-04-24 17:59:49 +000015990$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015991
Neal Norwitz865400f2003-03-21 01:42:58 +000015992fi
15993
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015994if test $ac_sys_system = Darwin
15995then
15996 LIBS="$LIBS -framework CoreFoundation"
15997fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16000$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016001if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016002 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016003else
Matthias Kloseb9621712010-04-24 17:59:49 +000016004 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016005 ac_cv_have_size_t_format="cross -- assuming yes"
16006
Thomas Wouters477c8d52006-05-27 19:21:47 +000016007else
Matthias Kloseb9621712010-04-24 17:59:49 +000016008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016009/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016010
Thomas Wouters477c8d52006-05-27 19:21:47 +000016011#include <stdio.h>
16012#include <stddef.h>
16013#include <string.h>
16014
Christian Heimes2c181612007-12-17 20:04:13 +000016015#ifdef HAVE_SYS_TYPES_H
16016#include <sys/types.h>
16017#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016018
16019#ifdef HAVE_SSIZE_T
16020typedef ssize_t Py_ssize_t;
16021#elif SIZEOF_VOID_P == SIZEOF_LONG
16022typedef long Py_ssize_t;
16023#else
16024typedef int Py_ssize_t;
16025#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016026
Christian Heimes2c181612007-12-17 20:04:13 +000016027int main()
16028{
16029 char buffer[256];
16030
Thomas Wouters477c8d52006-05-27 19:21:47 +000016031 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16032 return 1;
16033
Thomas Wouters89f507f2006-12-13 04:49:30 +000016034 if (strcmp(buffer, "123"))
16035 return 1;
16036
16037 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16038 return 1;
16039
16040 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016041 return 1;
16042
16043 return 0;
16044}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016045
Thomas Wouters477c8d52006-05-27 19:21:47 +000016046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016047if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016048 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016049else
Matthias Kloseb9621712010-04-24 17:59:49 +000016050 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016052rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16053 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016054fi
16055
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16058$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016059if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016060
Matthias Kloseb9621712010-04-24 17:59:49 +000016061$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016062
16063fi
16064
Matthias Kloseb9621712010-04-24 17:59:49 +000016065ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016066#ifdef HAVE_SYS_TYPES_H
16067#include <sys/types.h>
16068#endif
16069#ifdef HAVE_SYS_SOCKET_H
16070#include <sys/socket.h>
16071#endif
16072
Matthias Kloseb9621712010-04-24 17:59:49 +000016073"
Victor Stinnere0be4232011-10-25 13:06:09 +020016074if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016075
Martin v. Löwis11437992002-04-12 09:54:03 +000016076else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016077
Matthias Kloseb9621712010-04-24 17:59:49 +000016078$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016079
16080fi
16081
Michael W. Hudson54241132001-12-07 15:38:26 +000016082
Matthias Kloseb9621712010-04-24 17:59:49 +000016083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16084$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016085if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016086 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016087else
Matthias Kloseb9621712010-04-24 17:59:49 +000016088 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016089 ac_cv_broken_mbstowcs=no
16090else
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016092/* end confdefs.h. */
16093
Stefan Krah19c21392012-11-22 23:47:32 +010016094#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016095#include<stdlib.h>
16096int main() {
16097 size_t len = -1;
16098 const char *str = "text";
16099 len = mbstowcs(NULL, str, 0);
16100 return (len != 4);
16101}
16102
16103_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016104if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016105 ac_cv_broken_mbstowcs=no
16106else
Matthias Kloseb9621712010-04-24 17:59:49 +000016107 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016111fi
16112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016113fi
16114
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16116$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016117if test "$ac_cv_broken_mbstowcs" = yes
16118then
16119
Matthias Kloseb9621712010-04-24 17:59:49 +000016120$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016121
16122fi
16123
Antoine Pitroub52ec782009-01-25 16:34:23 +000016124# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16126$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016127
16128# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016129if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016130 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016131if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016132then
16133
Matthias Kloseb9621712010-04-24 17:59:49 +000016134$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016135
Matthias Kloseb9621712010-04-24 17:59:49 +000016136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16137$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016138fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016139if test "$withval" = no
16140then
16141
16142$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16143
Matthias Kloseb9621712010-04-24 17:59:49 +000016144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16145$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016146fi
16147
Antoine Pitrou042b1282010-08-13 21:15:58 +000016148else
16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16150$as_echo "no value specified" >&6; }
16151fi
16152
Antoine Pitroub52ec782009-01-25 16:34:23 +000016153
Matthias Kloseb17289e2012-03-15 19:51:34 +010016154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16155$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16156if ${ac_cv_computed_gotos+:} false; then :
16157 $as_echo_n "(cached) " >&6
16158else
16159 if test "$cross_compiling" = yes; then :
16160 if test "${with_computed_gotos+set}" = set; then
16161 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16162 else
16163 ac_cv_computed_gotos=no
16164 fi
16165else
16166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16167/* end confdefs.h. */
16168
16169int main(int argc, char **argv)
16170{
16171 static void *targets[1] = { &&LABEL1 };
16172 goto LABEL2;
16173LABEL1:
16174 return 0;
16175LABEL2:
16176 goto *targets[0];
16177 return 1;
16178}
16179
16180_ACEOF
16181if ac_fn_c_try_run "$LINENO"; then :
16182 ac_cv_computed_gotos=yes
16183else
16184 ac_cv_computed_gotos=no
16185fi
16186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16187 conftest.$ac_objext conftest.beam conftest.$ac_ext
16188fi
16189
16190fi
16191
16192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16193$as_echo "$ac_cv_computed_gotos" >&6; }
16194case "$ac_cv_computed_gotos" in yes*)
16195
16196$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16197
16198esac
16199
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016200case $ac_sys_system in
16201AIX*)
16202
16203$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16204 ;;
16205esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016206
Michael W. Hudson54241132001-12-07 15:38:26 +000016207
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016208
16209
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016210for h in `(cd $srcdir;echo Python/thread_*.h)`
16211do
16212 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16213done
16214
Michael W. Hudson54241132001-12-07 15:38:26 +000016215
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016216SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16218$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016219for dir in $SRCDIRS; do
16220 if test ! -d $dir; then
16221 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016222 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016223done
Matthias Kloseb9621712010-04-24 17:59:49 +000016224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16225$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016226
Stefan Krah1919b7e2012-03-21 18:25:23 +010016227# Availability of -O2:
16228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16229$as_echo_n "checking for -O2... " >&6; }
16230saved_cflags="$CFLAGS"
16231CFLAGS="-O2"
16232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235int
16236main ()
16237{
16238
16239
16240 ;
16241 return 0;
16242}
16243_ACEOF
16244if ac_fn_c_try_compile "$LINENO"; then :
16245 have_O2=yes
16246else
16247 have_O2=no
16248fi
16249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16251$as_echo "$have_O2" >&6; }
16252CFLAGS="$saved_cflags"
16253
16254# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16255# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16257$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16258saved_cflags="$CFLAGS"
16259CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16260if test "$have_O2" = no; then
16261 CFLAGS=""
16262fi
16263if test "$cross_compiling" = yes; then :
16264 have_glibc_memmove_bug=undefined
16265else
16266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16267/* end confdefs.h. */
16268
16269#include <stdio.h>
16270#include <stdlib.h>
16271#include <string.h>
16272void foo(void *p, void *q) { memmove(p, q, 19); }
16273int main() {
16274 char a[32] = "123456789000000000";
16275 foo(&a[9], a);
16276 if (strcmp(a, "123456789123456789000000000") != 0)
16277 return 1;
16278 foo(a, &a[9]);
16279 if (strcmp(a, "123456789000000000") != 0)
16280 return 1;
16281 return 0;
16282}
16283
16284_ACEOF
16285if ac_fn_c_try_run "$LINENO"; then :
16286 have_glibc_memmove_bug=no
16287else
16288 have_glibc_memmove_bug=yes
16289fi
16290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16291 conftest.$ac_objext conftest.beam conftest.$ac_ext
16292fi
16293
16294CFLAGS="$saved_cflags"
16295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16296$as_echo "$have_glibc_memmove_bug" >&6; }
16297if test "$have_glibc_memmove_bug" = yes; then
16298
16299$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16300
16301fi
16302
16303if test "$have_gcc_asm_for_x87" = yes; then
16304 # Some versions of gcc miscompile inline asm:
16305 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16306 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16307 case $CC in
16308 *gcc*)
16309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16310$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16311 saved_cflags="$CFLAGS"
16312 CFLAGS="-O2"
16313 if test "$cross_compiling" = yes; then :
16314 have_ipa_pure_const_bug=undefined
16315else
16316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16317/* end confdefs.h. */
16318
16319 __attribute__((noinline)) int
16320 foo(int *p) {
16321 int r;
16322 asm ( "movl \$6, (%1)\n\t"
16323 "xorl %0, %0\n\t"
16324 : "=r" (r) : "r" (p) : "memory"
16325 );
16326 return r;
16327 }
16328 int main() {
16329 int p = 8;
16330 if ((foo(&p) ? : p) != 6)
16331 return 1;
16332 return 0;
16333 }
16334
16335_ACEOF
16336if ac_fn_c_try_run "$LINENO"; then :
16337 have_ipa_pure_const_bug=no
16338else
16339 have_ipa_pure_const_bug=yes
16340fi
16341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16342 conftest.$ac_objext conftest.beam conftest.$ac_ext
16343fi
16344
16345 CFLAGS="$saved_cflags"
16346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16347$as_echo "$have_ipa_pure_const_bug" >&6; }
16348 if test "$have_ipa_pure_const_bug" = yes; then
16349
16350$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16351
16352 fi
16353 ;;
16354 esac
16355fi
16356
Victor Stinner4f5366e2015-01-09 02:13:19 +010016357# Check for stdatomic.h
16358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16359$as_echo_n "checking for stdatomic.h... " >&6; }
16360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361/* end confdefs.h. */
16362
16363
16364 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016365 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016366 int main() {
16367 int loaded_value = atomic_load(&value);
16368 return 0;
16369 }
16370
16371
16372_ACEOF
16373if ac_fn_c_try_link "$LINENO"; then :
16374 have_stdatomic_h=yes
16375else
16376 have_stdatomic_h=no
16377fi
16378rm -f core conftest.err conftest.$ac_objext \
16379 conftest$ac_exeext conftest.$ac_ext
16380
16381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16382$as_echo "$have_stdatomic_h" >&6; }
16383
16384if test "$have_stdatomic_h" = yes; then
16385
16386$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16387
16388fi
16389
16390# Check for GCC >= 4.7 __atomic builtins
16391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16392$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16393cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16394/* end confdefs.h. */
16395
16396
16397 volatile int val = 1;
16398 int main() {
16399 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16400 return 0;
16401 }
16402
16403
16404_ACEOF
16405if ac_fn_c_try_link "$LINENO"; then :
16406 have_builtin_atomic=yes
16407else
16408 have_builtin_atomic=no
16409fi
16410rm -f core conftest.err conftest.$ac_objext \
16411 conftest$ac_exeext conftest.$ac_ext
16412
16413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16414$as_echo "$have_builtin_atomic" >&6; }
16415
16416if test "$have_builtin_atomic" = yes; then
16417
16418$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16419
16420fi
16421
Ned Deily322f5ba2013-11-21 23:01:59 -080016422# ensurepip option
16423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16424$as_echo_n "checking for ensurepip... " >&6; }
16425
16426# Check whether --with-ensurepip was given.
16427if test "${with_ensurepip+set}" = set; then :
16428 withval=$with_ensurepip;
16429else
16430 with_ensurepip=upgrade
16431fi
16432
16433case $with_ensurepip in #(
16434 yes|upgrade) :
16435 ENSUREPIP=upgrade ;; #(
16436 install) :
16437 ENSUREPIP=install ;; #(
16438 no) :
16439 ENSUREPIP=no ;; #(
16440 *) :
16441 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16442esac
16443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16444$as_echo "$ENSUREPIP" >&6; }
16445
16446
Victor Stinner35a97c02015-03-08 02:59:09 +010016447# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16449$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16450cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451/* end confdefs.h. */
16452
16453
16454 #include <dirent.h>
16455
16456 int main() {
16457 struct dirent entry;
16458 return entry.d_type == DT_UNKNOWN;
16459 }
16460
16461
16462_ACEOF
16463if ac_fn_c_try_link "$LINENO"; then :
16464 have_dirent_d_type=yes
16465else
16466 have_dirent_d_type=no
16467fi
16468rm -f core conftest.err conftest.$ac_objext \
16469 conftest$ac_exeext conftest.$ac_ext
16470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16471$as_echo "$have_dirent_d_type" >&6; }
16472
16473if test "$have_dirent_d_type" = yes; then
16474
16475$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16476
16477fi
16478
Victor Stinner9eb57c52015-03-19 22:21:49 +010016479# check if the Linux getrandom() syscall is available
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16481$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16483/* end confdefs.h. */
16484
16485
Victor Stinner1b80b242016-04-12 22:34:58 +020016486 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016487 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016488 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016489
16490 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016491 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016492 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016493 const int flags = GRND_NONBLOCK;
16494 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016495 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016496 return 0;
16497 }
16498
16499
16500_ACEOF
16501if ac_fn_c_try_link "$LINENO"; then :
16502 have_getrandom_syscall=yes
16503else
16504 have_getrandom_syscall=no
16505fi
16506rm -f core conftest.err conftest.$ac_objext \
16507 conftest$ac_exeext conftest.$ac_ext
16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16509$as_echo "$have_getrandom_syscall" >&6; }
16510
16511if test "$have_getrandom_syscall" = yes; then
16512
16513$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16514
16515fi
16516
Victor Stinner3abf44e2015-09-18 15:38:37 +020016517# check if the getrandom() function is available
16518# the test was written for the Solaris function of <sys/random.h>
16519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16520$as_echo_n "checking for the getrandom() function... " >&6; }
16521cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16522/* end confdefs.h. */
16523
16524
16525 #include <sys/random.h>
16526
16527 int main() {
16528 char buffer[1];
16529 const size_t buflen = sizeof(buffer);
16530 const int flags = 0;
16531 /* ignore the result, Python checks for ENOSYS at runtime */
16532 (void)getrandom(buffer, buflen, flags);
16533 return 0;
16534 }
16535
16536
16537_ACEOF
16538if ac_fn_c_try_link "$LINENO"; then :
16539 have_getrandom=yes
16540else
16541 have_getrandom=no
16542fi
16543rm -f core conftest.err conftest.$ac_objext \
16544 conftest$ac_exeext conftest.$ac_ext
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16546$as_echo "$have_getrandom" >&6; }
16547
16548if test "$have_getrandom" = yes; then
16549
16550$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16551
16552fi
16553
Christian Heimesff5be6e2018-01-20 13:19:21 +010016554# Check for usable OpenSSL
16555
16556 found=false
16557
16558# Check whether --with-openssl was given.
16559if test "${with_openssl+set}" = set; then :
16560 withval=$with_openssl;
16561 case "$withval" in
16562 "" | y | ye | yes | n | no)
16563 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16564 ;;
16565 *) ssldirs="$withval"
16566 ;;
16567 esac
16568
16569else
16570
16571 # if pkg-config is installed and openssl has installed a .pc file,
16572 # then use that information and don't search ssldirs
16573 if test -n "$ac_tool_prefix"; then
16574 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16575set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16577$as_echo_n "checking for $ac_word... " >&6; }
16578if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16579 $as_echo_n "(cached) " >&6
16580else
16581 if test -n "$PKG_CONFIG"; then
16582 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16583else
16584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16585for as_dir in $PATH
16586do
16587 IFS=$as_save_IFS
16588 test -z "$as_dir" && as_dir=.
16589 for ac_exec_ext in '' $ac_executable_extensions; do
16590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16591 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16593 break 2
16594 fi
16595done
16596 done
16597IFS=$as_save_IFS
16598
16599fi
16600fi
16601PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16602if test -n "$PKG_CONFIG"; then
16603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16604$as_echo "$PKG_CONFIG" >&6; }
16605else
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16607$as_echo "no" >&6; }
16608fi
16609
16610
16611fi
16612if test -z "$ac_cv_prog_PKG_CONFIG"; then
16613 ac_ct_PKG_CONFIG=$PKG_CONFIG
16614 # Extract the first word of "pkg-config", so it can be a program name with args.
16615set dummy pkg-config; ac_word=$2
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16617$as_echo_n "checking for $ac_word... " >&6; }
16618if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16619 $as_echo_n "(cached) " >&6
16620else
16621 if test -n "$ac_ct_PKG_CONFIG"; then
16622 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16623else
16624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16625for as_dir in $PATH
16626do
16627 IFS=$as_save_IFS
16628 test -z "$as_dir" && as_dir=.
16629 for ac_exec_ext in '' $ac_executable_extensions; do
16630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16631 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16633 break 2
16634 fi
16635done
16636 done
16637IFS=$as_save_IFS
16638
16639fi
16640fi
16641ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16642if test -n "$ac_ct_PKG_CONFIG"; then
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16644$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16645else
16646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16647$as_echo "no" >&6; }
16648fi
16649
16650 if test "x$ac_ct_PKG_CONFIG" = x; then
16651 PKG_CONFIG=""
16652 else
16653 case $cross_compiling:$ac_tool_warned in
16654yes:)
16655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16657ac_tool_warned=yes ;;
16658esac
16659 PKG_CONFIG=$ac_ct_PKG_CONFIG
16660 fi
16661else
16662 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16663fi
16664
16665 if test x"$PKG_CONFIG" != x""; then
16666 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16667 if test $? = 0; then
16668 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16669 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16670 found=true
16671 fi
16672 fi
16673
16674 # no such luck; use some default ssldirs
16675 if ! $found; then
16676 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16677 fi
16678
16679
16680fi
16681
16682
16683
16684 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16685 # an 'openssl' subdirectory
16686
16687 if ! $found; then
16688 OPENSSL_INCLUDES=
16689 for ssldir in $ssldirs; do
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16691$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16692 if test -f "$ssldir/include/openssl/ssl.h"; then
16693 OPENSSL_INCLUDES="-I$ssldir/include"
16694 OPENSSL_LDFLAGS="-L$ssldir/lib"
16695 OPENSSL_LIBS="-lssl -lcrypto"
16696 found=true
16697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16698$as_echo "yes" >&6; }
16699 break
16700 else
16701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16702$as_echo "no" >&6; }
16703 fi
16704 done
16705
16706 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16707 # it will just work!
16708 fi
16709
16710 # try the preprocessor and linker with our new flags,
16711 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16712
16713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16714$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16715 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16716 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16717
16718 save_LIBS="$LIBS"
16719 save_LDFLAGS="$LDFLAGS"
16720 save_CPPFLAGS="$CPPFLAGS"
16721 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16722 LIBS="$OPENSSL_LIBS $LIBS"
16723 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16725/* end confdefs.h. */
16726#include <openssl/ssl.h>
16727int
16728main ()
16729{
16730SSL_new(NULL)
16731 ;
16732 return 0;
16733}
16734_ACEOF
16735if ac_fn_c_try_link "$LINENO"; then :
16736
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16738$as_echo "yes" >&6; }
16739 have_openssl=yes
16740
16741else
16742
16743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16744$as_echo "no" >&6; }
16745 have_openssl=no
16746
16747fi
16748rm -f core conftest.err conftest.$ac_objext \
16749 conftest$ac_exeext conftest.$ac_ext
16750 CPPFLAGS="$save_CPPFLAGS"
16751 LDFLAGS="$save_LDFLAGS"
16752 LIBS="$save_LIBS"
16753
16754
16755
16756
16757
16758
16759if test "$have_openssl" = yes; then
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16761$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16762
16763 save_LIBS="$LIBS"
16764 save_LDFLAGS="$LDFLAGS"
16765 save_CPPFLAGS="$CPPFLAGS"
16766 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16767 LIBS="$OPENSSL_LIBS $LIBS"
16768 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16769
16770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16771/* end confdefs.h. */
16772
16773 #include <openssl/x509_vfy.h>
16774
16775int
16776main ()
16777{
16778
16779 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16780 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16781 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16782 X509_VERIFY_PARAM_set_hostflags(p, 0);
16783
16784 ;
16785 return 0;
16786}
16787
16788_ACEOF
16789if ac_fn_c_try_link "$LINENO"; then :
16790
16791 ac_cv_has_x509_verify_param_set1_host=yes
16792
16793else
16794
16795 ac_cv_has_x509_verify_param_set1_host=no
16796
16797fi
16798rm -f core conftest.err conftest.$ac_objext \
16799 conftest$ac_exeext conftest.$ac_ext
16800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16801$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16802 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16803
16804$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16805
16806 fi
16807
16808 CPPFLAGS="$save_CPPFLAGS"
16809 LDFLAGS="$save_LDFLAGS"
16810 LIBS="$save_LIBS"
16811fi
16812
Christian Heimes892d66e2018-01-29 14:10:18 +010016813# ssl module default cipher suite string
16814
16815
16816
16817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16818$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16819
16820# Check whether --with-ssl-default-suites was given.
16821if test "${with_ssl_default_suites+set}" = set; then :
16822 withval=$with_ssl_default_suites;
16823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16824$as_echo "$withval" >&6; }
16825case "$withval" in
16826 python)
16827 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16828
16829 ;;
16830 openssl)
16831 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16832
16833 ;;
16834 *)
16835 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16836
16837 cat >>confdefs.h <<_ACEOF
16838#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16839_ACEOF
16840
16841 ;;
16842esac
16843
16844else
16845
16846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16847$as_echo "python" >&6; }
16848$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16849
16850
16851fi
16852
16853
16854
Guido van Rossum627b2d71993-12-24 10:39:16 +000016855# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016856ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016857
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016858ac_config_files="$ac_config_files Modules/ld_so_aix"
16859
Martin v. Löwis11437992002-04-12 09:54:03 +000016860cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016861# This file is a shell script that caches the results of configure
16862# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016863# scripts and configure runs, see configure's option --config-cache.
16864# It is not useful on other systems. If it contains results you don't
16865# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016866#
Martin v. Löwis11437992002-04-12 09:54:03 +000016867# config.status only pays attention to the cache file if you give it
16868# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016869#
Skip Montanaro6dead952003-09-25 14:50:04 +000016870# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016871# loading this file, other *unset* `ac_cv_foo' will be assigned the
16872# following values.
16873
16874_ACEOF
16875
Guido van Rossumf78abae1997-01-21 22:02:36 +000016876# The following way of writing the cache mishandles newlines in values,
16877# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016878# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016879# Ultrix sh set writes to stderr and can't be redirected directly,
16880# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881(
16882 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16883 eval ac_val=\$$ac_var
16884 case $ac_val in #(
16885 *${as_nl}*)
16886 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016887 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16888$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016889 esac
16890 case $ac_var in #(
16891 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016892 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16893 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894 esac ;;
16895 esac
16896 done
16897
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16900 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016901 # `set' does not quote correctly, so add quotes: double-quote
16902 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016903 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016904 "s/'/'\\\\''/g;
16905 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016906 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016907 *)
16908 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 esac |
16912 sort
16913) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016918 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16919 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16921 :end' >>confcache
16922if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16923 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016924 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016925 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16926$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016927 if test ! -f "$cache_file" || test -h "$cache_file"; then
16928 cat confcache >"$cache_file"
16929 else
16930 case $cache_file in #(
16931 */* | ?:*)
16932 mv -f confcache "$cache_file"$$ &&
16933 mv -f "$cache_file"$$ "$cache_file" ;; #(
16934 *)
16935 mv -f confcache "$cache_file" ;;
16936 esac
16937 fi
16938 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016939 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016940 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16941$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016942 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016943fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016944rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016946test "x$prefix" = xNONE && prefix=$ac_default_prefix
16947# Let make expand exec_prefix.
16948test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016950DEFS=-DHAVE_CONFIG_H
16951
Skip Montanaro6dead952003-09-25 14:50:04 +000016952ac_libobjs=
16953ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016954U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016955for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16956 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016958 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016959 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16960 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016961 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16962 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016963done
16964LIBOBJS=$ac_libobjs
16965
16966LTLIBOBJS=$ac_ltlibobjs
16967
16968
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
Matthias Kloseb9621712010-04-24 17:59:49 +000016970
Victor Stinnere0be4232011-10-25 13:06:09 +020016971: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016972ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016973ac_clean_files_save=$ac_clean_files
16974ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016975{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16976$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16977as_write_fail=0
16978cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016979#! $SHELL
16980# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016981# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016982# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016983# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016984
Martin v. Löwis11437992002-04-12 09:54:03 +000016985debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016986ac_cs_recheck=false
16987ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016988
Matthias Kloseb9621712010-04-24 17:59:49 +000016989SHELL=\${CONFIG_SHELL-$SHELL}
16990export SHELL
16991_ASEOF
16992cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16993## -------------------- ##
16994## M4sh Initialization. ##
16995## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997# Be more Bourne compatible
16998DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016999if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017000 emulate sh
17001 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017002 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017003 # is contrary to our usage. Disable this feature.
17004 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017006else
Matthias Kloseb9621712010-04-24 17:59:49 +000017007 case `(set -o) 2>/dev/null` in #(
17008 *posix*) :
17009 set -o posix ;; #(
17010 *) :
17011 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017013fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017014
17015
Matthias Kloseb9621712010-04-24 17:59:49 +000017016as_nl='
17017'
17018export as_nl
17019# Printing a long string crashes Solaris 7 /usr/bin/printf.
17020as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17021as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17022as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17023# Prefer a ksh shell builtin over an external printf program on Solaris,
17024# but without wasting forks for bash or zsh.
17025if test -z "$BASH_VERSION$ZSH_VERSION" \
17026 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17027 as_echo='print -r --'
17028 as_echo_n='print -rn --'
17029elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17030 as_echo='printf %s\n'
17031 as_echo_n='printf %s'
17032else
17033 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17034 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17035 as_echo_n='/usr/ucb/echo -n'
17036 else
17037 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17038 as_echo_n_body='eval
17039 arg=$1;
17040 case $arg in #(
17041 *"$as_nl"*)
17042 expr "X$arg" : "X\\(.*\\)$as_nl";
17043 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17044 esac;
17045 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17046 '
17047 export as_echo_n_body
17048 as_echo_n='sh -c $as_echo_n_body as_echo'
17049 fi
17050 export as_echo_body
17051 as_echo='sh -c $as_echo_body as_echo'
17052fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017053
17054# The user is always right.
17055if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017056 PATH_SEPARATOR=:
17057 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17058 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17059 PATH_SEPARATOR=';'
17060 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063
17064# IFS
17065# We need space, tab and new line, in precisely that order. Quoting is
17066# there to prevent editors from complaining about space-tab.
17067# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17068# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069IFS=" "" $as_nl"
17070
17071# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017072as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017073case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 *[\\/]* ) as_myself=$0 ;;
17075 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017076for as_dir in $PATH
17077do
17078 IFS=$as_save_IFS
17079 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17081 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 ;;
17085esac
17086# We did not find ourselves, most probably we were run as `sh COMMAND'
17087# in which case we are not to be found in the path.
17088if test "x$as_myself" = x; then
17089 as_myself=$0
17090fi
17091if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017092 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17093 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094fi
17095
Matthias Kloseb9621712010-04-24 17:59:49 +000017096# Unset variables that we do not need and which cause bugs (e.g. in
17097# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17098# suppresses any "Segmentation fault" message there. '((' could
17099# trigger a bug in pdksh 5.2.14.
17100for as_var in BASH_ENV ENV MAIL MAILPATH
17101do eval test x\${$as_var+set} = xset \
17102 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017103done
17104PS1='$ '
17105PS2='> '
17106PS4='+ '
17107
17108# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017109LC_ALL=C
17110export LC_ALL
17111LANGUAGE=C
17112export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017113
Matthias Kloseb9621712010-04-24 17:59:49 +000017114# CDPATH.
17115(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17116
17117
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017118# as_fn_error STATUS ERROR [LINENO LOG_FD]
17119# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017120# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17121# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017122# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017123as_fn_error ()
17124{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125 as_status=$1; test $as_status -eq 0 && as_status=1
17126 if test "$4"; then
17127 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17128 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017130 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017131 as_fn_exit $as_status
17132} # as_fn_error
17133
17134
17135# as_fn_set_status STATUS
17136# -----------------------
17137# Set $? to STATUS, without forking.
17138as_fn_set_status ()
17139{
17140 return $1
17141} # as_fn_set_status
17142
17143# as_fn_exit STATUS
17144# -----------------
17145# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17146as_fn_exit ()
17147{
17148 set +e
17149 as_fn_set_status $1
17150 exit $1
17151} # as_fn_exit
17152
17153# as_fn_unset VAR
17154# ---------------
17155# Portably unset VAR.
17156as_fn_unset ()
17157{
17158 { eval $1=; unset $1;}
17159}
17160as_unset=as_fn_unset
17161# as_fn_append VAR VALUE
17162# ----------------------
17163# Append the text in VALUE to the end of the definition contained in VAR. Take
17164# advantage of any shell optimizations that allow amortized linear growth over
17165# repeated appends, instead of the typical quadratic growth present in naive
17166# implementations.
17167if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17168 eval 'as_fn_append ()
17169 {
17170 eval $1+=\$2
17171 }'
17172else
17173 as_fn_append ()
17174 {
17175 eval $1=\$$1\$2
17176 }
17177fi # as_fn_append
17178
17179# as_fn_arith ARG...
17180# ------------------
17181# Perform arithmetic evaluation on the ARGs, and store the result in the
17182# global $as_val. Take advantage of shells that can avoid forks. The arguments
17183# must be portable across $(()) and expr.
17184if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17185 eval 'as_fn_arith ()
17186 {
17187 as_val=$(( $* ))
17188 }'
17189else
17190 as_fn_arith ()
17191 {
17192 as_val=`expr "$@" || test $? -eq 1`
17193 }
17194fi # as_fn_arith
17195
17196
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197if expr a : '\(a\)' >/dev/null 2>&1 &&
17198 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17199 as_expr=expr
17200else
17201 as_expr=false
17202fi
17203
17204if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17205 as_basename=basename
17206else
17207 as_basename=false
17208fi
17209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17211 as_dirname=dirname
17212else
17213 as_dirname=false
17214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216as_me=`$as_basename -- "$0" ||
17217$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17218 X"$0" : 'X\(//\)$' \| \
17219 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017220$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017221 sed '/^.*\/\([^/][^/]*\)\/*$/{
17222 s//\1/
17223 q
17224 }
17225 /^X\/\(\/\/\)$/{
17226 s//\1/
17227 q
17228 }
17229 /^X\/\(\/\).*/{
17230 s//\1/
17231 q
17232 }
17233 s/.*/./; q'`
17234
Matthias Kloseb9621712010-04-24 17:59:49 +000017235# Avoid depending upon Character Ranges.
17236as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17237as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17238as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17239as_cr_digits='0123456789'
17240as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017241
17242ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017243case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017245 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017247 xy) ECHO_C='\c';;
17248 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17249 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017250 esac;;
17251*)
17252 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017253esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017254
Martin v. Löwis11437992002-04-12 09:54:03 +000017255rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017256if test -d conf$$.dir; then
17257 rm -f conf$$.dir/conf$$.file
17258else
17259 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017260 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017262if (echo >conf$$.file) 2>/dev/null; then
17263 if ln -s conf$$.file conf$$ 2>/dev/null; then
17264 as_ln_s='ln -s'
17265 # ... but there are two gotchas:
17266 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17267 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017268 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017269 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017270 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 elif ln conf$$.file conf$$ 2>/dev/null; then
17272 as_ln_s=ln
17273 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017274 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017275 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017276else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017277 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017278fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017279rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17280rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017281
Matthias Kloseb9621712010-04-24 17:59:49 +000017282
17283# as_fn_mkdir_p
17284# -------------
17285# Create "$as_dir" as a directory, including parents if necessary.
17286as_fn_mkdir_p ()
17287{
17288
17289 case $as_dir in #(
17290 -*) as_dir=./$as_dir;;
17291 esac
17292 test -d "$as_dir" || eval $as_mkdir_p || {
17293 as_dirs=
17294 while :; do
17295 case $as_dir in #(
17296 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17297 *) as_qdir=$as_dir;;
17298 esac
17299 as_dirs="'$as_qdir' $as_dirs"
17300 as_dir=`$as_dirname -- "$as_dir" ||
17301$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17302 X"$as_dir" : 'X\(//\)[^/]' \| \
17303 X"$as_dir" : 'X\(//\)$' \| \
17304 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17305$as_echo X"$as_dir" |
17306 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17307 s//\1/
17308 q
17309 }
17310 /^X\(\/\/\)[^/].*/{
17311 s//\1/
17312 q
17313 }
17314 /^X\(\/\/\)$/{
17315 s//\1/
17316 q
17317 }
17318 /^X\(\/\).*/{
17319 s//\1/
17320 q
17321 }
17322 s/.*/./; q'`
17323 test -d "$as_dir" && break
17324 done
17325 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017326 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017327
17328
17329} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017330if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017331 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017332else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017333 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017334 as_mkdir_p=false
17335fi
17336
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017337
17338# as_fn_executable_p FILE
17339# -----------------------
17340# Test if FILE is an executable regular file.
17341as_fn_executable_p ()
17342{
17343 test -f "$1" && test -x "$1"
17344} # as_fn_executable_p
17345as_test_x='test -x'
17346as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017347
17348# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349as_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 +000017350
17351# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017352as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017353
17354
Martin v. Löwis11437992002-04-12 09:54:03 +000017355exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017356## ----------------------------------- ##
17357## Main body of $CONFIG_STATUS script. ##
17358## ----------------------------------- ##
17359_ASEOF
17360test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017361
Matthias Kloseb9621712010-04-24 17:59:49 +000017362cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17363# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017364# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365# values after options handling.
17366ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017367This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017368generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017369
17370 CONFIG_FILES = $CONFIG_FILES
17371 CONFIG_HEADERS = $CONFIG_HEADERS
17372 CONFIG_LINKS = $CONFIG_LINKS
17373 CONFIG_COMMANDS = $CONFIG_COMMANDS
17374 $ $0 $@
17375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376on `(hostname || uname -n) 2>/dev/null | sed 1q`
17377"
17378
Martin v. Löwis11437992002-04-12 09:54:03 +000017379_ACEOF
17380
Matthias Kloseb9621712010-04-24 17:59:49 +000017381case $ac_config_files in *"
17382"*) set x $ac_config_files; shift; ac_config_files=$*;;
17383esac
17384
17385case $ac_config_headers in *"
17386"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17387esac
17388
17389
17390cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017391# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017392config_files="$ac_config_files"
17393config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017396
Matthias Kloseb9621712010-04-24 17:59:49 +000017397cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017398ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017399\`$as_me' instantiates files and other configuration actions
17400from templates according to the current configuration. Unless the files
17401and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017404
17405 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017407 --config print configuration, then exit
17408 -q, --quiet, --silent
17409 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 -d, --debug don't remove temporary files
17411 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017412 --file=FILE[:TEMPLATE]
17413 instantiate the configuration file FILE
17414 --header=FILE[:TEMPLATE]
17415 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017416
17417Configuration files:
17418$config_files
17419
17420Configuration headers:
17421$config_headers
17422
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017423Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017426cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17427ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017428ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017429python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017430configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017431 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017432
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017433Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017434This config.status script is free software; the Free Software Foundation
17435gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436
17437ac_pwd='$ac_pwd'
17438srcdir='$srcdir'
17439INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017440MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017441test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017442_ACEOF
17443
Matthias Kloseb9621712010-04-24 17:59:49 +000017444cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17445# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017446ac_need_defaults=:
17447while test $# != 0
17448do
17449 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017450 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17452 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017453 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017454 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017455 --*=)
17456 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17457 ac_optarg=
17458 ac_shift=:
17459 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017460 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017461 ac_option=$1
17462 ac_optarg=$2
17463 ac_shift=shift
17464 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 esac
17466
Skip Montanaro6dead952003-09-25 14:50:04 +000017467 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017469 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17470 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017472 $as_echo "$ac_cs_version"; exit ;;
17473 --config | --confi | --conf | --con | --co | --c )
17474 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 debug=: ;;
17477 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017478 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017479 case $ac_optarg in
17480 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017481 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 esac
17483 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017484 ac_need_defaults=false;;
17485 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017486 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017487 case $ac_optarg in
17488 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17489 esac
17490 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017492 --he | --h)
17493 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017494 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017495Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017497 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017498 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17499 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17500 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
17502 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017503 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017504Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017505
Matthias Kloseb9621712010-04-24 17:59:49 +000017506 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017508
17509 esac
17510 shift
17511done
17512
Skip Montanaro6dead952003-09-25 14:50:04 +000017513ac_configure_extra_args=
17514
17515if $ac_cs_silent; then
17516 exec 6>/dev/null
17517 ac_configure_extra_args="$ac_configure_extra_args --silent"
17518fi
17519
17520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017521cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017522if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017523 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017524 shift
17525 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17526 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017529fi
17530
Martin v. Löwis11437992002-04-12 09:54:03 +000017531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017532cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533exec 5>>config.log
17534{
17535 echo
17536 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17537## Running $as_me. ##
17538_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017539 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
Matthias Kloseb9621712010-04-24 17:59:49 +000017546cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547
17548# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017549for ac_config_target in $ac_config_targets
17550do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551 case $ac_config_target in
17552 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17553 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17554 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017555 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17556 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017558 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017559 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017560 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561
Victor Stinnere0be4232011-10-25 13:06:09 +020017562 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017563 esac
17564done
17565
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017566
Martin v. Löwis11437992002-04-12 09:54:03 +000017567# If the user did not use the arguments to specify the items to instantiate,
17568# then the envvar interface is used. Set only those that are not.
17569# We use the long form for the default assignment because of an extremely
17570# bizarre bug on SunOS 4.1.3.
17571if $ac_need_defaults; then
17572 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17573 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17574fi
17575
Skip Montanaro6dead952003-09-25 14:50:04 +000017576# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017578# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579# Hook for its removal unless debugging.
17580# Note that there is a small window in which the directory will not be cleaned:
17581# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017582$debug ||
17583{
Victor Stinnere0be4232011-10-25 13:06:09 +020017584 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017585 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017586 : "${ac_tmp:=$tmp}"
17587 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017589 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017590}
Martin v. Löwis11437992002-04-12 09:54:03 +000017591# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017592
Martin v. Löwis11437992002-04-12 09:54:03 +000017593{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017595 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017596} ||
17597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598 tmp=./conf$$-$RANDOM
17599 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017600} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017601ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017602
Matthias Kloseb9621712010-04-24 17:59:49 +000017603# Set up the scripts for CONFIG_FILES section.
17604# No need to generate them if there are no CONFIG_FILES.
17605# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
Matthias Kloseb9621712010-04-24 17:59:49 +000017608
17609ac_cr=`echo X | tr X '\015'`
17610# On cygwin, bash can eat \r inside `` if the user requested igncr.
17611# But we know of no other shell where ac_cr would be empty at this
17612# point, so we can use a bashism as a fallback.
17613if test "x$ac_cr" = x; then
17614 eval ac_cr=\$\'\\r\'
17615fi
17616ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17617if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017618 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017619else
17620 ac_cs_awk_cr=$ac_cr
17621fi
17622
Victor Stinnere0be4232011-10-25 13:06:09 +020017623echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017624_ACEOF
17625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626
Matthias Kloseb9621712010-04-24 17:59:49 +000017627{
17628 echo "cat >conf$$subs.awk <<_ACEOF" &&
17629 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17630 echo "_ACEOF"
17631} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017632 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17633ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634ac_delim='%!_!# '
17635for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017636 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017638
Matthias Kloseb9621712010-04-24 17:59:49 +000017639 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17640 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641 break
17642 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017643 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 else
17645 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017646 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647done
Matthias Kloseb9621712010-04-24 17:59:49 +000017648rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649
Matthias Kloseb9621712010-04-24 17:59:49 +000017650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017651cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017653sed -n '
17654h
17655s/^/S["/; s/!.*/"]=/
17656p
17657g
17658s/^[^!]*!//
17659:repl
17660t repl
17661s/'"$ac_delim"'$//
17662t delim
17663:nl
17664h
17665s/\(.\{148\}\)..*/\1/
17666t more1
17667s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17668p
17669n
17670b repl
17671:more1
17672s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17673p
17674g
17675s/.\{148\}//
17676t nl
17677:delim
17678h
17679s/\(.\{148\}\)..*/\1/
17680t more2
17681s/["\\]/\\&/g; s/^/"/; s/$/"/
17682p
17683b
17684:more2
17685s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17686p
17687g
17688s/.\{148\}//
17689t delim
17690' <conf$$subs.awk | sed '
17691/^[^""]/{
17692 N
17693 s/\n//
17694}
17695' >>$CONFIG_STATUS || ac_write_fail=1
17696rm -f conf$$subs.awk
17697cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17698_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017699cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017700 for (key in S) S_is_set[key] = 1
17701 FS = ""
17702
17703}
17704{
17705 line = $ 0
17706 nfields = split(line, field, "@")
17707 substed = 0
17708 len = length(field[1])
17709 for (i = 2; i < nfields; i++) {
17710 key = field[i]
17711 keylen = length(key)
17712 if (S_is_set[key]) {
17713 value = S[key]
17714 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17715 len += length(value) + length(field[++i])
17716 substed = 1
17717 } else
17718 len += 1 + keylen
17719 }
17720
17721 print line
17722}
17723
17724_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017726cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17727if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17728 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17729else
17730 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017731fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017732 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017733_ACEOF
17734
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017735# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17736# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017737# trailing colons and then remove the whole line if VPATH becomes empty
17738# (actually we leave an empty line to preserve line numbers).
17739if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017740 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17741h
17742s///
17743s/^/:/
17744s/[ ]*$/:/
17745s/:\$(srcdir):/:/g
17746s/:\${srcdir}:/:/g
17747s/:@srcdir@:/:/g
17748s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017750x
17751s/\(=[ ]*\).*/\1/
17752G
17753s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017754s/^[^=]*=[ ]*$//
17755}'
17756fi
17757
Matthias Kloseb9621712010-04-24 17:59:49 +000017758cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017759fi # test -n "$CONFIG_FILES"
17760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761# Set up the scripts for CONFIG_HEADERS section.
17762# No need to generate them if there are no CONFIG_HEADERS.
17763# This happens for instance with `./config.status Makefile'.
17764if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017765cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017766BEGIN {
17767_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017768
Matthias Kloseb9621712010-04-24 17:59:49 +000017769# Transform confdefs.h into an awk script `defines.awk', embedded as
17770# here-document in config.status, that substitutes the proper values into
17771# config.h.in to produce config.h.
17772
17773# Create a delimiter string that does not exist in confdefs.h, to ease
17774# handling of long lines.
17775ac_delim='%!_!# '
17776for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017777 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17778 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017779 break
17780 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017781 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017782 else
17783 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17784 fi
17785done
17786
17787# For the awk script, D is an array of macro values keyed by name,
17788# likewise P contains macro parameters if any. Preserve backslash
17789# newline sequences.
17790
17791ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17792sed -n '
17793s/.\{148\}/&'"$ac_delim"'/g
17794t rset
17795:rset
17796s/^[ ]*#[ ]*define[ ][ ]*/ /
17797t def
17798d
17799:def
17800s/\\$//
17801t bsnl
17802s/["\\]/\\&/g
17803s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17804D["\1"]=" \3"/p
17805s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17806d
17807:bsnl
17808s/["\\]/\\&/g
17809s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17810D["\1"]=" \3\\\\\\n"\\/p
17811t cont
17812s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17813t cont
17814d
17815:cont
17816n
17817s/.\{148\}/&'"$ac_delim"'/g
17818t clear
17819:clear
17820s/\\$//
17821t bsnlc
17822s/["\\]/\\&/g; s/^/"/; s/$/"/p
17823d
17824:bsnlc
17825s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17826b cont
17827' <confdefs.h | sed '
17828s/'"$ac_delim"'/"\\\
17829"/g' >>$CONFIG_STATUS || ac_write_fail=1
17830
17831cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17832 for (key in D) D_is_set[key] = 1
17833 FS = ""
17834}
17835/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17836 line = \$ 0
17837 split(line, arg, " ")
17838 if (arg[1] == "#") {
17839 defundef = arg[2]
17840 mac1 = arg[3]
17841 } else {
17842 defundef = substr(arg[1], 2)
17843 mac1 = arg[2]
17844 }
17845 split(mac1, mac2, "(") #)
17846 macro = mac2[1]
17847 prefix = substr(line, 1, index(line, defundef) - 1)
17848 if (D_is_set[macro]) {
17849 # Preserve the white space surrounding the "#".
17850 print prefix "define", macro P[macro] D[macro]
17851 next
17852 } else {
17853 # Replace #undef with comments. This is necessary, for example,
17854 # in the case of _POSIX_SOURCE, which is predefined and required
17855 # on some systems where configure will not decide to define it.
17856 if (defundef == "undef") {
17857 print "/*", prefix defundef, macro, "*/"
17858 next
17859 }
17860 }
17861}
17862{ print }
17863_ACAWK
17864_ACEOF
17865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017866 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017867fi # test -n "$CONFIG_HEADERS"
17868
17869
17870eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17871shift
17872for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873do
17874 case $ac_tag in
17875 :[FHLC]) ac_mode=$ac_tag; continue;;
17876 esac
17877 case $ac_mode$ac_tag in
17878 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017879 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017880 :[FH]-) ac_tag=-:-;;
17881 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17882 esac
17883 ac_save_IFS=$IFS
17884 IFS=:
17885 set x $ac_tag
17886 IFS=$ac_save_IFS
17887 shift
17888 ac_file=$1
17889 shift
17890
17891 case $ac_mode in
17892 :L) ac_source=$1;;
17893 :[FH])
17894 ac_file_inputs=
17895 for ac_f
17896 do
17897 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017898 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899 *) # Look for the file first in the build tree, then in the source tree
17900 # (if the path is not absolute). The absolute path cannot be DOS-style,
17901 # because $ac_f cannot contain `:'.
17902 test -f "$ac_f" ||
17903 case $ac_f in
17904 [\\/$]*) false;;
17905 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17906 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017907 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17910 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911 done
17912
17913 # Let's still pretend it is `configure' which instantiates (i.e., don't
17914 # use $as_me), people would be surprised to read:
17915 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 configure_input='Generated from '`
17917 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17918 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017919 if test x"$ac_file" != x-; then
17920 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017921 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17922$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017923 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 # Neutralize special characters interpreted by sed in replacement strings.
17925 case $configure_input in #(
17926 *\&* | *\|* | *\\* )
17927 ac_sed_conf_input=`$as_echo "$configure_input" |
17928 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17929 *) ac_sed_conf_input=$configure_input;;
17930 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017931
17932 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017933 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17934 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017935 esac
17936 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017937 esac
17938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017939 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017940$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017941 X"$ac_file" : 'X\(//\)[^/]' \| \
17942 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017943 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017944$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17946 s//\1/
17947 q
17948 }
17949 /^X\(\/\/\)[^/].*/{
17950 s//\1/
17951 q
17952 }
17953 /^X\(\/\/\)$/{
17954 s//\1/
17955 q
17956 }
17957 /^X\(\/\).*/{
17958 s//\1/
17959 q
17960 }
17961 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017962 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017963 ac_builddir=.
17964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965case "$ac_dir" in
17966.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17967*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017968 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017970 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971 case $ac_top_builddir_sub in
17972 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17973 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17974 esac ;;
17975esac
17976ac_abs_top_builddir=$ac_pwd
17977ac_abs_builddir=$ac_pwd$ac_dir_suffix
17978# for backward compatibility:
17979ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017980
17981case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017983 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 ac_top_srcdir=$ac_top_builddir_sub
17985 ac_abs_top_srcdir=$ac_pwd ;;
17986 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017987 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988 ac_top_srcdir=$srcdir
17989 ac_abs_top_srcdir=$srcdir ;;
17990 *) # Relative name.
17991 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17992 ac_top_srcdir=$ac_top_build_prefix$srcdir
17993 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017994esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017996
Martin v. Löwis11437992002-04-12 09:54:03 +000017997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 case $ac_mode in
17999 :F)
18000 #
18001 # CONFIG_FILE
18002 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018003
18004 case $INSTALL in
18005 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018008 ac_MKDIR_P=$MKDIR_P
18009 case $MKDIR_P in
18010 [\\/$]* | ?:[\\/]* ) ;;
18011 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18012 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018013_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014
Matthias Kloseb9621712010-04-24 17:59:49 +000018015cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016# If the template does not know about datarootdir, expand it.
18017# FIXME: This hack should be removed a few years after 2.60.
18018ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018019ac_sed_dataroot='
18020/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021 p
18022 q
18023}
18024/@datadir@/p
18025/@docdir@/p
18026/@infodir@/p
18027/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018028/@mandir@/p'
18029case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030*datarootdir*) ac_datarootdir_seen=yes;;
18031*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18033$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036 ac_datarootdir_hack='
18037 s&@datadir@&$datadir&g
18038 s&@docdir@&$docdir&g
18039 s&@infodir@&$infodir&g
18040 s&@localedir@&$localedir&g
18041 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018042 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043esac
18044_ACEOF
18045
18046# Neutralize VPATH when `$srcdir' = `.'.
18047# Shell code in configure.ac might set extrasub.
18048# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018049cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18050ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018051$extrasub
18052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018054:t
18055/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018056s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018058s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059s&@srcdir@&$ac_srcdir&;t t
18060s&@abs_srcdir@&$ac_abs_srcdir&;t t
18061s&@top_srcdir@&$ac_top_srcdir&;t t
18062s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18063s&@builddir@&$ac_builddir&;t t
18064s&@abs_builddir@&$ac_abs_builddir&;t t
18065s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18066s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018067s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018069"
Victor Stinnere0be4232011-10-25 13:06:09 +020018070eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18071 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018072
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018074 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18075 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18076 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018078which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018079$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018080which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018081
Victor Stinnere0be4232011-10-25 13:06:09 +020018082 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018084 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18085 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018086 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018087 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018088 ;;
18089 :H)
18090 #
18091 # CONFIG_HEADER
18092 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018094 {
18095 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018096 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18097 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018098 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018099 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018100 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18101$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018103 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018104 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018105 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018106 fi
18107 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018108 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018109 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018110 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018111 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018114
18115 esac
18116
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018117
18118 case $ac_file$ac_mode in
18119 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18120
18121 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018122done # for ac_tag
18123
Guido van Rossum627b2d71993-12-24 10:39:16 +000018124
Matthias Kloseb9621712010-04-24 17:59:49 +000018125as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018126_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018127ac_clean_files=$ac_clean_files_save
18128
Matthias Kloseb9621712010-04-24 17:59:49 +000018129test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018130 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018131
Martin v. Löwis11437992002-04-12 09:54:03 +000018132
18133# configure is writing to config.log, and then calls config.status.
18134# config.status does its own redirection, appending to config.log.
18135# Unfortunately, on DOS this fails, as config.log is still kept open
18136# by configure, so config.status won't be able to write to it; its
18137# output is simply discarded. So we exec the FD to /dev/null,
18138# effectively closing config.log, so it can be properly (re)opened and
18139# appended to by config.status. When coming back to configure, we
18140# need to make the FD available again.
18141if test "$no_create" != yes; then
18142 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018143 ac_config_status_args=
18144 test "$silent" = yes &&
18145 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018147 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 exec 5>>config.log
18149 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18150 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018151 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018152fi
18153if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18155$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018156fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018157
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018158
Christian Heimes75ed8902013-11-20 01:11:18 +010018159echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018160if test ! -f Modules/Setup.local
18161then
18162 echo "# Edit this file for local setup changes" >Modules/Setup.local
18163fi
18164
Christian Heimes75ed8902013-11-20 01:11:18 +010018165echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018166$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018167 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018168 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018169mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018170
18171if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18172 echo "" >&6
18173 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018174 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 +000018175 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018176 echo "" >&6
18177 echo "" >&6
18178fi
18179