blob: 9d2c4e4ad7e6f2d2ae1eddbec3e5cd6706dc5434 [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
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LDLAST
Ned Deilyd819b932013-09-06 01:07:05 -0700653TCLTK_LIBS
654TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000655LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800656PKG_CONFIG_LIBDIR
657PKG_CONFIG_PATH
658PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000659SHLIBS
660CFLAGSFORSHARED
661LINKFORSHARED
662CCSHARED
663BLDSHARED
664LDCXXSHARED
665LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700666SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LIBTOOL_CRUFT
668OTHER_LIBTOOL_OPT
669UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675target_os
676target_vendor
677target_cpu
678target
679LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700680LLVM_PROF_ERR
681LLVM_PROF_FILE
682LLVM_PROF_MERGER
683PGO_PROF_USE_FLAG
684PGO_PROF_GEN_FLAG
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698GNULD
699LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000700LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000701RUNSHARED
702INSTSONAME
703LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000704PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000705BLDLIBRARY
706DLLLIBRARY
707LDLIBRARY
708LIBRARY
709BUILDEXEEXT
710EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200711NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200712MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713PLATFORM_TRIPLET
714MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200715ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000716MAINCC
717CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700718SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200719GREP
720CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000721OBJEXT
722EXEEXT
723ac_ct_CC
724CPPFLAGS
725LDFLAGS
726CFLAGS
727CC
728EXPORT_MACOSX_DEPLOYMENT_TARGET
729CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000731MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000732FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000733FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800734FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKALTINSTALLLAST
736FRAMEWORKALTINSTALLFIRST
737FRAMEWORKINSTALLLAST
738FRAMEWORKINSTALLFIRST
739PYTHONFRAMEWORKINSTALLDIR
740PYTHONFRAMEWORKPREFIX
741PYTHONFRAMEWORKDIR
742PYTHONFRAMEWORKIDENTIFIER
743PYTHONFRAMEWORK
744LIPO_32BIT_FLAGS
745ARCH_RUN_32BIT
746UNIVERSALSDK
747CONFIG_ARGS
748SOVERSION
749VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200750PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200751PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100752host_os
753host_vendor
754host_cpu
755host
756build_os
757build_vendor
758build_cpu
759build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500760HAS_GIT
761GITBRANCH
762GITTAG
763GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400764BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000765target_alias
766host_alias
767build_alias
768LIBS
769ECHO_T
770ECHO_N
771ECHO_C
772DEFS
773mandir
774localedir
775libdir
776psdir
777pdfdir
778dvidir
779htmldir
780infodir
781docdir
782oldincludedir
783includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300784runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000785localstatedir
786sharedstatedir
787sysconfdir
788datadir
789datarootdir
790libexecdir
791sbindir
792bindir
793program_transform_name
794prefix
795exec_prefix
796PACKAGE_URL
797PACKAGE_BUGREPORT
798PACKAGE_STRING
799PACKAGE_VERSION
800PACKAGE_TARNAME
801PACKAGE_NAME
802PATH_SEPARATOR
803SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000804ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000805ac_user_opts='
806enable_option_checking
807enable_universalsdk
808with_universal_archs
809with_framework_name
810enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_cxx_main
812with_suffix
813enable_shared
814enable_profiling
815with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200816with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000817enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700818with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100819with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100820with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_libs
822with_system_expat
823with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100824with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000825enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700826with_tcltk_includes
827with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000828with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000829enable_ipv6
830with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000832with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700834with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100840with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100841with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000842'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843 ac_precious_vars='build_alias
844host_alias
845target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100846MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847CC
848CFLAGS
849LDFLAGS
850LIBS
851CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800852CPP
853PKG_CONFIG
854PKG_CONFIG_PATH
855PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859ac_init_help=
860ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000861ac_unrecognized_opts=
862ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863# The variables have the same names as the options, with
864# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868no_recursion=
869prefix=NONE
870program_prefix=NONE
871program_suffix=NONE
872program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877x_includes=NONE
878x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000879
880# Installation directory options.
881# These are left unexpanded so users can "make install exec_prefix=/foo"
882# and all the variables that are supposed to be based on exec_prefix
883# by default will actually change.
884# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000885# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886bindir='${exec_prefix}/bin'
887sbindir='${exec_prefix}/sbin'
888libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889datarootdir='${prefix}/share'
890datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891sysconfdir='${prefix}/etc'
892sharedstatedir='${prefix}/com'
893localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300894runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895includedir='${prefix}/include'
896oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
898infodir='${datarootdir}/info'
899htmldir='${docdir}'
900dvidir='${docdir}'
901pdfdir='${docdir}'
902psdir='${docdir}'
903libdir='${exec_prefix}/lib'
904localedir='${datarootdir}/locale'
905mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911 # If the previous option needs an argument, assign it.
912 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 ac_prev=
915 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200919 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
920 *=) ac_optarg= ;;
921 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000924 # Accept the important Cygnus configure options, so we can diagnose typos.
925
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 case $ac_dashdash$ac_option in
927 --)
928 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000929
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -bindir | --bindir | --bindi | --bind | --bin | --bi)
931 ac_prev=bindir ;;
932 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
935 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000940 -cache-file | --cache-file | --cache-fil | --cache-fi \
941 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
942 ac_prev=cache_file ;;
943 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
944 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 cache_file=$ac_optarg ;;
946
947 --config-cache | -C)
948 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
956 | --dataroo | --dataro | --datar)
957 ac_prev=datarootdir ;;
958 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
959 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
960 datarootdir=$ac_optarg ;;
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000964 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200966 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt_orig=$ac_useropt
968 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
969 case $ac_user_opts in
970 *"
971"enable_$ac_useropt"
972"*) ;;
973 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
974 ac_unrecognized_sep=', ';;
975 esac
976 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000977
978 -docdir | --docdir | --docdi | --doc | --do)
979 ac_prev=docdir ;;
980 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
981 docdir=$ac_optarg ;;
982
983 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
984 ac_prev=dvidir ;;
985 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
986 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000990 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200992 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt_orig=$ac_useropt
994 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
995 case $ac_user_opts in
996 *"
997"enable_$ac_useropt"
998"*) ;;
999 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1000 ac_unrecognized_sep=', ';;
1001 esac
1002 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1005 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1006 | --exec | --exe | --ex)
1007 ac_prev=exec_prefix ;;
1008 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1009 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1010 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
1013 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 # Obsolete; use --with-gas.
1015 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
Martin v. Löwis11437992002-04-12 09:54:03 +00001017 -help | --help | --hel | --he | -h)
1018 ac_init_help=long ;;
1019 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1020 ac_init_help=recursive ;;
1021 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1022 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
1024 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1030 ac_prev=htmldir ;;
1031 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1032 | --ht=*)
1033 htmldir=$ac_optarg ;;
1034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -includedir | --includedir | --includedi | --included | --include \
1036 | --includ | --inclu | --incl | --inc)
1037 ac_prev=includedir ;;
1038 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1039 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -infodir | --infodir | --infodi | --infod | --info | --inf)
1043 ac_prev=infodir ;;
1044 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libdir | --libdir | --libdi | --libd)
1048 ac_prev=libdir ;;
1049 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1053 | --libexe | --libex | --libe)
1054 ac_prev=libexecdir ;;
1055 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1056 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 -localedir | --localedir | --localedi | --localed | --locale)
1060 ac_prev=localedir ;;
1061 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1062 localedir=$ac_optarg ;;
1063
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001065 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 ac_prev=localstatedir ;;
1067 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
1071 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1072 ac_prev=mandir ;;
1073 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Obsolete; use --without-fp.
1078 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001081 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 no_create=yes ;;
1083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1085 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1086 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1089 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1090 | --oldin | --oldi | --old | --ol | --o)
1091 ac_prev=oldincludedir ;;
1092 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1093 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1094 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001096
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1098 ac_prev=prefix ;;
1099 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1103 | --program-pre | --program-pr | --program-p)
1104 ac_prev=program_prefix ;;
1105 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1106 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1110 | --program-suf | --program-su | --program-s)
1111 ac_prev=program_suffix ;;
1112 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1113 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115
1116 -program-transform-name | --program-transform-name \
1117 | --program-transform-nam | --program-transform-na \
1118 | --program-transform-n | --program-transform- \
1119 | --program-transform | --program-transfor \
1120 | --program-transfo | --program-transf \
1121 | --program-trans | --program-tran \
1122 | --progr-tra | --program-tr | --program-t)
1123 ac_prev=program_transform_name ;;
1124 -program-transform-name=* | --program-transform-name=* \
1125 | --program-transform-nam=* | --program-transform-na=* \
1126 | --program-transform-n=* | --program-transform-=* \
1127 | --program-transform=* | --program-transfor=* \
1128 | --program-transfo=* | --program-transf=* \
1129 | --program-trans=* | --program-tran=* \
1130 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001133 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1134 ac_prev=pdfdir ;;
1135 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1136 pdfdir=$ac_optarg ;;
1137
1138 -psdir | --psdir | --psdi | --psd | --ps)
1139 ac_prev=psdir ;;
1140 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1141 psdir=$ac_optarg ;;
1142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1144 | -silent | --silent | --silen | --sile | --sil)
1145 silent=yes ;;
1146
William Grzybowski23e65b22018-09-07 09:06:15 -03001147 -runstatedir | --runstatedir | --runstatedi | --runstated \
1148 | --runstate | --runstat | --runsta | --runst | --runs \
1149 | --run | --ru | --r)
1150 ac_prev=runstatedir ;;
1151 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1152 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1153 | --run=* | --ru=* | --r=*)
1154 runstatedir=$ac_optarg ;;
1155
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1157 ac_prev=sbindir ;;
1158 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1159 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001161
1162 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1163 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1164 | --sharedst | --shareds | --shared | --share | --shar \
1165 | --sha | --sh)
1166 ac_prev=sharedstatedir ;;
1167 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1168 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1169 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1170 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 -site | --site | --sit)
1174 ac_prev=site ;;
1175 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1179 ac_prev=srcdir ;;
1180 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1184 | --syscon | --sysco | --sysc | --sys | --sy)
1185 ac_prev=sysconfdir ;;
1186 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1187 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001189
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1196 verbose=yes ;;
1197
Martin v. Löwis11437992002-04-12 09:54:03 +00001198 -version | --version | --versio | --versi | --vers | -V)
1199 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
1217 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt_orig=$ac_useropt
1223 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1224 case $ac_user_opts in
1225 *"
1226"with_$ac_useropt"
1227"*) ;;
1228 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1229 ac_unrecognized_sep=', ';;
1230 esac
1231 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001233 --x)
1234 # Obsolete; use --with-x.
1235 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1238 | --x-incl | --x-inc | --x-in | --x-i)
1239 ac_prev=x_includes ;;
1240 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1241 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
1244 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1245 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1246 ac_prev=x_libraries ;;
1247 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1248 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001251 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1252Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001253 ;;
1254
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 *=*)
1256 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1257 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001258 case $ac_envvar in #(
1259 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001262 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 export $ac_envvar ;;
1264
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001265 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001268 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001270 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271 ;;
1272
1273 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274done
1275
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001277 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001279fi
1280
Matthias Kloseb9621712010-04-24 17:59:49 +00001281if test -n "$ac_unrecognized_opts"; then
1282 case $enable_option_checking in
1283 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001284 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001285 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1286 esac
1287fi
1288
1289# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1291 datadir sysconfdir sharedstatedir localstatedir includedir \
1292 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001293 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001294do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001296 # Remove trailing slashes.
1297 case $ac_val in
1298 */ )
1299 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1300 eval $ac_var=\$ac_val;;
1301 esac
1302 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001303 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 [\\/$]* | ?:[\\/]* ) continue;;
1305 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001307 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001308done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# There might be people who depend on the old broken behavior: `$host'
1311# used to hold the argument of --host etc.
1312# FIXME: To remove some day.
1313build=$build_alias
1314host=$host_alias
1315target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwis11437992002-04-12 09:54:03 +00001317# FIXME: To remove some day.
1318if test "x$host_alias" != x; then
1319 if test "x$build_alias" = x; then
1320 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001321 elif test "x$build_alias" != "x$host_alias"; then
1322 cross_compiling=yes
1323 fi
1324fi
1325
1326ac_tool_prefix=
1327test -n "$host_alias" && ac_tool_prefix=$host_alias-
1328
1329test "$silent" = yes && exec 6>/dev/null
1330
Guido van Rossum627b2d71993-12-24 10:39:16 +00001331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332ac_pwd=`pwd` && test -n "$ac_pwd" &&
1333ac_ls_di=`ls -di .` &&
1334ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338
1339
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340# Find the source files, if location was not specified.
1341if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001342 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001344 ac_confdir=`$as_dirname -- "$as_myself" ||
1345$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1346 X"$as_myself" : 'X\(//\)[^/]' \| \
1347 X"$as_myself" : 'X\(//\)$' \| \
1348 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1349$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001350 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)[^/].*/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)$/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\).*/{
1363 s//\1/
1364 q
1365 }
1366 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369 srcdir=..
1370 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001371else
1372 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374if test ! -r "$srcdir/$ac_unique_file"; then
1375 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1379ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001381 pwd)`
1382# When building in place, set srcdir=.
1383if test "$ac_abs_confdir" = "$ac_pwd"; then
1384 srcdir=.
1385fi
1386# Remove unnecessary trailing slashes from srcdir.
1387# Double slashes in file names in object file debugging info
1388# mess up M-x gdb in Emacs.
1389case $srcdir in
1390*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1391esac
1392for ac_var in $ac_precious_vars; do
1393 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_env_${ac_var}_value=\$${ac_var}
1395 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1396 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1397done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001398
Martin v. Löwis11437992002-04-12 09:54:03 +00001399#
1400# Report the --help message.
1401#
1402if test "$ac_init_help" = "long"; then
1403 # Omit some internal or obsolete options to make the list less imposing.
1404 # This message is too long to be a string in the A/UX 3.1 sh.
1405 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001406\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001407
1408Usage: $0 [OPTION]... [VAR=VALUE]...
1409
1410To assign environment variables (e.g., CC, CFLAGS...), specify them as
1411VAR=VALUE. See below for descriptions of some of the useful variables.
1412
1413Defaults for the options are specified in brackets.
1414
1415Configuration:
1416 -h, --help display this help and exit
1417 --help=short display options specific to this package
1418 --help=recursive display the short help of all the included packages
1419 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001420 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --cache-file=FILE cache test results in FILE [disabled]
1422 -C, --config-cache alias for \`--cache-file=config.cache'
1423 -n, --no-create do not create output files
1424 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1425
Martin v. Löwis11437992002-04-12 09:54:03 +00001426Installation directories:
1427 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001430 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
1432By default, \`make install' will install all the files in
1433\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1434an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1435for instance \`--prefix=\$HOME'.
1436
1437For better control, use the options below.
1438
1439Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001440 --bindir=DIR user executables [EPREFIX/bin]
1441 --sbindir=DIR system admin executables [EPREFIX/sbin]
1442 --libexecdir=DIR program executables [EPREFIX/libexec]
1443 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1444 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1445 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001446 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001447 --libdir=DIR object code libraries [EPREFIX/lib]
1448 --includedir=DIR C header files [PREFIX/include]
1449 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1450 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1451 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1452 --infodir=DIR info documentation [DATAROOTDIR/info]
1453 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1454 --mandir=DIR man documentation [DATAROOTDIR/man]
1455 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1456 --htmldir=DIR html documentation [DOCDIR]
1457 --dvidir=DIR dvi documentation [DOCDIR]
1458 --pdfdir=DIR pdf documentation [DOCDIR]
1459 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461
1462 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001463
1464System types:
1465 --build=BUILD configure for building on BUILD [guessed]
1466 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001467 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001468_ACEOF
1469fi
1470
1471if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001472 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001473 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001474 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 cat <<\_ACEOF
1476
1477Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001478 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1480 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001481 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001482 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-framework[=INSTALLDIR]
1484 Build (MacOSX|Darwin) framework
1485 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001486 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001487 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1488 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001489 --enable-loadable-sqlite-extensions
1490 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --enable-ipv6 Enable ipv6 (with ipv4) support
1492 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001493 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001494 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Optional Packages:
1497 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1498 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001499 --with-universal-archs=ARCH
1500 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001501 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1502 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001503 --with-framework-name=FRAMEWORK
1504 specify an alternate name of the framework built
1505 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-cxx-main=<compiler>
1507 compile main() and link python executable with C++
1508 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-suffix=.exe set executable suffix
1510 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001511 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001512 --with-lto Enable Link Time Optimization in any build. Disabled
1513 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001514 --with-hash-algorithm=[fnv|siphash24]
1515 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001516 --with-address-sanitizer
1517 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001519 --with-system-expat build pyexpat module using an installed expat
1520 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001521 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001522 --with-system-libmpdec build _decimal module using an installed libmpdec
1523 library
Ned Deilyd819b932013-09-06 01:07:05 -07001524 --with-tcltk-includes='-I...'
1525 override search for Tcl and Tk include files
1526 --with-tcltk-libs='-L...'
1527 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001528 --with-dbmliborder=db1:db2:...
1529 order to check db backends for dbm. Valid value is a
1530 colon separated string with the backend names
1531 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001532 --with(out)-doc-strings disable/enable documentation strings
1533 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001534 --with(out)-c-locale-coercion
1535 disable/enable C locale coercion to a UTF-8 based
1536 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001538 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001546 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001547 --with-ssl-default-suites=[python|openssl|STRING]
1548 Override default cipher suites string, python: use
1549 Python's preferred selection (default), openssl:
1550 leave OpenSSL's defaults untouched, STRING: use a
1551 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001635python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily5489bda2018-01-31 17:44:09 -05002344It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Christian Heimesff5be6e2018-01-20 13:19:21 +01002694
2695
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002696if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002697 # If we're building out-of-tree, we need to make sure the following
2698 # resources get picked up before their $srcdir counterparts.
2699 # Objects/ -> typeslots.inc
2700 # Include/ -> Python-ast.h, graminit.h
2701 # Python/ -> importlib.h
2702 # (A side effect of this is that these resources will automatically be
2703 # regenerated when building out-of-tree, regardless of whether or not
2704 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2705 # off.)
2706 BASECPPFLAGS="-IObjects -IInclude -IPython"
2707else
2708 BASECPPFLAGS=""
2709fi
2710
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711
2712
2713
2714
Victor Stinner9ed34a82017-05-02 22:35:58 +02002715if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002717# Extract the first word of "git", so it can be a program name with args.
2718set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2720$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002722 $as_echo_n "(cached) " >&6
2723else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724 if test -n "$HAS_GIT"; then
2725 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726else
2727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2728for as_dir in $PATH
2729do
2730 IFS=$as_save_IFS
2731 test -z "$as_dir" && as_dir=.
2732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002734 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2736 break 2
2737 fi
2738done
2739 done
2740IFS=$as_save_IFS
2741
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002743fi
2744fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002745HAS_GIT=$ac_cv_prog_HAS_GIT
2746if test -n "$HAS_GIT"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2748$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002749else
2750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2751$as_echo "no" >&6; }
2752fi
2753
2754
2755else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002758if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002759then
Xiang Zhang4c855572018-08-20 22:36:19 +08002760 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2761 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2762 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002763else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002764 GITVERSION=""
2765 GITTAG=""
2766 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002767fi
2768
2769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002770ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002771
2772
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002773ac_aux_dir=
2774for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2775 if test -f "$ac_dir/install-sh"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/install-sh -c"
2778 break
2779 elif test -f "$ac_dir/install.sh"; then
2780 ac_aux_dir=$ac_dir
2781 ac_install_sh="$ac_aux_dir/install.sh -c"
2782 break
2783 elif test -f "$ac_dir/shtool"; then
2784 ac_aux_dir=$ac_dir
2785 ac_install_sh="$ac_aux_dir/shtool install -c"
2786 break
2787 fi
2788done
2789if test -z "$ac_aux_dir"; then
2790 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2791fi
2792
2793# These three variables are undocumented and unsupported,
2794# and are intended to be withdrawn in a future Autoconf release.
2795# They can cause serious problems if a builder's source tree is in a directory
2796# whose full name contains unusual characters.
2797ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2798ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2799ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2800
2801
2802# Make sure we can run config.sub.
2803$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2804 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2805
2806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2807$as_echo_n "checking build system type... " >&6; }
2808if ${ac_cv_build+:} false; then :
2809 $as_echo_n "(cached) " >&6
2810else
2811 ac_build_alias=$build_alias
2812test "x$ac_build_alias" = x &&
2813 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2814test "x$ac_build_alias" = x &&
2815 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2816ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2817 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2818
2819fi
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2821$as_echo "$ac_cv_build" >&6; }
2822case $ac_cv_build in
2823*-*-*) ;;
2824*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2825esac
2826build=$ac_cv_build
2827ac_save_IFS=$IFS; IFS='-'
2828set x $ac_cv_build
2829shift
2830build_cpu=$1
2831build_vendor=$2
2832shift; shift
2833# Remember, the first character of IFS is used to create $*,
2834# except with old shells:
2835build_os=$*
2836IFS=$ac_save_IFS
2837case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2838
2839
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2841$as_echo_n "checking host system type... " >&6; }
2842if ${ac_cv_host+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844else
2845 if test "x$host_alias" = x; then
2846 ac_cv_host=$ac_cv_build
2847else
2848 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2849 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2850fi
2851
2852fi
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2854$as_echo "$ac_cv_host" >&6; }
2855case $ac_cv_host in
2856*-*-*) ;;
2857*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2858esac
2859host=$ac_cv_host
2860ac_save_IFS=$IFS; IFS='-'
2861set x $ac_cv_host
2862shift
2863host_cpu=$1
2864host_vendor=$2
2865shift; shift
2866# Remember, the first character of IFS is used to create $*,
2867# except with old shells:
2868host_os=$*
2869IFS=$ac_save_IFS
2870case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2871
2872
2873
doko@python.orga10e4a92013-01-25 18:45:12 +01002874
2875
Ned Deilyfcbc2462014-08-22 13:32:49 -07002876# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2877rm -f pybuilddir.txt
2878
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002879for ac_prog in python$PACKAGE_VERSION python3 python
2880do
2881 # Extract the first word of "$ac_prog", so it can be a program name with args.
2882set dummy $ac_prog; ac_word=$2
2883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2884$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886 $as_echo_n "(cached) " >&6
2887else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002888 if test -n "$PYTHON_FOR_REGEN"; then
2889 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002890else
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
2897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002898 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2900 break 2
2901 fi
2902done
2903 done
2904IFS=$as_save_IFS
2905
2906fi
2907fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002908PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2909if test -n "$PYTHON_FOR_REGEN"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2911$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002912else
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2914$as_echo "no" >&6; }
2915fi
2916
2917
Victor Stinnera5c62a82017-05-03 18:21:48 +02002918 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002920test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922
2923
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002924if test "$cross_compiling" = yes; then
2925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2926$as_echo_n "checking for python interpreter for cross build... " >&6; }
2927 if test -z "$PYTHON_FOR_BUILD"; then
2928 for interp in python$PACKAGE_VERSION python3 python; do
2929 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002930 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 +02002931 break
2932 fi
2933 interp=
2934 done
2935 if test x$interp = x; then
2936 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2937 fi
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2939$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002940 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 +02002941 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002942elif test "$cross_compiling" = maybe; then
2943 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944else
2945 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Benjamin Petersond23f8222009-04-05 19:13:16 +00002950if test "$prefix" != "/"; then
2951 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
2956
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002957# We don't use PACKAGE_ variables, and they cause conflicts
2958# with other autoconf-based packages that include Python.h
2959grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2960rm confdefs.h
2961mv confdefs.h.new confdefs.h
2962
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002963
Ned Deily5489bda2018-01-31 17:44:09 -05002964VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002965
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002966# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002967
2968SOVERSION=1.0
2969
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002970# The later defininition of _XOPEN_SOURCE disables certain features
2971# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2972
Matthias Kloseb9621712010-04-24 17:59:49 +00002973$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002974
2975
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2977# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2978# them.
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002981
2982
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002988
2989
Martin v. Löwisd6320502004-08-12 13:45:08 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002995
2996
2997
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002998define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002999
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003000# Arguments passed to configure.
3001
3002CONFIG_ARGS="$ac_configure_args"
3003
Matthias Kloseb9621712010-04-24 17:59:49 +00003004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3005$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003007if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003009 case $enableval in
3010 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003011 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003012 # information
3013 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003014 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003015 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003016 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3017 if test ! -d "${enableval}"
3018 then
3019 enableval=/
3020 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003021 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 ;;
3023 esac
3024 case $enableval in
3025 no)
3026 UNIVERSALSDK=
3027 enable_universalsdk=
3028 ;;
3029 *)
3030 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 if test ! -d "${UNIVERSALSDK}"
3032 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003033 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003037
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038
Thomas Wouters477c8d52006-05-27 19:21:47 +00003039else
3040
3041 UNIVERSALSDK=
3042 enable_universalsdk=
3043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003045
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003046if test -n "${UNIVERSALSDK}"
3047then
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3049$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050else
Matthias Kloseb9621712010-04-24 17:59:49 +00003051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003055
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003056
Ned Deily87adb6e2013-10-18 21:09:56 -07003057ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003058
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059# For backward compatibility reasons we prefer to select '32-bit' if available,
3060# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062if test "`uname -s`" = "Darwin"
3063then
3064 if test -n "${UNIVERSALSDK}"
3065 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003066 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003067 then
3068 UNIVERSAL_ARCHS="intel"
3069 fi
3070 fi
3071fi
3072
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003073
Matthias Kloseb9621712010-04-24 17:59:49 +00003074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3075$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076
3077# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003078if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 UNIVERSAL_ARCHS="$withval"
3081
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003082fi
3083
Ned Deily87adb6e2013-10-18 21:09:56 -07003084if test -n "${UNIVERSALSDK}"
3085then
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3087$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3088else
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3090$as_echo "no" >&6; }
3091fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093
3094# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003095if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003096 withval=$with_framework_name;
3097 PYTHONFRAMEWORK=${withval}
3098 PYTHONFRAMEWORKDIR=${withval}.framework
3099 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3100
3101else
3102
3103 PYTHONFRAMEWORK=Python
3104 PYTHONFRAMEWORKDIR=Python.framework
3105 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3106
3107fi
3108
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003109# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003110if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003111 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003112 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003113 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003114 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003115 esac
3116 case $enableval in
3117 no)
3118 PYTHONFRAMEWORK=
3119 PYTHONFRAMEWORKDIR=no-framework
3120 PYTHONFRAMEWORKPREFIX=
3121 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003122 FRAMEWORKINSTALLFIRST=
3123 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 FRAMEWORKALTINSTALLFIRST=
3125 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003126 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003127 if test "x${prefix}" = "xNONE"; then
3128 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3129 else
3130 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3131 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003132 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003133 ;;
3134 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003135 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003136 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003137 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003138 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003139 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3140 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003141 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 if test "x${prefix}" = "xNONE" ; then
3145 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003146
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003147 else
3148 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3149 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150
3151 case "${enableval}" in
3152 /System*)
3153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3154 if test "${prefix}" = "NONE" ; then
3155 # See below
3156 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3157 fi
3158 ;;
3159
3160 /Library*)
3161 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3162 ;;
3163
3164 */Library/Frameworks)
3165 MDIR="`dirname "${enableval}"`"
3166 MDIR="`dirname "${MDIR}"`"
3167 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3168
3169 if test "${prefix}" = "NONE"; then
3170 # User hasn't specified the
3171 # --prefix option, but wants to install
3172 # the framework in a non-default location,
3173 # ensure that the compatibility links get
3174 # installed relative to that prefix as well
3175 # instead of in /usr/local.
3176 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3177 fi
3178 ;;
3179
3180 *)
3181 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3182 ;;
3183 esac
3184
Jack Jansen127e56e2001-09-11 14:41:54 +00003185 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003187 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003190
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003191 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003192
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003193 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3194
3195 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3196
Jack Jansene578a632001-08-15 01:27:14 +00003197 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003198
Guido van Rossum563e7081996-09-10 18:20:48 +00003199else
Martin v. Löwis11437992002-04-12 09:54:03 +00003200
Jack Jansene578a632001-08-15 01:27:14 +00003201 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003202 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003203 PYTHONFRAMEWORKPREFIX=
3204 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205 FRAMEWORKINSTALLFIRST=
3206 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 FRAMEWORKALTINSTALLFIRST=
3208 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003209 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 if test "x${prefix}" = "xNONE" ; then
3211 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3212 else
3213 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3214 fi
Jack Jansene578a632001-08-15 01:27:14 +00003215 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003216
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218fi
3219
Thomas Wouters477c8d52006-05-27 19:21:47 +00003220
3221
Michael W. Hudson54241132001-12-07 15:38:26 +00003222
3223
3224
3225
Jack Jansene578a632001-08-15 01:27:14 +00003226
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003227
3228
3229
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003230
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003231
Ned Deilyb8f944f2013-11-21 22:42:25 -08003232
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233
3234cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003235#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003236_ACEOF
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003240## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003241## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003242##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003243# Set name for machine-dependent library files
3244
Matthias Kloseb9621712010-04-24 17:59:49 +00003245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3246$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003247if test -z "$MACHDEP"
3248then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 # avoid using uname for cross builds
3250 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003251 # ac_sys_system and ac_sys_release are used for setting
3252 # a lot of different things including 'define_xopen_source'
3253 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003254 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003255 *-*-linux-android*)
3256 ac_sys_system=Linux-android
3257 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003258 *-*-linux*)
3259 ac_sys_system=Linux
3260 ;;
3261 *-*-cygwin*)
3262 ac_sys_system=Cygwin
3263 ;;
3264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3268 esac
3269 ac_sys_release=
3270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003272 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003273 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 fi
3279 ac_md_system=`echo $ac_sys_system |
3280 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3281 ac_md_release=`echo $ac_sys_release |
3282 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3283 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003284
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003286 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003287 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003288 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003289 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003290 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291fi
Guido van Rossum91922671997-10-09 20:24:13 +00003292
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003293
3294if test "$cross_compiling" = yes; then
3295 case "$host" in
3296 *-*-linux*)
3297 case "$host_cpu" in
3298 arm*)
3299 _host_cpu=arm
3300 ;;
3301 *)
3302 _host_cpu=$host_cpu
3303 esac
3304 ;;
3305 *-*-cygwin*)
3306 _host_cpu=
3307 ;;
3308 *)
3309 # for now, limit cross builds to known configurations
3310 MACHDEP="unknown"
3311 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3312 esac
3313 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3314fi
3315
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003316# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3317# disable features if it is defined, without any means to access these
3318# features as extensions. For these systems, we skip the definition of
3319# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3320# some feature, make sure there is no alternative way to access this
3321# feature. Also, when using wildcards, make sure you have verified the
3322# need for not defining _XOPEN_SOURCE on all systems matching the
3323# wildcard, and that the wildcard does not include future systems
3324# (which may remove their limitations).
3325case $ac_sys_system/$ac_sys_release in
3326 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3327 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003328 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003329 # In addition, Stefan Krah confirms that issue #1244610 exists through
3330 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003331 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003332 define_xopen_source=no
3333 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3334 # also defined. This can be overridden by defining _BSD_SOURCE
3335 # As this has a different meaning on Linux, only define it on OpenBSD
3336
Matthias Kloseb9621712010-04-24 17:59:49 +00003337$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338
3339 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003340 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003346
3347 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003348 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3349 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3350 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003351 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 +00003352 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003353 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3354 # request to enable features supported by the standard as a request
3355 # to disable features not supported by the standard. The best way
3356 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3357 # entirely and define __EXTENSIONS__ instead.
3358 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003359 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003360 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3361 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003362 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003363 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 define_xopen_source=no;;
3365 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003366 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003369 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3370 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3371 # identifies itself as Darwin/7.*
3372 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3373 # disables platform specific features beyond repair.
3374 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # has no effect, don't bother defining them
3376 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003377 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003378 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003379 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003380 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3381 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3382 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003383 AIX/4)
3384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 AIX/5)
3386 if test `uname -r` -eq 1; then
3387 define_xopen_source=no
3388 fi
3389 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003390 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3391 # defining NI_NUMERICHOST.
3392 QNX/6.3.2)
3393 define_xopen_source=no
3394 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396esac
3397
3398if test $define_xopen_source = yes
3399then
Victor Stinner14d098d2011-09-07 22:29:43 +02003400 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003401
Victor Stinner14d098d2011-09-07 22:29:43 +02003402$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
3405 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3406 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3407 # several APIs are not declared. Since this is also needed in some
3408 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Matthias Kloseb9621712010-04-24 17:59:49 +00003410$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003414$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003416fi
3417
Christian Heimes647cd872013-12-07 23:39:33 +01003418# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3419case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003420 hp*|HP*)
3421 define_stdc_a1=yes;;
3422 *)
3423 define_stdc_a1=no;;
3424esac
3425
3426if test $define_stdc_a1 = yes
3427then
Christian Heimes647cd872013-12-07 23:39:33 +01003428
3429$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3430
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431fi
Christian Heimes647cd872013-12-07 23:39:33 +01003432
Jack Jansen6b08a402004-06-03 12:41:45 +00003433# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3434# it may influence the way we can build extensions, so distutils
3435# needs to check it
3436
Thomas Wouters477c8d52006-05-27 19:21:47 +00003437
Jack Jansen6b08a402004-06-03 12:41:45 +00003438CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003439EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003442
3443# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3444# for debug/optimization stuff. BASECFLAGS is for flags that are required
3445# just to get things to compile and link. Users are free to override OPT
3446# when running configure or make. The build should not break if they do.
3447# BASECFLAGS should generally not be messed with, however.
3448
Guido van Rossum8b131c51995-03-09 14:10:13 +00003449# If the user switches compilers, we can't believe the cache
3450if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3451then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003452 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003453(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003454fi
3455
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003456# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3457# when the compiler supports them, but we don't always want -O2, and
3458# we set -g later.
3459if test -z "$CFLAGS"; then
3460 CFLAGS=
3461fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003462
3463if test "$ac_sys_system" = "Darwin"
3464then
3465 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003466 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003467 # information
3468 if test -z "${CC}"
3469 then
3470 found_gcc=
3471 found_clang=
3472 as_save_IFS=$IFS; IFS=:
3473 for as_dir in $PATH
3474 do
3475 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003476 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003477 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003478 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003479 fi
3480 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003481 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003482 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 fi
3485 fi
3486 done
3487 IFS=$as_save_IFS
3488
3489 if test -n "$found_gcc" -a -n "$found_clang"
3490 then
3491 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3492 then
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3494$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3495 CC="$found_clang"
3496 CXX="$found_clang++"
3497 fi
3498
3499
3500 elif test -z "$found_gcc" -a -n "$found_clang"
3501 then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3503$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3504 CC="$found_clang"
3505 CXX="$found_clang++"
3506
3507 elif test -z "$found_gcc" -a -z "$found_clang"
3508 then
3509 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3510 if test -n "${found_clang}"
3511 then
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3513$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3514 CC="${found_clang}"
3515 CXX="`/usr/bin/xcrun -find clang++`"
3516
3517 # else: use default behaviour
3518 fi
3519 fi
3520 fi
3521fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
3527if test -n "$ac_tool_prefix"; then
3528 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3529set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3531$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003532if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003533 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003534else
3535 if test -n "$CC"; then
3536 ac_cv_prog_CC="$CC" # Let the user override the test.
3537else
Martin v. Löwis11437992002-04-12 09:54:03 +00003538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3539for as_dir in $PATH
3540do
3541 IFS=$as_save_IFS
3542 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003543 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003546 $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 +00003547 break 2
3548 fi
3549done
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003551IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003552
Jack Jansendd19cf82001-12-06 22:36:17 +00003553fi
3554fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003555CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003556if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3558$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003559else
Matthias Kloseb9621712010-04-24 17:59:49 +00003560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3561$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562fi
3563
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003564
Martin v. Löwis11437992002-04-12 09:54:03 +00003565fi
3566if test -z "$ac_cv_prog_CC"; then
3567 ac_ct_CC=$CC
3568 # Extract the first word of "gcc", so it can be a program name with args.
3569set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003574else
3575 if test -n "$ac_ct_CC"; then
3576 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3577else
3578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
3593fi
3594fi
3595ac_ct_CC=$ac_cv_prog_ac_ct_CC
3596if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3598$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604 if test "x$ac_ct_CC" = x; then
3605 CC=""
3606 else
3607 case $cross_compiling:$ac_tool_warned in
3608yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003609{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3610$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611ac_tool_warned=yes ;;
3612esac
3613 CC=$ac_ct_CC
3614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003615else
3616 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003617fi
3618
Jack Jansendd19cf82001-12-06 22:36:17 +00003619if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620 if test -n "$ac_tool_prefix"; then
3621 # 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 +00003622set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3624$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003625if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003627else
3628 if test -n "$CC"; then
3629 ac_cv_prog_CC="$CC" # Let the user override the test.
3630else
Martin v. Löwis11437992002-04-12 09:54:03 +00003631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3632for as_dir in $PATH
3633do
3634 IFS=$as_save_IFS
3635 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003638 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 $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 +00003640 break 2
3641 fi
3642done
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003645
3646fi
3647fi
3648CC=$ac_cv_prog_CC
3649if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3651$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
Matthias Kloseb9621712010-04-24 17:59:49 +00003653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3654$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003655fi
3656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003659fi
3660if test -z "$CC"; then
3661 # Extract the first word of "cc", so it can be a program name with args.
3662set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003671 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003672as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3673for as_dir in $PATH
3674do
3675 IFS=$as_save_IFS
3676 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3680 ac_prog_rejected=yes
3681 continue
3682 fi
3683 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $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 +00003685 break 2
3686 fi
3687done
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003689IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003690
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003691if test $ac_prog_rejected = yes; then
3692 # We found a bogon in the path, so make sure we never use it.
3693 set dummy $ac_cv_prog_CC
3694 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003696 # We chose a different compiler from the bogus one.
3697 # However, it has the same basename, so the bogon will be chosen
3698 # first if we set CC to just the basename; use the full file name.
3699 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003700 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701 fi
3702fi
3703fi
3704fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003705CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003706if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3708$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003709else
Matthias Kloseb9621712010-04-24 17:59:49 +00003710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3711$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712fi
3713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715fi
3716if test -z "$CC"; then
3717 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 do
3720 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3721set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3723$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003724if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003726else
3727 if test -n "$CC"; then
3728 ac_cv_prog_CC="$CC" # Let the user override the test.
3729else
Martin v. Löwis11437992002-04-12 09:54:03 +00003730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3731for as_dir in $PATH
3732do
3733 IFS=$as_save_IFS
3734 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 $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 +00003739 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741done
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003744
3745fi
3746fi
3747CC=$ac_cv_prog_CC
3748if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3750$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751else
Matthias Kloseb9621712010-04-24 17:59:49 +00003752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3753$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003754fi
3755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003756
Martin v. Löwis11437992002-04-12 09:54:03 +00003757 test -n "$CC" && break
3758 done
3759fi
3760if test -z "$CC"; then
3761 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003763do
3764 # Extract the first word of "$ac_prog", so it can be a program name with args.
3765set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3767$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003768if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003769 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003770else
3771 if test -n "$ac_ct_CC"; then
3772 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3773else
3774as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777 IFS=$as_save_IFS
3778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003781 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 $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 +00003783 break 2
3784 fi
3785done
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003788
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790fi
3791ac_ct_CC=$ac_cv_prog_ac_ct_CC
3792if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3794$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003795else
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3797$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003799
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 test -n "$ac_ct_CC" && break
3802done
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804 if test "x$ac_ct_CC" = x; then
3805 CC=""
3806 else
3807 case $cross_compiling:$ac_tool_warned in
3808yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811ac_tool_warned=yes ;;
3812esac
3813 CC=$ac_ct_CC
3814 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003815fi
3816
3817fi
3818
3819
Matthias Kloseb9621712010-04-24 17:59:49 +00003820test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003822as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003823See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824
3825# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003826$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3827set X $ac_compile
3828ac_compiler=$2
3829for ac_option in --version -v -V -qversion; do
3830 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831case "(($ac_try" in
3832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3833 *) ac_try_echo=$ac_try;;
3834esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003835eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3836$as_echo "$ac_try_echo"; } >&5
3837 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 if test -s conftest.err; then
3840 sed '10a\
3841... rest of stderr output deleted ...
3842 10q' conftest.err >conftest.er1
3843 cat conftest.er1 >&5
3844 fi
3845 rm -f conftest.er1 conftest.err
3846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3847 test $ac_status = 0; }
3848done
Martin v. Löwis11437992002-04-12 09:54:03 +00003849
Matthias Kloseb9621712010-04-24 17:59:49 +00003850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003851/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003852
Martin v. Löwis11437992002-04-12 09:54:03 +00003853int
3854main ()
3855{
3856
3857 ;
3858 return 0;
3859}
3860_ACEOF
3861ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003862ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003863# Try to create an executable without -o first, disregard a.out.
3864# It will help us diagnose broken compilers, and finding out an intuition
3865# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3867$as_echo_n "checking whether the C compiler works... " >&6; }
3868ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3869
3870# The possible output files:
3871ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873ac_rmfiles=
3874for ac_file in $ac_files
3875do
3876 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003877 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3879 esac
3880done
3881rm -f $ac_rmfiles
3882
Matthias Kloseb9621712010-04-24 17:59:49 +00003883if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884case "(($ac_try" in
3885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3886 *) ac_try_echo=$ac_try;;
3887esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3889$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003891 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003892 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3893 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3895# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3896# in a Makefile. We should not override ac_cv_exeext if it was cached,
3897# so that the user can short-circuit this test for compilers unknown to
3898# Autoconf.
3899for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003900do
3901 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003904 ;;
3905 [ab].out )
3906 # We found the default executable, but exeext='' is most
3907 # certainly right.
3908 break;;
3909 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003911 then :; else
3912 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3913 fi
3914 # We set ac_cv_exeext here because the later test for it is not
3915 # safe: cross compilers may not add the suffix if given an `-o'
3916 # argument, so we may need to know it at that point already.
3917 # Even if this section looks crufty: it has the advantage of
3918 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003919 break;;
3920 * )
3921 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003922 esac
3923done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924test "$ac_cv_exeext" = no && ac_cv_exeext=
3925
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003926else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 ac_file=''
3928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003929if test -z "$ac_file"; then :
3930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3931$as_echo "no" >&6; }
3932$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003933sed 's/^/| /' conftest.$ac_ext >&5
3934
Matthias Kloseb9621712010-04-24 17:59:49 +00003935{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003937as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003938See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003939else
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3941$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3944$as_echo_n "checking for C compiler default output file name... " >&6; }
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3946$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003947ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948
Matthias Kloseb9621712010-04-24 17:59:49 +00003949rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003950ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3952$as_echo_n "checking for suffix of executables... " >&6; }
3953if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954case "(($ac_try" in
3955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3956 *) ac_try_echo=$ac_try;;
3957esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003958eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3959$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003961 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003962 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3963 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003964 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3965# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3966# work properly (i.e., refer to `conftest.exe'), while it won't with
3967# `rm'.
3968for ac_file in conftest.exe conftest conftest.*; do
3969 test -f "$ac_file" || continue
3970 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003972 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3973 break;;
3974 * ) break;;
3975 esac
3976done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003977else
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3979$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003980as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003981See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983rm -f conftest conftest$ac_cv_exeext
3984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3985$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986
3987rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003988EXEEXT=$ac_cv_exeext
3989ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3991/* end confdefs.h. */
3992#include <stdio.h>
3993int
3994main ()
3995{
3996FILE *f = fopen ("conftest.out", "w");
3997 return ferror (f) || fclose (f) != 0;
3998
3999 ;
4000 return 0;
4001}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004002_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004003ac_clean_files="$ac_clean_files conftest.out"
4004# Check that the compiler produces executables we can run. If not, either
4005# the compiler is broken, or we cross compile.
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4007$as_echo_n "checking whether we are cross compiling... " >&6; }
4008if test "$cross_compiling" != yes; then
4009 { { ac_try="$ac_link"
4010case "(($ac_try" in
4011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4012 *) ac_try_echo=$ac_try;;
4013esac
4014eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4015$as_echo "$ac_try_echo"; } >&5
4016 (eval "$ac_link") 2>&5
4017 ac_status=$?
4018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4019 test $ac_status = 0; }
4020 if { ac_try='./conftest$ac_cv_exeext'
4021 { { case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_try") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }; }; then
4031 cross_compiling=no
4032 else
4033 if test "$cross_compiling" = maybe; then
4034 cross_compiling=yes
4035 else
4036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004038as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004039If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004040See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004041 fi
4042 fi
4043fi
4044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4045$as_echo "$cross_compiling" >&6; }
4046
4047rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4048ac_clean_files=$ac_clean_files_save
4049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4050$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004051if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 $as_echo_n "(cached) " >&6
4053else
4054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004055/* end confdefs.h. */
4056
4057int
4058main ()
4059{
4060
4061 ;
4062 return 0;
4063}
4064_ACEOF
4065rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004066if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004067case "(($ac_try" in
4068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4069 *) ac_try_echo=$ac_try;;
4070esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4072$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004074 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4076 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 for ac_file in conftest.o conftest.obj conftest.*; do
4078 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004079 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004080 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4082 break;;
4083 esac
4084done
4085else
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004087sed 's/^/| /' conftest.$ac_ext >&5
4088
Matthias Kloseb9621712010-04-24 17:59:49 +00004089{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4090$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004091as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004092See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004093fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004094rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4097$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004098OBJEXT=$ac_cv_objext
4099ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4101$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004102if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004104else
Matthias Kloseb9621712010-04-24 17:59:49 +00004105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Martin v. Löwis11437992002-04-12 09:54:03 +00004108int
4109main ()
4110{
4111#ifndef __GNUC__
4112 choke me
4113#endif
4114
4115 ;
4116 return 0;
4117}
4118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 ac_compiler_gnu=yes
4121else
Matthias Kloseb9621712010-04-24 17:59:49 +00004122 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004125ac_cv_c_compiler_gnu=$ac_compiler_gnu
4126
4127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4129$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4130if test $ac_compiler_gnu = yes; then
4131 GCC=yes
4132else
4133 GCC=
4134fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004135ac_test_CFLAGS=${CFLAGS+set}
4136ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4138$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004141else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142 ac_save_c_werror_flag=$ac_c_werror_flag
4143 ac_c_werror_flag=yes
4144 ac_cv_prog_cc_g=no
4145 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149int
4150main ()
4151{
4152
4153 ;
4154 return 0;
4155}
4156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004157if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004158 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004159else
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 CFLAGS=""
4161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004162/* end confdefs.h. */
4163
4164int
4165main ()
4166{
4167
4168 ;
4169 return 0;
4170}
4171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004172if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173
Matthias Kloseb9621712010-04-24 17:59:49 +00004174else
4175 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004176 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004178/* end confdefs.h. */
4179
4180int
4181main ()
4182{
4183
4184 ;
4185 return 0;
4186}
4187_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004188if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4196 ac_c_werror_flag=$ac_save_c_werror_flag
4197fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4199$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004200if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004201 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004202elif test $ac_cv_prog_cc_g = yes; then
4203 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004204 CFLAGS="-g -O2"
4205 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207 fi
4208else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209 if test "$GCC" = yes; then
4210 CFLAGS="-O2"
4211 else
4212 CFLAGS=
4213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4216$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004217if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004219else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004220 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004221ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004223/* end confdefs.h. */
4224#include <stdarg.h>
4225#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004226struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004227/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4228struct buf { int x; };
4229FILE * (*rcsopen) (struct buf *, struct stat *, int);
4230static char *e (p, i)
4231 char **p;
4232 int i;
4233{
4234 return p[i];
4235}
4236static char *f (char * (*g) (char **, int), char **p, ...)
4237{
4238 char *s;
4239 va_list v;
4240 va_start (v,p);
4241 s = g (p, va_arg (v,int));
4242 va_end (v);
4243 return s;
4244}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004245
4246/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4247 function prototypes and stuff, but not '\xHH' hex character constants.
4248 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004250 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4251 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004253int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4254
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4256 inside strings and character constants. */
4257#define FOO(x) 'x'
4258int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4259
Skip Montanaro6dead952003-09-25 14:50:04 +00004260int test (int i, double x);
4261struct s1 {int (*f) (int a);};
4262struct s2 {int (*f) (double a);};
4263int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4264int argc;
4265char **argv;
4266int
4267main ()
4268{
4269return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4270 ;
4271 return 0;
4272}
4273_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4275 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004276do
4277 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004279 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281rm -f core conftest.err conftest.$ac_objext
4282 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004283done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004284rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004285CC=$ac_save_CC
4286
4287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288# AC_CACHE_VAL
4289case "x$ac_cv_prog_cc_c89" in
4290 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4292$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4295$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004296 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4299$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004301if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004302
Matthias Kloseb9621712010-04-24 17:59:49 +00004303fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004304
Martin v. Löwis11437992002-04-12 09:54:03 +00004305ac_ext=c
4306ac_cpp='$CPP $CPPFLAGS'
4307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4309ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004311ac_ext=c
4312ac_cpp='$CPP $CPPFLAGS'
4313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4315ac_compiler_gnu=$ac_cv_c_compiler_gnu
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4317$as_echo_n "checking how to run the C preprocessor... " >&6; }
4318# On Suns, sometimes $CPP names a directory.
4319if test -n "$CPP" && test -d "$CPP"; then
4320 CPP=
4321fi
4322if test -z "$CPP"; then
4323 if ${ac_cv_prog_CPP+:} false; then :
4324 $as_echo_n "(cached) " >&6
4325else
4326 # Double quotes because CPP needs to be expanded
4327 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4328 do
4329 ac_preproc_ok=false
4330for ac_c_preproc_warn_flag in '' yes
4331do
4332 # Use a header file that comes with gcc, so configuring glibc
4333 # with a fresh cross-compiler works.
4334 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4335 # <limits.h> exists even on freestanding compilers.
4336 # On the NeXT, cc -E runs the code through the compiler's parser,
4337 # not just through cpp. "Syntax error" is here to catch this case.
4338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4339/* end confdefs.h. */
4340#ifdef __STDC__
4341# include <limits.h>
4342#else
4343# include <assert.h>
4344#endif
4345 Syntax error
4346_ACEOF
4347if ac_fn_c_try_cpp "$LINENO"; then :
4348
4349else
4350 # Broken: fails on valid input.
4351continue
4352fi
4353rm -f conftest.err conftest.i conftest.$ac_ext
4354
4355 # OK, works on sane cases. Now check whether nonexistent headers
4356 # can be detected and how.
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358/* end confdefs.h. */
4359#include <ac_nonexistent.h>
4360_ACEOF
4361if ac_fn_c_try_cpp "$LINENO"; then :
4362 # Broken: success on invalid input.
4363continue
4364else
4365 # Passes both tests.
4366ac_preproc_ok=:
4367break
4368fi
4369rm -f conftest.err conftest.i conftest.$ac_ext
4370
4371done
4372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4373rm -f conftest.i conftest.err conftest.$ac_ext
4374if $ac_preproc_ok; then :
4375 break
4376fi
4377
4378 done
4379 ac_cv_prog_CPP=$CPP
4380
4381fi
4382 CPP=$ac_cv_prog_CPP
4383else
4384 ac_cv_prog_CPP=$CPP
4385fi
4386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4387$as_echo "$CPP" >&6; }
4388ac_preproc_ok=false
4389for ac_c_preproc_warn_flag in '' yes
4390do
4391 # Use a header file that comes with gcc, so configuring glibc
4392 # with a fresh cross-compiler works.
4393 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4394 # <limits.h> exists even on freestanding compilers.
4395 # On the NeXT, cc -E runs the code through the compiler's parser,
4396 # not just through cpp. "Syntax error" is here to catch this case.
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398/* end confdefs.h. */
4399#ifdef __STDC__
4400# include <limits.h>
4401#else
4402# include <assert.h>
4403#endif
4404 Syntax error
4405_ACEOF
4406if ac_fn_c_try_cpp "$LINENO"; then :
4407
4408else
4409 # Broken: fails on valid input.
4410continue
4411fi
4412rm -f conftest.err conftest.i conftest.$ac_ext
4413
4414 # OK, works on sane cases. Now check whether nonexistent headers
4415 # can be detected and how.
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#include <ac_nonexistent.h>
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421 # Broken: success on invalid input.
4422continue
4423else
4424 # Passes both tests.
4425ac_preproc_ok=:
4426break
4427fi
4428rm -f conftest.err conftest.i conftest.$ac_ext
4429
4430done
4431# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4432rm -f conftest.i conftest.err conftest.$ac_ext
4433if $ac_preproc_ok; then :
4434
4435else
4436 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4438as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4439See \`config.log' for more details" "$LINENO" 5; }
4440fi
4441
4442ac_ext=c
4443ac_cpp='$CPP $CPPFLAGS'
4444ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4445ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4446ac_compiler_gnu=$ac_cv_c_compiler_gnu
4447
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4449$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4450if ${ac_cv_path_GREP+:} false; then :
4451 $as_echo_n "(cached) " >&6
4452else
4453 if test -z "$GREP"; then
4454 ac_path_GREP_found=false
4455 # Loop through the user's path and test for each of PROGNAME-LIST
4456 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4457for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4458do
4459 IFS=$as_save_IFS
4460 test -z "$as_dir" && as_dir=.
4461 for ac_prog in grep ggrep; do
4462 for ac_exec_ext in '' $ac_executable_extensions; do
4463 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4464 as_fn_executable_p "$ac_path_GREP" || continue
4465# Check for GNU ac_path_GREP and select it if it is found.
4466 # Check for GNU $ac_path_GREP
4467case `"$ac_path_GREP" --version 2>&1` in
4468*GNU*)
4469 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4470*)
4471 ac_count=0
4472 $as_echo_n 0123456789 >"conftest.in"
4473 while :
4474 do
4475 cat "conftest.in" "conftest.in" >"conftest.tmp"
4476 mv "conftest.tmp" "conftest.in"
4477 cp "conftest.in" "conftest.nl"
4478 $as_echo 'GREP' >> "conftest.nl"
4479 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4480 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4481 as_fn_arith $ac_count + 1 && ac_count=$as_val
4482 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4483 # Best one so far, save it but keep looking for a better one
4484 ac_cv_path_GREP="$ac_path_GREP"
4485 ac_path_GREP_max=$ac_count
4486 fi
4487 # 10*(2^10) chars as input seems more than enough
4488 test $ac_count -gt 10 && break
4489 done
4490 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4491esac
4492
4493 $ac_path_GREP_found && break 3
4494 done
4495 done
4496 done
4497IFS=$as_save_IFS
4498 if test -z "$ac_cv_path_GREP"; then
4499 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4500 fi
4501else
4502 ac_cv_path_GREP=$GREP
4503fi
4504
4505fi
4506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4507$as_echo "$ac_cv_path_GREP" >&6; }
4508 GREP="$ac_cv_path_GREP"
4509
4510
Łukasz Langaa785c872016-09-09 17:37:37 -07004511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4512$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4513if ${ac_cv_path_SED+:} false; then :
4514 $as_echo_n "(cached) " >&6
4515else
4516 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4517 for ac_i in 1 2 3 4 5 6 7; do
4518 ac_script="$ac_script$as_nl$ac_script"
4519 done
4520 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4521 { ac_script=; unset ac_script;}
4522 if test -z "$SED"; then
4523 ac_path_SED_found=false
4524 # Loop through the user's path and test for each of PROGNAME-LIST
4525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4526for as_dir in $PATH
4527do
4528 IFS=$as_save_IFS
4529 test -z "$as_dir" && as_dir=.
4530 for ac_prog in sed gsed; do
4531 for ac_exec_ext in '' $ac_executable_extensions; do
4532 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4533 as_fn_executable_p "$ac_path_SED" || continue
4534# Check for GNU ac_path_SED and select it if it is found.
4535 # Check for GNU $ac_path_SED
4536case `"$ac_path_SED" --version 2>&1` in
4537*GNU*)
4538 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4539*)
4540 ac_count=0
4541 $as_echo_n 0123456789 >"conftest.in"
4542 while :
4543 do
4544 cat "conftest.in" "conftest.in" >"conftest.tmp"
4545 mv "conftest.tmp" "conftest.in"
4546 cp "conftest.in" "conftest.nl"
4547 $as_echo '' >> "conftest.nl"
4548 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4549 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4550 as_fn_arith $ac_count + 1 && ac_count=$as_val
4551 if test $ac_count -gt ${ac_path_SED_max-0}; then
4552 # Best one so far, save it but keep looking for a better one
4553 ac_cv_path_SED="$ac_path_SED"
4554 ac_path_SED_max=$ac_count
4555 fi
4556 # 10*(2^10) chars as input seems more than enough
4557 test $ac_count -gt 10 && break
4558 done
4559 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4560esac
4561
4562 $ac_path_SED_found && break 3
4563 done
4564 done
4565 done
4566IFS=$as_save_IFS
4567 if test -z "$ac_cv_path_SED"; then
4568 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4569 fi
4570else
4571 ac_cv_path_SED=$SED
4572fi
4573
4574fi
4575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4576$as_echo "$ac_cv_path_SED" >&6; }
4577 SED="$ac_cv_path_SED"
4578 rm -f conftest.sed
4579
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004580
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581
4582
Matthias Kloseb9621712010-04-24 17:59:49 +00004583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4584$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004586# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004587if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004588 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
4590 case $withval in
4591 no) with_cxx_main=no
4592 MAINCC='$(CC)';;
4593 yes) with_cxx_main=yes
4594 MAINCC='$(CXX)';;
4595 *) with_cxx_main=yes
4596 MAINCC=$withval
4597 if test -z "$CXX"
4598 then
4599 CXX=$withval
4600 fi;;
4601 esac
4602else
4603
4604 with_cxx_main=no
4605 MAINCC='$(CC)'
4606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004607fi
4608
Matthias Kloseb9621712010-04-24 17:59:49 +00004609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4610$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004611
4612preset_cxx="$CXX"
4613if test -z "$CXX"
4614then
4615 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004616 gcc) if test -n "$ac_tool_prefix"; then
4617 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4618set dummy ${ac_tool_prefix}g++; ac_word=$2
4619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4620$as_echo_n "checking for $ac_word... " >&6; }
4621if ${ac_cv_path_CXX+:} false; then :
4622 $as_echo_n "(cached) " >&6
4623else
4624 case $CXX in
4625 [\\/]* | ?:[\\/]*)
4626 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4627 ;;
4628 *)
4629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4630for as_dir in notfound
4631do
4632 IFS=$as_save_IFS
4633 test -z "$as_dir" && as_dir=.
4634 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004636 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4638 break 2
4639 fi
4640done
4641 done
4642IFS=$as_save_IFS
4643
4644 ;;
4645esac
4646fi
4647CXX=$ac_cv_path_CXX
4648if test -n "$CXX"; then
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4650$as_echo "$CXX" >&6; }
4651else
4652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4653$as_echo "no" >&6; }
4654fi
4655
4656
4657fi
4658if test -z "$ac_cv_path_CXX"; then
4659 ac_pt_CXX=$CXX
4660 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004661set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4663$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004664if ${ac_cv_path_ac_pt_CXX+:} false; then :
4665 $as_echo_n "(cached) " >&6
4666else
4667 case $ac_pt_CXX in
4668 [\\/]* | ?:[\\/]*)
4669 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4670 ;;
4671 *)
4672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4673for as_dir in notfound
4674do
4675 IFS=$as_save_IFS
4676 test -z "$as_dir" && as_dir=.
4677 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4681 break 2
4682 fi
4683done
4684 done
4685IFS=$as_save_IFS
4686
4687 ;;
4688esac
4689fi
4690ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4691if test -n "$ac_pt_CXX"; then
4692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4693$as_echo "$ac_pt_CXX" >&6; }
4694else
4695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4696$as_echo "no" >&6; }
4697fi
4698
4699 if test "x$ac_pt_CXX" = x; then
4700 CXX="g++"
4701 else
4702 case $cross_compiling:$ac_tool_warned in
4703yes:)
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4705$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4706ac_tool_warned=yes ;;
4707esac
4708 CXX=$ac_pt_CXX
4709 fi
4710else
4711 CXX="$ac_cv_path_CXX"
4712fi
4713 ;;
4714 cc) if test -n "$ac_tool_prefix"; then
4715 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4716set dummy ${ac_tool_prefix}c++; ac_word=$2
4717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004719if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721else
4722 case $CXX in
4723 [\\/]* | ?:[\\/]*)
4724 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4725 ;;
4726 *)
4727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4728for as_dir in notfound
4729do
4730 IFS=$as_save_IFS
4731 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736 break 2
4737 fi
4738done
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004740IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 ;;
4743esac
4744fi
4745CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004746if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4748$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004749else
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004753
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754
4755fi
4756if test -z "$ac_cv_path_CXX"; then
4757 ac_pt_CXX=$CXX
4758 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004762if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004763 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004764else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004767 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 +00004768 ;;
4769 *)
4770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in notfound
4772do
4773 IFS=$as_save_IFS
4774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004777 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779 break 2
4780 fi
4781done
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004783IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 ;;
4786esac
4787fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4789if test -n "$ac_pt_CXX"; then
4790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4791$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004792else
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004795fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004796
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797 if test "x$ac_pt_CXX" = x; then
4798 CXX="c++"
4799 else
4800 case $cross_compiling:$ac_tool_warned in
4801yes:)
4802{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4803$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4804ac_tool_warned=yes ;;
4805esac
4806 CXX=$ac_pt_CXX
4807 fi
4808else
4809 CXX="$ac_cv_path_CXX"
4810fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004811 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004812 clang|*/clang) if test -n "$ac_tool_prefix"; then
4813 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4814set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CXX+:} false; then :
4818 $as_echo_n "(cached) " >&6
4819else
4820 case $CXX in
4821 [\\/]* | ?:[\\/]*)
4822 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4823 ;;
4824 *)
4825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in notfound
4827do
4828 IFS=$as_save_IFS
4829 test -z "$as_dir" && as_dir=.
4830 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834 break 2
4835 fi
4836done
4837 done
4838IFS=$as_save_IFS
4839
Ned Deilycbfb9a52012-06-23 16:02:19 -07004840 ;;
4841esac
4842fi
4843CXX=$ac_cv_path_CXX
4844if test -n "$CXX"; then
4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4846$as_echo "$CXX" >&6; }
4847else
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004852
4853fi
4854if test -z "$ac_cv_path_CXX"; then
4855 ac_pt_CXX=$CXX
4856 # Extract the first word of "clang++", so it can be a program name with args.
4857set dummy clang++; ac_word=$2
4858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859$as_echo_n "checking for $ac_word... " >&6; }
4860if ${ac_cv_path_ac_pt_CXX+:} false; then :
4861 $as_echo_n "(cached) " >&6
4862else
4863 case $ac_pt_CXX in
4864 [\\/]* | ?:[\\/]*)
4865 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4866 ;;
4867 *)
4868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869for as_dir in notfound
4870do
4871 IFS=$as_save_IFS
4872 test -z "$as_dir" && as_dir=.
4873 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877 break 2
4878 fi
4879done
4880 done
4881IFS=$as_save_IFS
4882
4883 ;;
4884esac
4885fi
4886ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4887if test -n "$ac_pt_CXX"; then
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4889$as_echo "$ac_pt_CXX" >&6; }
4890else
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892$as_echo "no" >&6; }
4893fi
4894
4895 if test "x$ac_pt_CXX" = x; then
4896 CXX="clang++"
4897 else
4898 case $cross_compiling:$ac_tool_warned in
4899yes:)
4900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4902ac_tool_warned=yes ;;
4903esac
4904 CXX=$ac_pt_CXX
4905 fi
4906else
4907 CXX="$ac_cv_path_CXX"
4908fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004909 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004910 icc|*/icc) if test -n "$ac_tool_prefix"; then
4911 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4912set dummy ${ac_tool_prefix}icpc; ac_word=$2
4913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914$as_echo_n "checking for $ac_word... " >&6; }
4915if ${ac_cv_path_CXX+:} false; then :
4916 $as_echo_n "(cached) " >&6
4917else
4918 case $CXX in
4919 [\\/]* | ?:[\\/]*)
4920 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4921 ;;
4922 *)
4923 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924for as_dir in notfound
4925do
4926 IFS=$as_save_IFS
4927 test -z "$as_dir" && as_dir=.
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4931 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932 break 2
4933 fi
4934done
4935 done
4936IFS=$as_save_IFS
4937
4938 ;;
4939esac
4940fi
4941CXX=$ac_cv_path_CXX
4942if test -n "$CXX"; then
4943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4944$as_echo "$CXX" >&6; }
4945else
4946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947$as_echo "no" >&6; }
4948fi
4949
4950
4951fi
4952if test -z "$ac_cv_path_CXX"; then
4953 ac_pt_CXX=$CXX
4954 # Extract the first word of "icpc", so it can be a program name with args.
4955set dummy icpc; ac_word=$2
4956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4957$as_echo_n "checking for $ac_word... " >&6; }
4958if ${ac_cv_path_ac_pt_CXX+:} false; then :
4959 $as_echo_n "(cached) " >&6
4960else
4961 case $ac_pt_CXX in
4962 [\\/]* | ?:[\\/]*)
4963 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4964 ;;
4965 *)
4966 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4967for as_dir in notfound
4968do
4969 IFS=$as_save_IFS
4970 test -z "$as_dir" && as_dir=.
4971 for ac_exec_ext in '' $ac_executable_extensions; do
4972 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4973 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4974 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4975 break 2
4976 fi
4977done
4978 done
4979IFS=$as_save_IFS
4980
4981 ;;
4982esac
4983fi
4984ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4985if test -n "$ac_pt_CXX"; then
4986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4987$as_echo "$ac_pt_CXX" >&6; }
4988else
4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4990$as_echo "no" >&6; }
4991fi
4992
4993 if test "x$ac_pt_CXX" = x; then
4994 CXX="icpc"
4995 else
4996 case $cross_compiling:$ac_tool_warned in
4997yes:)
4998{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4999$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5000ac_tool_warned=yes ;;
5001esac
5002 CXX=$ac_pt_CXX
5003 fi
5004else
5005 CXX="$ac_cv_path_CXX"
5006fi
5007 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005008 esac
5009 if test "$CXX" = "notfound"
5010 then
5011 CXX=""
5012 fi
5013fi
5014if test -z "$CXX"
5015then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005016 if test -n "$ac_tool_prefix"; then
5017 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5018 do
5019 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5020set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5022$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005023if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005025else
5026 if test -n "$CXX"; then
5027 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5028else
5029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in $PATH
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005036 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005038 break 2
5039 fi
5040done
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005043
5044fi
5045fi
5046CXX=$ac_cv_prog_CXX
5047if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5049$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050else
Matthias Kloseb9621712010-04-24 17:59:49 +00005051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005053fi
5054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005055
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005056 test -n "$CXX" && break
5057 done
5058fi
5059if test -z "$CXX"; then
5060 ac_ct_CXX=$CXX
5061 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5062do
5063 # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5068 $as_echo_n "(cached) " >&6
5069else
5070 if test -n "$ac_ct_CXX"; then
5071 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5072else
5073as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5074for as_dir in $PATH
5075do
5076 IFS=$as_save_IFS
5077 test -z "$as_dir" && as_dir=.
5078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005080 ac_cv_prog_ac_ct_CXX="$ac_prog"
5081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5082 break 2
5083 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005084done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005085 done
5086IFS=$as_save_IFS
5087
5088fi
5089fi
5090ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5091if test -n "$ac_ct_CXX"; then
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5093$as_echo "$ac_ct_CXX" >&6; }
5094else
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100 test -n "$ac_ct_CXX" && break
5101done
5102
5103 if test "x$ac_ct_CXX" = x; then
5104 CXX="notfound"
5105 else
5106 case $cross_compiling:$ac_tool_warned in
5107yes:)
5108{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5109$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5110ac_tool_warned=yes ;;
5111esac
5112 CXX=$ac_ct_CXX
5113 fi
5114fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005115
5116 if test "$CXX" = "notfound"
5117 then
5118 CXX=""
5119 fi
5120fi
5121if test "$preset_cxx" != "$CXX"
5122then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005123 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125 By default, distutils will build C++ extension modules with \"$CXX\".
5126 If this is not intended, then set CXX on the configure command line.
5127 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005128$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005129
5130 By default, distutils will build C++ extension modules with \"$CXX\".
5131 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133fi
5134
5135
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005136MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5137
5138
5139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5140$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5141cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005142#undef bfin
5143#undef cris
5144#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005145#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef hppa
5147#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005148#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005150#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005151#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005153#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005154 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005155#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156# if defined(__x86_64__) && defined(__LP64__)
5157 x86_64-linux-gnu
5158# elif defined(__x86_64__) && defined(__ILP32__)
5159 x86_64-linux-gnux32
5160# elif defined(__i386__)
5161 i386-linux-gnu
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-gnu
5165# else
5166 aarch64-linux-gnu
5167# endif
5168# elif defined(__aarch64__) && defined(__AARCH64EB__)
5169# if defined(__ILP32__)
5170 aarch64_be_ilp32-linux-gnu
5171# else
5172 aarch64_be-linux-gnu
5173# endif
5174# elif defined(__alpha__)
5175 alpha-linux-gnu
5176# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5177# if defined(__ARMEL__)
5178 arm-linux-gnueabihf
5179# else
5180 armeb-linux-gnueabihf
5181# endif
5182# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5183# if defined(__ARMEL__)
5184 arm-linux-gnueabi
5185# else
5186 armeb-linux-gnueabi
5187# endif
5188# elif defined(__hppa__)
5189 hppa-linux-gnu
5190# elif defined(__ia64__)
5191 ia64-linux-gnu
5192# elif defined(__m68k__) && !defined(__mcoldfire__)
5193 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005194# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5195# if _MIPS_SIM == _ABIO32
5196 mipsisa32r6el-linux-gnu
5197# elif _MIPS_SIM == _ABIN32
5198 mipsisa64r6el-linux-gnuabin32
5199# elif _MIPS_SIM == _ABI64
5200 mipsisa64r6el-linux-gnuabi64
5201# else
5202# error unknown platform triplet
5203# endif
5204# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5205# if _MIPS_SIM == _ABIO32
5206 mipsisa32r6-linux-gnu
5207# elif _MIPS_SIM == _ABIN32
5208 mipsisa64r6-linux-gnuabin32
5209# elif _MIPS_SIM == _ABI64
5210 mipsisa64r6-linux-gnuabi64
5211# else
5212# error unknown platform triplet
5213# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005214# elif defined(__mips_hard_float) && defined(_MIPSEL)
5215# if _MIPS_SIM == _ABIO32
5216 mipsel-linux-gnu
5217# elif _MIPS_SIM == _ABIN32
5218 mips64el-linux-gnuabin32
5219# elif _MIPS_SIM == _ABI64
5220 mips64el-linux-gnuabi64
5221# else
5222# error unknown platform triplet
5223# endif
5224# elif defined(__mips_hard_float)
5225# if _MIPS_SIM == _ABIO32
5226 mips-linux-gnu
5227# elif _MIPS_SIM == _ABIN32
5228 mips64-linux-gnuabin32
5229# elif _MIPS_SIM == _ABI64
5230 mips64-linux-gnuabi64
5231# else
5232# error unknown platform triplet
5233# endif
5234# elif defined(__or1k__)
5235 or1k-linux-gnu
5236# elif defined(__powerpc__) && defined(__SPE__)
5237 powerpc-linux-gnuspe
5238# elif defined(__powerpc64__)
5239# if defined(__LITTLE_ENDIAN__)
5240 powerpc64le-linux-gnu
5241# else
5242 powerpc64-linux-gnu
5243# endif
5244# elif defined(__powerpc__)
5245 powerpc-linux-gnu
5246# elif defined(__s390x__)
5247 s390x-linux-gnu
5248# elif defined(__s390__)
5249 s390-linux-gnu
5250# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5251 sh4-linux-gnu
5252# elif defined(__sparc__) && defined(__arch64__)
5253 sparc64-linux-gnu
5254# elif defined(__sparc__)
5255 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005256# elif defined(__riscv)
5257# if __riscv_xlen == 32
5258 riscv32-linux-gnu
5259# elif __riscv_xlen == 64
5260 riscv64-linux-gnu
5261# else
5262# error unknown platform triplet
5263# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005264# else
5265# error unknown platform triplet
5266# endif
5267#elif defined(__FreeBSD_kernel__)
5268# if defined(__LP64__)
5269 x86_64-kfreebsd-gnu
5270# elif defined(__i386__)
5271 i386-kfreebsd-gnu
5272# else
5273# error unknown platform triplet
5274# endif
5275#elif defined(__gnu_hurd__)
5276 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005277#elif defined(__APPLE__)
5278 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005279#else
5280# error unknown platform triplet
5281#endif
5282
5283EOF
5284
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005285if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005286 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5288$as_echo "$PLATFORM_TRIPLET" >&6; }
5289else
5290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5291$as_echo "none" >&6; }
5292fi
5293rm -f conftest.c conftest.out
5294
5295if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5296 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5297 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5298 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005299elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5300 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005301fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302
doko@ubuntu.com55532312016-06-14 08:55:19 +02005303if test x$MULTIARCH != x; then
5304 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5305fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005306
5307
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5309$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5310save_LDFLAGS="$LDFLAGS"
5311LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005312
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5314/* end confdefs.h. */
5315
5316int
5317main ()
5318{
5319
5320 ;
5321 return 0;
5322}
5323_ACEOF
5324if ac_fn_c_try_link "$LINENO"; then :
5325 NO_AS_NEEDED="-Wl,--no-as-needed"
5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5327$as_echo "yes" >&6; }
5328else
5329 NO_AS_NEEDED=""
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5331$as_echo "no" >&6; }
5332fi
5333rm -f core conftest.err conftest.$ac_objext \
5334 conftest$ac_exeext conftest.$ac_ext
5335LDFLAGS="$save_LDFLAGS"
5336
5337
5338
5339# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005340
Matthias Kloseb9621712010-04-24 17:59:49 +00005341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5342$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005343if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005344 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005345else
5346 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5347 then ac_cv_path_EGREP="$GREP -E"
5348 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005350 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 # Loop through the user's path and test for each of PROGNAME-LIST
5352 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5354do
5355 IFS=$as_save_IFS
5356 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 for ac_prog in egrep; do
5358 for ac_exec_ext in '' $ac_executable_extensions; do
5359 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005360 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005361# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362 # Check for GNU $ac_path_EGREP
5363case `"$ac_path_EGREP" --version 2>&1` in
5364*GNU*)
5365 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5366*)
5367 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 while :
5370 do
5371 cat "conftest.in" "conftest.in" >"conftest.tmp"
5372 mv "conftest.tmp" "conftest.in"
5373 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5376 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5379 # Best one so far, save it but keep looking for a better one
5380 ac_cv_path_EGREP="$ac_path_EGREP"
5381 ac_path_EGREP_max=$ac_count
5382 fi
5383 # 10*(2^10) chars as input seems more than enough
5384 test $ac_count -gt 10 && break
5385 done
5386 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5387esac
5388
Matthias Kloseb9621712010-04-24 17:59:49 +00005389 $ac_path_EGREP_found && break 3
5390 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005395 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 +00005396 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397else
5398 ac_cv_path_EGREP=$EGREP
5399fi
5400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401 fi
5402fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5404$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005406
5407
Matthias Kloseb9621712010-04-24 17:59:49 +00005408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5409$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005410if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 $as_echo_n "(cached) " >&6
5412else
5413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005414/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005415#include <stdlib.h>
5416#include <stdarg.h>
5417#include <string.h>
5418#include <float.h>
5419
5420int
5421main ()
5422{
5423
5424 ;
5425 return 0;
5426}
5427_ACEOF
5428if ac_fn_c_try_compile "$LINENO"; then :
5429 ac_cv_header_stdc=yes
5430else
5431 ac_cv_header_stdc=no
5432fi
5433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5434
5435if test $ac_cv_header_stdc = yes; then
5436 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438/* end confdefs.h. */
5439#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005440
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005445else
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005447fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005448rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005449
Matthias Kloseb9621712010-04-24 17:59:49 +00005450fi
5451
5452if test $ac_cv_header_stdc = yes; then
5453 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5455/* end confdefs.h. */
5456#include <stdlib.h>
5457
5458_ACEOF
5459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5460 $EGREP "free" >/dev/null 2>&1; then :
5461
5462else
5463 ac_cv_header_stdc=no
5464fi
5465rm -f conftest*
5466
5467fi
5468
5469if test $ac_cv_header_stdc = yes; then
5470 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5471 if test "$cross_compiling" = yes; then :
5472 :
5473else
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <ctype.h>
5477#include <stdlib.h>
5478#if ((' ' & 0x0FF) == 0x020)
5479# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5480# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5481#else
5482# define ISLOWER(c) \
5483 (('a' <= (c) && (c) <= 'i') \
5484 || ('j' <= (c) && (c) <= 'r') \
5485 || ('s' <= (c) && (c) <= 'z'))
5486# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5487#endif
5488
5489#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5490int
5491main ()
5492{
5493 int i;
5494 for (i = 0; i < 256; i++)
5495 if (XOR (islower (i), ISLOWER (i))
5496 || toupper (i) != TOUPPER (i))
5497 return 2;
5498 return 0;
5499}
5500_ACEOF
5501if ac_fn_c_try_run "$LINENO"; then :
5502
5503else
5504 ac_cv_header_stdc=no
5505fi
5506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5507 conftest.$ac_objext conftest.beam conftest.$ac_ext
5508fi
5509
5510fi
5511fi
5512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5513$as_echo "$ac_cv_header_stdc" >&6; }
5514if test $ac_cv_header_stdc = yes; then
5515
5516$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5517
5518fi
5519
5520# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5521for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5522 inttypes.h stdint.h unistd.h
5523do :
5524 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5525ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5526"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005527if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005528 cat >>confdefs.h <<_ACEOF
5529#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5530_ACEOF
5531
5532fi
5533
5534done
5535
5536
5537
5538 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 +02005539if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005540 MINIX=yes
5541else
5542 MINIX=
5543fi
5544
5545
5546 if test "$MINIX" = yes; then
5547
5548$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5549
5550
5551$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5552
5553
5554$as_echo "#define _MINIX 1" >>confdefs.h
5555
5556 fi
5557
5558
5559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5560$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005561if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005562 $as_echo_n "(cached) " >&6
5563else
5564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5565/* end confdefs.h. */
5566
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005567# define __EXTENSIONS__ 1
5568 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005569int
5570main ()
5571{
5572
5573 ;
5574 return 0;
5575}
5576_ACEOF
5577if ac_fn_c_try_compile "$LINENO"; then :
5578 ac_cv_safe_to_define___extensions__=yes
5579else
5580 ac_cv_safe_to_define___extensions__=no
5581fi
5582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5583fi
5584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5585$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5586 test $ac_cv_safe_to_define___extensions__ = yes &&
5587 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5588
5589 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5590
5591 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5592
5593 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5594
5595 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5596
5597
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598
Xavier de Gaye95750b12016-07-09 11:05:42 +02005599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5600$as_echo_n "checking for the Android API level... " >&6; }
5601cat >> conftest.c <<EOF
5602#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005603android_api = __ANDROID_API__
5604arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005605#else
5606#error not Android
5607#endif
5608EOF
5609
5610if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005611 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5612 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5614$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005615 if test -z "$ANDROID_API_LEVEL"; then
5616 echo 'Fatal: you must define __ANDROID_API__'
5617 exit 1
5618 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619
5620cat >>confdefs.h <<_ACEOF
5621#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5622_ACEOF
5623
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5626$as_echo_n "checking for the Android arm ABI... " >&6; }
5627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5628$as_echo "$_arm_arch" >&6; }
5629 if test "$_arm_arch" = 7; then
5630 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5631 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5632 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633else
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5635$as_echo "not Android" >&6; }
5636fi
5637rm -f conftest.c conftest.out
5638
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005639# Check for unsupported systems
5640case $ac_sys_system/$ac_sys_release in
5641atheos*|Linux*/1*)
5642 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5643 echo See README for details.
5644 exit 1;;
5645esac
5646
5647
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5649$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
5651# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005652if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653 withval=$with_suffix;
5654 case $withval in
5655 no) EXEEXT=;;
5656 yes) EXEEXT=.exe;;
5657 *) EXEEXT=$withval;;
5658 esac
5659fi
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5662$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Test whether we're running on a non-case-sensitive system, in which
5665# case we give a warning if no ext is given
5666
Matthias Kloseb9621712010-04-24 17:59:49 +00005667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5668$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669if test ! -d CaseSensitiveTestDir; then
5670mkdir CaseSensitiveTestDir
5671fi
5672
5673if test -d casesensitivetestdir
5674then
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5676$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 BUILDEXEEXT=.exe
5678else
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5680$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 BUILDEXEEXT=$EXEEXT
5682fi
5683rmdir CaseSensitiveTestDir
5684
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685case $ac_sys_system in
5686hp*|HP*)
5687 case $CC in
5688 cc|*/cc) CC="$CC -Ae";;
5689 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690esac
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692
Matthias Kloseb9621712010-04-24 17:59:49 +00005693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5694$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695if test -z "$LIBRARY"
5696then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005697 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5700$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# LDLIBRARY is the name of the library to link against (as opposed to the
5703# name of the library into which to insert object files). BLDLIBRARY is also
5704# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5705# is blank as the main program is not linked directly against LDLIBRARY.
5706# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5707# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5708# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5709# DLLLIBRARY is the shared (i.e., DLL) library.
5710#
5711# RUNSHARED is used to run shared python without installed libraries
5712#
5713# INSTSONAME is the name of the shared library that will be use to install
5714# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005715#
5716# LDVERSION is the shared library version number, normally the Python version
5717# with the ABI build flags appended.
5718
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719
5720
5721
5722
5723
5724
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726LDLIBRARY="$LIBRARY"
5727BLDLIBRARY='$(LDLIBRARY)'
5728INSTSONAME='$(LDLIBRARY)'
5729DLLLIBRARY=''
5730LDLIBRARYDIR=''
5731RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005732LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733
5734# LINKCC is the command that links the python executable -- default is $(CC).
5735# If CXX is set, and if it is needed to link a main function that was
5736# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5737# python might then depend on the C++ runtime
5738# This is altered for AIX in order to build the export list before
5739# linking.
5740
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5742$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743if test -z "$LINKCC"
5744then
5745 LINKCC='$(PURIFY) $(MAINCC)'
5746 case $ac_sys_system in
5747 AIX*)
5748 exp_extra="\"\""
5749 if test $ac_sys_release -ge 5 -o \
5750 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5751 exp_extra="."
5752 fi
5753 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754 QNX*)
5755 # qcc must be used because the other compilers do not
5756 # support -N.
5757 LINKCC=qcc;;
5758 esac
5759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5761$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762
5763# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5764# make sure we default having it set to "no": this is used by
5765# distutils.unixccompiler to know if it should add --enable-new-dtags
5766# to linker command lines, and failing to detect GNU ld simply results
5767# in the same bahaviour as before.
5768
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5770$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771ac_prog=ld
5772if test "$GCC" = yes; then
5773 ac_prog=`$CC -print-prog-name=ld`
5774fi
5775case `"$ac_prog" -V 2>&1 < /dev/null` in
5776 *GNU*)
5777 GNULD=yes;;
5778 *)
5779 GNULD=no;;
5780esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5782$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5785$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005787if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788 enableval=$enable_shared;
5789fi
5790
5791
5792if test -z "$enable_shared"
5793then
5794 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005795 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 enable_shared="yes";;
5797 *)
5798 enable_shared="no";;
5799 esac
5800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5802$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5805$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005808 enableval=$enable_profiling;
5809fi
5810
5811if test "x$enable_profiling" = xyes; then
5812 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005813 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815/* end confdefs.h. */
5816int main() { return 0; }
5817_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005818if ac_fn_c_try_link "$LINENO"; then :
5819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005823rm -f core conftest.err conftest.$ac_objext \
5824 conftest$ac_exeext conftest.$ac_ext
5825 CC="$ac_save_cc"
5826else
5827 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5830$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832if test "x$enable_profiling" = xyes; then
5833 BASECFLAGS="-pg $BASECFLAGS"
5834 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5838$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
5840# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5841# library that we build, but we do not want to link against it (we
5842# will find it with a -framework option). For this reason there is an
5843# extra variable BLDLIBRARY against which Python and the extension
5844# modules are linked, BLDLIBRARY. This is normally the same as
5845# LDLIBRARY, but empty for MacOSX framework builds.
5846if test "$enable_framework"
5847then
5848 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005849 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 BLDLIBRARY=''
5851else
5852 BLDLIBRARY='$(LDLIBRARY)'
5853fi
5854
5855# Other platforms follow
5856if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005857 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
Matthias Kloseb9621712010-04-24 17:59:49 +00005859$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005860
5861 case $ac_sys_system in
5862 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005863 LDLIBRARY='libpython$(LDVERSION).dll.a'
5864 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865 ;;
5866 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005867 LDLIBRARY='libpython$(LDVERSION).so'
5868 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005869 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005871 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005872 then
5873 PY3LIBRARY=libpython3.so
5874 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005876 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005877 LDLIBRARY='libpython$(LDVERSION).so'
5878 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005879 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005881 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005882 then
5883 PY3LIBRARY=libpython3.so
5884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 hp*|HP*)
5887 case `uname -m` in
5888 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005889 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 ;;
5891 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005892 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005895 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).dylib'
5900 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005901 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005903 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005906 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 esac
5909else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005910 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 case $ac_sys_system in
5912 CYGWIN*)
5913 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
5916 esac
5917fi
5918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005919if test "$cross_compiling" = yes; then
5920 RUNSHARED=
5921fi
5922
Matthias Kloseb9621712010-04-24 17:59:49 +00005923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5924$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005927if test -n "$ac_tool_prefix"; then
5928 for ac_prog in ar aal
5929 do
5930 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5931set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005934if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005935 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936else
5937 if test -n "$AR"; then
5938 ac_cv_prog_AR="$AR" # Let the user override the test.
5939else
5940as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5941for as_dir in $PATH
5942do
5943 IFS=$as_save_IFS
5944 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005945 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 break 2
5950 fi
5951done
Matthias Kloseb9621712010-04-24 17:59:49 +00005952 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005953IFS=$as_save_IFS
5954
5955fi
5956fi
5957AR=$ac_cv_prog_AR
5958if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5960$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961else
Matthias Kloseb9621712010-04-24 17:59:49 +00005962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964fi
5965
5966
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005967 test -n "$AR" && break
5968 done
5969fi
5970if test -z "$AR"; then
5971 ac_ct_AR=$AR
5972 for ac_prog in ar aal
5973do
5974 # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_prog_ac_ct_AR+:} false; then :
5979 $as_echo_n "(cached) " >&6
5980else
5981 if test -n "$ac_ct_AR"; then
5982 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
5989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005991 ac_cv_prog_ac_ct_AR="$ac_prog"
5992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5993 break 2
5994 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005996 done
5997IFS=$as_save_IFS
5998
5999fi
6000fi
6001ac_ct_AR=$ac_cv_prog_ac_ct_AR
6002if test -n "$ac_ct_AR"; then
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6004$as_echo "$ac_ct_AR" >&6; }
6005else
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011 test -n "$ac_ct_AR" && break
6012done
6013
6014 if test "x$ac_ct_AR" = x; then
6015 AR="ar"
6016 else
6017 case $cross_compiling:$ac_tool_warned in
6018yes:)
6019{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6020$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6021ac_tool_warned=yes ;;
6022esac
6023 AR=$ac_ct_AR
6024 fi
6025fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026
6027
6028# tweak ARFLAGS only if the user didn't set it on the command line
6029
6030if test -z "$ARFLAGS"
6031then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006032 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033fi
6034
doko@ubuntu.com58844492012-06-30 18:25:32 +02006035if test -n "$ac_tool_prefix"; then
6036 for ac_prog in readelf
6037 do
6038 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6041$as_echo_n "checking for $ac_word... " >&6; }
6042if ${ac_cv_prog_READELF+:} false; then :
6043 $as_echo_n "(cached) " >&6
6044else
6045 if test -n "$READELF"; then
6046 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6047else
6048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
6053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006055 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6057 break 2
6058 fi
6059done
6060 done
6061IFS=$as_save_IFS
6062
6063fi
6064fi
6065READELF=$ac_cv_prog_READELF
6066if test -n "$READELF"; then
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6068$as_echo "$READELF" >&6; }
6069else
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075 test -n "$READELF" && break
6076 done
6077fi
6078if test -z "$READELF"; then
6079 ac_ct_READELF=$READELF
6080 for ac_prog in readelf
6081do
6082 # Extract the first word of "$ac_prog", so it can be a program name with args.
6083set dummy $ac_prog; ac_word=$2
6084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6085$as_echo_n "checking for $ac_word... " >&6; }
6086if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6087 $as_echo_n "(cached) " >&6
6088else
6089 if test -n "$ac_ct_READELF"; then
6090 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6091else
6092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6093for as_dir in $PATH
6094do
6095 IFS=$as_save_IFS
6096 test -z "$as_dir" && as_dir=.
6097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006099 ac_cv_prog_ac_ct_READELF="$ac_prog"
6100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6101 break 2
6102 fi
6103done
6104 done
6105IFS=$as_save_IFS
6106
6107fi
6108fi
6109ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6110if test -n "$ac_ct_READELF"; then
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6112$as_echo "$ac_ct_READELF" >&6; }
6113else
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6115$as_echo "no" >&6; }
6116fi
6117
6118
6119 test -n "$ac_ct_READELF" && break
6120done
6121
6122 if test "x$ac_ct_READELF" = x; then
6123 READELF=":"
6124 else
6125 case $cross_compiling:$ac_tool_warned in
6126yes:)
6127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6129ac_tool_warned=yes ;;
6130esac
6131 READELF=$ac_ct_READELF
6132 fi
6133fi
6134
6135if test "$cross_compiling" = yes; then
6136 case "$READELF" in
6137 readelf|:)
6138 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6139 ;;
6140 esac
6141fi
6142
6143
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006146hp*|HP*)
6147 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006148 if test -z "$INSTALL"
6149 then
6150 INSTALL="${srcdir}/install-sh -c"
6151 fi
6152esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153# Find a good install program. We prefer a C program (faster),
6154# so one script is as good as another. But avoid the broken or
6155# incompatible versions:
6156# SysV /etc/install, /usr/sbin/install
6157# SunOS /usr/etc/install
6158# IRIX /sbin/install
6159# AIX /bin/install
6160# AmigaOS /C/install, which installs bootblocks on floppy discs
6161# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6162# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6163# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6164# OS/2's system install, which has a completely different semantic
6165# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006166# Reject install programs that cannot install multiple files.
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6168$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006170if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006171 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172else
6173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6174for as_dir in $PATH
6175do
6176 IFS=$as_save_IFS
6177 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 # Account for people who put trailing slashes in PATH elements.
6179case $as_dir/ in #((
6180 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 /usr/ucb/* ) ;;
6184 *)
6185 # OSF1 and SCO ODT 3.0 have their own names for install.
6186 # Don't use installbsd from OSF since it installs stuff as root
6187 # by default.
6188 for ac_prog in ginstall scoinst install; do
6189 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006190 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 if test $ac_prog = install &&
6192 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6193 # AIX install. It has an incompatible calling convention.
6194 :
6195 elif test $ac_prog = install &&
6196 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6197 # program-specific install script used by HP pwplus--don't use.
6198 :
6199 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 rm -rf conftest.one conftest.two conftest.dir
6201 echo one > conftest.one
6202 echo two > conftest.two
6203 mkdir conftest.dir
6204 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6205 test -s conftest.one && test -s conftest.two &&
6206 test -s conftest.dir/conftest.one &&
6207 test -s conftest.dir/conftest.two
6208 then
6209 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6210 break 3
6211 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006212 fi
6213 fi
6214 done
6215 done
6216 ;;
6217esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006218
6219 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220IFS=$as_save_IFS
6221
Matthias Kloseb9621712010-04-24 17:59:49 +00006222rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223
6224fi
6225 if test "${ac_cv_path_install+set}" = set; then
6226 INSTALL=$ac_cv_path_install
6227 else
6228 # As a last resort, use the slow shell script. Don't cache a
6229 # value for INSTALL within a source directory, because that will
6230 # break other packages using the cache if that directory is
6231 # removed, or if the value is a relative name.
6232 INSTALL=$ac_install_sh
6233 fi
6234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6236$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006237
6238# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6239# It thinks the first close brace ends the variable substitution.
6240test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6241
6242test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6243
6244test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6245
Matthias Klose93a0ef12012-03-15 18:08:34 +01006246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6247$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6248if test -z "$MKDIR_P"; then
6249 if ${ac_cv_path_mkdir+:} false; then :
6250 $as_echo_n "(cached) " >&6
6251else
6252 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6253for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6254do
6255 IFS=$as_save_IFS
6256 test -z "$as_dir" && as_dir=.
6257 for ac_prog in mkdir gmkdir; do
6258 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006259 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006260 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6261 'mkdir (GNU coreutils) '* | \
6262 'mkdir (coreutils) '* | \
6263 'mkdir (fileutils) '4.1*)
6264 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6265 break 3;;
6266 esac
6267 done
6268 done
6269 done
6270IFS=$as_save_IFS
6271
6272fi
6273
6274 test -d ./--version && rmdir ./--version
6275 if test "${ac_cv_path_mkdir+set}" = set; then
6276 MKDIR_P="$ac_cv_path_mkdir -p"
6277 else
6278 # As a last resort, use the slow shell script. Don't cache a
6279 # value for MKDIR_P within a source directory, because that will
6280 # break other packages using the cache if that directory is
6281 # removed, or if the value is a relative name.
6282 MKDIR_P="$ac_install_sh -d"
6283 fi
6284fi
6285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6286$as_echo "$MKDIR_P" >&6; }
6287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288
6289# Not every filesystem supports hard links
6290
6291if test -z "$LN" ; then
6292 case $ac_sys_system in
6293 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294 *) LN=ln;;
6295 esac
6296fi
6297
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006298# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006299
6300ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6304$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305
6306# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006307if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 withval=$with_pydebug;
6309if test "$withval" != no
6310then
6311
Matthias Kloseb9621712010-04-24 17:59:49 +00006312$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313
Matthias Kloseb9621712010-04-24 17:59:49 +00006314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6315$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006317 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006318else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320fi
6321else
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324fi
6325
6326
T. Woutersddbfa2c2017-05-23 01:30:49 +02006327# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6328# the ABI. This allows enabling assertions without changing the ABI.
6329assertions='false'
6330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6331$as_echo_n "checking for --with-assertions... " >&6; }
6332
6333# Check whether --with-assertions was given.
6334if test "${with_assertions+set}" = set; then :
6335 withval=$with_assertions;
6336if test "$withval" != no
6337then
6338 assertions='true'
6339fi
6340fi
6341
6342if test "$assertions" = 'true'; then
6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6344$as_echo "yes" >&6; }
6345elif test "$Py_DEBUG" = 'true'; then
6346 assertions='true'
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6348$as_echo "implied by --with-pydebug" >&6; }
6349else
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6351$as_echo "no" >&6; }
6352fi
6353
Brett Cannon63d98bc2016-09-06 17:12:40 -07006354# Enable optimization flags
6355
6356
6357Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6359$as_echo_n "checking for --enable-optimizations... " >&6; }
6360# Check whether --enable-optimizations was given.
6361if test "${enable_optimizations+set}" = set; then :
6362 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006363if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006364then
6365 Py_OPT='true'
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6367$as_echo "yes" >&6; };
6368else
6369 Py_OPT='false'
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; };
6372fi
6373else
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376fi
6377
6378if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006379 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6380 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006381 # 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 +00006382 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006383 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006384 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006385 DEF_MAKE_RULE="build_all"
6386else
6387 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006388 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389 DEF_MAKE_RULE="all"
6390fi
6391
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006392# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6394$as_echo_n "checking for --with-lto... " >&6; }
6395
6396# Check whether --with-lto was given.
6397if test "${with_lto+set}" = set; then :
6398 withval=$with_lto;
6399if test "$withval" != no
6400then
6401 Py_LTO='true'
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6403$as_echo "yes" >&6; };
6404else
6405 Py_LTO='false'
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; };
6408fi
6409else
6410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414if test "$Py_LTO" = 'true' ; then
6415 case $CC in
6416 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006417 case $ac_sys_system in
6418 Darwin*)
6419 # Any changes made here should be reflected in the GCC+Darwin case below
6420 LTOFLAGS="-flto -Wl,-export_dynamic"
6421 ;;
6422 *)
6423 LTOFLAGS="-flto"
6424 ;;
6425 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006426 ;;
6427 *gcc*)
6428 case $ac_sys_system in
6429 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006430 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006431 ;;
6432 *)
6433 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6434 ;;
6435 esac
6436 ;;
6437 esac
Victor Stinner06fe77a2018-06-19 18:24:58 +02006438
6439 if test "$ac_cv_prog_cc_g" = "yes"
6440 then
6441 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6442 # to get debug symbols.
6443 LTOFLAGS="$LTOFLAGS -g"
6444 fi
6445
octaviansoldea4c814012017-09-08 12:14:33 -07006446 CFLAGS="$CFLAGS $LTOFLAGS"
6447 LDFLAGS="$LDFLAGS $LTOFLAGS"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448fi
6449
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006451
6452
6453
6454
6455
Gregory P. Smith799520c2016-09-07 16:10:00 -07006456# Make this work on systems where llvm tools are not installed with their
6457# normal names in the default $PATH (ie: Ubuntu). They exist under the
6458# non-suffixed name in their versioned llvm directory.
6459llvm_bin_dir=''
6460llvm_path="${PATH}"
6461if test "${CC}" = "clang"
6462then
6463 clang_bin=`which clang`
6464 # Some systems install clang elsewhere as a symlink to the real path
6465 # which is where the related llvm tools are located.
6466 if test -L "${clang_bin}"
6467 then
6468 clang_dir=`dirname "${clang_bin}"`
6469 clang_bin=`readlink "${clang_bin}"`
6470 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6471 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6472 fi
6473fi
Zachary Ware5af85642015-12-21 12:09:17 -06006474
Gregory P. Smith799520c2016-09-07 16:10:00 -07006475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6476$as_echo_n "checking target system type... " >&6; }
6477if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478 $as_echo_n "(cached) " >&6
6479else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006480 if test "x$target_alias" = x; then
6481 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006482else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006483 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6484 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6485fi
6486
6487fi
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6489$as_echo "$ac_cv_target" >&6; }
6490case $ac_cv_target in
6491*-*-*) ;;
6492*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6493esac
6494target=$ac_cv_target
6495ac_save_IFS=$IFS; IFS='-'
6496set x $ac_cv_target
6497shift
6498target_cpu=$1
6499target_vendor=$2
6500shift; shift
6501# Remember, the first character of IFS is used to create $*,
6502# except with old shells:
6503target_os=$*
6504IFS=$ac_save_IFS
6505case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6506
6507
6508# The aliases save the names the user supplied, while $host etc.
6509# will get canonicalized.
6510test -n "$target_alias" &&
6511 test "$program_prefix$program_suffix$program_transform_name" = \
6512 NONENONEs,x,x, &&
6513 program_prefix=${target_alias}-
6514# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6515set dummy $target_alias-llvm-profdata; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6519 $as_echo_n "(cached) " >&6
6520else
6521 case $LLVM_PROFDATA in
6522 [\\/]* | ?:[\\/]*)
6523 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6524 ;;
6525 *)
6526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006528do
6529 IFS=$as_save_IFS
6530 test -z "$as_dir" && as_dir=.
6531 for ac_exec_ext in '' $ac_executable_extensions; do
6532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006533 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535 break 2
6536 fi
6537done
6538 done
6539IFS=$as_save_IFS
6540
Gregory P. Smith799520c2016-09-07 16:10:00 -07006541 ;;
6542esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006544LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6545if test -n "$LLVM_PROFDATA"; then
6546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6547$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006548else
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
Gregory P. Smith799520c2016-09-07 16:10:00 -07006554if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6555 if test "$build" = "$target"; then
6556 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6557 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6558set dummy llvm-profdata; ac_word=$2
6559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6560$as_echo_n "checking for $ac_word... " >&6; }
6561if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6562 $as_echo_n "(cached) " >&6
6563else
6564 case $ac_pt_LLVM_PROFDATA in
6565 [\\/]* | ?:[\\/]*)
6566 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6567 ;;
6568 *)
6569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6570for as_dir in ${llvm_path}
6571do
6572 IFS=$as_save_IFS
6573 test -z "$as_dir" && as_dir=.
6574 for ac_exec_ext in '' $ac_executable_extensions; do
6575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6576 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6578 break 2
6579 fi
6580done
6581 done
6582IFS=$as_save_IFS
6583
6584 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6585 ;;
6586esac
6587fi
6588ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6589if test -n "$ac_pt_LLVM_PROFDATA"; then
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6591$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6592else
6593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594$as_echo "no" >&6; }
6595fi
6596
6597 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6598 else
6599 LLVM_PROFDATA="''"
6600 fi
6601else
6602 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6603fi
6604
6605
6606if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6607then
6608 LLVM_PROF_FOUND="found"
6609else
6610 LLVM_PROF_FOUND="not-found"
6611fi
6612if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6613then
6614 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6615 if test -n "${found_llvm_profdata}"
6616 then
6617 # llvm-profdata isn't directly in $PATH in some cases.
6618 # https://apple.stackexchange.com/questions/197053/
6619 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6620 LLVM_PROF_FOUND=found
6621 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6622$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6623 fi
6624fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006625LLVM_PROF_ERR=no
6626case $CC in
6627 *clang*)
6628 # Any changes made here should be reflected in the GCC+Darwin case below
6629 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6630 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006631 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006632 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6633 if test $LLVM_PROF_FOUND = not-found
6634 then
6635 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006636 if test "${REQUIRE_PGO}" = "yes"
6637 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006638 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 -07006639 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006640 fi
6641 ;;
6642 *gcc*)
6643 case $ac_sys_system in
6644 Darwin*)
6645 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006649 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006650 then
6651 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006652 if test "${REQUIRE_PGO}" = "yes"
6653 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006654 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 -07006655 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656 fi
6657 ;;
6658 *)
6659 PGO_PROF_GEN_FLAG="-fprofile-generate"
6660 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6661 LLVM_PROF_MERGER="true"
6662 LLVM_PROF_FILE=""
6663 ;;
6664 esac
6665 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006666 *icc*)
6667 PGO_PROF_GEN_FLAG="-prof-gen"
6668 PGO_PROF_USE_FLAG="-prof-use"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672esac
6673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6675# merged with this chunk of code?
6676
6677# Optimizer/debugger flags
6678# ------------------------
6679# (The following bit of code is complicated enough - please keep things
6680# indented properly. Just pretend you're editing Python code. ;-)
6681
6682# There are two parallel sets of case statements below, one that checks to
6683# see if OPT was set and one that does BASECFLAGS setting based upon
6684# compiler and platform. BASECFLAGS tweaks need to be made even if the
6685# user set OPT.
6686
6687# tweak OPT based on compiler and platform, only if the user didn't set
6688# it on the command line
6689
Victor Stinner9ed34a82017-05-02 22:35:58 +02006690
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006691if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006692then
6693 case $GCC in
6694 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6696 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6697 WRAP="-fwrapv"
6698 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006699
Stefan Krahaf04ff22011-12-08 22:20:31 +01006700 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006701 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006702 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006703 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006704 *)
6705 if $CC --version 2>&1 | grep -q clang
6706 then
6707 cc_is_clang=1
6708 else
6709 cc_is_clang=
6710 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006711 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006712
Victor Stinner35f3d242017-04-21 12:35:24 +02006713 if test -n "${cc_is_clang}"
6714 then
6715 # Clang also needs -fwrapv
6716 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006717 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6718 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006719 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006720 fi
6721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722 case $ac_cv_prog_cc_g in
6723 yes)
6724 if test "$Py_DEBUG" = 'true' ; then
6725 # Optimization messes up debuggers, so turn it off for
6726 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006727 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006728 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006729 else
Victor Stinner28205b22017-04-21 11:24:34 +02006730 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006731 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006732 else
Victor Stinner28205b22017-04-21 11:24:34 +02006733 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006734 fi
6735 ;;
6736 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006737 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738 ;;
6739 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006740
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741 case $ac_sys_system in
6742 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6743 ;;
6744 esac
6745 ;;
6746
6747 *)
6748 OPT="-O"
6749 ;;
6750 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751fi
6752
6753
6754
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006755
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006756# The -arch flags for universal builds on OSX
6757UNIVERSAL_ARCH_FLAGS=
6758
6759
6760# tweak BASECFLAGS based on compiler and platform
6761case $GCC in
6762yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006763 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006764
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6766$as_echo_n "checking for -Wextra... " >&6; }
6767 ac_save_cc="$CC"
6768 CC="$CC -Wextra -Werror"
6769 if ${ac_cv_extra_warnings+:} false; then :
6770 $as_echo_n "(cached) " >&6
6771else
6772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6773/* end confdefs.h. */
6774
6775
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783
6784_ACEOF
6785if ac_fn_c_try_compile "$LINENO"; then :
6786
6787 ac_cv_extra_warnings=yes
6788
6789else
6790
6791 ac_cv_extra_warnings=no
6792
6793fi
6794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6795fi
6796
6797 CC="$ac_save_cc"
6798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6799$as_echo "$ac_cv_extra_warnings" >&6; }
6800
6801 if test $ac_cv_extra_warnings = yes
6802 then
6803 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6804 fi
6805
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 # Python doesn't violate C99 aliasing rules, but older versions of
6807 # GCC produce warnings for legal Python code. Enable
6808 # -fno-strict-aliasing on versions of GCC that support but produce
6809 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6811$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006812 ac_save_cc="$CC"
6813 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006814 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006815 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006820
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006822int
6823main ()
6824{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006825
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006826 ;
6827 return 0;
6828}
Matthias Kloseb159a552010-04-25 21:00:44 +00006829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006831if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006832
6833 CC="$ac_save_cc -fstrict-aliasing"
6834 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006836/* end confdefs.h. */
6837
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006838 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006839int
6840main ()
6841{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006842double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006843 ;
6844 return 0;
6845}
Matthias Kloseb159a552010-04-25 21:00:44 +00006846
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006848if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006849
6850 ac_cv_no_strict_aliasing=no
6851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852else
Matthias Kloseb159a552010-04-25 21:00:44 +00006853
6854 ac_cv_no_strict_aliasing=yes
6855
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006856fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006858
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006859else
Matthias Kloseb159a552010-04-25 21:00:44 +00006860
6861 ac_cv_no_strict_aliasing=no
6862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006865fi
6866
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006867 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6870$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006871 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 then
6873 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6874 fi
6875
Zachary Ware5af85642015-12-21 12:09:17 -06006876 # ICC doesn't recognize the option, but only emits a warning
6877 ## XXX does it emit an unused result warning and can it be disabled?
6878 case "$CC" in
6879 *icc*)
6880 ac_cv_disable_unused_result_warning=no
6881 ;;
6882 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6884$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6885 ac_save_cc="$CC"
6886 CC="$CC -Wunused-result -Werror"
6887 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006888 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006889 $as_echo_n "(cached) " >&6
6890else
6891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6892/* end confdefs.h. */
6893
6894
6895int
6896main ()
6897{
6898
6899 ;
6900 return 0;
6901}
6902
6903_ACEOF
6904if ac_fn_c_try_compile "$LINENO"; then :
6905
6906 ac_cv_disable_unused_result_warning=yes
6907
6908else
6909
6910 ac_cv_disable_unused_result_warning=no
6911
6912fi
6913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6914fi
6915
6916 CFLAGS="$save_CFLAGS"
6917 CC="$ac_save_cc"
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6919$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006920 ;;
6921 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006922
6923 if test $ac_cv_disable_unused_result_warning = yes
6924 then
6925 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006926 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
6927 fi
6928
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
6930$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
6931 ac_save_cc="$CC"
6932 CC="$CC -Wunused-parameter -Werror"
6933 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
6934 $as_echo_n "(cached) " >&6
6935else
6936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6937/* end confdefs.h. */
6938
6939
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
6947
6948_ACEOF
6949if ac_fn_c_try_compile "$LINENO"; then :
6950
6951 ac_cv_disable_unused_parameter_warning=yes
6952
6953else
6954
6955 ac_cv_disable_unused_parameter_warning=no
6956
6957fi
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959fi
6960
6961 CC="$ac_save_cc"
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
6963$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
6964
6965 if test $ac_cv_disable_unused_parameter_warning = yes
6966 then
6967 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
6968 fi
6969
6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
6971$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
6972 ac_save_cc="$CC"
6973 CC="$CC -Wmissing-field-initializers -Werror"
6974 if ${ac_cv_disable_missing_field_initializers+:} false; then :
6975 $as_echo_n "(cached) " >&6
6976else
6977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6978/* end confdefs.h. */
6979
6980
6981int
6982main ()
6983{
6984
6985 ;
6986 return 0;
6987}
6988
6989_ACEOF
6990if ac_fn_c_try_compile "$LINENO"; then :
6991
6992 ac_cv_disable_missing_field_initializers=yes
6993
6994else
6995
6996 ac_cv_disable_missing_field_initializers=no
6997
6998fi
6999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7000fi
7001
7002 CC="$ac_save_cc"
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7004$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7005
7006 if test $ac_cv_disable_missing_field_initializers = yes
7007 then
7008 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007009 fi
7010
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7012$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7013 ac_save_cc="$CC"
7014 CC="$CC -Wsign-compare"
7015 save_CFLAGS="$CFLAGS"
7016 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_enable_sign_compare_warning=yes
7035
7036else
7037
7038 ac_cv_enable_sign_compare_warning=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CFLAGS="$save_CFLAGS"
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7047$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7048
7049 if test $ac_cv_enable_sign_compare_warning = yes
7050 then
7051 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7052 fi
7053
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7055$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7056 ac_save_cc="$CC"
7057 CC="$CC -Wunreachable-code"
7058 save_CFLAGS="$CFLAGS"
7059 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061else
7062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7063/* end confdefs.h. */
7064
7065
7066int
7067main ()
7068{
7069
7070 ;
7071 return 0;
7072}
7073
7074_ACEOF
7075if ac_fn_c_try_compile "$LINENO"; then :
7076
7077 ac_cv_enable_unreachable_code_warning=yes
7078
7079else
7080
7081 ac_cv_enable_unreachable_code_warning=no
7082
7083fi
7084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085fi
7086
7087 CFLAGS="$save_CFLAGS"
7088 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007089
7090 # Don't enable unreachable code warning in debug mode, since it usually
7091 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007092 # Issue #24324: Unfortunately, the unreachable code warning does not work
7093 # correctly on gcc and has been silently removed from the compiler.
7094 # It is supported on clang but on OS X systems gcc may be an alias
7095 # for clang. Try to determine if the compiler is not really gcc and,
7096 # if so, only then enable the warning.
7097 if test $ac_cv_enable_unreachable_code_warning = yes && \
7098 test "$Py_DEBUG" != "true" && \
7099 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007100 then
7101 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007102 else
7103 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007104 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7106$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007107
INADA Naokie3364842018-06-05 20:40:53 +09007108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7109$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7110 ac_save_cc="$CC"
7111 CC="$CC -Werror -Wstrict-prototypes"
7112 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118
7119int
7120main ()
7121{
7122
7123 ;
7124 return 0;
7125}
7126
7127_ACEOF
7128if ac_fn_c_try_compile "$LINENO"; then :
7129
7130 ac_cv_enable_strict_prototypes_warning=yes
7131
7132else
7133
7134 ac_cv_enable_strict_prototypes_warning=no
7135
7136fi
7137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7138fi
7139
7140 CC="$ac_save_cc"
7141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7142$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7143
7144 if test $ac_cv_enable_strict_prototypes_warning = yes
7145 then
7146 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7147 fi
7148
Victor Stinner193ee0a2017-02-06 14:24:00 +01007149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7150$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7151 ac_save_cc="$CC"
7152 CC="$CC -Werror=implicit-function-declaration"
7153 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7154 $as_echo_n "(cached) " >&6
7155else
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157/* end confdefs.h. */
7158
7159
7160int
7161main ()
7162{
7163
7164 ;
7165 return 0;
7166}
7167
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 ac_cv_enable_implicit_function_declaration_error=yes
7172
7173else
7174
7175 ac_cv_enable_implicit_function_declaration_error=no
7176
7177fi
7178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7179fi
7180
7181 CC="$ac_save_cc"
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7183$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7184
7185 if test $ac_cv_enable_implicit_function_declaration_error = yes
7186 then
7187 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7188 fi
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7191 # support. Without this, treatment of subnormals doesn't follow
7192 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007193 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007194 alpha*)
7195 BASECFLAGS="$BASECFLAGS -mieee"
7196 ;;
7197 esac
7198
7199 case $ac_sys_system in
7200 SCO_SV*)
7201 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7202 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007203
Ned Deily87adb6e2013-10-18 21:09:56 -07007204 Darwin*)
7205 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7206 # used to be here, but non-Apple gcc doesn't accept them.
7207 if test "${CC}" = gcc
7208 then
7209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007210$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007211 case "${UNIVERSALSDK}" in
7212 */MacOSX10.4u.sdk)
7213 # Build using 10.4 SDK, force usage of gcc when the
7214 # compiler is gcc, otherwise the user will get very
7215 # confusing error messages when building on OSX 10.6
7216 CC=gcc-4.0
7217 CPP=cpp-4.0
7218 ;;
7219 esac
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007221$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007223
Ned Deily87adb6e2013-10-18 21:09:56 -07007224 if test "${enable_universalsdk}"
7225 then
7226 case "$UNIVERSAL_ARCHS" in
7227 32-bit)
7228 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7229 LIPO_32BIT_FLAGS=""
7230 ARCH_RUN_32BIT=""
7231 ;;
7232 64-bit)
7233 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7234 LIPO_32BIT_FLAGS=""
7235 ARCH_RUN_32BIT="true"
7236 ;;
7237 all)
7238 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7239 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7240 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7241 ;;
7242 intel)
7243 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7244 LIPO_32BIT_FLAGS="-extract i386"
7245 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7246 ;;
7247 intel-32)
7248 UNIVERSAL_ARCH_FLAGS="-arch i386"
7249 LIPO_32BIT_FLAGS=""
7250 ARCH_RUN_32BIT=""
7251 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007252 intel-64)
7253 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7254 LIPO_32BIT_FLAGS=""
7255 ARCH_RUN_32BIT="true"
7256 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007257 3-way)
7258 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7259 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7260 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7261 ;;
7262 *)
7263 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7264 ;;
7265 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266
Ned Deily87adb6e2013-10-18 21:09:56 -07007267 if test "${UNIVERSALSDK}" != "/"
7268 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007269 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7270 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007271 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007272 else
7273 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7274 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007275 fi
7276 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007277
Ned Deily87adb6e2013-10-18 21:09:56 -07007278 # Calculate an appropriate deployment target for this build:
7279 # The deployment target value is used explicitly to enable certain
7280 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007281 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007282 # component of the string returned by distutils.get_platform().
7283 #
7284 # Use the value from:
7285 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7286 # 2. the operating system version of the build machine if >= 10.6
7287 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7288 # below to pick either 10.3, 10.4, or 10.5 as the target.
7289 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290
Ned Deily87adb6e2013-10-18 21:09:56 -07007291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7292$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007293 cur_target_major=`sw_vers -productVersion | \
7294 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7295 cur_target_minor=`sw_vers -productVersion | \
7296 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7297 cur_target="${cur_target_major}.${cur_target_minor}"
7298 if test ${cur_target_major} -eq 10 && \
7299 test ${cur_target_minor} -ge 3 && \
7300 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007301 then
Ned Deily36820b62014-06-25 13:44:22 -07007302 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007303 cur_target=10.3
7304 if test ${enable_universalsdk}
7305 then
7306 case "$UNIVERSAL_ARCHS" in
7307 all|3-way|intel|64-bit)
7308 # These configurations were first supported in 10.5
7309 cur_target='10.5'
7310 ;;
7311 esac
7312 else
7313 if test `/usr/bin/arch` = "i386"
7314 then
7315 # 10.4 was the first release to support Intel archs
7316 cur_target="10.4"
7317 fi
7318 fi
7319 fi
7320 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007321
Ned Deily87adb6e2013-10-18 21:09:56 -07007322 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7323 # environment with a value that is the same as what we'll use
7324 # in the Makefile to ensure that we'll get the same compiler
7325 # environment during configure and build time.
7326 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7327 export MACOSX_DEPLOYMENT_TARGET
7328 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7330$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 # end of Darwin* tests
7333 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334 esac
7335 ;;
7336
7337*)
7338 case $ac_sys_system in
7339 OpenUNIX*|UnixWare*)
7340 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7341 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342 SCO_SV*)
7343 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7344 ;;
7345 esac
7346 ;;
7347esac
7348
Zachary Ware5af85642015-12-21 12:09:17 -06007349# ICC needs -fp-model strict or floats behave badly
7350case "$CC" in
7351*icc*)
7352 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7353 ;;
7354esac
7355
T. Woutersddbfa2c2017-05-23 01:30:49 +02007356if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007357 :
7358else
7359 OPT="-DNDEBUG $OPT"
7360fi
7361
7362if test "$ac_arch_flags"
7363then
7364 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7365fi
7366
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007367# On some compilers, pthreads are available without further options
7368# (e.g. MacOS X). On some of these systems, the compiler will not
7369# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7370# So we have to see first whether pthreads are available without
7371# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7373$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007374if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007375 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378 ac_cv_pthread_is_default=no
7379else
Matthias Kloseb9621712010-04-24 17:59:49 +00007380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381/* end confdefs.h. */
7382
Stefan Krah7dba5942012-11-22 22:49:11 +01007383#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384#include <pthread.h>
7385
7386void* routine(void* p){return NULL;}
7387
7388int main(){
7389 pthread_t p;
7390 if(pthread_create(&p,NULL,routine,NULL)!=0)
7391 return 1;
7392 (void)pthread_detach(p);
7393 return 0;
7394}
7395
7396_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007397if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
7399 ac_cv_pthread_is_default=yes
7400 ac_cv_kthread=no
7401 ac_cv_pthread=no
7402
7403else
Matthias Kloseb9621712010-04-24 17:59:49 +00007404 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007406rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7407 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408fi
7409
7410
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411fi
7412
Matthias Kloseb9621712010-04-24 17:59:49 +00007413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7414$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007415
7416
7417if test $ac_cv_pthread_is_default = yes
7418then
7419 ac_cv_kpthread=no
7420else
7421# -Kpthread, if available, provides the right #defines
7422# and linker options to make pthread_create available
7423# Some compilers won't report that they do not support -Kpthread,
7424# so we need to run a program to see whether it really made the
7425# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7427$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007428if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007429 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007430else
7431 ac_save_cc="$CC"
7432CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007433if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 ac_cv_kpthread=no
7435else
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437/* end confdefs.h. */
7438
Stefan Krah7dba5942012-11-22 22:49:11 +01007439#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440#include <pthread.h>
7441
7442void* routine(void* p){return NULL;}
7443
7444int main(){
7445 pthread_t p;
7446 if(pthread_create(&p,NULL,routine,NULL)!=0)
7447 return 1;
7448 (void)pthread_detach(p);
7449 return 0;
7450}
7451
7452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007453if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 ac_cv_kpthread=yes
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007458rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7459 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007460fi
7461
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462CC="$ac_save_cc"
7463fi
7464
Matthias Kloseb9621712010-04-24 17:59:49 +00007465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7466$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467fi
7468
7469if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7470then
7471# -Kthread, if available, provides the right #defines
7472# and linker options to make pthread_create available
7473# Some compilers won't report that they do not support -Kthread,
7474# so we need to run a program to see whether it really made the
7475# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7477$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007478if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480else
7481 ac_save_cc="$CC"
7482CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007483if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007484 ac_cv_kthread=no
7485else
Matthias Kloseb9621712010-04-24 17:59:49 +00007486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487/* end confdefs.h. */
7488
Stefan Krah7dba5942012-11-22 22:49:11 +01007489#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490#include <pthread.h>
7491
7492void* routine(void* p){return NULL;}
7493
7494int main(){
7495 pthread_t p;
7496 if(pthread_create(&p,NULL,routine,NULL)!=0)
7497 return 1;
7498 (void)pthread_detach(p);
7499 return 0;
7500}
7501
7502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007503if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 ac_cv_kthread=yes
7505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7509 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512CC="$ac_save_cc"
7513fi
7514
Matthias Kloseb9621712010-04-24 17:59:49 +00007515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7516$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517fi
7518
7519if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7520then
7521# -pthread, if available, provides the right #defines
7522# and linker options to make pthread_create available
7523# Some compilers won't report that they do not support -pthread,
7524# so we need to run a program to see whether it really made the
7525# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7527$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007528if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530else
7531 ac_save_cc="$CC"
7532CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007533if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 ac_cv_pthread=no
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538
Stefan Krah7dba5942012-11-22 22:49:11 +01007539#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540#include <pthread.h>
7541
7542void* routine(void* p){return NULL;}
7543
7544int main(){
7545 pthread_t p;
7546 if(pthread_create(&p,NULL,routine,NULL)!=0)
7547 return 1;
7548 (void)pthread_detach(p);
7549 return 0;
7550}
7551
7552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554 ac_cv_pthread=yes
7555else
Matthias Kloseb9621712010-04-24 17:59:49 +00007556 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560fi
7561
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562CC="$ac_save_cc"
7563fi
7564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7566$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
7569# If we have set a CC compiler flag for thread support then
7570# check if it works for CXX, too.
7571ac_cv_cxx_thread=no
7572if test ! -z "$CXX"
7573then
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7575$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007576ac_save_cxx="$CXX"
7577
7578if test "$ac_cv_kpthread" = "yes"
7579then
7580 CXX="$CXX -Kpthread"
7581 ac_cv_cxx_thread=yes
7582elif test "$ac_cv_kthread" = "yes"
7583then
7584 CXX="$CXX -Kthread"
7585 ac_cv_cxx_thread=yes
7586elif test "$ac_cv_pthread" = "yes"
7587then
7588 CXX="$CXX -pthread"
7589 ac_cv_cxx_thread=yes
7590fi
7591
7592if test $ac_cv_cxx_thread = yes
7593then
7594 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7595 $CXX -c conftest.$ac_ext 2>&5
7596 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7597 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7598 then
7599 ac_cv_cxx_thread=yes
7600 else
7601 ac_cv_cxx_thread=no
7602 fi
7603 rm -fr conftest*
7604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7606$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607fi
7608CXX="$ac_save_cxx"
7609
7610
7611# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7613$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007614if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616else
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618/* end confdefs.h. */
7619#include <stdlib.h>
7620#include <stdarg.h>
7621#include <string.h>
7622#include <float.h>
7623
7624int
7625main ()
7626{
7627
7628 ;
7629 return 0;
7630}
7631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007632if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633 ac_cv_header_stdc=yes
7634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7638
7639if test $ac_cv_header_stdc = yes; then
7640 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007642/* end confdefs.h. */
7643#include <string.h>
7644
7645_ACEOF
7646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 $EGREP "memchr" >/dev/null 2>&1; then :
7648
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649else
7650 ac_cv_header_stdc=no
7651fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007652rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653
7654fi
7655
7656if test $ac_cv_header_stdc = yes; then
7657 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659/* end confdefs.h. */
7660#include <stdlib.h>
7661
7662_ACEOF
7663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 $EGREP "free" >/dev/null 2>&1; then :
7665
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666else
7667 ac_cv_header_stdc=no
7668fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007669rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007670
7671fi
7672
7673if test $ac_cv_header_stdc = yes; then
7674 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007675 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007676 :
7677else
Matthias Kloseb9621712010-04-24 17:59:49 +00007678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679/* end confdefs.h. */
7680#include <ctype.h>
7681#include <stdlib.h>
7682#if ((' ' & 0x0FF) == 0x020)
7683# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7684# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7685#else
7686# define ISLOWER(c) \
7687 (('a' <= (c) && (c) <= 'i') \
7688 || ('j' <= (c) && (c) <= 'r') \
7689 || ('s' <= (c) && (c) <= 'z'))
7690# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7691#endif
7692
7693#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7694int
7695main ()
7696{
7697 int i;
7698 for (i = 0; i < 256; i++)
7699 if (XOR (islower (i), ISLOWER (i))
7700 || toupper (i) != TOUPPER (i))
7701 return 2;
7702 return 0;
7703}
7704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007705if ac_fn_c_try_run "$LINENO"; then :
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707else
Matthias Kloseb9621712010-04-24 17:59:49 +00007708 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714fi
7715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7717$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718if test $ac_cv_header_stdc = yes; then
7719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721
7722fi
7723
stratakise768c862018-01-23 16:11:24 +01007724for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007725fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007726ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007727sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007728utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007729poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007730sys/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 +01007731sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007732sys/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 +01007733sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007734sys/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 -07007735libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007736linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007737sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007738do :
7739 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7740ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
7745
7746fi
7747
Guido van Rossum627b2d71993-12-24 10:39:16 +00007748done
7749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007751for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007752 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7754$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007759/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760#include <sys/types.h>
7761#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763int
7764main ()
7765{
7766if ((DIR *) 0)
7767return 0;
7768 ;
7769 return 0;
7770}
7771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007774else
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779eval ac_res=\$$as_ac_Header
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7781$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007782if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007783 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007784#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007785_ACEOF
7786
7787ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007788fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007790done
7791# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7792if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7794$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007795if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797else
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802/* Override any GCC internal prototype to avoid an error.
7803 Use char because int might match the return type of a GCC
7804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007805#ifdef __cplusplus
7806extern "C"
7807#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007808char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007809int
7810main ()
7811{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007812return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007813 ;
7814 return 0;
7815}
7816_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007817for ac_lib in '' dir; do
7818 if test -z "$ac_lib"; then
7819 ac_res="none required"
7820 else
7821 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007822 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007823 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007825 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007826fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007827rm -f core conftest.err conftest.$ac_objext \
7828 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007829 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007832done
Victor Stinnere0be4232011-10-25 13:06:09 +02007833if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007835else
7836 ac_cv_search_opendir=no
7837fi
7838rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007839LIBS=$ac_func_search_save_LIBS
7840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7842$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007843ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007844if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007846
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007848
Michael W. Hudson54241132001-12-07 15:38:26 +00007849else
Matthias Kloseb9621712010-04-24 17:59:49 +00007850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7851$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007854else
7855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007859/* Override any GCC internal prototype to avoid an error.
7860 Use char because int might match the return type of a GCC
7861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007862#ifdef __cplusplus
7863extern "C"
7864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007865char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007869return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874for ac_lib in '' x; do
7875 if test -z "$ac_lib"; then
7876 ac_res="none required"
7877 else
7878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884rm -f core conftest.err conftest.$ac_objext \
7885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007886 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007889done
Victor Stinnere0be4232011-10-25 13:06:09 +02007890if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892else
7893 ac_cv_search_opendir=no
7894fi
7895rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007896LIBS=$ac_func_search_save_LIBS
7897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7899$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007903
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
7905
7906fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007907
Matthias Kloseb9621712010-04-24 17:59:49 +00007908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7909$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007910if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007911 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007912else
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007914/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007915#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007916int
7917main ()
7918{
7919return makedev(0, 0);
7920 ;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007925 ac_cv_header_sys_types_h_makedev=yes
7926else
Matthias Kloseb9621712010-04-24 17:59:49 +00007927 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929rm -f core conftest.err conftest.$ac_objext \
7930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007931
7932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7934$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007935
7936if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007937ac_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 +02007938if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007939
Matthias Kloseb9621712010-04-24 17:59:49 +00007940$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007941
7942fi
7943
7944
7945
7946 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007947 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 +02007948if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007949
Matthias Kloseb9621712010-04-24 17:59:49 +00007950$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007951
7952fi
7953
7954
7955 fi
7956fi
7957
Michael W. Hudson54241132001-12-07 15:38:26 +00007958
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007959# bluetooth/bluetooth.h has been known to not compile with -std=c99.
7960# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
7961SAVE_CFLAGS=$CFLAGS
7962CFLAGS="-std=c99 $CFLAGS"
7963for ac_header in bluetooth/bluetooth.h
7964do :
7965 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
7966if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
7967 cat >>confdefs.h <<_ACEOF
7968#define HAVE_BLUETOOTH_BLUETOOTH_H 1
7969_ACEOF
7970
7971fi
7972
7973done
7974
7975CFLAGS=$SAVE_CFLAGS
7976
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007977# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7978for ac_header in net/if.h
7979do :
7980 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7981#ifdef STDC_HEADERS
7982# include <stdlib.h>
7983# include <stddef.h>
7984#else
7985# ifdef HAVE_STDLIB_H
7986# include <stdlib.h>
7987# endif
7988#endif
7989#ifdef HAVE_SYS_SOCKET_H
7990# include <sys/socket.h>
7991#endif
7992
7993"
Victor Stinnere0be4232011-10-25 13:06:09 +02007994if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007995 cat >>confdefs.h <<_ACEOF
7996#define HAVE_NET_IF_H 1
7997_ACEOF
7998
7999fi
8000
8001done
8002
8003
Martin v. Löwis11017b12006-01-14 18:12:57 +00008004# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008005for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008006do :
8007 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 +00008008#ifdef HAVE_ASM_TYPES_H
8009#include <asm/types.h>
8010#endif
8011#ifdef HAVE_SYS_SOCKET_H
8012#include <sys/socket.h>
8013#endif
8014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015"
Victor Stinnere0be4232011-10-25 13:06:09 +02008016if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008017 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008018#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008019_ACEOF
8020
8021fi
8022
8023done
8024
8025
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008026# On Linux, qrtr.h requires asm/types.h
8027for ac_header in linux/qrtr.h
8028do :
8029 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8030#ifdef HAVE_ASM_TYPES_H
8031#include <asm/types.h>
8032#endif
8033#ifdef HAVE_SYS_SOCKET_H
8034#include <sys/socket.h>
8035#endif
8036
8037"
8038if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8039 cat >>confdefs.h <<_ACEOF
8040#define HAVE_LINUX_QRTR_H 1
8041_ACEOF
8042
8043fi
8044
8045done
8046
8047
caaveryeffc12f2017-09-06 18:18:10 -04008048for ac_header in linux/vm_sockets.h
8049do :
8050 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8051#ifdef HAVE_SYS_SOCKET_H
8052#include <sys/socket.h>
8053#endif
8054
8055"
8056if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8057 cat >>confdefs.h <<_ACEOF
8058#define HAVE_LINUX_VM_SOCKETS_H 1
8059_ACEOF
8060
8061fi
8062
8063done
8064
8065
Charles-François Natali47413c12011-10-06 19:47:44 +02008066# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008067for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008068do :
8069 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8070ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8071#ifdef HAVE_SYS_SOCKET_H
8072#include <sys/socket.h>
8073#endif
8074
8075"
8076if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8077 cat >>confdefs.h <<_ACEOF
8078#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8079_ACEOF
8080
8081fi
8082
8083done
8084
8085
Guido van Rossum627b2d71993-12-24 10:39:16 +00008086# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008087was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8089$as_echo_n "checking for clock_t in time.h... " >&6; }
8090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008091/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008093
8094_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008096 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008097 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008098else
Martin v. Löwis11437992002-04-12 09:54:03 +00008099
8100
Matthias Kloseb9621712010-04-24 17:59:49 +00008101$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008102
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008103
Guido van Rossum627b2d71993-12-24 10:39:16 +00008104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008105rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008106
Matthias Kloseb9621712010-04-24 17:59:49 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8108$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8111$as_echo_n "checking for makedev... " >&6; }
8112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008113/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008114
Jesus Cea740f53a2010-04-28 11:35:30 +00008115#if defined(MAJOR_IN_MKDEV)
8116#include <sys/mkdev.h>
8117#elif defined(MAJOR_IN_SYSMACROS)
8118#include <sys/sysmacros.h>
8119#else
8120#include <sys/types.h>
8121#endif
8122
Neal Norwitz11690112002-07-30 01:08:28 +00008123int
8124main ()
8125{
Jesus Cea740f53a2010-04-28 11:35:30 +00008126
8127 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008128 ;
8129 return 0;
8130}
Matthias Kloseb159a552010-04-25 21:00:44 +00008131
Neal Norwitz11690112002-07-30 01:08:28 +00008132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008133if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008134 ac_cv_has_makedev=yes
8135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008137fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008138rm -f core conftest.err conftest.$ac_objext \
8139 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8141$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008142if test "$ac_cv_has_makedev" = "yes"; then
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008145
8146fi
8147
Christian Heimes985ecdc2013-11-20 11:46:18 +01008148# byte swapping
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8150$as_echo_n "checking for le64toh... " >&6; }
8151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8152/* end confdefs.h. */
8153
8154#ifdef HAVE_ENDIAN_H
8155#include <endian.h>
8156#elif defined(HAVE_SYS_ENDIAN_H)
8157#include <sys/endian.h>
8158#endif
8159
8160int
8161main ()
8162{
8163
8164 le64toh(1)
8165 ;
8166 return 0;
8167}
8168
8169_ACEOF
8170if ac_fn_c_try_link "$LINENO"; then :
8171 ac_cv_has_le64toh=yes
8172else
8173 ac_cv_has_le64toh=no
8174fi
8175rm -f core conftest.err conftest.$ac_objext \
8176 conftest$ac_exeext conftest.$ac_ext
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8178$as_echo "$ac_cv_has_le64toh" >&6; }
8179if test "$ac_cv_has_le64toh" = "yes"; then
8180
8181$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8182
8183fi
8184
Martin v. Löwis399a6892002-10-04 10:22:02 +00008185use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008186# Don't use largefile support for GNU/Hurd
8187case $ac_sys_system in GNU*)
8188 use_lfs=no
8189esac
8190
Martin v. Löwis399a6892002-10-04 10:22:02 +00008191if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008192# Two defines needed to enable largefile support on various platforms
8193# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008194case $ac_sys_system/$ac_sys_release in
8195AIX*)
8196
8197$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8198
8199 ;;
8200esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008201
Matthias Kloseb9621712010-04-24 17:59:49 +00008202$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008203
8204
Matthias Kloseb9621712010-04-24 17:59:49 +00008205$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008206
Martin v. Löwis399a6892002-10-04 10:22:02 +00008207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008208
Guido van Rossum84e7b241996-08-19 21:59:00 +00008209# Add some code to confdefs.h so that the test for off_t works on SCO
8210cat >> confdefs.h <<\EOF
8211#if defined(SCO_DS)
8212#undef _OFF_T
8213#endif
8214EOF
8215
Guido van Rossumef2255b2000-03-10 22:30:29 +00008216# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008217ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008218if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220else
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222cat >>confdefs.h <<_ACEOF
8223#define mode_t int
8224_ACEOF
8225
8226fi
8227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008229if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008231else
Martin v. Löwis11437992002-04-12 09:54:03 +00008232
8233cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008234#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008235_ACEOF
8236
8237fi
8238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008240if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008241
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008242else
Martin v. Löwis11437992002-04-12 09:54:03 +00008243
8244cat >>confdefs.h <<_ACEOF
8245#define pid_t int
8246_ACEOF
8247
8248fi
8249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008252#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008253_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008256if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008257
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008258else
Martin v. Löwis11437992002-04-12 09:54:03 +00008259
8260cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008261#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008262_ACEOF
8263
8264fi
8265
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8267$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008268if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008269 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008270else
Matthias Kloseb9621712010-04-24 17:59:49 +00008271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008272/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008273#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008274
8275_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008278 ac_cv_type_uid_t=yes
8279else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008280 ac_cv_type_uid_t=no
8281fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008282rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008283
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008284fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8286$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008287if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008288
Matthias Kloseb9621712010-04-24 17:59:49 +00008289$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008290
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008293
8294fi
8295
Mark Dickinson983bc162012-12-02 12:11:38 +00008296
Matthias Kloseb9621712010-04-24 17:59:49 +00008297ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008298if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008301
8302fi
8303
Stefan Krah1919b7e2012-03-21 18:25:23 +01008304ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8305if test "x$ac_cv_type___uint128_t" = xyes; then :
8306
8307$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8308
8309fi
8310
Jack Jansendd19cf82001-12-06 22:36:17 +00008311
Michael W. Hudson54241132001-12-07 15:38:26 +00008312# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008313# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314# The cast to long int works around a bug in the HP C Compiler
8315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8317# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8319$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008320if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008322else
Matthias Kloseb9621712010-04-24 17:59:49 +00008323 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 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325else
Matthias Kloseb9621712010-04-24 17:59:49 +00008326 if test "$ac_cv_type_int" = yes; then
8327 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8328$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008329as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008330See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008331 else
8332 ac_cv_sizeof_int=0
8333 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335
Martin v. Löwis11437992002-04-12 09:54:03 +00008336fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8338$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008339
8340
8341
Martin v. Löwis11437992002-04-12 09:54:03 +00008342cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008343#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008344_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008345
8346
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347# The cast to long int works around a bug in the HP C Compiler
8348# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8349# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8350# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8352$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008353if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008355else
Matthias Kloseb9621712010-04-24 17:59:49 +00008356 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 +00008357
Martin v. Löwis11437992002-04-12 09:54:03 +00008358else
Matthias Kloseb9621712010-04-24 17:59:49 +00008359 if test "$ac_cv_type_long" = yes; then
8360 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8361$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008362as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008363See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008364 else
8365 ac_cv_sizeof_long=0
8366 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008368
Martin v. Löwis11437992002-04-12 09:54:03 +00008369fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8371$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372
8373
8374
Martin v. Löwis11437992002-04-12 09:54:03 +00008375cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008376#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008377_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008378
8379
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008380# The cast to long int works around a bug in the HP C Compiler
8381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8383# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8385$as_echo_n "checking size of long long... " >&6; }
8386if ${ac_cv_sizeof_long_long+:} false; then :
8387 $as_echo_n "(cached) " >&6
8388else
8389 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8390
8391else
8392 if test "$ac_cv_type_long_long" = yes; then
8393 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8395as_fn_error 77 "cannot compute sizeof (long long)
8396See \`config.log' for more details" "$LINENO" 5; }
8397 else
8398 ac_cv_sizeof_long_long=0
8399 fi
8400fi
8401
8402fi
8403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8404$as_echo "$ac_cv_sizeof_long_long" >&6; }
8405
8406
8407
8408cat >>confdefs.h <<_ACEOF
8409#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8410_ACEOF
8411
8412
8413# The cast to long int works around a bug in the HP C Compiler
8414# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8415# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8416# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8418$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008419if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008421else
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 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 +00008423
Martin v. Löwis11437992002-04-12 09:54:03 +00008424else
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 if test "$ac_cv_type_void_p" = yes; then
8426 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8427$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008428as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008429See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008430 else
8431 ac_cv_sizeof_void_p=0
8432 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434
Martin v. Löwis11437992002-04-12 09:54:03 +00008435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8437$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008438
8439
8440
Martin v. Löwis11437992002-04-12 09:54:03 +00008441cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008442#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008443_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008444
8445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008446# The cast to long int works around a bug in the HP C Compiler
8447# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8448# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8449# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8451$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008452if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 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 +00008456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457else
Matthias Kloseb9621712010-04-24 17:59:49 +00008458 if test "$ac_cv_type_short" = yes; then
8459 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008461as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008462See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 else
8464 ac_cv_sizeof_short=0
8465 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467
Martin v. Löwis11437992002-04-12 09:54:03 +00008468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8470$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008471
8472
8473
Martin v. Löwis11437992002-04-12 09:54:03 +00008474cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008475#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008476_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008477
8478
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008479# The cast to long int works around a bug in the HP C Compiler
8480# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8481# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8482# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8484$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008485if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 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 +00008489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490else
Matthias Kloseb9621712010-04-24 17:59:49 +00008491 if test "$ac_cv_type_float" = yes; then
8492 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8493$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008494as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008495See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008496 else
8497 ac_cv_sizeof_float=0
8498 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8503$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504
8505
8506
Martin v. Löwis11437992002-04-12 09:54:03 +00008507cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008508#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008509_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008510
8511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512# The cast to long int works around a bug in the HP C Compiler
8513# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8514# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8515# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8517$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008518if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 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 +00008522
Martin v. Löwis11437992002-04-12 09:54:03 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 if test "$ac_cv_type_double" = yes; then
8525 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008527as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008528See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529 else
8530 ac_cv_sizeof_double=0
8531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533
Martin v. Löwis11437992002-04-12 09:54:03 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8536$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537
8538
8539
Martin v. Löwis11437992002-04-12 09:54:03 +00008540cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008541#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008542_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008543
8544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008545# The cast to long int works around a bug in the HP C Compiler
8546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8548# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8550$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008551if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 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 +00008555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556else
Matthias Kloseb9621712010-04-24 17:59:49 +00008557 if test "$ac_cv_type_fpos_t" = yes; then
8558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008560as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008561See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562 else
8563 ac_cv_sizeof_fpos_t=0
8564 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566
Martin v. Löwis11437992002-04-12 09:54:03 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8569$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570
8571
8572
Martin v. Löwis11437992002-04-12 09:54:03 +00008573cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008574#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008575_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008576
Michael W. Hudson54241132001-12-07 15:38:26 +00008577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578# The cast to long int works around a bug in the HP C Compiler
8579# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8580# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8581# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8583$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008584if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 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 +00008588
Martin v. Löwis18e16552006-02-15 17:27:45 +00008589else
Matthias Kloseb9621712010-04-24 17:59:49 +00008590 if test "$ac_cv_type_size_t" = yes; then
8591 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008593as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008594See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595 else
8596 ac_cv_sizeof_size_t=0
8597 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599
Martin v. Löwis18e16552006-02-15 17:27:45 +00008600fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8602$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603
8604
8605
Martin v. Löwis18e16552006-02-15 17:27:45 +00008606cat >>confdefs.h <<_ACEOF
8607#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8608_ACEOF
8609
8610
Christian Heimes400adb02008-02-01 08:12:03 +00008611# The cast to long int works around a bug in the HP C Compiler
8612# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8613# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8614# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8616$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008617if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 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 +00008621
Christian Heimes400adb02008-02-01 08:12:03 +00008622else
Matthias Kloseb9621712010-04-24 17:59:49 +00008623 if test "$ac_cv_type_pid_t" = yes; then
8624 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8625$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008626as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008627See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008628 else
8629 ac_cv_sizeof_pid_t=0
8630 fi
8631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632
Christian Heimes400adb02008-02-01 08:12:03 +00008633fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8635$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008636
8637
8638
8639cat >>confdefs.h <<_ACEOF
8640#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8641_ACEOF
8642
8643
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008644# The cast to long int works around a bug in the HP C Compiler
8645# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8646# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8647# This bug is HP SR number 8606223364.
8648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8649$as_echo_n "checking size of uintptr_t... " >&6; }
8650if ${ac_cv_sizeof_uintptr_t+:} false; then :
8651 $as_echo_n "(cached) " >&6
8652else
8653 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8654
8655else
8656 if test "$ac_cv_type_uintptr_t" = yes; then
8657 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8659as_fn_error 77 "cannot compute sizeof (uintptr_t)
8660See \`config.log' for more details" "$LINENO" 5; }
8661 else
8662 ac_cv_sizeof_uintptr_t=0
8663 fi
8664fi
8665
8666fi
8667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8668$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8669
8670
8671
8672cat >>confdefs.h <<_ACEOF
8673#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8674_ACEOF
8675
8676
Michael W. Hudson54241132001-12-07 15:38:26 +00008677
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008678
Eitan Adler3055c942018-05-15 22:58:09 -07008679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8680$as_echo_n "checking for long double... " >&6; }
8681if ${ac_cv_type_long_double+:} false; then :
8682 $as_echo_n "(cached) " >&6
8683else
8684 if test "$GCC" = yes; then
8685 ac_cv_type_long_double=yes
8686 else
8687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8688/* end confdefs.h. */
8689/* The Stardent Vistra knows sizeof (long double), but does
8690 not support it. */
8691 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008692int
8693main ()
8694{
Eitan Adler3055c942018-05-15 22:58:09 -07008695static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8696 sizeof (double) <= sizeof (long double))];
8697test_array [0] = 0;
8698return test_array [0];
8699
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008700 ;
8701 return 0;
8702}
8703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008704if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008705 ac_cv_type_long_double=yes
8706else
8707 ac_cv_type_long_double=no
8708fi
8709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8710 fi
8711fi
8712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8713$as_echo "$ac_cv_type_long_double" >&6; }
8714 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008715
Matthias Kloseb9621712010-04-24 17:59:49 +00008716$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008717
Eitan Adler3055c942018-05-15 22:58:09 -07008718 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008719
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008720# The cast to long int works around a bug in the HP C Compiler
8721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8723# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8725$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008726if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008727 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008728else
Matthias Kloseb9621712010-04-24 17:59:49 +00008729 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 +00008730
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 if test "$ac_cv_type_long_double" = yes; then
8733 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8734$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008735as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008736See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008737 else
8738 ac_cv_sizeof_long_double=0
8739 fi
8740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008741
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008742fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8744$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008745
8746
8747
8748cat >>confdefs.h <<_ACEOF
8749#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8750_ACEOF
8751
8752
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008754# The cast to long int works around a bug in the HP C Compiler
8755# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8756# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8757# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8759$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008760if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008762else
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 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 +00008764
Thomas Woutersb2137042007-02-01 18:02:27 +00008765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 if test "$ac_cv_type__Bool" = yes; then
8767 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8768$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008769as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008770See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771 else
8772 ac_cv_sizeof__Bool=0
8773 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775
Thomas Woutersb2137042007-02-01 18:02:27 +00008776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8778$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779
8780
8781
Thomas Woutersb2137042007-02-01 18:02:27 +00008782cat >>confdefs.h <<_ACEOF
8783#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8784_ACEOF
8785
8786
Thomas Woutersb2137042007-02-01 18:02:27 +00008787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008788# The cast to long int works around a bug in the HP C Compiler
8789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8791# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8793$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008794if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008798#ifdef HAVE_SYS_TYPES_H
8799#include <sys/types.h>
8800#endif
8801
Matthias Kloseb9621712010-04-24 17:59:49 +00008802"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 if test "$ac_cv_type_off_t" = yes; then
8806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008808as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008809See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810 else
8811 ac_cv_sizeof_off_t=0
8812 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008814
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8817$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819
8820
Martin v. Löwis11437992002-04-12 09:54:03 +00008821cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008822#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008823_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008824
Michael W. Hudson54241132001-12-07 15:38:26 +00008825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826
Matthias Kloseb9621712010-04-24 17:59:49 +00008827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8828$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008829if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008830 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Matthias Kloseb9621712010-04-24 17:59:49 +00008834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8835$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008836else
Matthias Kloseb9621712010-04-24 17:59:49 +00008837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8838$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008839fi
8840
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008841# The cast to long int works around a bug in the HP C Compiler
8842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8844# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8846$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008847if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008849else
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851#ifdef HAVE_SYS_TYPES_H
8852#include <sys/types.h>
8853#endif
8854#ifdef HAVE_TIME_H
8855#include <time.h>
8856#endif
8857
Matthias Kloseb9621712010-04-24 17:59:49 +00008858"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 if test "$ac_cv_type_time_t" = yes; then
8862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008864as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008865See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008866 else
8867 ac_cv_sizeof_time_t=0
8868 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8873$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875
8876
Martin v. Löwis11437992002-04-12 09:54:03 +00008877cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008878#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008879_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008880
Michael W. Hudson54241132001-12-07 15:38:26 +00008881
8882
Trent Mick635f6fb2000-08-23 21:33:05 +00008883# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008884ac_save_cc="$CC"
8885if test "$ac_cv_kpthread" = "yes"
8886then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008887elif test "$ac_cv_kthread" = "yes"
8888then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008889elif test "$ac_cv_pthread" = "yes"
8890then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008891fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008892
Matthias Kloseb9621712010-04-24 17:59:49 +00008893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8894$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008895have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008896cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008897/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008898
8899 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008900int
8901main ()
8902{
Guido van Rossum12580492000-09-24 16:47:19 +00008903pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 ;
8905 return 0;
8906}
Matthias Kloseb159a552010-04-25 21:00:44 +00008907
Martin v. Löwis11437992002-04-12 09:54:03 +00008908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008909if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008910 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8914$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008915if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8921$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008922if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926#ifdef HAVE_PTHREAD_H
8927#include <pthread.h>
8928#endif
8929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 if test "$ac_cv_type_pthread_t" = yes; then
8934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008936as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008937See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938 else
8939 ac_cv_sizeof_pthread_t=0
8940 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942
Trent Mick635f6fb2000-08-23 21:33:05 +00008943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8945$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008947
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008950#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008952
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008953
Trent Mick635f6fb2000-08-23 21:33:05 +00008954fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09008955
8956# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
8957# This checking will be unnecessary after removing deprecated TLS API.
8958# The cast to long int works around a bug in the HP C Compiler
8959# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8960# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8961# This bug is HP SR number 8606223364.
8962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
8963$as_echo_n "checking size of pthread_key_t... " >&6; }
8964if ${ac_cv_sizeof_pthread_key_t+:} false; then :
8965 $as_echo_n "(cached) " >&6
8966else
8967 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
8968"; then :
8969
8970else
8971 if test "$ac_cv_type_pthread_key_t" = yes; then
8972 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8974as_fn_error 77 "cannot compute sizeof (pthread_key_t)
8975See \`config.log' for more details" "$LINENO" 5; }
8976 else
8977 ac_cv_sizeof_pthread_key_t=0
8978 fi
8979fi
8980
8981fi
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
8983$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
8984
8985
8986
8987cat >>confdefs.h <<_ACEOF
8988#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
8989_ACEOF
8990
8991
8992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
8993$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
8994if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
8995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8996/* end confdefs.h. */
8997#include <pthread.h>
8998int
8999main ()
9000{
9001pthread_key_t k; k * 1;
9002 ;
9003 return 0;
9004}
9005_ACEOF
9006if ac_fn_c_try_compile "$LINENO"; then :
9007 ac_pthread_key_t_is_arithmetic_type=yes
9008else
9009 ac_pthread_key_t_is_arithmetic_type=no
9010
9011fi
9012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9014$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9015 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9016
9017$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9018
9019 fi
9020else
9021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
9023fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009024CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009025
Michael W. Hudson54241132001-12-07 15:38:26 +00009026
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009027case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009028 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009029 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9030 ;;
9031 Darwin/*)
9032 OTHER_LIBTOOL_OPT=""
9033 ;;
9034esac
9035
9036
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009037
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009038case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009039 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009040 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9041 if test "${enable_universalsdk}"; then
9042 :
9043 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009044 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009045 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009046 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009047 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009048 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009049 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009050 if test ${gcc_version} '<' 4.0
9051 then
9052 LIBTOOL_CRUFT="-lcc_dynamic"
9053 else
9054 LIBTOOL_CRUFT=""
9055 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009057 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009061
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009062 #include <unistd.h>
9063 int main(int argc, char*argv[])
9064 {
9065 if (sizeof(long) == 4) {
9066 return 0;
9067 } else {
9068 return 1;
9069 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009070 }
9071
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009073if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009074 ac_osx_32bit=yes
9075else
Matthias Kloseb9621712010-04-24 17:59:49 +00009076 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009078rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9079 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009080fi
9081
9082
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009083 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009084 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009085 i386)
9086 MACOSX_DEFAULT_ARCH="i386"
9087 ;;
9088 ppc)
9089 MACOSX_DEFAULT_ARCH="ppc"
9090 ;;
9091 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009092 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009093 ;;
9094 esac
9095 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009096 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009097 i386)
9098 MACOSX_DEFAULT_ARCH="x86_64"
9099 ;;
9100 ppc)
9101 MACOSX_DEFAULT_ARCH="ppc64"
9102 ;;
9103 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009104 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009105 ;;
9106 esac
9107
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009108 fi
9109
9110 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009111 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009112 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9115$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009116if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009117then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009118 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009120 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009121
Matthias Kloseb9621712010-04-24 17:59:49 +00009122$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009123
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9125$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009126 if test $enable_shared = "yes"
9127 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009128 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 +00009129 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130else
Matthias Kloseb9621712010-04-24 17:59:49 +00009131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009133fi
9134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9136$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009137case $ac_sys_system/$ac_sys_release in
9138 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009139
Matthias Kloseb9621712010-04-24 17:59:49 +00009140$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009141
Matthias Kloseb9621712010-04-24 17:59:49 +00009142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9143$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009144 ;;
9145 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9147$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009148 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009149esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009150
Guido van Rossum0a516c91994-09-12 10:58:40 +00009151# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009152
Michael W. Hudson54241132001-12-07 15:38:26 +00009153
9154
9155
9156
Benjamin Peterson99f03762010-04-11 22:15:28 +00009157
Thomas Wouters477c8d52006-05-27 19:21:47 +00009158
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009159# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9160# -- usually .so, .sl on HP-UX, .dll on Cygwin
9161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9162$as_echo_n "checking the extension of shared libraries... " >&6; }
9163if test -z "$SHLIB_SUFFIX"; then
9164 case $ac_sys_system in
9165 hp*|HP*)
9166 case `uname -m` in
9167 ia64) SHLIB_SUFFIX=.so;;
9168 *) SHLIB_SUFFIX=.sl;;
9169 esac
9170 ;;
9171 CYGWIN*) SHLIB_SUFFIX=.dll;;
9172 *) SHLIB_SUFFIX=.so;;
9173 esac
9174fi
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9176$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009177
Guido van Rossum0a516c91994-09-12 10:58:40 +00009178# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009179# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009180# (Shared libraries in this instance are shared modules to be loaded into
9181# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9183$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009184if test -z "$LDSHARED"
9185then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009186 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009187 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009188 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009189 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009190 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009192 if test "$GCC" = "yes" ; then
9193 LDSHARED='$(CC) -shared'
9194 LDCXXSHARED='$(CXX) -shared'
9195 else
9196 LDSHARED='$(CC) -G'
9197 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009198 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009199 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009200 if test "$GCC" = "yes" ; then
9201 LDSHARED='$(CC) -shared'
9202 LDCXXSHARED='$(CXX) -shared'
9203 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009204 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009205 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009206 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009207 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009208 LDSHARED='$(CC) -bundle'
9209 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009210 if test "$enable_framework" ; then
9211 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009212 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9213 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009214 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009215 else
9216 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009217 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009218 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009219 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009220 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009221 LDSHARED='$(CC) -bundle'
9222 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009223 if test "$enable_framework" ; then
9224 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009225 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9226 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009227 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009228 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009229 # No framework, use the Python app as bundle-loader
9230 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009231 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009232 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009233 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 Darwin/*)
9235 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9236 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009237
Ned Deily36820b62014-06-25 13:44:22 -07009238 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9239 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9240 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9241 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9242 if test ${dep_target_major} -eq 10 && \
9243 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009244 then
Ned Deily36820b62014-06-25 13:44:22 -07009245 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009246 LDSHARED='$(CC) -bundle'
9247 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009248 if test "$enable_framework" ; then
9249 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009250 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9251 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009252 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009253 else
9254 # No framework, use the Python app as bundle-loader
9255 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9256 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009257 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009258 fi
Ned Deily36820b62014-06-25 13:44:22 -07009259 else
9260 # building for OS X 10.3 and later
9261 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9262 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9263 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009264 fi
9265 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009266 Linux*|GNU*|QNX*)
9267 LDSHARED='$(CC) -shared'
9268 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009269 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009270 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009271 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009272 LDSHARED='$(CC) -shared'
9273 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009274 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009275 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009276 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009277 OpenBSD*)
9278 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9279 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009280 LDSHARED='$(CC) -shared $(CCSHARED)'
9281 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009282 else
9283 case `uname -r` in
9284 [01].* | 2.[0-7] | 2.[0-7].*)
9285 LDSHARED="ld -Bshareable ${LDFLAGS}"
9286 ;;
9287 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009288 LDSHARED='$(CC) -shared $(CCSHARED)'
9289 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009290 ;;
9291 esac
9292 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009293 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009294 LDSHARED='$(CC) -shared'
9295 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009296 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009297 if test "$GCC" = "yes" ; then
9298 LDSHARED='$(CC) -shared'
9299 LDCXXSHARED='$(CXX) -shared'
9300 else
9301 LDSHARED='$(CC) -G'
9302 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009303 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009304 SCO_SV*)
9305 LDSHARED='$(CC) -Wl,-G,-Bexport'
9306 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9307 CYGWIN*)
9308 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9309 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310 *) LDSHARED="ld";;
9311 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9314$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009315LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009316BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009317# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009318# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9320$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009321if test -z "$CCSHARED"
9322then
Guido van Rossum07397971997-04-29 21:49:50 +00009323 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009324 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009325 then CCSHARED="-fPIC";
9326 elif test `uname -p` = sparc;
9327 then CCSHARED="-xcode=pic32";
9328 else CCSHARED="-Kpic";
9329 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009330 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009331 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009332 else CCSHARED="+z";
9333 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009334 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009335 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009336 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009337 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009338 if test "$GCC" = "yes"
9339 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009340 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009341 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009342 SCO_SV*)
9343 if test "$GCC" = "yes"
9344 then CCSHARED="-fPIC"
9345 else CCSHARED="-Kpic -belf"
9346 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009347 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9350$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009351# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009352# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9354$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009355if test -z "$LINKFORSHARED"
9356then
Guido van Rossum07397971997-04-29 21:49:50 +00009357 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009358 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009359 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009360 LINKFORSHARED="-Wl,-E -Wl,+s";;
9361# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009362 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009363 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009364 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009366 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009367
9368 # Issue #18075: the default maximum stack size (8MBytes) is too
9369 # small for the default recursion limit. Increase the stack size
9370 # to ensure that tests don't crash
9371 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9372
Jack Jansene578a632001-08-15 01:27:14 +00009373 if test "$enable_framework"
9374 then
Jack Jansenda49e192005-01-07 13:08:22 +00009375 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009376 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009377 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009378 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009379 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009380 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009381 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009382 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9383 then
9384 LINKFORSHARED="-Wl,--export-dynamic"
9385 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009386 SunOS/5*) case $CC in
9387 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009388 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009389 then
9390 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009391 fi;;
9392 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009393 CYGWIN*)
9394 if test $enable_shared = "no"
9395 then
9396 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9397 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009398 QNX*)
9399 # -Wl,-E causes the symbols to be added to the dynamic
9400 # symbol table so that they can be found when a module
9401 # is loaded. -N 2048K causes the stack size to be set
9402 # to 2048 kilobytes so that the stack doesn't overflow
9403 # when running test_compile.py.
9404 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9408$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009409
Michael W. Hudson54241132001-12-07 15:38:26 +00009410
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009411
Matthias Kloseb9621712010-04-24 17:59:49 +00009412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9413$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009414if test ! "$LIBRARY" = "$LDLIBRARY"
9415then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009416 case $ac_sys_system in
9417 CYGWIN*)
9418 # Cygwin needs CCSHARED when building extension DLLs
9419 # but not when building the interpreter DLL.
9420 CFLAGSFORSHARED='';;
9421 *)
9422 CFLAGSFORSHARED='$(CCSHARED)'
9423 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9426$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009427
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009428# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9429# library (with --enable-shared).
9430# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009431# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9432# if it is not required, since it creates a dependency of the shared library
9433# to LIBS. This, in turn, means that applications linking the shared libpython
9434# don't need to link LIBS explicitly. The default should be only changed
9435# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009436
Matthias Kloseb9621712010-04-24 17:59:49 +00009437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9438$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009439case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009440 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009441 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009442esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9444$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009445
9446
Guido van Rossum627b2d71993-12-24 10:39:16 +00009447# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9449$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009450if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009451 $as_echo_n "(cached) " >&6
9452else
9453 ac_check_lib_save_LIBS=$LIBS
9454LIBS="-lsendfile $LIBS"
9455cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9456/* end confdefs.h. */
9457
9458/* Override any GCC internal prototype to avoid an error.
9459 Use char because int might match the return type of a GCC
9460 builtin and then its argument prototype would still apply. */
9461#ifdef __cplusplus
9462extern "C"
9463#endif
9464char sendfile ();
9465int
9466main ()
9467{
9468return sendfile ();
9469 ;
9470 return 0;
9471}
9472_ACEOF
9473if ac_fn_c_try_link "$LINENO"; then :
9474 ac_cv_lib_sendfile_sendfile=yes
9475else
9476 ac_cv_lib_sendfile_sendfile=no
9477fi
9478rm -f core conftest.err conftest.$ac_objext \
9479 conftest$ac_exeext conftest.$ac_ext
9480LIBS=$ac_check_lib_save_LIBS
9481fi
9482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9483$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009485 cat >>confdefs.h <<_ACEOF
9486#define HAVE_LIBSENDFILE 1
9487_ACEOF
9488
9489 LIBS="-lsendfile $LIBS"
9490
9491fi
9492
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9494$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009495if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009497else
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009500cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503/* Override any GCC internal prototype to avoid an error.
9504 Use char because int might match the return type of a GCC
9505 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009506#ifdef __cplusplus
9507extern "C"
9508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009509char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009510int
9511main ()
9512{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ;
9515 return 0;
9516}
9517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009518if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009520else
Matthias Kloseb9621712010-04-24 17:59:49 +00009521 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009523rm -f core conftest.err conftest.$ac_objext \
9524 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009525LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9528$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009529if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009530 cat >>confdefs.h <<_ACEOF
9531#define HAVE_LIBDL 1
9532_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009534 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009536fi
9537 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9539$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009540if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009541 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009544LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551#ifdef __cplusplus
9552extern "C"
9553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009554char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ;
9560 return 0;
9561}
9562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009565else
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009570LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9573$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009574if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 cat >>confdefs.h <<_ACEOF
9576#define HAVE_LIBDLD 1
9577_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009578
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009579 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009580
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009581fi
9582 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009583
Michael Felt0d3ccb42017-12-30 22:39:20 +01009584# checks for uuid.h location
9585for ac_header in uuid/uuid.h uuid.h
9586do :
9587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9588ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9589if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9590 cat >>confdefs.h <<_ACEOF
9591#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9592_ACEOF
9593
9594fi
9595
9596done
9597
9598
Berker Peksag9a10ff42017-11-08 23:09:16 +03009599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9600$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9601cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9602/* end confdefs.h. */
9603#include <uuid/uuid.h>
9604int
9605main ()
9606{
9607
9608#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009609void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009610#endif
9611
9612 ;
9613 return 0;
9614}
9615_ACEOF
9616if ac_fn_c_try_compile "$LINENO"; then :
9617
9618$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9619
9620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9621$as_echo "yes" >&6; }
9622else
9623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9624$as_echo "no" >&6; }
9625
9626fi
9627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9628
Michael Felt0d3ccb42017-12-30 22:39:20 +01009629# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009630# FreeBSD and OpenBSD provides support as well
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9632$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635#include <uuid.h>
9636int
9637main ()
9638{
9639
9640#ifndef uuid_create
9641void *x = uuid_create
9642#endif
9643
9644 ;
9645 return 0;
9646}
9647_ACEOF
9648if ac_fn_c_try_compile "$LINENO"; then :
9649
9650$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9651
9652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9653$as_echo "yes" >&6; }
9654else
9655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9656$as_echo "no" >&6; }
9657
9658fi
9659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9660
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009661# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9662# stream in big-endian byte-order
9663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9664$as_echo_n "checking for uuid_enc_be... " >&6; }
9665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9666/* end confdefs.h. */
9667#include <uuid.h>
9668int
9669main ()
9670{
9671
9672#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009673void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009674#endif
9675
9676 ;
9677 return 0;
9678}
9679_ACEOF
9680if ac_fn_c_try_compile "$LINENO"; then :
9681
9682$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9683
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9685$as_echo "yes" >&6; }
9686else
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9688$as_echo "no" >&6; }
9689
9690fi
9691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9692
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009693# 'Real Time' functions on Solaris
9694# posix4 on Solaris 2.6
9695# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009697$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009698if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009700else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009701 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009705/* Override any GCC internal prototype to avoid an error.
9706 Use char because int might match the return type of a GCC
9707 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708#ifdef __cplusplus
9709extern "C"
9710#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009711char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009712int
9713main ()
9714{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 ;
9717 return 0;
9718}
9719_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009720for ac_lib in '' pthread rt posix4; do
9721 if test -z "$ac_lib"; then
9722 ac_res="none required"
9723 else
9724 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009727 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009732 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735done
Victor Stinnere0be4232011-10-25 13:06:09 +02009736if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009738else
9739 ac_cv_search_sem_init=no
9740fi
9741rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009742LIBS=$ac_func_search_save_LIBS
9743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9745$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009747if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009749
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009750fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009751
Martin v. Löwis519adae2003-09-20 10:47:47 +00009752
Martin v. Löwis19d17342003-06-14 21:03:05 +00009753# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9755$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009756if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009758else
9759 ac_check_lib_save_LIBS=$LIBS
9760LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009762/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764/* Override any GCC internal prototype to avoid an error.
9765 Use char because int might match the return type of a GCC
9766 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009767#ifdef __cplusplus
9768extern "C"
9769#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009770char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009771int
9772main ()
9773{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009774return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009775 ;
9776 return 0;
9777}
9778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009779if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009780 ac_cv_lib_intl_textdomain=yes
9781else
Matthias Kloseb9621712010-04-24 17:59:49 +00009782 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009784rm -f core conftest.err conftest.$ac_objext \
9785 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009786LIBS=$ac_check_lib_save_LIBS
9787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9789$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009790if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009791
Matthias Kloseb9621712010-04-24 17:59:49 +00009792$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009793
Brett Cannonc6d936e2009-06-07 20:09:53 +00009794 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009795fi
9796
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009797
9798# checks for system dependent C++ extensions support
9799case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9801$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009803/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009804
Georg Brandl59e87bd2011-02-15 19:48:59 +00009805 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009806int
9807main ()
9808{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009809loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009810 ;
9811 return 0;
9812}
Matthias Kloseb159a552010-04-25 21:00:44 +00009813
Martin v. Löwis11437992002-04-12 09:54:03 +00009814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009815if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009816
Matthias Kloseb159a552010-04-25 21:00:44 +00009817
Matthias Kloseb9621712010-04-24 17:59:49 +00009818$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009819
Matthias Kloseb159a552010-04-25 21:00:44 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009821$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009822
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009823else
Matthias Kloseb159a552010-04-25 21:00:44 +00009824
9825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009826$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009827
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829rm -f core conftest.err conftest.$ac_objext \
9830 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009831 *) ;;
9832esac
9833
Christian Heimes985ecdc2013-11-20 11:46:18 +01009834# check for systems that require aligned memory access
9835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9836$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009837if ${ac_cv_aligned_required+:} false; then :
9838 $as_echo_n "(cached) " >&6
9839else
9840 if test "$cross_compiling" = yes; then :
9841 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009842else
9843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9844/* end confdefs.h. */
9845
9846int main()
9847{
9848 char s[16];
9849 int i, *p1, *p2;
9850 for (i=0; i < 16; i++)
9851 s[i] = i;
9852 p1 = (int*)(s+1);
9853 p2 = (int*)(s+2);
9854 if (*p1 == *p2)
9855 return 1;
9856 return 0;
9857}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009858_ACEOF
9859if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009860 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009861else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009862 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009863fi
9864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9865 conftest.$ac_objext conftest.beam conftest.$ac_ext
9866fi
9867
9868
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009869fi
9870
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9872$as_echo "$ac_cv_aligned_required" >&6; }
9873if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009874
9875$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9876
9877fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009878
9879# str, bytes and memoryview hash algorithm
9880
9881
9882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9883$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9884
9885# Check whether --with-hash_algorithm was given.
9886if test "${with_hash_algorithm+set}" = set; then :
9887 withval=$with_hash_algorithm;
9888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9889$as_echo "$withval" >&6; }
9890case "$withval" in
9891 siphash24)
9892 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9893
9894 ;;
9895 fnv)
9896 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9897
9898 ;;
9899 *)
9900 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9901 ;;
9902esac
9903
9904else
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9906$as_echo "default" >&6; }
9907fi
9908
9909
Charles-François Natalid30b0222014-05-08 23:08:51 +01009910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9911$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9912
9913# Check whether --with-address_sanitizer was given.
9914if test "${with_address_sanitizer+set}" = set; then :
9915 withval=$with_address_sanitizer;
9916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9917$as_echo "$withval" >&6; }
9918BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9919LDFLAGS="-fsanitize=address $LDFLAGS"
9920
9921else
9922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923$as_echo "no" >&6; }
9924fi
9925
9926
Guido van Rossum70c7f481998-03-26 18:44:10 +00009927# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9929$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009930if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009932else
Martin v. Löwis11437992002-04-12 09:54:03 +00009933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009934LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009937
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009938/* Override any GCC internal prototype to avoid an error.
9939 Use char because int might match the return type of a GCC
9940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009941#ifdef __cplusplus
9942extern "C"
9943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009944char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009945int
9946main ()
9947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009949 ;
9950 return 0;
9951}
9952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009955else
Matthias Kloseb9621712010-04-24 17:59:49 +00009956 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009957fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009958rm -f core conftest.err conftest.$ac_objext \
9959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009960LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9963$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009964if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009965 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009966fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009967 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9969$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009970if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009972else
Martin v. Löwis11437992002-04-12 09:54:03 +00009973 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009974LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009977
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009978/* Override any GCC internal prototype to avoid an error.
9979 Use char because int might match the return type of a GCC
9980 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009981#ifdef __cplusplus
9982extern "C"
9983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009984char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009985int
9986main ()
9987{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009988return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ;
9990 return 0;
9991}
9992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009993if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009994 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009995else
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009998rm -f core conftest.err conftest.$ac_objext \
9999 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010000LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10003$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010004if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010005 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010006fi
10007 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010008
Matthias Kloseb9621712010-04-24 17:59:49 +000010009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10010$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010011
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010012# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010013if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10016$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010017LIBS="$withval $LIBS"
10018
10019else
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10021$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022fi
10023
Guido van Rossum7f43da71994-08-01 12:15:30 +000010024
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010025
10026
10027
10028
10029
10030
10031
10032if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10033 if test -n "$ac_tool_prefix"; then
10034 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10035set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10037$as_echo_n "checking for $ac_word... " >&6; }
10038if ${ac_cv_path_PKG_CONFIG+:} false; then :
10039 $as_echo_n "(cached) " >&6
10040else
10041 case $PKG_CONFIG in
10042 [\\/]* | ?:[\\/]*)
10043 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10044 ;;
10045 *)
10046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10047for as_dir in $PATH
10048do
10049 IFS=$as_save_IFS
10050 test -z "$as_dir" && as_dir=.
10051 for ac_exec_ext in '' $ac_executable_extensions; do
10052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10053 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10055 break 2
10056 fi
10057done
10058 done
10059IFS=$as_save_IFS
10060
10061 ;;
10062esac
10063fi
10064PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10065if test -n "$PKG_CONFIG"; then
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10067$as_echo "$PKG_CONFIG" >&6; }
10068else
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070$as_echo "no" >&6; }
10071fi
10072
10073
10074fi
10075if test -z "$ac_cv_path_PKG_CONFIG"; then
10076 ac_pt_PKG_CONFIG=$PKG_CONFIG
10077 # Extract the first word of "pkg-config", so it can be a program name with args.
10078set dummy pkg-config; ac_word=$2
10079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10080$as_echo_n "checking for $ac_word... " >&6; }
10081if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10082 $as_echo_n "(cached) " >&6
10083else
10084 case $ac_pt_PKG_CONFIG in
10085 [\\/]* | ?:[\\/]*)
10086 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10087 ;;
10088 *)
10089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10090for as_dir in $PATH
10091do
10092 IFS=$as_save_IFS
10093 test -z "$as_dir" && as_dir=.
10094 for ac_exec_ext in '' $ac_executable_extensions; do
10095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10096 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10098 break 2
10099 fi
10100done
10101 done
10102IFS=$as_save_IFS
10103
10104 ;;
10105esac
10106fi
10107ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10108if test -n "$ac_pt_PKG_CONFIG"; then
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10110$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10111else
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113$as_echo "no" >&6; }
10114fi
10115
10116 if test "x$ac_pt_PKG_CONFIG" = x; then
10117 PKG_CONFIG=""
10118 else
10119 case $cross_compiling:$ac_tool_warned in
10120yes:)
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10123ac_tool_warned=yes ;;
10124esac
10125 PKG_CONFIG=$ac_pt_PKG_CONFIG
10126 fi
10127else
10128 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10129fi
10130
10131fi
10132if test -n "$PKG_CONFIG"; then
10133 _pkg_min_version=0.9.0
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10135$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10136 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10138$as_echo "yes" >&6; }
10139 else
10140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10141$as_echo "no" >&6; }
10142 PKG_CONFIG=""
10143 fi
10144fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010145
10146# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10148$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010149
10150# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010151if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010152 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010153else
10154 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010155fi
10156
10157
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10159$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010160
10161# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10163$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010164
10165# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010166if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010167 withval=$with_system_ffi;
10168fi
10169
10170
Zachary Waref40d4dd2016-09-17 01:25:24 -050010171if test "$ac_sys_system" = "Darwin"
10172then
10173 case "$with_system_ffi" in
10174 "")
10175 with_system_ffi="no"
10176 ;;
10177 yes|no)
10178 ;;
10179 *)
10180 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10181 ;;
10182 esac
10183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10184$as_echo "$with_system_ffi" >&6; }
10185else
10186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10187$as_echo "yes" >&6; }
10188 if test "$with_system_ffi" != ""
10189 then
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10191$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10192 fi
10193 with_system_ffi="yes"
10194fi
Zachary Ware935043d2016-09-09 17:01:21 -070010195
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010196if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010197 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10198else
10199 LIBFFI_INCLUDEDIR=""
10200fi
10201
10202
Stefan Krah60187b52012-03-23 19:06:27 +010010203# Check for use of the system libmpdec library
10204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10205$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10206
10207# Check whether --with-system_libmpdec was given.
10208if test "${with_system_libmpdec+set}" = set; then :
10209 withval=$with_system_libmpdec;
10210else
10211 with_system_libmpdec="no"
10212fi
10213
10214
10215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10216$as_echo "$with_system_libmpdec" >&6; }
10217
Benjamin Peterson076ed002010-10-31 17:11:02 +000010218# Check for support for loadable sqlite extensions
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10220$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10221# Check whether --enable-loadable-sqlite-extensions was given.
10222if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10223 enableval=$enable_loadable_sqlite_extensions;
10224else
10225 enable_loadable_sqlite_extensions="no"
10226fi
10227
10228
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10230$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10231
Ned Deilyd819b932013-09-06 01:07:05 -070010232# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10233
10234
10235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10236$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10237
10238# Check whether --with-tcltk-includes was given.
10239if test "${with_tcltk_includes+set}" = set; then :
10240 withval=$with_tcltk_includes;
10241else
10242 with_tcltk_includes="default"
10243fi
10244
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10246$as_echo "$with_tcltk_includes" >&6; }
10247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10248$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10249
10250# Check whether --with-tcltk-libs was given.
10251if test "${with_tcltk_libs+set}" = set; then :
10252 withval=$with_tcltk_libs;
10253else
10254 with_tcltk_libs="default"
10255fi
10256
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10258$as_echo "$with_tcltk_libs" >&6; }
10259if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10260then
10261 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10262 then
10263 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10264 fi
10265 TCLTK_INCLUDES=""
10266 TCLTK_LIBS=""
10267else
10268 TCLTK_INCLUDES="$with_tcltk_includes"
10269 TCLTK_LIBS="$with_tcltk_libs"
10270fi
10271
Matthias Klose55708cc2009-04-30 08:06:49 +000010272# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10274$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010275
10276# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010277if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010278 withval=$with_dbmliborder;
10279if test x$with_dbmliborder = xyes
10280then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010281as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010282else
10283 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10284 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10285 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010286 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010287 fi
10288 done
10289fi
10290fi
10291
Matthias Kloseb9621712010-04-24 17:59:49 +000010292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10293$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295
Martin v. Löwis11437992002-04-12 09:54:03 +000010296
10297# Templates for things AC_DEFINEd more than once.
10298# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010299
10300
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010301if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010302then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010303 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010304 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010305
10306 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010307elif test "$ac_cv_kpthread" = "yes"
10308then
10309 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010310 if test "$ac_cv_cxx_thread" = "yes"; then
10311 CXX="$CXX -Kpthread"
10312 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010313 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010314elif test "$ac_cv_kthread" = "yes"
10315then
10316 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010317 if test "$ac_cv_cxx_thread" = "yes"; then
10318 CXX="$CXX -Kthread"
10319 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010320 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010321elif test "$ac_cv_pthread" = "yes"
10322then
10323 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010324 if test "$ac_cv_cxx_thread" = "yes"; then
10325 CXX="$CXX -pthread"
10326 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010327 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010328else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010329 if test ! -z "$withval" -a -d "$withval"
10330 then LDFLAGS="$LDFLAGS -L$withval"
10331 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010332
10333 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010334 # define _POSIX_THREADS in unistd.h. Some apparently don't
10335 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10337$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010339/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010340
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010341#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010342#ifdef _POSIX_THREADS
10343yes
10344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010345
10346_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010348 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010349 unistd_defines_pthreads=yes
10350else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010351 unistd_defines_pthreads=no
10352fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010353rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010354
Matthias Kloseb9621712010-04-24 17:59:49 +000010355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10356$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010357
Matthias Kloseb9621712010-04-24 17:59:49 +000010358 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010359
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010360 # Just looking for pthread_create in libpthread is not enough:
10361 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10362 # So we really have to include pthread.h, and then link.
10363 _libs=$LIBS
10364 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10366$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010368/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010369
10370#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010371#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010372
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010373void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010374int
10375main ()
10376{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010377
10378pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 ;
10380 return 0;
10381}
10382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010383if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010384
Matthias Kloseb9621712010-04-24 17:59:49 +000010385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10386$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010387 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010388
Guido van Rossum02a1c402000-02-25 19:26:31 +000010389else
Martin v. Löwis11437992002-04-12 09:54:03 +000010390
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010391 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010393if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010394
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010395 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010396
Guido van Rossumad678af1998-10-02 14:42:15 +000010397else
Guido van Rossumad678af1998-10-02 14:42:15 +000010398
Matthias Kloseb9621712010-04-24 17:59:49 +000010399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10400$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010401if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010402 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010403else
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010405LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010408
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409/* Override any GCC internal prototype to avoid an error.
10410 Use char because int might match the return type of a GCC
10411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010412#ifdef __cplusplus
10413extern "C"
10414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010415char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010416int
10417main ()
10418{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010420 ;
10421 return 0;
10422}
10423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010424if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010426else
Matthias Kloseb9621712010-04-24 17:59:49 +000010427 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010429rm -f core conftest.err conftest.$ac_objext \
10430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010431LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10434$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010435if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010437 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010438 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010439
Greg Steinadf63d62000-07-05 10:38:09 +000010440else
Greg Steinadf63d62000-07-05 10:38:09 +000010441
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10443$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010444if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010446else
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010448LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010452/* Override any GCC internal prototype to avoid an error.
10453 Use char because int might match the return type of a GCC
10454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010455#ifdef __cplusplus
10456extern "C"
10457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010458char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459int
10460main ()
10461{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010462return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010467if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010468 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010469else
Matthias Kloseb9621712010-04-24 17:59:49 +000010470 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472rm -f core conftest.err conftest.$ac_objext \
10473 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010474LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10477$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010478if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010479
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010480 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010481 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010482
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010483else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010484
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10486$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010487if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010488 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010489else
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010491LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495/* Override any GCC internal prototype to avoid an error.
10496 Use char because int might match the return type of a GCC
10497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010498#ifdef __cplusplus
10499extern "C"
10500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010501char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010502int
10503main ()
10504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010506 ;
10507 return 0;
10508}
10509_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010510if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010511 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010512else
Matthias Kloseb9621712010-04-24 17:59:49 +000010513 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010514fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010515rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010517LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010518fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10520$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010521if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010522
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010523 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010524 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010525
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010526else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010527
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10529$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010530if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010532else
Martin v. Löwis11437992002-04-12 09:54:03 +000010533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010534LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538/* Override any GCC internal prototype to avoid an error.
10539 Use char because int might match the return type of a GCC
10540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010541#ifdef __cplusplus
10542extern "C"
10543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010544char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010545int
10546main ()
10547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010548return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 ;
10550 return 0;
10551}
10552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010555else
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010558rm -f core conftest.err conftest.$ac_objext \
10559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010560LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10563$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010564if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010565
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010566 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010567 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010568
Guido van Rossumb93a8621998-05-07 13:27:32 +000010569else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010570
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010571 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10572
Guido van Rossum2d38f911996-06-26 19:47:01 +000010573fi
10574
Guido van Rossum627b2d71993-12-24 10:39:16 +000010575
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010576fi
10577
Guido van Rossum0be3e491997-05-22 20:33:33 +000010578fi
10579
Guido van Rossum49545951997-12-02 19:28:29 +000010580fi
10581
Guido van Rossumb93a8621998-05-07 13:27:32 +000010582fi
10583
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010584fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010585rm -f core conftest.err conftest.$ac_objext \
10586 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010587
Matthias Kloseb9621712010-04-24 17:59:49 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10589$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010592else
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010594LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598/* Override any GCC internal prototype to avoid an error.
10599 Use char because int might match the return type of a GCC
10600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010601#ifdef __cplusplus
10602extern "C"
10603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010604char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605int
10606main ()
10607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010608return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ;
10610 return 0;
10611}
10612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010615else
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618rm -f core conftest.err conftest.$ac_objext \
10619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010621fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10623$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010624if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010625
Martin v. Löwis130fb172001-07-19 11:00:41 +000010626 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010627
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628fi
10629
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010631fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010632
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010633if test "$posix_threads" = "yes"; then
10634 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010635
Matthias Kloseb9621712010-04-24 17:59:49 +000010636$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010637
10638 fi
10639
10640 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10641 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010642 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010643$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010644
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010645 ;;
10646 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010648
10649 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010650 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010651$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010652
10653 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010654 esac
10655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10657$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010658 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010660else
Matthias Kloseb9621712010-04-24 17:59:49 +000010661 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010662 ac_cv_pthread_system_supported=no
10663else
Matthias Kloseb9621712010-04-24 17:59:49 +000010664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010665/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010666
10667 #include <stdio.h>
10668 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669 void *foo(void *parm) {
10670 return NULL;
10671 }
10672 main() {
10673 pthread_attr_t attr;
10674 pthread_t id;
10675 if (pthread_attr_init(&attr)) exit(-1);
10676 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10677 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10678 exit(0);
10679 }
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682 ac_cv_pthread_system_supported=yes
10683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010689
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690
Guido van Rossum627b2d71993-12-24 10:39:16 +000010691fi
10692
Matthias Kloseb9621712010-04-24 17:59:49 +000010693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10694$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010695 if test "$ac_cv_pthread_system_supported" = "yes"; then
10696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698
10699 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 for ac_func in pthread_sigmask
10701do :
10702 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010703if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010704 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010705#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010706_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010707 case $ac_sys_system in
10708 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010711
10712 ;;
10713 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010714fi
10715done
10716
pdoxe14679c2017-10-05 00:01:56 -070010717 for ac_func in pthread_getcpuclockid
10718do :
10719 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10720if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10721 cat >>confdefs.h <<_ACEOF
10722#define HAVE_PTHREAD_GETCPUCLOCKID 1
10723_ACEOF
10724
10725fi
10726done
10727
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010728fi
10729
10730
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010732
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10734$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010736if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010737 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10740$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010741 ipv6=no
10742 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010743 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10744$as_echo "yes" >&6; }
10745 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746
10747 ipv6=yes
10748 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010749 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750else
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010753/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010754 /* AF_INET6 available check */
10755#include <sys/types.h>
10756#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010757int
10758main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010760int domain = AF_INET6;
10761 ;
10762 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763}
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010765if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010766
Matthias Kloseb9621712010-04-24 17:59:49 +000010767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10768$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010770
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010771else
Matthias Kloseb159a552010-04-25 21:00:44 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010775 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010780if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10782$as_echo_n "checking if RFC2553 API is available... " >&6; }
10783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010785
10786 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010787#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010788int
10789main ()
10790{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010791struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010792 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010793 ;
10794 return 0;
10795}
Matthias Kloseb159a552010-04-25 21:00:44 +000010796
Martin v. Löwis11437992002-04-12 09:54:03 +000010797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010799
10800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010801$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010802 ipv6=yes
10803
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010804else
Matthias Kloseb159a552010-04-25 21:00:44 +000010805
10806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010808 ipv6=no
10809
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010812fi
10813
10814if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010816
10817fi
10818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010819fi
10820
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010821
10822ipv6type=unknown
10823ipv6lib=none
10824ipv6trylibc=no
10825
10826if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10828$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010829 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10830 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831 case $i in
10832 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836#include <netinet/in.h>
10837#ifdef IPV6_INRIA_VERSION
10838yes
10839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010840_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010843 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010845rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846
10847 ;;
10848 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010851
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010852#include <netinet/in.h>
10853#ifdef __KAME__
10854yes
10855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010856_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859 ipv6type=$i;
10860 ipv6lib=inet6
10861 ipv6libdir=/usr/local/v6/lib
10862 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010863fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010864rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865
10866 ;;
10867 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010871#include <features.h>
10872#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10873yes
10874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010875_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010877 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878 ipv6type=$i;
10879 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010881rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882
10883 ;;
10884 linux-inet6)
10885 if test -d /usr/inet6; then
10886 ipv6type=$i
10887 ipv6lib=inet6
10888 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010889 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890 fi
10891 ;;
10892 solaris)
10893 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010894 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i
10896 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010897 fi
10898 fi
10899 ;;
10900 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010903
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010904#include <sys/param.h>
10905#ifdef _TOSHIBA_INET6
10906yes
10907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010908_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010910 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911 ipv6type=$i;
10912 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010913 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010915rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916
10917 ;;
10918 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010920/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010921
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922#include </usr/local/v6/include/sys/v6config.h>
10923#ifdef __V6D__
10924yes
10925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010926_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010929 ipv6type=$i;
10930 ipv6lib=v6;
10931 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010932 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010934rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935
10936 ;;
10937 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010939/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941#include <sys/param.h>
10942#ifdef _ZETA_MINAMI_INET6
10943yes
10944#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948 ipv6type=$i;
10949 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010950 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010951fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010952rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953
10954 ;;
10955 esac
10956 if test "$ipv6type" != "unknown"; then
10957 break
10958 fi
10959 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10961$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962fi
10963
10964if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10965 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10966 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10967 echo "using lib$ipv6lib"
10968 else
10969 if test $ipv6trylibc = "yes"; then
10970 echo "using libc"
10971 else
10972 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10973 echo "You need to fetch lib$ipv6lib.a from appropriate"
10974 echo 'ipv6 kit and compile beforehand.'
10975 exit 1
10976 fi
10977 fi
10978fi
10979
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10981$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10983/* end confdefs.h. */
10984 /* CAN_RAW_FD_FRAMES available check */
10985#include <linux/can/raw.h>
10986int
10987main ()
10988{
10989int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10990 ;
10991 return 0;
10992}
10993_ACEOF
10994if ac_fn_c_try_compile "$LINENO"; then :
10995
10996
10997$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10998
10999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11000$as_echo "yes" >&6; }
11001
11002else
11003
11004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
11006
11007fi
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11009
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011010# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11012$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011015if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011016 withval=$with_doc_strings;
11017fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011018
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011019
11020if test -z "$with_doc_strings"
11021then with_doc_strings="yes"
11022fi
11023if test "$with_doc_strings" != "no"
11024then
11025
Matthias Kloseb9621712010-04-24 17:59:49 +000011026$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011027
11028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11030$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011031
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011032# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11034$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011037if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038 withval=$with_pymalloc;
11039fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011040
Neil Schemenauera35c6882001-02-27 04:45:05 +000011041
Neil Schemenauer16c22972002-03-22 15:34:49 +000011042if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011043then
11044 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011045fi
11046if test "$with_pymalloc" != "no"
11047then
Martin v. Löwis11437992002-04-12 09:54:03 +000011048
Matthias Kloseb9621712010-04-24 17:59:49 +000011049$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011050
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011051 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11054$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011055
Nick Coghlan6ea41862017-06-11 13:16:15 +100011056# Check for --with-c-locale-coercion
11057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11058$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11059
11060# Check whether --with-c-locale-coercion was given.
11061if test "${with_c_locale_coercion+set}" = set; then :
11062 withval=$with_c_locale_coercion;
11063fi
11064
11065
11066if test -z "$with_c_locale_coercion"
11067then
11068 with_c_locale_coercion="yes"
11069fi
11070if test "$with_c_locale_coercion" != "no"
11071then
11072
11073$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11074
11075fi
11076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11077$as_echo "$with_c_locale_coercion" >&6; }
11078
Benjamin Peterson05159c42009-12-03 03:01:27 +000011079# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11081$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011082
11083# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011085 withval=$with_valgrind;
11086else
11087 with_valgrind=no
11088fi
11089
Matthias Kloseb9621712010-04-24 17:59:49 +000011090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11091$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011092if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011093 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 +020011094if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011097
11098else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011099 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011100
11101fi
11102
11103
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011104 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011105fi
11106
Łukasz Langaa785c872016-09-09 17:37:37 -070011107# Check for DTrace support
11108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11109$as_echo_n "checking for --with-dtrace... " >&6; }
11110
11111# Check whether --with-dtrace was given.
11112if test "${with_dtrace+set}" = set; then :
11113 withval=$with_dtrace;
11114else
11115 with_dtrace=no
11116fi
11117
11118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11119$as_echo "$with_dtrace" >&6; }
11120
11121
11122
11123
11124
11125DTRACE=
11126DFLAGS=
11127DTRACE_HEADERS=
11128DTRACE_OBJS=
11129
11130if test "$with_dtrace" = "yes"
11131then
11132 # Extract the first word of "dtrace", so it can be a program name with args.
11133set dummy dtrace; ac_word=$2
11134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11135$as_echo_n "checking for $ac_word... " >&6; }
11136if ${ac_cv_path_DTRACE+:} false; then :
11137 $as_echo_n "(cached) " >&6
11138else
11139 case $DTRACE in
11140 [\\/]* | ?:[\\/]*)
11141 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11142 ;;
11143 *)
11144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11145for as_dir in $PATH
11146do
11147 IFS=$as_save_IFS
11148 test -z "$as_dir" && as_dir=.
11149 for ac_exec_ext in '' $ac_executable_extensions; do
11150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11151 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11153 break 2
11154 fi
11155done
11156 done
11157IFS=$as_save_IFS
11158
11159 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11160 ;;
11161esac
11162fi
11163DTRACE=$ac_cv_path_DTRACE
11164if test -n "$DTRACE"; then
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11166$as_echo "$DTRACE" >&6; }
11167else
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11169$as_echo "no" >&6; }
11170fi
11171
11172
11173 if test "$DTRACE" = "not found"; then
11174 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11175 fi
11176
11177$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11178
11179 DTRACE_HEADERS="Include/pydtrace_probes.h"
11180
11181 # On OS X, DTrace providers do not need to be explicitly compiled and
11182 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11183 # generation flag '-G'. We check for presence of this flag, rather than
11184 # hardcoding support by OS, in the interest of robustness.
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11186$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11187if ${ac_cv_dtrace_link+:} false; then :
11188 $as_echo_n "(cached) " >&6
11189else
11190 ac_cv_dtrace_link=no
11191 echo 'BEGIN' > conftest.d
11192 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11193 ac_cv_dtrace_link=yes
11194
11195fi
11196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11197$as_echo "$ac_cv_dtrace_link" >&6; }
11198 if test "$ac_cv_dtrace_link" = "yes"; then
11199 DTRACE_OBJS="Python/pydtrace.o"
11200 fi
11201fi
11202
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011203# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011204
Guido van Rossum98935bf2001-09-05 19:13:16 +000011205DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011206
Guido van Rossume97ee181999-12-20 21:27:22 +000011207# the dlopen() function means we might want to use dynload_shlib.o. some
11208# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011209for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011210do :
11211 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011212if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011213 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011214#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011215_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011216
Guido van Rossume97ee181999-12-20 21:27:22 +000011217fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011218done
Guido van Rossume97ee181999-12-20 21:27:22 +000011219
Michael W. Hudson54241132001-12-07 15:38:26 +000011220
Guido van Rossume97ee181999-12-20 21:27:22 +000011221# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11222# loading of modules.
11223
Matthias Kloseb9621712010-04-24 17:59:49 +000011224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11225$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011226if test -z "$DYNLOADFILE"
11227then
11228 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011229 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11230 if test "$ac_cv_func_dlopen" = yes
11231 then DYNLOADFILE="dynload_shlib.o"
11232 else DYNLOADFILE="dynload_aix.o"
11233 fi
11234 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011235 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011236 *)
11237 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11238 # out any dynamic loading
11239 if test "$ac_cv_func_dlopen" = yes
11240 then DYNLOADFILE="dynload_shlib.o"
11241 else DYNLOADFILE="dynload_stub.o"
11242 fi
11243 ;;
11244 esac
11245fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11247$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011248if test "$DYNLOADFILE" != "dynload_stub.o"
11249then
Martin v. Löwis11437992002-04-12 09:54:03 +000011250
Matthias Kloseb9621712010-04-24 17:59:49 +000011251$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011252
11253fi
11254
Neil Schemenauer4e425612001-06-19 15:44:15 +000011255# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11256
Michael W. Hudson54241132001-12-07 15:38:26 +000011257
Matthias Kloseb9621712010-04-24 17:59:49 +000011258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11259$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011260if test -z "$MACHDEP_OBJS"
11261then
Jack Jansene578a632001-08-15 01:27:14 +000011262 MACHDEP_OBJS=$extra_machdep_objs
11263else
11264 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011265fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011266if test -z "$MACHDEP_OBJS"; then
11267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11268$as_echo "none" >&6; }
11269else
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11271$as_echo "$MACHDEP_OBJS" >&6; }
11272fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011273
Guido van Rossum627b2d71993-12-24 10:39:16 +000011274# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011275for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011276 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011277 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011278 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011279 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011280 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011281 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011282 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011283 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011284 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011285 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011286 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011287 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011288 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011289 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011290 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011291 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11292 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011293 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011294 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011295 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011296 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011297 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011298do :
11299 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11300ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011301if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011302 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011303#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011304_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011305
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011306fi
11307done
11308
Michael W. Hudson54241132001-12-07 15:38:26 +000011309
Benjamin Peterson40caa052018-09-12 15:52:40 -070011310# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11311# links. Some libc implementations have a stub lchmod implementation that always
11312# returns an error.
11313if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011314 for ac_func in lchmod
11315do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011316 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11317if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011318 cat >>confdefs.h <<_ACEOF
11319#define HAVE_LCHMOD 1
11320_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011321
11322fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011323done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011324
11325fi
11326
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011327ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11328 #include <dirent.h>
11329"
11330if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11331
11332$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11333
11334fi
11335
11336
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337# For some functions, having a definition is not sufficient, since
11338# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11340$as_echo_n "checking for chroot... " >&6; }
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011342/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011343#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011344int
11345main ()
11346{
11347void *x=chroot
11348 ;
11349 return 0;
11350}
11351_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011352if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011353
Matthias Kloseb9621712010-04-24 17:59:49 +000011354$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
Matthias Kloseb159a552010-04-25 21:00:44 +000011356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011357$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011358else
Matthias Kloseb9621712010-04-24 17:59:49 +000011359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11360$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011361
11362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11365$as_echo_n "checking for link... " >&6; }
11366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011367/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011368#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011369int
11370main ()
11371{
11372void *x=link
11373 ;
11374 return 0;
11375}
11376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011377if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011378
Matthias Kloseb9621712010-04-24 17:59:49 +000011379$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011380
Matthias Kloseb159a552010-04-25 21:00:44 +000011381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011382$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011383else
Matthias Kloseb9621712010-04-24 17:59:49 +000011384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11385$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011386
11387fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11390$as_echo_n "checking for symlink... " >&6; }
11391cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011392/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011393#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011394int
11395main ()
11396{
11397void *x=symlink
11398 ;
11399 return 0;
11400}
11401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011402if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011403
Matthias Kloseb9621712010-04-24 17:59:49 +000011404$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011405
Matthias Kloseb159a552010-04-25 21:00:44 +000011406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011407$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011408else
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11410$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011411
11412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11415$as_echo_n "checking for fchdir... " >&6; }
11416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011417/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011418#include <unistd.h>
11419int
11420main ()
11421{
11422void *x=fchdir
11423 ;
11424 return 0;
11425}
11426_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011428
Matthias Kloseb9621712010-04-24 17:59:49 +000011429$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
Matthias Kloseb159a552010-04-25 21:00:44 +000011431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011433else
Matthias Kloseb9621712010-04-24 17:59:49 +000011434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011436
11437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11440$as_echo_n "checking for fsync... " >&6; }
11441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011442/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011443#include <unistd.h>
11444int
11445main ()
11446{
11447void *x=fsync
11448 ;
11449 return 0;
11450}
11451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011452if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011453
Matthias Kloseb9621712010-04-24 17:59:49 +000011454$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011455
Matthias Kloseb159a552010-04-25 21:00:44 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011457$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011458else
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11460$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011461
11462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11465$as_echo_n "checking for fdatasync... " >&6; }
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011467/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011468#include <unistd.h>
11469int
11470main ()
11471{
11472void *x=fdatasync
11473 ;
11474 return 0;
11475}
11476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011478
Matthias Kloseb9621712010-04-24 17:59:49 +000011479$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011480
Matthias Kloseb159a552010-04-25 21:00:44 +000011481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011482$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011483else
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011486
11487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11490$as_echo_n "checking for epoll... " >&6; }
11491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011492/* end confdefs.h. */
11493#include <sys/epoll.h>
11494int
11495main ()
11496{
11497void *x=epoll_create
11498 ;
11499 return 0;
11500}
11501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011502if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011503
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505
Matthias Kloseb159a552010-04-25 21:00:44 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011507$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508else
Matthias Kloseb9621712010-04-24 17:59:49 +000011509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11510$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011511
11512fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11515$as_echo_n "checking for epoll_create1... " >&6; }
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518#include <sys/epoll.h>
11519int
11520main ()
11521{
11522void *x=epoll_create1
11523 ;
11524 return 0;
11525}
11526_ACEOF
11527if ac_fn_c_try_compile "$LINENO"; then :
11528
11529$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11530
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11532$as_echo "yes" >&6; }
11533else
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
11536
11537fi
11538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11540$as_echo_n "checking for kqueue... " >&6; }
11541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011542/* end confdefs.h. */
11543
11544#include <sys/types.h>
11545#include <sys/event.h>
11546
11547int
11548main ()
11549{
11550int x=kqueue()
11551 ;
11552 return 0;
11553}
11554_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011555if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011556
Matthias Kloseb9621712010-04-24 17:59:49 +000011557$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011558
Matthias Kloseb159a552010-04-25 21:00:44 +000011559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011560$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011561else
Matthias Kloseb9621712010-04-24 17:59:49 +000011562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11563$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011564
11565fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11568$as_echo_n "checking for prlimit... " >&6; }
11569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11570/* end confdefs.h. */
11571
11572#include <sys/time.h>
11573#include <sys/resource.h>
11574
11575int
11576main ()
11577{
11578void *x=prlimit
11579 ;
11580 return 0;
11581}
11582_ACEOF
11583if ac_fn_c_try_compile "$LINENO"; then :
11584
11585$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11586
11587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11588$as_echo "yes" >&6; }
11589else
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11591$as_echo "no" >&6; }
11592
11593fi
11594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11595
Martin v. Löwisd5843682002-11-21 20:41:28 +000011596# On some systems (eg. FreeBSD 5), we would find a definition of the
11597# functions ctermid_r, setgroups in the library, but no prototype
11598# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11599# address to avoid compiler warnings and potential miscompilations
11600# because of the missing prototypes.
11601
Matthias Kloseb9621712010-04-24 17:59:49 +000011602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11603$as_echo_n "checking for ctermid_r... " >&6; }
11604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011605/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011606
Martin v. Löwisd5843682002-11-21 20:41:28 +000011607#include <stdio.h>
11608
Martin v. Löwisd5843682002-11-21 20:41:28 +000011609int
11610main ()
11611{
11612void* p = ctermid_r
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11629
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11631$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011633 $as_echo_n "(cached) " >&6
11634else
11635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011636/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011637#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011638int
11639main ()
11640{
11641void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011642
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011643 ;
11644 return 0;
11645}
11646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011648 ac_cv_flock_decl=yes
11649else
11650 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011651
11652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011654
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011655fi
11656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11657$as_echo "$ac_cv_flock_decl" >&6; }
11658if test "x${ac_cv_flock_decl}" = xyes; then
11659 for ac_func in flock
11660do :
11661 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011662if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011663 cat >>confdefs.h <<_ACEOF
11664#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011665_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011666
Antoine Pitroua3000072010-09-07 14:52:42 +000011667else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011669$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011670if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011671 $as_echo_n "(cached) " >&6
11672else
11673 ac_check_lib_save_LIBS=$LIBS
11674LIBS="-lbsd $LIBS"
11675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11676/* end confdefs.h. */
11677
11678/* Override any GCC internal prototype to avoid an error.
11679 Use char because int might match the return type of a GCC
11680 builtin and then its argument prototype would still apply. */
11681#ifdef __cplusplus
11682extern "C"
11683#endif
11684char flock ();
11685int
11686main ()
11687{
11688return flock ();
11689 ;
11690 return 0;
11691}
11692_ACEOF
11693if ac_fn_c_try_link "$LINENO"; then :
11694 ac_cv_lib_bsd_flock=yes
11695else
11696 ac_cv_lib_bsd_flock=no
11697fi
11698rm -f core conftest.err conftest.$ac_objext \
11699 conftest$ac_exeext conftest.$ac_ext
11700LIBS=$ac_check_lib_save_LIBS
11701fi
11702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11703$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011704if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011705 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011706
11707
11708$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11709
11710
11711fi
11712
11713
11714fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011715done
11716
Antoine Pitroua3000072010-09-07 14:52:42 +000011717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011718
Matthias Kloseb9621712010-04-24 17:59:49 +000011719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11720$as_echo_n "checking for getpagesize... " >&6; }
11721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011722/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011723
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011724#include <unistd.h>
11725
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011726int
11727main ()
11728{
11729void* p = getpagesize
11730 ;
11731 return 0;
11732}
11733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011734if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011735
Matthias Kloseb9621712010-04-24 17:59:49 +000011736$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011737
Matthias Kloseb159a552010-04-25 21:00:44 +000011738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011740else
Matthias Kloseb9621712010-04-24 17:59:49 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11742$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011743
11744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011746
Victor Stinner984890f2011-11-24 13:53:38 +010011747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11748$as_echo_n "checking for broken unsetenv... " >&6; }
11749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11750/* end confdefs.h. */
11751
11752#include <stdlib.h>
11753
11754int
11755main ()
11756{
11757int res = unsetenv("DUMMY")
11758 ;
11759 return 0;
11760}
11761_ACEOF
11762if ac_fn_c_try_compile "$LINENO"; then :
11763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11764$as_echo "no" >&6; }
11765else
11766
11767$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11768
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11770$as_echo "yes" >&6; }
11771
11772fi
11773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11774
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011775for ac_prog in true
11776do
11777 # Extract the first word of "$ac_prog", so it can be a program name with args.
11778set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11780$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011783else
11784 if test -n "$TRUE"; then
11785 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11786else
11787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11788for as_dir in $PATH
11789do
11790 IFS=$as_save_IFS
11791 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011792 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011794 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011795 $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 +000011796 break 2
11797 fi
11798done
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011801
11802fi
11803fi
11804TRUE=$ac_cv_prog_TRUE
11805if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11807$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11810$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011811fi
11812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011814 test -n "$TRUE" && break
11815done
11816test -n "$TRUE" || TRUE="/bin/true"
11817
11818
Matthias Kloseb9621712010-04-24 17:59:49 +000011819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11820$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011821if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823else
11824 ac_check_lib_save_LIBS=$LIBS
11825LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011829/* Override any GCC internal prototype to avoid an error.
11830 Use char because int might match the return type of a GCC
11831 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011832#ifdef __cplusplus
11833extern "C"
11834#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011835char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011836int
11837main ()
11838{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011840 ;
11841 return 0;
11842}
11843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011845 ac_cv_lib_c_inet_aton=yes
11846else
Matthias Kloseb9621712010-04-24 17:59:49 +000011847 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849rm -f core conftest.err conftest.$ac_objext \
11850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011851LIBS=$ac_check_lib_save_LIBS
11852fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11854$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011856 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11859$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011862else
11863 ac_check_lib_save_LIBS=$LIBS
11864LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011866/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868/* Override any GCC internal prototype to avoid an error.
11869 Use char because int might match the return type of a GCC
11870 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011871#ifdef __cplusplus
11872extern "C"
11873#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011874char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011875int
11876main ()
11877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011879 ;
11880 return 0;
11881}
11882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011884 ac_cv_lib_resolv_inet_aton=yes
11885else
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011888rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011890LIBS=$ac_check_lib_save_LIBS
11891fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11893$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011895 cat >>confdefs.h <<_ACEOF
11896#define HAVE_LIBRESOLV 1
11897_ACEOF
11898
11899 LIBS="-lresolv $LIBS"
11900
11901fi
11902
11903
11904fi
11905
11906
Christian Heimesd0764e22007-12-04 15:00:33 +000011907# On Tru64, chflags seems to be present, but calling it will
11908# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11910$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011911if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011915 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011916else
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011918/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011919
Christian Heimesd0764e22007-12-04 15:00:33 +000011920#include <sys/stat.h>
11921#include <unistd.h>
11922int main(int argc, char*argv[])
11923{
11924 if(chflags(argv[0], 0) != 0)
11925 return 1;
11926 return 0;
11927}
Ned Deily3eb67d52011-06-28 00:00:28 -070011928
Christian Heimesd0764e22007-12-04 15:00:33 +000011929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011931 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011932else
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011934fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011935rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11936 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011937fi
11938
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011939
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11942$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011943if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011945if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011946 ac_cv_have_chflags="yes"
11947else
11948 ac_cv_have_chflags="no"
11949fi
11950
11951fi
11952if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011953
Matthias Kloseb9621712010-04-24 17:59:49 +000011954$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011955
11956fi
11957
Matthias Kloseb9621712010-04-24 17:59:49 +000011958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11959$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011960if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011961 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011962else
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011964 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011965else
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011967/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011968
Christian Heimesd0764e22007-12-04 15:00:33 +000011969#include <sys/stat.h>
11970#include <unistd.h>
11971int main(int argc, char*argv[])
11972{
11973 if(lchflags(argv[0], 0) != 0)
11974 return 1;
11975 return 0;
11976}
Ned Deily3eb67d52011-06-28 00:00:28 -070011977
Christian Heimesd0764e22007-12-04 15:00:33 +000011978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011979if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011980 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011981else
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011983fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11985 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011986fi
11987
11988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11991$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011992if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011993 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011994if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011995 ac_cv_have_lchflags="yes"
11996else
11997 ac_cv_have_lchflags="no"
11998fi
11999
12000fi
12001if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012004
12005fi
12006
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012007case $ac_sys_system/$ac_sys_release in
12008Darwin/*)
12009 _CUR_CFLAGS="${CFLAGS}"
12010 _CUR_LDFLAGS="${LDFLAGS}"
12011 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12012 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12013 ;;
12014esac
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12017$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012020else
12021 ac_check_lib_save_LIBS=$LIBS
12022LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012024/* end confdefs.h. */
12025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026/* Override any GCC internal prototype to avoid an error.
12027 Use char because int might match the return type of a GCC
12028 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012029#ifdef __cplusplus
12030extern "C"
12031#endif
12032char inflateCopy ();
12033int
12034main ()
12035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012036return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012037 ;
12038 return 0;
12039}
12040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012041if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012042 ac_cv_lib_z_inflateCopy=yes
12043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012046rm -f core conftest.err conftest.$ac_objext \
12047 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012048LIBS=$ac_check_lib_save_LIBS
12049fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12051$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012052if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012055
12056fi
12057
12058
12059case $ac_sys_system/$ac_sys_release in
12060Darwin/*)
12061 CFLAGS="${_CUR_CFLAGS}"
12062 LDFLAGS="${_CUR_LDFLAGS}"
12063 ;;
12064esac
12065
Matthias Kloseb9621712010-04-24 17:59:49 +000012066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12067$as_echo_n "checking for hstrerror... " >&6; }
12068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012069/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012070
Martin v. Löwise9416172003-05-03 10:12:45 +000012071#include <netdb.h>
12072
Martin v. Löwise9416172003-05-03 10:12:45 +000012073int
12074main ()
12075{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012076void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012077 ;
12078 return 0;
12079}
12080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012081if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012084
Matthias Kloseb159a552010-04-25 21:00:44 +000012085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012086$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012087else
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12089$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012090
12091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092rm -f core conftest.err conftest.$ac_objext \
12093 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012094
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12096$as_echo_n "checking for inet_aton... " >&6; }
12097cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012098/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012099
Martin v. Löwis86d66262006-02-17 08:40:11 +000012100#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012101#include <sys/socket.h>
12102#include <netinet/in.h>
12103#include <arpa/inet.h>
12104
Martin v. Löwise9416172003-05-03 10:12:45 +000012105int
12106main ()
12107{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012108void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012114
Matthias Kloseb9621712010-04-24 17:59:49 +000012115$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012116
Matthias Kloseb159a552010-04-25 21:00:44 +000012117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012119else
Matthias Kloseb9621712010-04-24 17:59:49 +000012120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12121$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012122
12123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012124rm -f core conftest.err conftest.$ac_objext \
12125 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012126
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12128$as_echo_n "checking for inet_pton... " >&6; }
12129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012131
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012132#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012133#include <sys/socket.h>
12134#include <netinet/in.h>
12135#include <arpa/inet.h>
12136
Martin v. Löwise9416172003-05-03 10:12:45 +000012137int
12138main ()
12139{
12140void* p = inet_pton
12141 ;
12142 return 0;
12143}
12144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012146
Matthias Kloseb9621712010-04-24 17:59:49 +000012147$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012148
Matthias Kloseb159a552010-04-25 21:00:44 +000012149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012150$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12153$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012154
12155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012157
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012158# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12160$as_echo_n "checking for setgroups... " >&6; }
12161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012163
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012164#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012165#ifdef HAVE_GRP_H
12166#include <grp.h>
12167#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012168
Martin v. Löwisd5843682002-11-21 20:41:28 +000012169int
12170main ()
12171{
12172void* p = setgroups
12173 ;
12174 return 0;
12175}
12176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012178
Matthias Kloseb9621712010-04-24 17:59:49 +000012179$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012180
Matthias Kloseb159a552010-04-25 21:00:44 +000012181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012182$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012183else
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012186
12187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012189
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012190# check for openpty and forkpty
12191
12192for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012193do :
12194 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012195if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012197#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012198_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012199
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012200else
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12202$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012203if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012204 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012205else
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012211/* Override any GCC internal prototype to avoid an error.
12212 Use char because int might match the return type of a GCC
12213 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012214#ifdef __cplusplus
12215extern "C"
12216#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012217char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012218int
12219main ()
12220{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 ;
12223 return 0;
12224}
12225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012231rm -f core conftest.err conftest.$ac_objext \
12232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012233LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12236$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012237if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012239 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012240else
Matthias Kloseb9621712010-04-24 17:59:49 +000012241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12242$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012243if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012244 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012245else
12246 ac_check_lib_save_LIBS=$LIBS
12247LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012249/* end confdefs.h. */
12250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012251/* Override any GCC internal prototype to avoid an error.
12252 Use char because int might match the return type of a GCC
12253 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012254#ifdef __cplusplus
12255extern "C"
12256#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012257char openpty ();
12258int
12259main ()
12260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012261return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012262 ;
12263 return 0;
12264}
12265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012267 ac_cv_lib_bsd_openpty=yes
12268else
Matthias Kloseb9621712010-04-24 17:59:49 +000012269 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012271rm -f core conftest.err conftest.$ac_objext \
12272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012273LIBS=$ac_check_lib_save_LIBS
12274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12276$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012277if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012279 LIBS="$LIBS -lbsd"
12280fi
12281
12282
12283fi
12284
Fred Drake8cef4cf2000-06-28 16:40:38 +000012285
12286fi
12287done
12288
12289for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012290do :
12291 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012292if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012294#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012295_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012296
Fred Drake8cef4cf2000-06-28 16:40:38 +000012297else
Matthias Kloseb9621712010-04-24 17:59:49 +000012298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12299$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012301 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012302else
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012304LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012306/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308/* Override any GCC internal prototype to avoid an error.
12309 Use char because int might match the return type of a GCC
12310 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012311#ifdef __cplusplus
12312extern "C"
12313#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012314char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012324 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012328rm -f core conftest.err conftest.$ac_objext \
12329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012330LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12333$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012334if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012335 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012336 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12339$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012340if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012341 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012342else
12343 ac_check_lib_save_LIBS=$LIBS
12344LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012346/* end confdefs.h. */
12347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348/* Override any GCC internal prototype to avoid an error.
12349 Use char because int might match the return type of a GCC
12350 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012351#ifdef __cplusplus
12352extern "C"
12353#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012354char forkpty ();
12355int
12356main ()
12357{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012364 ac_cv_lib_bsd_forkpty=yes
12365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012368rm -f core conftest.err conftest.$ac_objext \
12369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012370LIBS=$ac_check_lib_save_LIBS
12371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12373$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012374if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012375 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012376 LIBS="$LIBS -lbsd"
12377fi
12378
12379
12380fi
12381
Fred Drake8cef4cf2000-06-28 16:40:38 +000012382
12383fi
12384done
12385
Jack Jansendd19cf82001-12-06 22:36:17 +000012386
Michael W. Hudson54241132001-12-07 15:38:26 +000012387# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012388for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012389do :
12390 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12391ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012392if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012394#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012395_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012398done
12399
Michael W. Hudson54241132001-12-07 15:38:26 +000012400
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012401ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012402if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012403 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012404
Martin v. Löwis1142de32002-03-29 16:28:31 +000012405else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012406 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012407 *" dup2.$ac_objext "* ) ;;
12408 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012409 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012410esac
12411
Martin v. Löwis1142de32002-03-29 16:28:31 +000012412fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012413
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012414ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012415if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012416 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12417
12418else
12419 case " $LIBOBJS " in
12420 *" strdup.$ac_objext "* ) ;;
12421 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12422 ;;
12423esac
12424
12425fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012426
12427
12428for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012429do :
12430 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012431if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012433#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012438int
12439main ()
12440{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012441getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 ;
12443 return 0;
12444}
12445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
Matthias Kloseb9621712010-04-24 17:59:49 +000012448$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012449
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012452
Guido van Rossum627b2d71993-12-24 10:39:16 +000012453fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012454done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012455
Jack Jansen150753c2003-03-29 22:07:47 +000012456for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012457do :
12458 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012460 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012461#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012464/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012465#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012466int
12467main ()
12468{
12469setpgrp(0,0);
12470 ;
12471 return 0;
12472}
12473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012474if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012477
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012480
12481fi
12482done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012483
Thomas Wouters3a584202000-08-05 23:28:51 +000012484for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012485do :
12486 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012487if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012492/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012493#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012494int
12495main ()
12496{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012497gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012498 ;
12499 return 0;
12500}
12501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012502if ac_fn_c_try_compile "$LINENO"; then :
12503
Guido van Rossum627b2d71993-12-24 10:39:16 +000012504else
Skip Montanaro6dead952003-09-25 14:50:04 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
Guido van Rossum627b2d71993-12-24 10:39:16 +000012509fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012511
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012512fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012513done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012514
Michael W. Hudson54241132001-12-07 15:38:26 +000012515
Victor Stinnere0be4232011-10-25 13:06:09 +020012516for ac_func in clock_gettime
12517do :
12518 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12519if test "x$ac_cv_func_clock_gettime" = xyes; then :
12520 cat >>confdefs.h <<_ACEOF
12521#define HAVE_CLOCK_GETTIME 1
12522_ACEOF
12523
12524else
12525
12526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12527$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12528if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12529 $as_echo_n "(cached) " >&6
12530else
12531 ac_check_lib_save_LIBS=$LIBS
12532LIBS="-lrt $LIBS"
12533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12534/* end confdefs.h. */
12535
12536/* Override any GCC internal prototype to avoid an error.
12537 Use char because int might match the return type of a GCC
12538 builtin and then its argument prototype would still apply. */
12539#ifdef __cplusplus
12540extern "C"
12541#endif
12542char clock_gettime ();
12543int
12544main ()
12545{
12546return clock_gettime ();
12547 ;
12548 return 0;
12549}
12550_ACEOF
12551if ac_fn_c_try_link "$LINENO"; then :
12552 ac_cv_lib_rt_clock_gettime=yes
12553else
12554 ac_cv_lib_rt_clock_gettime=no
12555fi
12556rm -f core conftest.err conftest.$ac_objext \
12557 conftest$ac_exeext conftest.$ac_ext
12558LIBS=$ac_check_lib_save_LIBS
12559fi
12560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12561$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12562if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12563
Victor Stinner7efb8332014-08-29 15:41:08 +020012564 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012565 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12566
12567
12568$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12569
12570
12571fi
12572
12573
12574fi
12575done
12576
12577
12578for ac_func in clock_getres
12579do :
12580 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12581if test "x$ac_cv_func_clock_getres" = xyes; then :
12582 cat >>confdefs.h <<_ACEOF
12583#define HAVE_CLOCK_GETRES 1
12584_ACEOF
12585
12586else
12587
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12589$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12590if ${ac_cv_lib_rt_clock_getres+:} false; then :
12591 $as_echo_n "(cached) " >&6
12592else
12593 ac_check_lib_save_LIBS=$LIBS
12594LIBS="-lrt $LIBS"
12595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12596/* end confdefs.h. */
12597
12598/* Override any GCC internal prototype to avoid an error.
12599 Use char because int might match the return type of a GCC
12600 builtin and then its argument prototype would still apply. */
12601#ifdef __cplusplus
12602extern "C"
12603#endif
12604char clock_getres ();
12605int
12606main ()
12607{
12608return clock_getres ();
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613if ac_fn_c_try_link "$LINENO"; then :
12614 ac_cv_lib_rt_clock_getres=yes
12615else
12616 ac_cv_lib_rt_clock_getres=no
12617fi
12618rm -f core conftest.err conftest.$ac_objext \
12619 conftest$ac_exeext conftest.$ac_ext
12620LIBS=$ac_check_lib_save_LIBS
12621fi
12622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12623$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12624if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12625
12626 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12627
12628
12629fi
12630
12631
12632fi
12633done
12634
12635
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012636for ac_func in clock_settime
12637do :
12638 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12639if test "x$ac_cv_func_clock_settime" = xyes; then :
12640 cat >>confdefs.h <<_ACEOF
12641#define HAVE_CLOCK_SETTIME 1
12642_ACEOF
12643
12644else
12645
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12647$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12648if ${ac_cv_lib_rt_clock_settime+:} false; then :
12649 $as_echo_n "(cached) " >&6
12650else
12651 ac_check_lib_save_LIBS=$LIBS
12652LIBS="-lrt $LIBS"
12653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12654/* end confdefs.h. */
12655
12656/* Override any GCC internal prototype to avoid an error.
12657 Use char because int might match the return type of a GCC
12658 builtin and then its argument prototype would still apply. */
12659#ifdef __cplusplus
12660extern "C"
12661#endif
12662char clock_settime ();
12663int
12664main ()
12665{
12666return clock_settime ();
12667 ;
12668 return 0;
12669}
12670_ACEOF
12671if ac_fn_c_try_link "$LINENO"; then :
12672 ac_cv_lib_rt_clock_settime=yes
12673else
12674 ac_cv_lib_rt_clock_settime=no
12675fi
12676rm -f core conftest.err conftest.$ac_objext \
12677 conftest$ac_exeext conftest.$ac_ext
12678LIBS=$ac_check_lib_save_LIBS
12679fi
12680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12681$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12682if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12683
12684 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12685
12686
12687fi
12688
12689
12690fi
12691done
12692
12693
Matthias Kloseb9621712010-04-24 17:59:49 +000012694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12695$as_echo_n "checking for major... " >&6; }
12696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012697/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012698
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012699#if defined(MAJOR_IN_MKDEV)
12700#include <sys/mkdev.h>
12701#elif defined(MAJOR_IN_SYSMACROS)
12702#include <sys/sysmacros.h>
12703#else
12704#include <sys/types.h>
12705#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012706
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012707int
12708main ()
12709{
12710
12711 makedev(major(0),minor(0));
12712
12713 ;
12714 return 0;
12715}
12716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012718
12719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12723$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012724
12725else
Skip Montanaro6dead952003-09-25 14:50:04 +000012726
Matthias Kloseb9621712010-04-24 17:59:49 +000012727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012729
12730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012731rm -f core conftest.err conftest.$ac_objext \
12732 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012733
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012734# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012735# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12737$as_echo_n "checking for getaddrinfo... " >&6; }
12738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012739/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012740
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012741#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012742#include <sys/socket.h>
12743#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012744#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012745
Martin v. Löwis11437992002-04-12 09:54:03 +000012746int
12747main ()
12748{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012749getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012750 ;
12751 return 0;
12752}
12753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012754if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012755 have_getaddrinfo=yes
12756else
Matthias Kloseb9621712010-04-24 17:59:49 +000012757 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012758fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012759rm -f core conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
12761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12762$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012763if test $have_getaddrinfo = yes
12764then
Matthias Kloseb9621712010-04-24 17:59:49 +000012765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12766$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012767 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012768 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012769else
Matthias Kloseb9621712010-04-24 17:59:49 +000012770 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012771
12772if test "${enable_ipv6+set}" = set; then
12773 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12774else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012775 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012776fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012780
Stefan Krah19c21392012-11-22 23:47:32 +010012781#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012782#include <sys/types.h>
12783#include <netdb.h>
12784#include <string.h>
12785#include <sys/socket.h>
12786#include <netinet/in.h>
12787
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012788int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012789{
12790 int passive, gaierr, inet4 = 0, inet6 = 0;
12791 struct addrinfo hints, *ai, *aitop;
12792 char straddr[INET6_ADDRSTRLEN], strport[16];
12793
12794 for (passive = 0; passive <= 1; passive++) {
12795 memset(&hints, 0, sizeof(hints));
12796 hints.ai_family = AF_UNSPEC;
12797 hints.ai_flags = passive ? AI_PASSIVE : 0;
12798 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012799 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012800 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12801 (void)gai_strerror(gaierr);
12802 goto bad;
12803 }
12804 for (ai = aitop; ai; ai = ai->ai_next) {
12805 if (ai->ai_addr == NULL ||
12806 ai->ai_addrlen == 0 ||
12807 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12808 straddr, sizeof(straddr), strport, sizeof(strport),
12809 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12810 goto bad;
12811 }
12812 switch (ai->ai_family) {
12813 case AF_INET:
12814 if (strcmp(strport, "54321") != 0) {
12815 goto bad;
12816 }
12817 if (passive) {
12818 if (strcmp(straddr, "0.0.0.0") != 0) {
12819 goto bad;
12820 }
12821 } else {
12822 if (strcmp(straddr, "127.0.0.1") != 0) {
12823 goto bad;
12824 }
12825 }
12826 inet4++;
12827 break;
12828 case AF_INET6:
12829 if (strcmp(strport, "54321") != 0) {
12830 goto bad;
12831 }
12832 if (passive) {
12833 if (strcmp(straddr, "::") != 0) {
12834 goto bad;
12835 }
12836 } else {
12837 if (strcmp(straddr, "::1") != 0) {
12838 goto bad;
12839 }
12840 }
12841 inet6++;
12842 break;
12843 case AF_UNSPEC:
12844 goto bad;
12845 break;
12846 default:
12847 /* another family support? */
12848 break;
12849 }
12850 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012851 freeaddrinfo(aitop);
12852 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012853 }
12854
12855 if (!(inet4 == 0 || inet4 == 2))
12856 goto bad;
12857 if (!(inet6 == 0 || inet6 == 2))
12858 goto bad;
12859
12860 if (aitop)
12861 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012862 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012863
12864 bad:
12865 if (aitop)
12866 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012867 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012868}
12869
Martin v. Löwis11437992002-04-12 09:54:03 +000012870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012871if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012872 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012878fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012880fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012881
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12885$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12886
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012887if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012888then
12889 if test $ipv6 = yes
12890 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012891 echo 'Fatal: You must get working getaddrinfo() function.'
12892 echo ' or you can specify "--disable-ipv6"'.
12893 exit 1
12894 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012895else
Martin v. Löwis11437992002-04-12 09:54:03 +000012896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012898
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012900
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012901for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012902do :
12903 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012904if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012906#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012907_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012908
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909fi
12910done
12911
Michael W. Hudson54241132001-12-07 15:38:26 +000012912
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12915$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012916if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012917 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012918else
Matthias Kloseb9621712010-04-24 17:59:49 +000012919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012920/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921#include <sys/types.h>
12922#include <sys/time.h>
12923#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012924
Martin v. Löwis11437992002-04-12 09:54:03 +000012925int
12926main ()
12927{
12928if ((struct tm *) 0)
12929return 0;
12930 ;
12931 return 0;
12932}
12933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012934if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012935 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012936else
Matthias Kloseb9621712010-04-24 17:59:49 +000012937 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12942$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012943if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012946
12947fi
12948
Matthias Kloseb9621712010-04-24 17:59:49 +000012949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12950$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012951if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012953else
Matthias Kloseb9621712010-04-24 17:59:49 +000012954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956#include <sys/types.h>
12957#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012958
Martin v. Löwis11437992002-04-12 09:54:03 +000012959int
12960main ()
12961{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012962struct tm tm;
12963 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012965 ;
12966 return 0;
12967}
12968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012969if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970 ac_cv_struct_tm=time.h
12971else
Matthias Kloseb9621712010-04-24 17:59:49 +000012972 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12977$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012978if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012981
12982fi
12983
Matthias Kloseb9621712010-04-24 17:59:49 +000012984ac_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 +000012985#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012986
Matthias Kloseb9621712010-04-24 17:59:49 +000012987"
Victor Stinnere0be4232011-10-25 13:06:09 +020012988if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
12990cat >>confdefs.h <<_ACEOF
12991#define HAVE_STRUCT_TM_TM_ZONE 1
12992_ACEOF
12993
12994
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012995fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012996
Martin v. Löwis11437992002-04-12 09:54:03 +000012997if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12998
Matthias Kloseb9621712010-04-24 17:59:49 +000012999$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013000
13001else
Matthias Kloseb9621712010-04-24 17:59:49 +000013002 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13003"
Victor Stinnere0be4232011-10-25 13:06:09 +020013004if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013005 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006else
Matthias Kloseb9621712010-04-24 17:59:49 +000013007 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013008fi
13009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013010cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013011#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012_ACEOF
13013
Matthias Kloseb9621712010-04-24 17:59:49 +000013014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13015$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013016if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013017 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013018else
Matthias Kloseb9621712010-04-24 17:59:49 +000013019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013021#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022#if !HAVE_DECL_TZNAME
13023extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013025
Martin v. Löwis11437992002-04-12 09:54:03 +000013026int
13027main ()
13028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013030 ;
13031 return 0;
13032}
13033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013034if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035 ac_cv_var_tzname=yes
13036else
Matthias Kloseb9621712010-04-24 17:59:49 +000013037 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013039rm -f core conftest.err conftest.$ac_objext \
13040 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13043$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013044 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013047
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013048 fi
13049fi
13050
Matthias Kloseb9621712010-04-24 17:59:49 +000013051ac_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 +020013052if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
13054cat >>confdefs.h <<_ACEOF
13055#define HAVE_STRUCT_STAT_ST_RDEV 1
13056_ACEOF
13057
13058
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013059fi
13060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061ac_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 +020013062if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064cat >>confdefs.h <<_ACEOF
13065#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13066_ACEOF
13067
13068
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013069fi
13070
Matthias Kloseb9621712010-04-24 17:59:49 +000013071ac_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 +020013072if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013073
13074cat >>confdefs.h <<_ACEOF
13075#define HAVE_STRUCT_STAT_ST_FLAGS 1
13076_ACEOF
13077
13078
13079fi
13080
Matthias Kloseb9621712010-04-24 17:59:49 +000013081ac_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 +020013082if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013083
13084cat >>confdefs.h <<_ACEOF
13085#define HAVE_STRUCT_STAT_ST_GEN 1
13086_ACEOF
13087
13088
13089fi
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091ac_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 +020013092if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013093
13094cat >>confdefs.h <<_ACEOF
13095#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13096_ACEOF
13097
13098
13099fi
13100
Matthias Kloseb9621712010-04-24 17:59:49 +000013101ac_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 +020013102if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104cat >>confdefs.h <<_ACEOF
13105#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13106_ACEOF
13107
13108
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013109fi
13110
Stefan Krah267b6392016-04-26 01:09:18 +020013111ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13112 #include <sys/types.h>
13113 #include <pwd.h>
13114
13115"
13116if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13117
13118cat >>confdefs.h <<_ACEOF
13119#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13120_ACEOF
13121
13122
13123fi
13124ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13125 #include <sys/types.h>
13126 #include <pwd.h>
13127
13128"
13129if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13130
13131cat >>confdefs.h <<_ACEOF
13132#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13133_ACEOF
13134
13135
13136fi
13137
Zachary Ware6a6967e2016-10-01 00:47:27 -050013138# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13139ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13140"
13141if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13142
13143cat >>confdefs.h <<_ACEOF
13144#define HAVE_SIGINFO_T_SI_BAND 1
13145_ACEOF
13146
13147
13148fi
13149
Michael W. Hudson54241132001-12-07 15:38:26 +000013150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13152$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013153if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013155else
Matthias Kloseb159a552010-04-25 21:00:44 +000013156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013158/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013159#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013160int
13161main ()
13162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013163return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 ;
13165 return 0;
13166}
13167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013169 ac_cv_header_time_altzone=yes
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013174
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175fi
13176
Matthias Kloseb9621712010-04-24 17:59:49 +000013177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13178$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013179if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013182
13183fi
13184
Guido van Rossumda88dad1995-01-26 00:46:29 +000013185was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13187$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013190
13191#include <sys/types.h>
13192#include <sys/select.h>
13193#include <sys/time.h>
13194
Martin v. Löwis11437992002-04-12 09:54:03 +000013195int
13196main ()
13197{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013198;
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 ;
13200 return 0;
13201}
13202_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013203if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
13205
Matthias Kloseb9621712010-04-24 17:59:49 +000013206$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013208 was_it_defined=yes
13209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13213$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214
Matthias Kloseb9621712010-04-24 17:59:49 +000013215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13216$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013217if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013218 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013219else
Matthias Kloseb9621712010-04-24 17:59:49 +000013220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013221/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013222#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013223int
13224main ()
13225{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013227 ;
13228 return 0;
13229}
13230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013232 ac_cv_struct_addrinfo=yes
13233else
Matthias Kloseb9621712010-04-24 17:59:49 +000013234 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13237fi
13238
Matthias Kloseb9621712010-04-24 17:59:49 +000013239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13240$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013241if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013242
Matthias Kloseb9621712010-04-24 17:59:49 +000013243$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013244
13245fi
13246
Matthias Kloseb9621712010-04-24 17:59:49 +000013247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13248$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013249if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013253/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013254
13255# include <sys/types.h>
13256# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013257int
13258main ()
13259{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013260struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013261 ;
13262 return 0;
13263}
13264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266 ac_cv_struct_sockaddr_storage=yes
13267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13271fi
13272
Matthias Kloseb9621712010-04-24 17:59:49 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13274$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013278
13279fi
13280
Christian Heimesdffa3942016-09-05 23:54:41 +020013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13282$as_echo_n "checking for sockaddr_alg... " >&6; }
13283if ${ac_cv_struct_sockaddr_alg+:} false; then :
13284 $as_echo_n "(cached) " >&6
13285else
13286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13287/* end confdefs.h. */
13288
13289# include <sys/types.h>
13290# include <sys/socket.h>
13291# include <linux/if_alg.h>
13292int
13293main ()
13294{
13295struct sockaddr_alg s
13296 ;
13297 return 0;
13298}
13299_ACEOF
13300if ac_fn_c_try_compile "$LINENO"; then :
13301 ac_cv_struct_sockaddr_alg=yes
13302else
13303 ac_cv_struct_sockaddr_alg=no
13304fi
13305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306fi
13307
13308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13309$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13310if test $ac_cv_struct_sockaddr_alg = yes; then
13311
13312$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13313
13314fi
13315
Guido van Rossum627b2d71993-12-24 10:39:16 +000013316# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13319$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013320if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013322else
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013324/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013325$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013326int
13327main ()
13328{
13329static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013330test_array [0] = 0;
13331return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013332
13333 ;
13334 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013335}
Martin v. Löwis11437992002-04-12 09:54:03 +000013336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013338 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013339else
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013343fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13345$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013346if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013348
13349fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013350
Matthias Kloseb9621712010-04-24 17:59:49 +000013351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13352$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013353if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013355else
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013357/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359int
13360main ()
13361{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013364 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013366 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013367 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368 char const *const *pcpcc;
13369 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013370 /* NEC SVR4.0.2 mips cc rejects this. */
13371 struct point {int x, y;};
13372 static struct point const zero = {0,0};
13373 /* AIX XL C 1.02.0.0 rejects this.
13374 It does not let you subtract one const X* pointer from another in
13375 an arm of an if-expression whose if-part is not a constant
13376 expression */
13377 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013379 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380 ++pcpcc;
13381 ppc = (char**) pcpcc;
13382 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013383 { /* SCO 3.2v4 cc rejects this sort of thing. */
13384 char tx;
13385 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013386 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013387
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 }
13391 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13392 int x[] = {25, 17};
13393 const int *foo = &x[0];
13394 ++foo;
13395 }
13396 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13397 typedef const int *iptr;
13398 iptr p = 0;
13399 ++p;
13400 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013401 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013403 struct s { int j; const int *ap[3]; } bx;
13404 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013405 }
13406 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13407 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013411#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013412
Martin v. Löwis11437992002-04-12 09:54:03 +000013413 ;
13414 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013415}
Martin v. Löwis11437992002-04-12 09:54:03 +000013416_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013417if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418 ac_cv_c_const=yes
13419else
Matthias Kloseb9621712010-04-24 17:59:49 +000013420 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13425$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013426if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013427
Matthias Kloseb9621712010-04-24 17:59:49 +000013428$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013429
13430fi
13431
Michael W. Hudson54241132001-12-07 15:38:26 +000013432
Guido van Rossumda88dad1995-01-26 00:46:29 +000013433works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13435$as_echo_n "checking for working signed char... " >&6; }
13436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013442signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 ;
13444 return 0;
13445}
13446_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013447if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013448 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013449else
Skip Montanaro6dead952003-09-25 14:50:04 +000013450
Matthias Kloseb9621712010-04-24 17:59:49 +000013451$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013452
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013453
Guido van Rossum7f43da71994-08-01 12:15:30 +000013454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13457$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013458
Guido van Rossumda88dad1995-01-26 00:46:29 +000013459have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13461$as_echo_n "checking for prototypes... " >&6; }
13462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013463/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013464int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013465int
13466main ()
13467{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013468return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 ;
13470 return 0;
13471}
13472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013476
Matthias Kloseb159a552010-04-25 21:00:44 +000013477 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13481$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482
Guido van Rossumda88dad1995-01-26 00:46:29 +000013483works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13485$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013487/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013488
13489#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013490int foo(int x, ...) {
13491 va_list va;
13492 va_start(va, x);
13493 va_arg(va, int);
13494 va_arg(va, char *);
13495 va_arg(va, double);
13496 return 0;
13497}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013498
Martin v. Löwis11437992002-04-12 09:54:03 +000013499int
13500main ()
13501{
Guido van Rossum90eea071996-08-30 20:58:57 +000013502return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ;
13504 return 0;
13505}
13506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013507if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013508
13509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013512 works=yes
13513
Guido van Rossum627b2d71993-12-24 10:39:16 +000013514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13517$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013518
Martin v. Löwisd6320502004-08-12 13:45:08 +000013519# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13521$as_echo_n "checking for socketpair... " >&6; }
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013523/* end confdefs.h. */
13524
13525#include <sys/types.h>
13526#include <sys/socket.h>
13527
13528int
13529main ()
13530{
13531void *x=socketpair
13532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013537
Matthias Kloseb9621712010-04-24 17:59:49 +000013538$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013539
Matthias Kloseb159a552010-04-25 21:00:44 +000013540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013541$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13544$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013545
13546fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013548
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013549# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13551$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013553/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013554#include <sys/types.h>
13555#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013556int
13557main ()
13558{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013559struct sockaddr x;
13560x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565if ac_fn_c_try_compile "$LINENO"; then :
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13567$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013570
13571else
Matthias Kloseb9621712010-04-24 17:59:49 +000013572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13573$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013574
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013578# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013582if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013583
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013585
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13587$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013588 OLD_CFLAGS=$CFLAGS
13589 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013591/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013592
13593# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595int
13596main ()
13597{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013598
13599 char *name;
13600 struct hostent *he, *res;
13601 char buffer[2048];
13602 int buflen = 2048;
13603 int h_errnop;
13604
13605 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
13607 ;
13608 return 0;
13609}
13610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013611if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013612
Matthias Kloseb9621712010-04-24 17:59:49 +000013613 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013614
Martin v. Löwis11437992002-04-12 09:54:03 +000013615
Matthias Kloseb9621712010-04-24 17:59:49 +000013616$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13619$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013621else
Skip Montanaro6dead952003-09-25 14:50:04 +000013622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13624$as_echo "no" >&6; }
13625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13626$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013628/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013630# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013631
Martin v. Löwis11437992002-04-12 09:54:03 +000013632int
13633main ()
13634{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013635
13636 char *name;
13637 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013638 char buffer[2048];
13639 int buflen = 2048;
13640 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013641
Matthias Kloseb159a552010-04-25 21:00:44 +000013642 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013643
13644 ;
13645 return 0;
13646}
13647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013648if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013649
Matthias Kloseb9621712010-04-24 17:59:49 +000013650 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Matthias Kloseb159a552010-04-25 21:00:44 +000013653$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013654
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13656$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013658else
Skip Montanaro6dead952003-09-25 14:50:04 +000013659
Matthias Kloseb9621712010-04-24 17:59:49 +000013660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13661$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13663$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13665/* end confdefs.h. */
13666
13667# include <netdb.h>
13668
13669int
13670main ()
13671{
13672
13673 char *name;
13674 struct hostent *he;
13675 struct hostent_data data;
13676
13677 (void) gethostbyname_r(name, he, &data);
13678
13679 ;
13680 return 0;
13681}
13682_ACEOF
13683if ac_fn_c_try_compile "$LINENO"; then :
13684
13685 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13686
13687
13688$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13689
13690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13691$as_echo "yes" >&6; }
13692
13693else
13694
13695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13696$as_echo "no" >&6; }
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
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013706 CFLAGS=$OLD_CFLAGS
13707
13708else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013709
Matthias Kloseb9621712010-04-24 17:59:49 +000013710 for ac_func in gethostbyname
13711do :
13712 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013713if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013715#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013716_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013717
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013718fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013719done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013720
Michael W. Hudson54241132001-12-07 15:38:26 +000013721
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013722fi
13723
Michael W. Hudson54241132001-12-07 15:38:26 +000013724
13725
13726
13727
13728
13729
Guido van Rossum627b2d71993-12-24 10:39:16 +000013730# checks for system services
13731# (none yet)
13732
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013733# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013734ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013737else
Matthias Kloseb9621712010-04-24 17:59:49 +000013738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13739$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013740if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013742else
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013744LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748/* Override any GCC internal prototype to avoid an error.
13749 Use char because int might match the return type of a GCC
13750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013751#ifdef __cplusplus
13752extern "C"
13753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013754char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013758return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
13761}
13762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013763if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013764 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013765else
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013767fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013768rm -f core conftest.err conftest.$ac_objext \
13769 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013770LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13773$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013775 cat >>confdefs.h <<_ACEOF
13776#define HAVE_LIBIEEE 1
13777_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013778
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013779 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013780
Guido van Rossum627b2d71993-12-24 10:39:16 +000013781fi
13782
Michael W. Hudson54241132001-12-07 15:38:26 +000013783
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013784fi
13785
Michael W. Hudson54241132001-12-07 15:38:26 +000013786
Guido van Rossum7f43da71994-08-01 12:15:30 +000013787# check for --with-libm=...
13788
Guido van Rossum563e7081996-09-10 18:20:48 +000013789case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013790Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013791*) LIBM=-lm
13792esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13794$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013796# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013797if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013799if test "$withval" = no
13800then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13802$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013803elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013804then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13806$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013807else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013808fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13811$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013812fi
13813
Guido van Rossum7f43da71994-08-01 12:15:30 +000013814
13815# check for --with-libc=...
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13818$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013822 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013823if test "$withval" = no
13824then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13826$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013827elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13830$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013831else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013832fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013833else
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13835$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836fi
13837
Guido van Rossum7f43da71994-08-01 12:15:30 +000013838
Stefan Krah1919b7e2012-03-21 18:25:23 +010013839# **************************************
13840# * Check for gcc x64 inline assembler *
13841# **************************************
13842
13843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13844$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13846/* end confdefs.h. */
13847
13848int
13849main ()
13850{
13851
13852 __asm__ __volatile__ ("movq %rcx, %rax");
13853
13854 ;
13855 return 0;
13856}
13857_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013858if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013859 have_gcc_asm_for_x64=yes
13860else
13861 have_gcc_asm_for_x64=no
13862fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013863rm -f core conftest.err conftest.$ac_objext \
13864 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13866$as_echo "$have_gcc_asm_for_x64" >&6; }
13867if test "$have_gcc_asm_for_x64" = yes
13868then
13869
13870$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13871
13872fi
13873
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013874# **************************************************
13875# * Check for various properties of floating point *
13876# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013877
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
13879$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
13880if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013882else
13883
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013884
13885ax_cv_c_float_words_bigendian=unknown
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013887/* end confdefs.h. */
13888
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013889
13890double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
13891
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013892
13893_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013894if ac_fn_c_try_compile "$LINENO"; then :
13895
13896
13897if grep noonsees conftest.$ac_objext >/dev/null ; then
13898 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013899fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013900if grep seesnoon conftest.$ac_objext >/dev/null ; then
13901 if test "$ax_cv_c_float_words_bigendian" = unknown; then
13902 ax_cv_c_float_words_bigendian=no
13903 else
13904 ax_cv_c_float_words_bigendian=unknown
13905 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013906fi
13907
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013908
13909fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013911fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
13913$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013914
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013915case $ax_cv_c_float_words_bigendian in
13916 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013917
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013918$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
13919 ;;
13920 no)
13921 ;;
13922 *)
13923 as_fn_error $? "
13924
13925Unknown float word ordering. You need to manually preset
13926ax_cv_c_float_words_bigendian=no (or yes) according to your system.
13927
13928 " "$LINENO" 5 ;;
13929esac
13930
13931
13932if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013933then
13934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013936
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013937elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013938then
13939
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013940$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
13941
13942else
13943 # Some ARM platforms use a mixed-endian representation for doubles.
13944 # While Python doesn't currently have full support for these platforms
13945 # (see e.g., issue 1762561), we can at least make sure that float <-> string
13946 # conversions work.
13947 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
13948 # or little, then it must be this?
13949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013951
13952fi
13953
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013954# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013955# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013956# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013957# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013958# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013959# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013960
13961# This inline assembler syntax may also work for suncc and icc,
13962# so we try it on all platforms.
13963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13965$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013967/* end confdefs.h. */
13968
13969int
13970main ()
13971{
13972
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013973 unsigned short cw;
13974 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13975 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013976
13977 ;
13978 return 0;
13979}
13980_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013981if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013982 have_gcc_asm_for_x87=yes
13983else
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013985fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013986rm -f core conftest.err conftest.$ac_objext \
13987 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13989$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013990if test "$have_gcc_asm_for_x87" = yes
13991then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013994
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013995fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013996
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13998$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14000/* end confdefs.h. */
14001
14002int
14003main ()
14004{
14005
14006 unsigned int fpcr;
14007 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14008 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14009
14010 ;
14011 return 0;
14012}
14013_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014014if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014015 have_gcc_asm_for_mc68881=yes
14016else
14017 have_gcc_asm_for_mc68881=no
14018fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014019rm -f core conftest.err conftest.$ac_objext \
14020 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14022$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14023if test "$have_gcc_asm_for_mc68881" = yes
14024then
14025
14026$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14027
14028fi
14029
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014030# Detect whether system arithmetic is subject to x87-style double
14031# rounding issues. The result of this test has little meaning on non
14032# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14033# mode is round-to-nearest and double rounding issues are present, and
14034# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14036$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014037# $BASECFLAGS may affect the result
14038ac_save_cc="$CC"
14039CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014040if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014041 ac_cv_x87_double_rounding=no
14042else
Matthias Kloseb9621712010-04-24 17:59:49 +000014043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014044/* end confdefs.h. */
14045
14046#include <stdlib.h>
14047#include <math.h>
14048int main() {
14049 volatile double x, y, z;
14050 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14051 x = 0.99999999999999989; /* 1-2**-53 */
14052 y = 1./x;
14053 if (y != 1.)
14054 exit(0);
14055 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14056 x = 1e16;
14057 y = 2.99999;
14058 z = x + y;
14059 if (z != 1e16+4.)
14060 exit(0);
14061 /* both tests show evidence of double rounding */
14062 exit(1);
14063}
14064
14065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014066if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014067 ac_cv_x87_double_rounding=no
14068else
Matthias Kloseb9621712010-04-24 17:59:49 +000014069 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014070fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14072 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073fi
14074
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014075CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14077$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014078if test "$ac_cv_x87_double_rounding" = yes
14079then
14080
Matthias Kloseb9621712010-04-24 17:59:49 +000014081$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014082
14083fi
14084
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014085# ************************************
14086# * Check for mathematical functions *
14087# ************************************
14088
14089LIBS_SAVE=$LIBS
14090LIBS="$LIBS $LIBM"
14091
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014092for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14093do :
14094 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14095ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014096if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097 cat >>confdefs.h <<_ACEOF
14098#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14099_ACEOF
14100
14101fi
14102done
14103
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014104for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014105do :
14106 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14107ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014108if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014109 cat >>confdefs.h <<_ACEOF
14110#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14111_ACEOF
14112
14113fi
14114done
14115
14116ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14117"
Victor Stinnere0be4232011-10-25 13:06:09 +020014118if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014119 ac_have_decl=1
14120else
14121 ac_have_decl=0
14122fi
14123
14124cat >>confdefs.h <<_ACEOF
14125#define HAVE_DECL_ISINF $ac_have_decl
14126_ACEOF
14127ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14128"
Victor Stinnere0be4232011-10-25 13:06:09 +020014129if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014130 ac_have_decl=1
14131else
14132 ac_have_decl=0
14133fi
14134
14135cat >>confdefs.h <<_ACEOF
14136#define HAVE_DECL_ISNAN $ac_have_decl
14137_ACEOF
14138ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14139"
Victor Stinnere0be4232011-10-25 13:06:09 +020014140if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014141 ac_have_decl=1
14142else
14143 ac_have_decl=0
14144fi
14145
14146cat >>confdefs.h <<_ACEOF
14147#define HAVE_DECL_ISFINITE $ac_have_decl
14148_ACEOF
14149
14150
Mark Dickinsona614f042009-11-28 12:48:43 +000014151# For multiprocessing module, check that sem_open
14152# actually works. For FreeBSD versions <= 7.2,
14153# the kernel module that provides POSIX semaphores
14154# isn't loaded by default, so an attempt to call
14155# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14157$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014158if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014162 ac_cv_posix_semaphores_enabled=yes
14163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014165/* end confdefs.h. */
14166
14167#include <unistd.h>
14168#include <fcntl.h>
14169#include <stdio.h>
14170#include <semaphore.h>
14171#include <sys/stat.h>
14172
14173int main(void) {
14174 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14175 if (a == SEM_FAILED) {
14176 perror("sem_open");
14177 return 1;
14178 }
14179 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014180 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014181 return 0;
14182}
14183
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014186 ac_cv_posix_semaphores_enabled=yes
14187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014192fi
14193
14194
Mark Dickinsona614f042009-11-28 12:48:43 +000014195fi
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14198$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014199if test $ac_cv_posix_semaphores_enabled = no
14200then
14201
Matthias Kloseb9621712010-04-24 17:59:49 +000014202$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014203
14204fi
14205
Mark Dickinson10683072009-04-18 21:18:19 +000014206# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14208$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014209if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014210 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014213 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014216/* end confdefs.h. */
14217
14218#include <unistd.h>
14219#include <fcntl.h>
14220#include <stdio.h>
14221#include <semaphore.h>
14222#include <sys/stat.h>
14223
14224int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014225 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014226 int count;
14227 int res;
14228 if(a==SEM_FAILED){
14229 perror("sem_open");
14230 return 1;
14231
14232 }
14233 res = sem_getvalue(a, &count);
14234 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014235 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014236 return res==-1 ? 1 : 0;
14237}
14238
Mark Dickinson10683072009-04-18 21:18:19 +000014239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014242else
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14246 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014247fi
14248
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014250fi
14251
Matthias Kloseb9621712010-04-24 17:59:49 +000014252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14253$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014254if test $ac_cv_broken_sem_getvalue = yes
14255then
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014258
14259fi
14260
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014261ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14262"
14263if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14264 ac_have_decl=1
14265else
14266 ac_have_decl=0
14267fi
14268
14269cat >>confdefs.h <<_ACEOF
14270#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14271_ACEOF
14272ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14273"
14274if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14275 ac_have_decl=1
14276else
14277 ac_have_decl=0
14278fi
14279
14280cat >>confdefs.h <<_ACEOF
14281#define HAVE_DECL_RTLD_NOW $ac_have_decl
14282_ACEOF
14283ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14284"
14285if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14286 ac_have_decl=1
14287else
14288 ac_have_decl=0
14289fi
14290
14291cat >>confdefs.h <<_ACEOF
14292#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14293_ACEOF
14294ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14295"
14296if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14297 ac_have_decl=1
14298else
14299 ac_have_decl=0
14300fi
14301
14302cat >>confdefs.h <<_ACEOF
14303#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14304_ACEOF
14305ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14306"
14307if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14308 ac_have_decl=1
14309else
14310 ac_have_decl=0
14311fi
14312
14313cat >>confdefs.h <<_ACEOF
14314#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14315_ACEOF
14316ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14317"
14318if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14319 ac_have_decl=1
14320else
14321 ac_have_decl=0
14322fi
14323
14324cat >>confdefs.h <<_ACEOF
14325#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14326_ACEOF
14327ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14328"
14329if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14330 ac_have_decl=1
14331else
14332 ac_have_decl=0
14333fi
14334
14335cat >>confdefs.h <<_ACEOF
14336#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14337_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014338ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14339"
14340if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14341 ac_have_decl=1
14342else
14343 ac_have_decl=0
14344fi
14345
14346cat >>confdefs.h <<_ACEOF
14347#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14348_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014349
14350
Mark Dickinsonbd792642009-03-18 20:06:12 +000014351# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14353$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014354# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014355if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014356 enableval=$enable_big_digits; case $enable_big_digits in
14357yes)
14358 enable_big_digits=30 ;;
14359no)
14360 enable_big_digits=15 ;;
1436115|30)
14362 ;;
14363*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014364 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 +000014365esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14367$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014368
14369cat >>confdefs.h <<_ACEOF
14370#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14371_ACEOF
14372
14373
14374else
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14376$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014377fi
14378
14379
Guido van Rossumef2255b2000-03-10 22:30:29 +000014380# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014381ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014382if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014383
14384
Matthias Kloseb9621712010-04-24 17:59:49 +000014385$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014386
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014387 wchar_h="yes"
14388
Guido van Rossumef2255b2000-03-10 22:30:29 +000014389else
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014391
14392fi
14393
Michael W. Hudson54241132001-12-07 15:38:26 +000014394
Martin v. Löwis11437992002-04-12 09:54:03 +000014395
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014396# determine wchar_t size
14397if test "$wchar_h" = yes
14398then
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014400# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14401# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14402# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14404$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014405if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014406 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014407else
Matthias Kloseb9621712010-04-24 17:59:49 +000014408 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14409"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
Martin v. Löwis11437992002-04-12 09:54:03 +000014411else
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 if test "$ac_cv_type_wchar_t" = yes; then
14413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014415as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 else
14418 ac_cv_sizeof_wchar_t=0
14419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014421
Martin v. Löwis11437992002-04-12 09:54:03 +000014422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14424$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014425
14426
14427
Martin v. Löwis11437992002-04-12 09:54:03 +000014428cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014429#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014430_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014431
Michael W. Hudson54241132001-12-07 15:38:26 +000014432
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014433fi
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14436$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014437have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014439/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014440
14441#include <tcl.h>
14442#if TCL_UTF_MAX != 6
14443# error "NOT UCS4_TCL"
14444#endif
14445int
14446main ()
14447{
14448
14449 ;
14450 return 0;
14451}
14452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014454
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014457
14458 have_ucs4_tcl=yes
14459
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14463$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014464
Skip Montanaro6dead952003-09-25 14:50:04 +000014465# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014466if test "$wchar_h" = yes
14467then
14468 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14470$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014471 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014473else
14474
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014476 ac_cv_wchar_t_signed=yes
14477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014479/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014480
14481 #include <wchar.h>
14482 int main()
14483 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014484 /* Success: exit code 0 */
14485 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014486 }
14487
14488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014489if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014490 ac_cv_wchar_t_signed=yes
14491else
Matthias Kloseb9621712010-04-24 17:59:49 +000014492 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014496fi
14497
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014498fi
14499
Matthias Kloseb9621712010-04-24 17:59:49 +000014500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14501$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502fi
14503
Michael Osipov3738fad2018-08-24 18:17:19 +020014504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14505$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014506# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014507if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014508 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014509then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
Michael Osipov3738fad2018-08-24 18:17:19 +020014513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14514$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014515else
Michael Osipov3738fad2018-08-24 18:17:19 +020014516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14517$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014518fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014519
14520# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14522$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014523if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 ac_cv_c_bigendian=unknown
14527 # See if we're dealing with a universal compiler.
14528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14529/* end confdefs.h. */
14530#ifndef __APPLE_CC__
14531 not a universal capable compiler
14532 #endif
14533 typedef int dummy;
14534
Skip Montanaro6dead952003-09-25 14:50:04 +000014535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014536if ac_fn_c_try_compile "$LINENO"; then :
14537
14538 # Check for potential -arch flags. It is not universal unless
14539 # there are at least two -arch flags with different values.
14540 ac_arch=
14541 ac_prev=
14542 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14543 if test -n "$ac_prev"; then
14544 case $ac_word in
14545 i?86 | x86_64 | ppc | ppc64)
14546 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14547 ac_arch=$ac_word
14548 else
14549 ac_cv_c_bigendian=universal
14550 break
14551 fi
14552 ;;
14553 esac
14554 ac_prev=
14555 elif test "x$ac_word" = "x-arch"; then
14556 ac_prev=arch
14557 fi
14558 done
14559fi
14560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14561 if test $ac_cv_c_bigendian = unknown; then
14562 # See if sys/param.h defines the BYTE_ORDER macro.
14563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014564/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014565#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568int
14569main ()
14570{
Matthias Kloseb9621712010-04-24 17:59:49 +000014571#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14572 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14573 && LITTLE_ENDIAN)
14574 bogus endian macros
14575 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014576
14577 ;
14578 return 0;
14579}
14580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014581if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014582 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014584/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014585#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014586 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014587
Martin v. Löwis11437992002-04-12 09:54:03 +000014588int
14589main ()
14590{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014592 not big endian
14593 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
14595 ;
14596 return 0;
14597}
14598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014600 ac_cv_c_bigendian=yes
14601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014605fi
14606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14607 fi
14608 if test $ac_cv_c_bigendian = unknown; then
14609 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014611/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014612#include <limits.h>
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614int
14615main ()
14616{
Matthias Kloseb9621712010-04-24 17:59:49 +000014617#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14618 bogus endian macros
14619 #endif
14620
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 ;
14622 return 0;
14623}
14624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014625if ac_fn_c_try_compile "$LINENO"; then :
14626 # It does; now see whether it defined to _BIG_ENDIAN or not.
14627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14628/* end confdefs.h. */
14629#include <limits.h>
14630
14631int
14632main ()
14633{
14634#ifndef _BIG_ENDIAN
14635 not big endian
14636 #endif
14637
14638 ;
14639 return 0;
14640}
14641_ACEOF
14642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014643 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014644else
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14648fi
14649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14650 fi
14651 if test $ac_cv_c_bigendian = unknown; then
14652 # Compile a test program.
14653 if test "$cross_compiling" = yes; then :
14654 # Try to guess by grepping values from an object file.
14655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14656/* end confdefs.h. */
14657short int ascii_mm[] =
14658 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14659 short int ascii_ii[] =
14660 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14661 int use_ascii (int i) {
14662 return ascii_mm[i] + ascii_ii[i];
14663 }
14664 short int ebcdic_ii[] =
14665 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14666 short int ebcdic_mm[] =
14667 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14668 int use_ebcdic (int i) {
14669 return ebcdic_mm[i] + ebcdic_ii[i];
14670 }
14671 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672
Matthias Kloseb9621712010-04-24 17:59:49 +000014673int
14674main ()
14675{
14676return use_ascii (foo) == use_ebcdic (foo);
14677 ;
14678 return 0;
14679}
14680_ACEOF
14681if ac_fn_c_try_compile "$LINENO"; then :
14682 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14683 ac_cv_c_bigendian=yes
14684 fi
14685 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14686 if test "$ac_cv_c_bigendian" = unknown; then
14687 ac_cv_c_bigendian=no
14688 else
14689 # finding both strings is unlikely to happen, but who knows?
14690 ac_cv_c_bigendian=unknown
14691 fi
14692 fi
14693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014695else
Matthias Kloseb9621712010-04-24 17:59:49 +000014696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014697/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014698$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014699int
14700main ()
14701{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014702
Matthias Kloseb9621712010-04-24 17:59:49 +000014703 /* Are we little or big endian? From Harbison&Steele. */
14704 union
14705 {
14706 long int l;
14707 char c[sizeof (long int)];
14708 } u;
14709 u.l = 1;
14710 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711
14712 ;
14713 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714}
Martin v. Löwis11437992002-04-12 09:54:03 +000014715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014716if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717 ac_cv_c_bigendian=no
14718else
Matthias Kloseb9621712010-04-24 17:59:49 +000014719 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014721rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14722 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14728$as_echo "$ac_cv_c_bigendian" >&6; }
14729 case $ac_cv_c_bigendian in #(
14730 yes)
14731 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14732;; #(
14733 no)
14734 ;; #(
14735 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014736
Matthias Kloseb9621712010-04-24 17:59:49 +000014737$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014738
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 ;; #(
14740 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014741 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014742 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014743 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014744
Michael W. Hudson54241132001-12-07 15:38:26 +000014745
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014746# ABI version string for Python extension modules. This appears between the
14747# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14748# from the following attributes which affect the ABI of this Python build (in
14749# this order):
14750#
14751# * The Python implementation (always 'cpython-' for us)
14752# * The major and minor version numbers
14753# * --with-pydebug (adds a 'd')
14754# * --with-pymalloc (adds a 'm')
14755# * --with-wide-unicode (adds a 'u')
14756#
14757# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014758# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14759# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014760
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14762$as_echo_n "checking ABIFLAGS... " >&6; }
14763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14764$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14766$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014767SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14769$as_echo "$SOABI" >&6; }
14770
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014771
14772case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014773 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014774 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14775 *)
14776 EXT_SUFFIX=${SHLIB_SUFFIX};;
14777esac
14778
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14780$as_echo_n "checking LDVERSION... " >&6; }
14781LDVERSION='$(VERSION)$(ABIFLAGS)'
14782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14783$as_echo "$LDVERSION" >&6; }
14784
doko@python.org87421192013-01-26 11:39:31 +010014785
doko@ubuntu.com55532312016-06-14 08:55:19 +020014786if test x$PLATFORM_TRIPLET = x; then
14787 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14788else
14789 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14790fi
doko@python.org87421192013-01-26 11:39:31 +010014791
14792
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014793# Check whether right shifting a negative integer extends the sign bit
14794# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14796$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014797if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014799else
Martin v. Löwis11437992002-04-12 09:54:03 +000014800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014802 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014805/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014806
14807int main()
14808{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014809 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014810}
14811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014814 ac_cv_rshift_extends_sign=yes
14815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014820fi
14821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822fi
14823
Matthias Kloseb9621712010-04-24 17:59:49 +000014824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14825$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014826if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014827then
Martin v. Löwis11437992002-04-12 09:54:03 +000014828
Matthias Kloseb9621712010-04-24 17:59:49 +000014829$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014830
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014831fi
14832
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014833# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14835$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014836if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014837 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014838else
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
Matthias Kloseb9621712010-04-24 17:59:49 +000014840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014841/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014842#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014843int
14844main ()
14845{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014846
14847 FILE *f = fopen("/dev/null", "r");
14848 flockfile(f);
14849 getc_unlocked(f);
14850 funlockfile(f);
14851
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ;
14853 return 0;
14854}
14855_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014856if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014857 ac_cv_have_getc_unlocked=yes
14858else
Matthias Kloseb9621712010-04-24 17:59:49 +000014859 ac_cv_have_getc_unlocked=no
14860fi
14861rm -f core conftest.err conftest.$ac_objext \
14862 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014864
Matthias Kloseb9621712010-04-24 17:59:49 +000014865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14866$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014867if test "$ac_cv_have_getc_unlocked" = yes
14868then
Martin v. Löwis11437992002-04-12 09:54:03 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014871
14872fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014873
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014874# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014875# save the value of LIBS so we don't actually link Python with readline
14876LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014877
Gregory P. Smith18820942008-09-07 06:24:49 +000014878# On some systems we need to link readline to a termcap compatible
14879# library. NOTE: Keep the precedence of listed libraries synchronised
14880# with setup.py.
14881py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14883$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014884for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014885 if test -z "$py_libtermcap"; then
14886 READLINE_LIBS="-lreadline"
14887 else
14888 READLINE_LIBS="-lreadline -l$py_libtermcap"
14889 fi
14890 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014892/* end confdefs.h. */
14893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014894/* Override any GCC internal prototype to avoid an error.
14895 Use char because int might match the return type of a GCC
14896 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014897#ifdef __cplusplus
14898extern "C"
14899#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014900char readline ();
14901int
14902main ()
14903{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014905 ;
14906 return 0;
14907}
14908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014909if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014910 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014911fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014912rm -f core conftest.err conftest.$ac_objext \
14913 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014914 if test $py_cv_lib_readline = yes; then
14915 break
14916 fi
14917done
14918# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14919#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014920if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14922$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014923else
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14925$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014926
Matthias Kloseb9621712010-04-24 17:59:49 +000014927$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014928
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014929fi
14930
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014931# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014934#include <readline/readline.h>
14935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014936if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014937 have_readline=yes
14938else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014939 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014940
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014941fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014942rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014943if test $have_readline = yes
14944then
Matthias Kloseb9621712010-04-24 17:59:49 +000014945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014946/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014947#include <readline/readline.h>
14948
14949_ACEOF
14950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014951 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014952
Matthias Kloseb9621712010-04-24 17:59:49 +000014953$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014954
14955fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014956rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014957
Matthias Kloseb9621712010-04-24 17:59:49 +000014958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014959/* end confdefs.h. */
14960#include <readline/readline.h>
14961
14962_ACEOF
14963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014964 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014967
14968fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014969rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014970
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014971fi
14972
Martin v. Löwis0daad592001-09-30 21:09:59 +000014973# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14975$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014976if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014977 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014978else
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014980LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014983
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014984/* Override any GCC internal prototype to avoid an error.
14985 Use char because int might match the return type of a GCC
14986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014987#ifdef __cplusplus
14988extern "C"
14989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014990char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014991int
14992main ()
14993{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 ;
14996 return 0;
14997}
14998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014999if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015001else
Matthias Kloseb9621712010-04-24 17:59:49 +000015002 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015003fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015004rm -f core conftest.err conftest.$ac_objext \
15005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015006LIBS=$ac_check_lib_save_LIBS
15007fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15009$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015010if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015011
Matthias Kloseb9621712010-04-24 17:59:49 +000015012$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015013
Martin v. Löwis0daad592001-09-30 21:09:59 +000015014fi
15015
Michael W. Hudson54241132001-12-07 15:38:26 +000015016
Thomas Wouters89d996e2007-09-08 17:39:28 +000015017# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15019$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015020if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015021 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015022else
15023 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015024LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015026/* end confdefs.h. */
15027
15028/* Override any GCC internal prototype to avoid an error.
15029 Use char because int might match the return type of a GCC
15030 builtin and then its argument prototype would still apply. */
15031#ifdef __cplusplus
15032extern "C"
15033#endif
15034char rl_completion_display_matches_hook ();
15035int
15036main ()
15037{
15038return rl_completion_display_matches_hook ();
15039 ;
15040 return 0;
15041}
15042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015043if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015044 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15045else
Matthias Kloseb9621712010-04-24 17:59:49 +000015046 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015048rm -f core conftest.err conftest.$ac_objext \
15049 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015050LIBS=$ac_check_lib_save_LIBS
15051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15053$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015054if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015055
Matthias Kloseb9621712010-04-24 17:59:49 +000015056$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015057
15058fi
15059
15060
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015061# also in 4.0, but not in editline
15062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15063$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15064if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15065 $as_echo_n "(cached) " >&6
15066else
15067 ac_check_lib_save_LIBS=$LIBS
15068LIBS="-lreadline $READLINE_LIBS $LIBS"
15069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15070/* end confdefs.h. */
15071
15072/* Override any GCC internal prototype to avoid an error.
15073 Use char because int might match the return type of a GCC
15074 builtin and then its argument prototype would still apply. */
15075#ifdef __cplusplus
15076extern "C"
15077#endif
15078char rl_resize_terminal ();
15079int
15080main ()
15081{
15082return rl_resize_terminal ();
15083 ;
15084 return 0;
15085}
15086_ACEOF
15087if ac_fn_c_try_link "$LINENO"; then :
15088 ac_cv_lib_readline_rl_resize_terminal=yes
15089else
15090 ac_cv_lib_readline_rl_resize_terminal=no
15091fi
15092rm -f core conftest.err conftest.$ac_objext \
15093 conftest$ac_exeext conftest.$ac_ext
15094LIBS=$ac_check_lib_save_LIBS
15095fi
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15097$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15098if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15099
15100$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15101
15102fi
15103
15104
Martin v. Löwis0daad592001-09-30 21:09:59 +000015105# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15107$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015108if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015110else
Martin v. Löwis11437992002-04-12 09:54:03 +000015111 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015112LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015113cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015114/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116/* Override any GCC internal prototype to avoid an error.
15117 Use char because int might match the return type of a GCC
15118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015119#ifdef __cplusplus
15120extern "C"
15121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015122char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015123int
15124main ()
15125{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015126return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015127 ;
15128 return 0;
15129}
15130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015131if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015133else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015136rm -f core conftest.err conftest.$ac_objext \
15137 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015138LIBS=$ac_check_lib_save_LIBS
15139fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15141$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015142if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015143
Matthias Kloseb9621712010-04-24 17:59:49 +000015144$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015145
Guido van Rossum353ae582001-07-10 16:45:32 +000015146fi
15147
Jack Jansendd19cf82001-12-06 22:36:17 +000015148
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015149# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015151/* end confdefs.h. */
15152#include <readline/readline.h>
15153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015154if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015155 have_readline=yes
15156else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015157 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015158
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015160rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015161if test $have_readline = yes
15162then
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164/* end confdefs.h. */
15165#include <readline/readline.h>
15166
15167_ACEOF
15168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015169 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015170
Matthias Kloseb9621712010-04-24 17:59:49 +000015171$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172
15173fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015174rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015175
15176fi
15177
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15179$as_echo_n "checking for append_history in -lreadline... " >&6; }
15180if ${ac_cv_lib_readline_append_history+:} false; then :
15181 $as_echo_n "(cached) " >&6
15182else
15183 ac_check_lib_save_LIBS=$LIBS
15184LIBS="-lreadline $READLINE_LIBS $LIBS"
15185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15186/* end confdefs.h. */
15187
15188/* Override any GCC internal prototype to avoid an error.
15189 Use char because int might match the return type of a GCC
15190 builtin and then its argument prototype would still apply. */
15191#ifdef __cplusplus
15192extern "C"
15193#endif
15194char append_history ();
15195int
15196main ()
15197{
15198return append_history ();
15199 ;
15200 return 0;
15201}
15202_ACEOF
15203if ac_fn_c_try_link "$LINENO"; then :
15204 ac_cv_lib_readline_append_history=yes
15205else
15206 ac_cv_lib_readline_append_history=no
15207fi
15208rm -f core conftest.err conftest.$ac_objext \
15209 conftest$ac_exeext conftest.$ac_ext
15210LIBS=$ac_check_lib_save_LIBS
15211fi
15212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15213$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15214if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15215
15216$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15217
15218fi
15219
15220
Martin v. Löwis82bca632006-02-10 20:49:30 +000015221# End of readline checks: restore LIBS
15222LIBS=$LIBS_no_readline
15223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15225$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015226if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015227 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015228else
Martin v. Löwis11437992002-04-12 09:54:03 +000015229
Matthias Kloseb9621712010-04-24 17:59:49 +000015230if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015231 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015232else
Matthias Kloseb9621712010-04-24 17:59:49 +000015233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015234/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015235
15236int main()
15237{
15238 int val1 = nice(1);
15239 if (val1 != -1 && val1 == nice(2))
15240 exit(0);
15241 exit(1);
15242}
15243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015245if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015246 ac_cv_broken_nice=yes
15247else
Matthias Kloseb9621712010-04-24 17:59:49 +000015248 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015249fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15251 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015252fi
15253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254fi
15255
Matthias Kloseb9621712010-04-24 17:59:49 +000015256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15257$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015258if test "$ac_cv_broken_nice" = yes
15259then
Martin v. Löwis11437992002-04-12 09:54:03 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015262
15263fi
15264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15266$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015267if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015268 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015271 ac_cv_broken_poll=no
15272else
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015274/* end confdefs.h. */
15275
15276#include <poll.h>
15277
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015278int main()
15279{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015280 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015281 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015282
15283 close (42);
15284
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015285 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015286 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015287 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015288 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015289 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015290 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015291 return 1;
15292}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015293
15294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015296 ac_cv_broken_poll=yes
15297else
Matthias Kloseb9621712010-04-24 17:59:49 +000015298 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015300rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15301 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015304fi
15305
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15307$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015308if test "$ac_cv_broken_poll" = yes
15309then
15310
Matthias Kloseb9621712010-04-24 17:59:49 +000015311$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015312
15313fi
15314
Martin v. Löwis1d459062005-03-14 21:23:33 +000015315# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15317$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015318if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015320else
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015323 ac_cv_working_tzset=no
15324else
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015326/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015327
15328#include <stdlib.h>
15329#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015330#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015331
15332#if HAVE_TZNAME
15333extern char *tzname[];
15334#endif
15335
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015336int main()
15337{
Brett Cannon18367812003-09-19 00:59:16 +000015338 /* Note that we need to ensure that not only does tzset(3)
15339 do 'something' with localtime, but it works as documented
15340 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015341 This includes making sure that tzname is set properly if
15342 tm->tm_zone does not exist since it is the alternative way
15343 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015344
15345 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015346 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015347 */
15348
Martin v. Löwis1d459062005-03-14 21:23:33 +000015349 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015350 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15351
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015352 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015353 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015354 if (localtime(&groundhogday)->tm_hour != 0)
15355 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015356#if HAVE_TZNAME
15357 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15358 if (strcmp(tzname[0], "UTC") ||
15359 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15360 exit(1);
15361#endif
Brett Cannon18367812003-09-19 00:59:16 +000015362
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015363 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015364 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015365 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015366 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015367#if HAVE_TZNAME
15368 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15369 exit(1);
15370#endif
Brett Cannon18367812003-09-19 00:59:16 +000015371
15372 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15373 tzset();
15374 if (localtime(&groundhogday)->tm_hour != 11)
15375 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015376#if HAVE_TZNAME
15377 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15378 exit(1);
15379#endif
15380
15381#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015382 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15383 exit(1);
15384 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15385 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015386#endif
Brett Cannon18367812003-09-19 00:59:16 +000015387
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015388 exit(0);
15389}
15390
15391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015392if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015393 ac_cv_working_tzset=yes
15394else
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15398 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015399fi
15400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401fi
15402
Matthias Kloseb9621712010-04-24 17:59:49 +000015403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15404$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015405if test "$ac_cv_working_tzset" = yes
15406then
15407
Matthias Kloseb9621712010-04-24 17:59:49 +000015408$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015409
15410fi
15411
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015412# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15414$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015415if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015416 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015417else
Matthias Kloseb9621712010-04-24 17:59:49 +000015418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015419/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015420#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015421int
15422main ()
15423{
15424
15425struct stat st;
15426st.st_mtim.tv_nsec = 1;
15427
15428 ;
15429 return 0;
15430}
15431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015432if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015433 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015434else
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15438fi
15439
Matthias Kloseb9621712010-04-24 17:59:49 +000015440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15441$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015442if test "$ac_cv_stat_tv_nsec" = yes
15443then
15444
Matthias Kloseb9621712010-04-24 17:59:49 +000015445$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015446
15447fi
15448
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015449# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15451$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015452if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015453 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015454else
Matthias Kloseb9621712010-04-24 17:59:49 +000015455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015456/* end confdefs.h. */
15457#include <sys/stat.h>
15458int
15459main ()
15460{
15461
15462struct stat st;
15463st.st_mtimespec.tv_nsec = 1;
15464
15465 ;
15466 return 0;
15467}
15468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015470 ac_cv_stat_tv_nsec2=yes
15471else
Matthias Kloseb9621712010-04-24 17:59:49 +000015472 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15475fi
15476
Matthias Kloseb9621712010-04-24 17:59:49 +000015477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15478$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015479if test "$ac_cv_stat_tv_nsec2" = yes
15480then
15481
Matthias Kloseb9621712010-04-24 17:59:49 +000015482$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015483
15484fi
15485
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015486# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015487ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015488if test "$cross_compiling" = no; then
15489 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15490fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015491
15492for ac_header in curses.h ncurses.h
15493do :
15494 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15495ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15496if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15497 cat >>confdefs.h <<_ACEOF
15498#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15499_ACEOF
15500
15501fi
15502
15503done
15504
15505
15506# On Solaris, term.h requires curses.h
15507for ac_header in term.h
15508do :
15509 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15510#ifdef HAVE_CURSES_H
15511#include <curses.h>
15512#endif
15513
15514"
15515if test "x$ac_cv_header_term_h" = xyes; then :
15516 cat >>confdefs.h <<_ACEOF
15517#define HAVE_TERM_H 1
15518_ACEOF
15519
15520fi
15521
15522done
15523
15524
Jack Jansen666b1e72001-10-31 12:11:48 +000015525# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15527$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015528if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015529 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015530else
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015532/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015533#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015534int
15535main ()
15536{
Jack Jansen666b1e72001-10-31 12:11:48 +000015537
15538 int rtn;
15539 rtn = mvwdelch(0,0,0);
15540
Martin v. Löwis11437992002-04-12 09:54:03 +000015541 ;
15542 return 0;
15543}
15544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015545if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015546 ac_cv_mvwdelch_is_expression=yes
15547else
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15551fi
15552
Matthias Kloseb9621712010-04-24 17:59:49 +000015553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15554$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015555
15556if test "$ac_cv_mvwdelch_is_expression" = yes
15557then
Martin v. Löwis11437992002-04-12 09:54:03 +000015558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015560
15561fi
15562
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015563# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15564# structs since version 5.7. If the macro is defined as zero before including
15565# [n]curses.h, ncurses will expose fields of the structs regardless of the
15566# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15568$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015569if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015570 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015571else
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015573/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015574
15575 #define NCURSES_OPAQUE 0
15576 #include <curses.h>
15577
Martin v. Löwis11437992002-04-12 09:54:03 +000015578int
15579main ()
15580{
Jack Jansen666b1e72001-10-31 12:11:48 +000015581
15582 WINDOW *w;
15583 w->_flags = 0;
15584
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 ;
15586 return 0;
15587}
15588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015589if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015590 ac_cv_window_has_flags=yes
15591else
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15595fi
15596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15598$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015599
Jack Jansen666b1e72001-10-31 12:11:48 +000015600
15601if test "$ac_cv_window_has_flags" = yes
15602then
Martin v. Löwis11437992002-04-12 09:54:03 +000015603
Matthias Kloseb9621712010-04-24 17:59:49 +000015604$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015605
15606fi
15607
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15609$as_echo_n "checking for is_pad... " >&6; }
15610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15611/* end confdefs.h. */
15612#include <curses.h>
15613int
15614main ()
15615{
15616
15617#ifndef is_pad
15618void *x=is_pad
15619#endif
15620
15621 ;
15622 return 0;
15623}
15624_ACEOF
15625if ac_fn_c_try_compile "$LINENO"; then :
15626
15627$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15628
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15630$as_echo "yes" >&6; }
15631else
15632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15633$as_echo "no" >&6; }
15634
15635fi
15636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15639$as_echo_n "checking for is_term_resized... " >&6; }
15640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015641/* end confdefs.h. */
15642#include <curses.h>
15643int
15644main ()
15645{
15646void *x=is_term_resized
15647 ;
15648 return 0;
15649}
15650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015651if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015652
Matthias Kloseb9621712010-04-24 17:59:49 +000015653$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015654
Matthias Kloseb159a552010-04-25 21:00:44 +000015655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015656$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15659$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015660
15661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15665$as_echo_n "checking for resize_term... " >&6; }
15666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015667/* end confdefs.h. */
15668#include <curses.h>
15669int
15670main ()
15671{
15672void *x=resize_term
15673 ;
15674 return 0;
15675}
15676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015677if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015680
Matthias Kloseb159a552010-04-25 21:00:44 +000015681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015682$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015683else
Matthias Kloseb9621712010-04-24 17:59:49 +000015684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15685$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015686
15687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15689
Matthias Kloseb9621712010-04-24 17:59:49 +000015690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15691$as_echo_n "checking for resizeterm... " >&6; }
15692cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015693/* end confdefs.h. */
15694#include <curses.h>
15695int
15696main ()
15697{
15698void *x=resizeterm
15699 ;
15700 return 0;
15701}
15702_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015703if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015704
Matthias Kloseb9621712010-04-24 17:59:49 +000015705$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015706
Matthias Kloseb159a552010-04-25 21:00:44 +000015707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015708$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015709else
Matthias Kloseb9621712010-04-24 17:59:49 +000015710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15711$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015712
15713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015715
15716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15717$as_echo_n "checking for immedok... " >&6; }
15718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15719/* end confdefs.h. */
15720#include <curses.h>
15721int
15722main ()
15723{
15724
15725#ifndef immedok
15726void *x=immedok
15727#endif
15728
15729 ;
15730 return 0;
15731}
15732_ACEOF
15733if ac_fn_c_try_compile "$LINENO"; then :
15734
15735$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15736
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15738$as_echo "yes" >&6; }
15739else
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15741$as_echo "no" >&6; }
15742
15743fi
15744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745
15746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15747$as_echo_n "checking for syncok... " >&6; }
15748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749/* end confdefs.h. */
15750#include <curses.h>
15751int
15752main ()
15753{
15754
15755#ifndef syncok
15756void *x=syncok
15757#endif
15758
15759 ;
15760 return 0;
15761}
15762_ACEOF
15763if ac_fn_c_try_compile "$LINENO"; then :
15764
15765$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15766
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15768$as_echo "yes" >&6; }
15769else
15770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15771$as_echo "no" >&6; }
15772
15773fi
15774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15775
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15777$as_echo_n "checking for wchgat... " >&6; }
15778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15779/* end confdefs.h. */
15780#include <curses.h>
15781int
15782main ()
15783{
15784
15785#ifndef wchgat
15786void *x=wchgat
15787#endif
15788
15789 ;
15790 return 0;
15791}
15792_ACEOF
15793if ac_fn_c_try_compile "$LINENO"; then :
15794
15795$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15796
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15798$as_echo "yes" >&6; }
15799else
15800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15801$as_echo "no" >&6; }
15802
15803fi
15804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15805
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15807$as_echo_n "checking for filter... " >&6; }
15808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15809/* end confdefs.h. */
15810#include <curses.h>
15811int
15812main ()
15813{
15814
15815#ifndef filter
15816void *x=filter
15817#endif
15818
15819 ;
15820 return 0;
15821}
15822_ACEOF
15823if ac_fn_c_try_compile "$LINENO"; then :
15824
15825$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15826
15827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15828$as_echo "yes" >&6; }
15829else
15830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15831$as_echo "no" >&6; }
15832
15833fi
15834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15835
15836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15837$as_echo_n "checking for has_key... " >&6; }
15838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15839/* end confdefs.h. */
15840#include <curses.h>
15841int
15842main ()
15843{
15844
15845#ifndef has_key
15846void *x=has_key
15847#endif
15848
15849 ;
15850 return 0;
15851}
15852_ACEOF
15853if ac_fn_c_try_compile "$LINENO"; then :
15854
15855$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15856
15857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15858$as_echo "yes" >&6; }
15859else
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15861$as_echo "no" >&6; }
15862
15863fi
15864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15865
15866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15867$as_echo_n "checking for typeahead... " >&6; }
15868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15869/* end confdefs.h. */
15870#include <curses.h>
15871int
15872main ()
15873{
15874
15875#ifndef typeahead
15876void *x=typeahead
15877#endif
15878
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883if ac_fn_c_try_compile "$LINENO"; then :
15884
15885$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
15886
15887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15888$as_echo "yes" >&6; }
15889else
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15891$as_echo "no" >&6; }
15892
15893fi
15894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15895
15896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
15897$as_echo_n "checking for use_env... " >&6; }
15898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15899/* end confdefs.h. */
15900#include <curses.h>
15901int
15902main ()
15903{
15904
15905#ifndef use_env
15906void *x=use_env
15907#endif
15908
15909 ;
15910 return 0;
15911}
15912_ACEOF
15913if ac_fn_c_try_compile "$LINENO"; then :
15914
15915$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
15916
15917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15918$as_echo "yes" >&6; }
15919else
15920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921$as_echo "no" >&6; }
15922
15923fi
15924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015925# last curses configure check
15926CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15929$as_echo "$as_me: checking for device files" >&6;}
15930
15931if test "x$cross_compiling" = xyes; then
15932 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15934$as_echo_n "checking for /dev/ptmx... " >&6; }
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15936$as_echo "not set" >&6; }
15937 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15938 fi
15939 if test "${ac_cv_file__dev_ptc+set}" != set; then
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15941$as_echo_n "checking for /dev/ptc... " >&6; }
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15943$as_echo "not set" >&6; }
15944 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15945 fi
15946fi
15947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15949$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015950if ${ac_cv_file__dev_ptmx+:} false; then :
15951 $as_echo_n "(cached) " >&6
15952else
15953 test "$cross_compiling" = yes &&
15954 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15955if test -r "/dev/ptmx"; then
15956 ac_cv_file__dev_ptmx=yes
15957else
15958 ac_cv_file__dev_ptmx=no
15959fi
15960fi
15961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15962$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15963if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015964
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015965fi
15966
15967if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015968
Matthias Kloseb9621712010-04-24 17:59:49 +000015969$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015970
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15973$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015974if ${ac_cv_file__dev_ptc+:} false; then :
15975 $as_echo_n "(cached) " >&6
15976else
15977 test "$cross_compiling" = yes &&
15978 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15979if test -r "/dev/ptc"; then
15980 ac_cv_file__dev_ptc=yes
15981else
15982 ac_cv_file__dev_ptc=no
15983fi
15984fi
15985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15986$as_echo "$ac_cv_file__dev_ptc" >&6; }
15987if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015988
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015989fi
15990
15991if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015992
Matthias Kloseb9621712010-04-24 17:59:49 +000015993$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015994
Neal Norwitz865400f2003-03-21 01:42:58 +000015995fi
15996
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015997if test $ac_sys_system = Darwin
15998then
15999 LIBS="$LIBS -framework CoreFoundation"
16000fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016001
Matthias Kloseb9621712010-04-24 17:59:49 +000016002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16003$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016004if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016006else
Matthias Kloseb9621712010-04-24 17:59:49 +000016007 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016008 ac_cv_have_size_t_format="cross -- assuming yes"
16009
Thomas Wouters477c8d52006-05-27 19:21:47 +000016010else
Matthias Kloseb9621712010-04-24 17:59:49 +000016011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016012/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016013
Thomas Wouters477c8d52006-05-27 19:21:47 +000016014#include <stdio.h>
16015#include <stddef.h>
16016#include <string.h>
16017
Christian Heimes2c181612007-12-17 20:04:13 +000016018#ifdef HAVE_SYS_TYPES_H
16019#include <sys/types.h>
16020#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016021
16022#ifdef HAVE_SSIZE_T
16023typedef ssize_t Py_ssize_t;
16024#elif SIZEOF_VOID_P == SIZEOF_LONG
16025typedef long Py_ssize_t;
16026#else
16027typedef int Py_ssize_t;
16028#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016029
Christian Heimes2c181612007-12-17 20:04:13 +000016030int main()
16031{
16032 char buffer[256];
16033
Thomas Wouters477c8d52006-05-27 19:21:47 +000016034 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16035 return 1;
16036
Thomas Wouters89f507f2006-12-13 04:49:30 +000016037 if (strcmp(buffer, "123"))
16038 return 1;
16039
16040 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16041 return 1;
16042
16043 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016044 return 1;
16045
16046 return 0;
16047}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016048
Thomas Wouters477c8d52006-05-27 19:21:47 +000016049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016050if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016051 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016052else
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016057fi
16058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16061$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016062if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016063
Matthias Kloseb9621712010-04-24 17:59:49 +000016064$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016065
16066fi
16067
Matthias Kloseb9621712010-04-24 17:59:49 +000016068ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016069#ifdef HAVE_SYS_TYPES_H
16070#include <sys/types.h>
16071#endif
16072#ifdef HAVE_SYS_SOCKET_H
16073#include <sys/socket.h>
16074#endif
16075
Matthias Kloseb9621712010-04-24 17:59:49 +000016076"
Victor Stinnere0be4232011-10-25 13:06:09 +020016077if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016078
Martin v. Löwis11437992002-04-12 09:54:03 +000016079else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016080
Matthias Kloseb9621712010-04-24 17:59:49 +000016081$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016082
16083fi
16084
Michael W. Hudson54241132001-12-07 15:38:26 +000016085
Matthias Kloseb9621712010-04-24 17:59:49 +000016086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16087$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016088if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016090else
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016092 ac_cv_broken_mbstowcs=no
16093else
Matthias Kloseb9621712010-04-24 17:59:49 +000016094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016095/* end confdefs.h. */
16096
Stefan Krah19c21392012-11-22 23:47:32 +010016097#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016098#include<stdlib.h>
16099int main() {
16100 size_t len = -1;
16101 const char *str = "text";
16102 len = mbstowcs(NULL, str, 0);
16103 return (len != 4);
16104}
16105
16106_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016107if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016108 ac_cv_broken_mbstowcs=no
16109else
Matthias Kloseb9621712010-04-24 17:59:49 +000016110 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016112rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16113 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016114fi
16115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016116fi
16117
Matthias Kloseb9621712010-04-24 17:59:49 +000016118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16119$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016120if test "$ac_cv_broken_mbstowcs" = yes
16121then
16122
Matthias Kloseb9621712010-04-24 17:59:49 +000016123$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016124
16125fi
16126
Antoine Pitroub52ec782009-01-25 16:34:23 +000016127# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16129$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016130
16131# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016132if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016133 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016134if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016135then
16136
Matthias Kloseb9621712010-04-24 17:59:49 +000016137$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016138
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16140$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016141fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016142if test "$withval" = no
16143then
16144
16145$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16146
Matthias Kloseb9621712010-04-24 17:59:49 +000016147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16148$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016149fi
16150
Antoine Pitrou042b1282010-08-13 21:15:58 +000016151else
16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16153$as_echo "no value specified" >&6; }
16154fi
16155
Antoine Pitroub52ec782009-01-25 16:34:23 +000016156
Matthias Kloseb17289e2012-03-15 19:51:34 +010016157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16158$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16159if ${ac_cv_computed_gotos+:} false; then :
16160 $as_echo_n "(cached) " >&6
16161else
16162 if test "$cross_compiling" = yes; then :
16163 if test "${with_computed_gotos+set}" = set; then
16164 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16165 else
16166 ac_cv_computed_gotos=no
16167 fi
16168else
16169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16170/* end confdefs.h. */
16171
16172int main(int argc, char **argv)
16173{
16174 static void *targets[1] = { &&LABEL1 };
16175 goto LABEL2;
16176LABEL1:
16177 return 0;
16178LABEL2:
16179 goto *targets[0];
16180 return 1;
16181}
16182
16183_ACEOF
16184if ac_fn_c_try_run "$LINENO"; then :
16185 ac_cv_computed_gotos=yes
16186else
16187 ac_cv_computed_gotos=no
16188fi
16189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16190 conftest.$ac_objext conftest.beam conftest.$ac_ext
16191fi
16192
16193fi
16194
16195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16196$as_echo "$ac_cv_computed_gotos" >&6; }
16197case "$ac_cv_computed_gotos" in yes*)
16198
16199$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16200
16201esac
16202
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016203case $ac_sys_system in
16204AIX*)
16205
16206$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16207 ;;
16208esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016209
Michael W. Hudson54241132001-12-07 15:38:26 +000016210
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016211
16212
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016213for h in `(cd $srcdir;echo Python/thread_*.h)`
16214do
16215 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16216done
16217
Michael W. Hudson54241132001-12-07 15:38:26 +000016218
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016219SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16221$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016222for dir in $SRCDIRS; do
16223 if test ! -d $dir; then
16224 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016225 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016226done
Matthias Kloseb9621712010-04-24 17:59:49 +000016227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16228$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016229
Stefan Krah1919b7e2012-03-21 18:25:23 +010016230# Availability of -O2:
16231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16232$as_echo_n "checking for -O2... " >&6; }
16233saved_cflags="$CFLAGS"
16234CFLAGS="-O2"
16235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16236/* end confdefs.h. */
16237
16238int
16239main ()
16240{
16241
16242
16243 ;
16244 return 0;
16245}
16246_ACEOF
16247if ac_fn_c_try_compile "$LINENO"; then :
16248 have_O2=yes
16249else
16250 have_O2=no
16251fi
16252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16254$as_echo "$have_O2" >&6; }
16255CFLAGS="$saved_cflags"
16256
16257# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16258# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16260$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16261saved_cflags="$CFLAGS"
16262CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16263if test "$have_O2" = no; then
16264 CFLAGS=""
16265fi
16266if test "$cross_compiling" = yes; then :
16267 have_glibc_memmove_bug=undefined
16268else
16269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270/* end confdefs.h. */
16271
16272#include <stdio.h>
16273#include <stdlib.h>
16274#include <string.h>
16275void foo(void *p, void *q) { memmove(p, q, 19); }
16276int main() {
16277 char a[32] = "123456789000000000";
16278 foo(&a[9], a);
16279 if (strcmp(a, "123456789123456789000000000") != 0)
16280 return 1;
16281 foo(a, &a[9]);
16282 if (strcmp(a, "123456789000000000") != 0)
16283 return 1;
16284 return 0;
16285}
16286
16287_ACEOF
16288if ac_fn_c_try_run "$LINENO"; then :
16289 have_glibc_memmove_bug=no
16290else
16291 have_glibc_memmove_bug=yes
16292fi
16293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16294 conftest.$ac_objext conftest.beam conftest.$ac_ext
16295fi
16296
16297CFLAGS="$saved_cflags"
16298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16299$as_echo "$have_glibc_memmove_bug" >&6; }
16300if test "$have_glibc_memmove_bug" = yes; then
16301
16302$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16303
16304fi
16305
16306if test "$have_gcc_asm_for_x87" = yes; then
16307 # Some versions of gcc miscompile inline asm:
16308 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16309 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16310 case $CC in
16311 *gcc*)
16312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16313$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16314 saved_cflags="$CFLAGS"
16315 CFLAGS="-O2"
16316 if test "$cross_compiling" = yes; then :
16317 have_ipa_pure_const_bug=undefined
16318else
16319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16320/* end confdefs.h. */
16321
16322 __attribute__((noinline)) int
16323 foo(int *p) {
16324 int r;
16325 asm ( "movl \$6, (%1)\n\t"
16326 "xorl %0, %0\n\t"
16327 : "=r" (r) : "r" (p) : "memory"
16328 );
16329 return r;
16330 }
16331 int main() {
16332 int p = 8;
16333 if ((foo(&p) ? : p) != 6)
16334 return 1;
16335 return 0;
16336 }
16337
16338_ACEOF
16339if ac_fn_c_try_run "$LINENO"; then :
16340 have_ipa_pure_const_bug=no
16341else
16342 have_ipa_pure_const_bug=yes
16343fi
16344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16345 conftest.$ac_objext conftest.beam conftest.$ac_ext
16346fi
16347
16348 CFLAGS="$saved_cflags"
16349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16350$as_echo "$have_ipa_pure_const_bug" >&6; }
16351 if test "$have_ipa_pure_const_bug" = yes; then
16352
16353$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16354
16355 fi
16356 ;;
16357 esac
16358fi
16359
Victor Stinner4f5366e2015-01-09 02:13:19 +010016360# Check for stdatomic.h
16361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16362$as_echo_n "checking for stdatomic.h... " >&6; }
16363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16364/* end confdefs.h. */
16365
16366
16367 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016368 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016369 int main() {
16370 int loaded_value = atomic_load(&value);
16371 return 0;
16372 }
16373
16374
16375_ACEOF
16376if ac_fn_c_try_link "$LINENO"; then :
16377 have_stdatomic_h=yes
16378else
16379 have_stdatomic_h=no
16380fi
16381rm -f core conftest.err conftest.$ac_objext \
16382 conftest$ac_exeext conftest.$ac_ext
16383
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16385$as_echo "$have_stdatomic_h" >&6; }
16386
16387if test "$have_stdatomic_h" = yes; then
16388
16389$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16390
16391fi
16392
16393# Check for GCC >= 4.7 __atomic builtins
16394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16395$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16396cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16397/* end confdefs.h. */
16398
16399
16400 volatile int val = 1;
16401 int main() {
16402 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16403 return 0;
16404 }
16405
16406
16407_ACEOF
16408if ac_fn_c_try_link "$LINENO"; then :
16409 have_builtin_atomic=yes
16410else
16411 have_builtin_atomic=no
16412fi
16413rm -f core conftest.err conftest.$ac_objext \
16414 conftest$ac_exeext conftest.$ac_ext
16415
16416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16417$as_echo "$have_builtin_atomic" >&6; }
16418
16419if test "$have_builtin_atomic" = yes; then
16420
16421$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16422
16423fi
16424
Ned Deily322f5ba2013-11-21 23:01:59 -080016425# ensurepip option
16426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16427$as_echo_n "checking for ensurepip... " >&6; }
16428
16429# Check whether --with-ensurepip was given.
16430if test "${with_ensurepip+set}" = set; then :
16431 withval=$with_ensurepip;
16432else
16433 with_ensurepip=upgrade
16434fi
16435
16436case $with_ensurepip in #(
16437 yes|upgrade) :
16438 ENSUREPIP=upgrade ;; #(
16439 install) :
16440 ENSUREPIP=install ;; #(
16441 no) :
16442 ENSUREPIP=no ;; #(
16443 *) :
16444 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16445esac
16446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16447$as_echo "$ENSUREPIP" >&6; }
16448
16449
Victor Stinner35a97c02015-03-08 02:59:09 +010016450# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16452$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16454/* end confdefs.h. */
16455
16456
16457 #include <dirent.h>
16458
16459 int main() {
16460 struct dirent entry;
16461 return entry.d_type == DT_UNKNOWN;
16462 }
16463
16464
16465_ACEOF
16466if ac_fn_c_try_link "$LINENO"; then :
16467 have_dirent_d_type=yes
16468else
16469 have_dirent_d_type=no
16470fi
16471rm -f core conftest.err conftest.$ac_objext \
16472 conftest$ac_exeext conftest.$ac_ext
16473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16474$as_echo "$have_dirent_d_type" >&6; }
16475
16476if test "$have_dirent_d_type" = yes; then
16477
16478$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16479
16480fi
16481
Victor Stinner9eb57c52015-03-19 22:21:49 +010016482# check if the Linux getrandom() syscall is available
16483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16484$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486/* end confdefs.h. */
16487
16488
Victor Stinner1b80b242016-04-12 22:34:58 +020016489 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016490 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016491 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016492
16493 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016494 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016495 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016496 const int flags = GRND_NONBLOCK;
16497 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016498 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016499 return 0;
16500 }
16501
16502
16503_ACEOF
16504if ac_fn_c_try_link "$LINENO"; then :
16505 have_getrandom_syscall=yes
16506else
16507 have_getrandom_syscall=no
16508fi
16509rm -f core conftest.err conftest.$ac_objext \
16510 conftest$ac_exeext conftest.$ac_ext
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16512$as_echo "$have_getrandom_syscall" >&6; }
16513
16514if test "$have_getrandom_syscall" = yes; then
16515
16516$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16517
16518fi
16519
Victor Stinner3abf44e2015-09-18 15:38:37 +020016520# check if the getrandom() function is available
16521# the test was written for the Solaris function of <sys/random.h>
16522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16523$as_echo_n "checking for the getrandom() function... " >&6; }
16524cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16525/* end confdefs.h. */
16526
16527
16528 #include <sys/random.h>
16529
16530 int main() {
16531 char buffer[1];
16532 const size_t buflen = sizeof(buffer);
16533 const int flags = 0;
16534 /* ignore the result, Python checks for ENOSYS at runtime */
16535 (void)getrandom(buffer, buflen, flags);
16536 return 0;
16537 }
16538
16539
16540_ACEOF
16541if ac_fn_c_try_link "$LINENO"; then :
16542 have_getrandom=yes
16543else
16544 have_getrandom=no
16545fi
16546rm -f core conftest.err conftest.$ac_objext \
16547 conftest$ac_exeext conftest.$ac_ext
16548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16549$as_echo "$have_getrandom" >&6; }
16550
16551if test "$have_getrandom" = yes; then
16552
16553$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16554
16555fi
16556
Christian Heimesff5be6e2018-01-20 13:19:21 +010016557# Check for usable OpenSSL
16558
16559 found=false
16560
16561# Check whether --with-openssl was given.
16562if test "${with_openssl+set}" = set; then :
16563 withval=$with_openssl;
16564 case "$withval" in
16565 "" | y | ye | yes | n | no)
16566 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16567 ;;
16568 *) ssldirs="$withval"
16569 ;;
16570 esac
16571
16572else
16573
16574 # if pkg-config is installed and openssl has installed a .pc file,
16575 # then use that information and don't search ssldirs
16576 if test -n "$ac_tool_prefix"; then
16577 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16578set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16580$as_echo_n "checking for $ac_word... " >&6; }
16581if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16582 $as_echo_n "(cached) " >&6
16583else
16584 if test -n "$PKG_CONFIG"; then
16585 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16586else
16587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16588for as_dir in $PATH
16589do
16590 IFS=$as_save_IFS
16591 test -z "$as_dir" && as_dir=.
16592 for ac_exec_ext in '' $ac_executable_extensions; do
16593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16594 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16596 break 2
16597 fi
16598done
16599 done
16600IFS=$as_save_IFS
16601
16602fi
16603fi
16604PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16605if test -n "$PKG_CONFIG"; then
16606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16607$as_echo "$PKG_CONFIG" >&6; }
16608else
16609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16610$as_echo "no" >&6; }
16611fi
16612
16613
16614fi
16615if test -z "$ac_cv_prog_PKG_CONFIG"; then
16616 ac_ct_PKG_CONFIG=$PKG_CONFIG
16617 # Extract the first word of "pkg-config", so it can be a program name with args.
16618set dummy pkg-config; ac_word=$2
16619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16620$as_echo_n "checking for $ac_word... " >&6; }
16621if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16622 $as_echo_n "(cached) " >&6
16623else
16624 if test -n "$ac_ct_PKG_CONFIG"; then
16625 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16626else
16627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16628for as_dir in $PATH
16629do
16630 IFS=$as_save_IFS
16631 test -z "$as_dir" && as_dir=.
16632 for ac_exec_ext in '' $ac_executable_extensions; do
16633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16634 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16636 break 2
16637 fi
16638done
16639 done
16640IFS=$as_save_IFS
16641
16642fi
16643fi
16644ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16645if test -n "$ac_ct_PKG_CONFIG"; then
16646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16647$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16648else
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16650$as_echo "no" >&6; }
16651fi
16652
16653 if test "x$ac_ct_PKG_CONFIG" = x; then
16654 PKG_CONFIG=""
16655 else
16656 case $cross_compiling:$ac_tool_warned in
16657yes:)
16658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16660ac_tool_warned=yes ;;
16661esac
16662 PKG_CONFIG=$ac_ct_PKG_CONFIG
16663 fi
16664else
16665 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16666fi
16667
16668 if test x"$PKG_CONFIG" != x""; then
16669 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16670 if test $? = 0; then
16671 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16672 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16673 found=true
16674 fi
16675 fi
16676
16677 # no such luck; use some default ssldirs
16678 if ! $found; then
16679 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16680 fi
16681
16682
16683fi
16684
16685
16686
16687 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16688 # an 'openssl' subdirectory
16689
16690 if ! $found; then
16691 OPENSSL_INCLUDES=
16692 for ssldir in $ssldirs; do
16693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16694$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16695 if test -f "$ssldir/include/openssl/ssl.h"; then
16696 OPENSSL_INCLUDES="-I$ssldir/include"
16697 OPENSSL_LDFLAGS="-L$ssldir/lib"
16698 OPENSSL_LIBS="-lssl -lcrypto"
16699 found=true
16700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16701$as_echo "yes" >&6; }
16702 break
16703 else
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16705$as_echo "no" >&6; }
16706 fi
16707 done
16708
16709 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16710 # it will just work!
16711 fi
16712
16713 # try the preprocessor and linker with our new flags,
16714 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16715
16716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16717$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16718 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16719 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16720
16721 save_LIBS="$LIBS"
16722 save_LDFLAGS="$LDFLAGS"
16723 save_CPPFLAGS="$CPPFLAGS"
16724 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16725 LIBS="$OPENSSL_LIBS $LIBS"
16726 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16728/* end confdefs.h. */
16729#include <openssl/ssl.h>
16730int
16731main ()
16732{
16733SSL_new(NULL)
16734 ;
16735 return 0;
16736}
16737_ACEOF
16738if ac_fn_c_try_link "$LINENO"; then :
16739
16740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16741$as_echo "yes" >&6; }
16742 have_openssl=yes
16743
16744else
16745
16746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16747$as_echo "no" >&6; }
16748 have_openssl=no
16749
16750fi
16751rm -f core conftest.err conftest.$ac_objext \
16752 conftest$ac_exeext conftest.$ac_ext
16753 CPPFLAGS="$save_CPPFLAGS"
16754 LDFLAGS="$save_LDFLAGS"
16755 LIBS="$save_LIBS"
16756
16757
16758
16759
16760
16761
16762if test "$have_openssl" = yes; then
16763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16764$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16765
16766 save_LIBS="$LIBS"
16767 save_LDFLAGS="$LDFLAGS"
16768 save_CPPFLAGS="$CPPFLAGS"
16769 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16770 LIBS="$OPENSSL_LIBS $LIBS"
16771 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16772
16773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16774/* end confdefs.h. */
16775
16776 #include <openssl/x509_vfy.h>
16777
16778int
16779main ()
16780{
16781
16782 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16783 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16784 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16785 X509_VERIFY_PARAM_set_hostflags(p, 0);
16786
16787 ;
16788 return 0;
16789}
16790
16791_ACEOF
16792if ac_fn_c_try_link "$LINENO"; then :
16793
16794 ac_cv_has_x509_verify_param_set1_host=yes
16795
16796else
16797
16798 ac_cv_has_x509_verify_param_set1_host=no
16799
16800fi
16801rm -f core conftest.err conftest.$ac_objext \
16802 conftest$ac_exeext conftest.$ac_ext
16803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16804$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16805 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16806
16807$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16808
16809 fi
16810
16811 CPPFLAGS="$save_CPPFLAGS"
16812 LDFLAGS="$save_LDFLAGS"
16813 LIBS="$save_LIBS"
16814fi
16815
Christian Heimes892d66e2018-01-29 14:10:18 +010016816# ssl module default cipher suite string
16817
16818
16819
16820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16821$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16822
16823# Check whether --with-ssl-default-suites was given.
16824if test "${with_ssl_default_suites+set}" = set; then :
16825 withval=$with_ssl_default_suites;
16826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16827$as_echo "$withval" >&6; }
16828case "$withval" in
16829 python)
16830 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16831
16832 ;;
16833 openssl)
16834 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16835
16836 ;;
16837 *)
16838 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16839
16840 cat >>confdefs.h <<_ACEOF
16841#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16842_ACEOF
16843
16844 ;;
16845esac
16846
16847else
16848
16849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16850$as_echo "python" >&6; }
16851$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16852
16853
16854fi
16855
16856
16857
Guido van Rossum627b2d71993-12-24 10:39:16 +000016858# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016859ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016860
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016861ac_config_files="$ac_config_files Modules/ld_so_aix"
16862
Martin v. Löwis11437992002-04-12 09:54:03 +000016863cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016864# This file is a shell script that caches the results of configure
16865# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016866# scripts and configure runs, see configure's option --config-cache.
16867# It is not useful on other systems. If it contains results you don't
16868# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016869#
Martin v. Löwis11437992002-04-12 09:54:03 +000016870# config.status only pays attention to the cache file if you give it
16871# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016872#
Skip Montanaro6dead952003-09-25 14:50:04 +000016873# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016874# loading this file, other *unset* `ac_cv_foo' will be assigned the
16875# following values.
16876
16877_ACEOF
16878
Guido van Rossumf78abae1997-01-21 22:02:36 +000016879# The following way of writing the cache mishandles newlines in values,
16880# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016881# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016882# Ultrix sh set writes to stderr and can't be redirected directly,
16883# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884(
16885 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16886 eval ac_val=\$$ac_var
16887 case $ac_val in #(
16888 *${as_nl}*)
16889 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016890 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16891$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892 esac
16893 case $ac_var in #(
16894 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016895 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16896 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016897 esac ;;
16898 esac
16899 done
16900
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16903 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016904 # `set' does not quote correctly, so add quotes: double-quote
16905 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016907 "s/'/'\\\\''/g;
16908 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016909 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016910 *)
16911 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016912 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016913 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016914 esac |
16915 sort
16916) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016918 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16922 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016923 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16924 :end' >>confcache
16925if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16926 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016927 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016928 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16929$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016930 if test ! -f "$cache_file" || test -h "$cache_file"; then
16931 cat confcache >"$cache_file"
16932 else
16933 case $cache_file in #(
16934 */* | ?:*)
16935 mv -f confcache "$cache_file"$$ &&
16936 mv -f "$cache_file"$$ "$cache_file" ;; #(
16937 *)
16938 mv -f confcache "$cache_file" ;;
16939 esac
16940 fi
16941 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016942 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016943 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16944$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016945 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016946fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016947rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016948
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016949test "x$prefix" = xNONE && prefix=$ac_default_prefix
16950# Let make expand exec_prefix.
16951test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016952
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016953DEFS=-DHAVE_CONFIG_H
16954
Skip Montanaro6dead952003-09-25 14:50:04 +000016955ac_libobjs=
16956ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016957U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016958for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16959 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016960 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016961 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16963 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016964 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16965 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016966done
16967LIBOBJS=$ac_libobjs
16968
16969LTLIBOBJS=$ac_ltlibobjs
16970
16971
Martin v. Löwis11437992002-04-12 09:54:03 +000016972
Matthias Kloseb9621712010-04-24 17:59:49 +000016973
Victor Stinnere0be4232011-10-25 13:06:09 +020016974: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016975ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016976ac_clean_files_save=$ac_clean_files
16977ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016978{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16979$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16980as_write_fail=0
16981cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016982#! $SHELL
16983# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016984# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016985# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016986# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016987
Martin v. Löwis11437992002-04-12 09:54:03 +000016988debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016989ac_cs_recheck=false
16990ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016991
Matthias Kloseb9621712010-04-24 17:59:49 +000016992SHELL=\${CONFIG_SHELL-$SHELL}
16993export SHELL
16994_ASEOF
16995cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16996## -------------------- ##
16997## M4sh Initialization. ##
16998## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000# Be more Bourne compatible
17001DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017002if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 emulate sh
17004 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017006 # is contrary to our usage. Disable this feature.
17007 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017009else
Matthias Kloseb9621712010-04-24 17:59:49 +000017010 case `(set -o) 2>/dev/null` in #(
17011 *posix*) :
17012 set -o posix ;; #(
17013 *) :
17014 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017016fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017017
17018
Matthias Kloseb9621712010-04-24 17:59:49 +000017019as_nl='
17020'
17021export as_nl
17022# Printing a long string crashes Solaris 7 /usr/bin/printf.
17023as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17024as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17025as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17026# Prefer a ksh shell builtin over an external printf program on Solaris,
17027# but without wasting forks for bash or zsh.
17028if test -z "$BASH_VERSION$ZSH_VERSION" \
17029 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17030 as_echo='print -r --'
17031 as_echo_n='print -rn --'
17032elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17033 as_echo='printf %s\n'
17034 as_echo_n='printf %s'
17035else
17036 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17037 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17038 as_echo_n='/usr/ucb/echo -n'
17039 else
17040 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17041 as_echo_n_body='eval
17042 arg=$1;
17043 case $arg in #(
17044 *"$as_nl"*)
17045 expr "X$arg" : "X\\(.*\\)$as_nl";
17046 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17047 esac;
17048 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17049 '
17050 export as_echo_n_body
17051 as_echo_n='sh -c $as_echo_n_body as_echo'
17052 fi
17053 export as_echo_body
17054 as_echo='sh -c $as_echo_body as_echo'
17055fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017056
17057# The user is always right.
17058if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017059 PATH_SEPARATOR=:
17060 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17061 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17062 PATH_SEPARATOR=';'
17063 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017065
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066
17067# IFS
17068# We need space, tab and new line, in precisely that order. Quoting is
17069# there to prevent editors from complaining about space-tab.
17070# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17071# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072IFS=" "" $as_nl"
17073
17074# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017075as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017076case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 *[\\/]* ) as_myself=$0 ;;
17078 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017079for as_dir in $PATH
17080do
17081 IFS=$as_save_IFS
17082 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17084 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017087 ;;
17088esac
17089# We did not find ourselves, most probably we were run as `sh COMMAND'
17090# in which case we are not to be found in the path.
17091if test "x$as_myself" = x; then
17092 as_myself=$0
17093fi
17094if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017095 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17096 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017097fi
17098
Matthias Kloseb9621712010-04-24 17:59:49 +000017099# Unset variables that we do not need and which cause bugs (e.g. in
17100# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17101# suppresses any "Segmentation fault" message there. '((' could
17102# trigger a bug in pdksh 5.2.14.
17103for as_var in BASH_ENV ENV MAIL MAILPATH
17104do eval test x\${$as_var+set} = xset \
17105 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017106done
17107PS1='$ '
17108PS2='> '
17109PS4='+ '
17110
17111# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017112LC_ALL=C
17113export LC_ALL
17114LANGUAGE=C
17115export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116
Matthias Kloseb9621712010-04-24 17:59:49 +000017117# CDPATH.
17118(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17119
17120
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017121# as_fn_error STATUS ERROR [LINENO LOG_FD]
17122# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017123# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17124# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017125# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017126as_fn_error ()
17127{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017128 as_status=$1; test $as_status -eq 0 && as_status=1
17129 if test "$4"; then
17130 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17131 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017132 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017133 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017134 as_fn_exit $as_status
17135} # as_fn_error
17136
17137
17138# as_fn_set_status STATUS
17139# -----------------------
17140# Set $? to STATUS, without forking.
17141as_fn_set_status ()
17142{
17143 return $1
17144} # as_fn_set_status
17145
17146# as_fn_exit STATUS
17147# -----------------
17148# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17149as_fn_exit ()
17150{
17151 set +e
17152 as_fn_set_status $1
17153 exit $1
17154} # as_fn_exit
17155
17156# as_fn_unset VAR
17157# ---------------
17158# Portably unset VAR.
17159as_fn_unset ()
17160{
17161 { eval $1=; unset $1;}
17162}
17163as_unset=as_fn_unset
17164# as_fn_append VAR VALUE
17165# ----------------------
17166# Append the text in VALUE to the end of the definition contained in VAR. Take
17167# advantage of any shell optimizations that allow amortized linear growth over
17168# repeated appends, instead of the typical quadratic growth present in naive
17169# implementations.
17170if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17171 eval 'as_fn_append ()
17172 {
17173 eval $1+=\$2
17174 }'
17175else
17176 as_fn_append ()
17177 {
17178 eval $1=\$$1\$2
17179 }
17180fi # as_fn_append
17181
17182# as_fn_arith ARG...
17183# ------------------
17184# Perform arithmetic evaluation on the ARGs, and store the result in the
17185# global $as_val. Take advantage of shells that can avoid forks. The arguments
17186# must be portable across $(()) and expr.
17187if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17188 eval 'as_fn_arith ()
17189 {
17190 as_val=$(( $* ))
17191 }'
17192else
17193 as_fn_arith ()
17194 {
17195 as_val=`expr "$@" || test $? -eq 1`
17196 }
17197fi # as_fn_arith
17198
17199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200if expr a : '\(a\)' >/dev/null 2>&1 &&
17201 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17202 as_expr=expr
17203else
17204 as_expr=false
17205fi
17206
17207if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17208 as_basename=basename
17209else
17210 as_basename=false
17211fi
17212
Matthias Kloseb9621712010-04-24 17:59:49 +000017213if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17214 as_dirname=dirname
17215else
17216 as_dirname=false
17217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017219as_me=`$as_basename -- "$0" ||
17220$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17221 X"$0" : 'X\(//\)$' \| \
17222 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017223$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224 sed '/^.*\/\([^/][^/]*\)\/*$/{
17225 s//\1/
17226 q
17227 }
17228 /^X\/\(\/\/\)$/{
17229 s//\1/
17230 q
17231 }
17232 /^X\/\(\/\).*/{
17233 s//\1/
17234 q
17235 }
17236 s/.*/./; q'`
17237
Matthias Kloseb9621712010-04-24 17:59:49 +000017238# Avoid depending upon Character Ranges.
17239as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17240as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17241as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17242as_cr_digits='0123456789'
17243as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244
17245ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017246case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017247-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017248 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017250 xy) ECHO_C='\c';;
17251 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17252 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017253 esac;;
17254*)
17255 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017256esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017257
Martin v. Löwis11437992002-04-12 09:54:03 +000017258rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259if test -d conf$$.dir; then
17260 rm -f conf$$.dir/conf$$.file
17261else
17262 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017263 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017265if (echo >conf$$.file) 2>/dev/null; then
17266 if ln -s conf$$.file conf$$ 2>/dev/null; then
17267 as_ln_s='ln -s'
17268 # ... but there are two gotchas:
17269 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17270 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017271 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017273 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017274 elif ln conf$$.file conf$$ 2>/dev/null; then
17275 as_ln_s=ln
17276 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017277 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017278 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017279else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017280 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017282rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17283rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017284
Matthias Kloseb9621712010-04-24 17:59:49 +000017285
17286# as_fn_mkdir_p
17287# -------------
17288# Create "$as_dir" as a directory, including parents if necessary.
17289as_fn_mkdir_p ()
17290{
17291
17292 case $as_dir in #(
17293 -*) as_dir=./$as_dir;;
17294 esac
17295 test -d "$as_dir" || eval $as_mkdir_p || {
17296 as_dirs=
17297 while :; do
17298 case $as_dir in #(
17299 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17300 *) as_qdir=$as_dir;;
17301 esac
17302 as_dirs="'$as_qdir' $as_dirs"
17303 as_dir=`$as_dirname -- "$as_dir" ||
17304$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17305 X"$as_dir" : 'X\(//\)[^/]' \| \
17306 X"$as_dir" : 'X\(//\)$' \| \
17307 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17308$as_echo X"$as_dir" |
17309 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17310 s//\1/
17311 q
17312 }
17313 /^X\(\/\/\)[^/].*/{
17314 s//\1/
17315 q
17316 }
17317 /^X\(\/\/\)$/{
17318 s//\1/
17319 q
17320 }
17321 /^X\(\/\).*/{
17322 s//\1/
17323 q
17324 }
17325 s/.*/./; q'`
17326 test -d "$as_dir" && break
17327 done
17328 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017329 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017330
17331
17332} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017333if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017335else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017336 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017337 as_mkdir_p=false
17338fi
17339
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017340
17341# as_fn_executable_p FILE
17342# -----------------------
17343# Test if FILE is an executable regular file.
17344as_fn_executable_p ()
17345{
17346 test -f "$1" && test -x "$1"
17347} # as_fn_executable_p
17348as_test_x='test -x'
17349as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017350
17351# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017352as_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 +000017353
17354# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017355as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017356
17357
Martin v. Löwis11437992002-04-12 09:54:03 +000017358exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017359## ----------------------------------- ##
17360## Main body of $CONFIG_STATUS script. ##
17361## ----------------------------------- ##
17362_ASEOF
17363test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017364
Matthias Kloseb9621712010-04-24 17:59:49 +000017365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17366# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017367# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368# values after options handling.
17369ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017370This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017371generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017372
17373 CONFIG_FILES = $CONFIG_FILES
17374 CONFIG_HEADERS = $CONFIG_HEADERS
17375 CONFIG_LINKS = $CONFIG_LINKS
17376 CONFIG_COMMANDS = $CONFIG_COMMANDS
17377 $ $0 $@
17378
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379on `(hostname || uname -n) 2>/dev/null | sed 1q`
17380"
17381
Martin v. Löwis11437992002-04-12 09:54:03 +000017382_ACEOF
17383
Matthias Kloseb9621712010-04-24 17:59:49 +000017384case $ac_config_files in *"
17385"*) set x $ac_config_files; shift; ac_config_files=$*;;
17386esac
17387
17388case $ac_config_headers in *"
17389"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17390esac
17391
17392
17393cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017394# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017395config_files="$ac_config_files"
17396config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017398_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017399
Matthias Kloseb9621712010-04-24 17:59:49 +000017400cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017401ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017402\`$as_me' instantiates files and other configuration actions
17403from templates according to the current configuration. Unless the files
17404and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017405
Matthias Kloseb9621712010-04-24 17:59:49 +000017406Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017407
17408 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017410 --config print configuration, then exit
17411 -q, --quiet, --silent
17412 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017413 -d, --debug don't remove temporary files
17414 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017415 --file=FILE[:TEMPLATE]
17416 instantiate the configuration file FILE
17417 --header=FILE[:TEMPLATE]
17418 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017419
17420Configuration files:
17421$config_files
17422
17423Configuration headers:
17424$config_headers
17425
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017426Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017429cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17430ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017431ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017432python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017433configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017434 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017435
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017436Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017437This config.status script is free software; the Free Software Foundation
17438gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439
17440ac_pwd='$ac_pwd'
17441srcdir='$srcdir'
17442INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017443MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017444test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017445_ACEOF
17446
Matthias Kloseb9621712010-04-24 17:59:49 +000017447cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17448# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017449ac_need_defaults=:
17450while test $# != 0
17451do
17452 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017453 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017454 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17455 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017456 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017457 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017458 --*=)
17459 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17460 ac_optarg=
17461 ac_shift=:
17462 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017464 ac_option=$1
17465 ac_optarg=$2
17466 ac_shift=shift
17467 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 esac
17469
Skip Montanaro6dead952003-09-25 14:50:04 +000017470 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017471 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017472 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17473 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017475 $as_echo "$ac_cs_version"; exit ;;
17476 --config | --confi | --conf | --con | --co | --c )
17477 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 debug=: ;;
17480 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017481 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017482 case $ac_optarg in
17483 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017484 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017485 esac
17486 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017487 ac_need_defaults=false;;
17488 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017489 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 case $ac_optarg in
17491 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17492 esac
17493 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495 --he | --h)
17496 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017497 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017498Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017499 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017501 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17502 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17503 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017504
17505 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017506 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017507Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017508
Matthias Kloseb9621712010-04-24 17:59:49 +000017509 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017511
17512 esac
17513 shift
17514done
17515
Skip Montanaro6dead952003-09-25 14:50:04 +000017516ac_configure_extra_args=
17517
17518if $ac_cs_silent; then
17519 exec 6>/dev/null
17520 ac_configure_extra_args="$ac_configure_extra_args --silent"
17521fi
17522
17523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017525if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017526 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 shift
17528 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17529 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017531 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017532fi
17533
Martin v. Löwis11437992002-04-12 09:54:03 +000017534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017535cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536exec 5>>config.log
17537{
17538 echo
17539 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17540## Running $as_me. ##
17541_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017542 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017543} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017544
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017548
Matthias Kloseb9621712010-04-24 17:59:49 +000017549cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550
17551# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017552for ac_config_target in $ac_config_targets
17553do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554 case $ac_config_target in
17555 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17556 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17557 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017558 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17559 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017561 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017562 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017563 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564
Victor Stinnere0be4232011-10-25 13:06:09 +020017565 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 esac
17567done
17568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570# If the user did not use the arguments to specify the items to instantiate,
17571# then the envvar interface is used. Set only those that are not.
17572# We use the long form for the default assignment because of an extremely
17573# bizarre bug on SunOS 4.1.3.
17574if $ac_need_defaults; then
17575 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17576 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17577fi
17578
Skip Montanaro6dead952003-09-25 14:50:04 +000017579# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017580# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017581# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582# Hook for its removal unless debugging.
17583# Note that there is a small window in which the directory will not be cleaned:
17584# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017585$debug ||
17586{
Victor Stinnere0be4232011-10-25 13:06:09 +020017587 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017589 : "${ac_tmp:=$tmp}"
17590 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017591' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017592 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017593}
Martin v. Löwis11437992002-04-12 09:54:03 +000017594# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017595
Martin v. Löwis11437992002-04-12 09:54:03 +000017596{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017598 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017599} ||
17600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017601 tmp=./conf$$-$RANDOM
17602 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017603} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017604ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017605
Matthias Kloseb9621712010-04-24 17:59:49 +000017606# Set up the scripts for CONFIG_FILES section.
17607# No need to generate them if there are no CONFIG_FILES.
17608# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017609if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017610
Matthias Kloseb9621712010-04-24 17:59:49 +000017611
17612ac_cr=`echo X | tr X '\015'`
17613# On cygwin, bash can eat \r inside `` if the user requested igncr.
17614# But we know of no other shell where ac_cr would be empty at this
17615# point, so we can use a bashism as a fallback.
17616if test "x$ac_cr" = x; then
17617 eval ac_cr=\$\'\\r\'
17618fi
17619ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17620if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017621 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017622else
17623 ac_cs_awk_cr=$ac_cr
17624fi
17625
Victor Stinnere0be4232011-10-25 13:06:09 +020017626echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017627_ACEOF
17628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629
Matthias Kloseb9621712010-04-24 17:59:49 +000017630{
17631 echo "cat >conf$$subs.awk <<_ACEOF" &&
17632 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17633 echo "_ACEOF"
17634} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017635 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17636ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637ac_delim='%!_!# '
17638for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017639 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017640 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017641
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17643 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644 break
17645 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017646 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017647 else
17648 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650done
Matthias Kloseb9621712010-04-24 17:59:49 +000017651rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652
Matthias Kloseb9621712010-04-24 17:59:49 +000017653cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017654cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017656sed -n '
17657h
17658s/^/S["/; s/!.*/"]=/
17659p
17660g
17661s/^[^!]*!//
17662:repl
17663t repl
17664s/'"$ac_delim"'$//
17665t delim
17666:nl
17667h
17668s/\(.\{148\}\)..*/\1/
17669t more1
17670s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17671p
17672n
17673b repl
17674:more1
17675s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17676p
17677g
17678s/.\{148\}//
17679t nl
17680:delim
17681h
17682s/\(.\{148\}\)..*/\1/
17683t more2
17684s/["\\]/\\&/g; s/^/"/; s/$/"/
17685p
17686b
17687:more2
17688s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17689p
17690g
17691s/.\{148\}//
17692t delim
17693' <conf$$subs.awk | sed '
17694/^[^""]/{
17695 N
17696 s/\n//
17697}
17698' >>$CONFIG_STATUS || ac_write_fail=1
17699rm -f conf$$subs.awk
17700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17701_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017702cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017703 for (key in S) S_is_set[key] = 1
17704 FS = ""
17705
17706}
17707{
17708 line = $ 0
17709 nfields = split(line, field, "@")
17710 substed = 0
17711 len = length(field[1])
17712 for (i = 2; i < nfields; i++) {
17713 key = field[i]
17714 keylen = length(key)
17715 if (S_is_set[key]) {
17716 value = S[key]
17717 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17718 len += length(value) + length(field[++i])
17719 substed = 1
17720 } else
17721 len += 1 + keylen
17722 }
17723
17724 print line
17725}
17726
17727_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017729cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17730if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17731 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17732else
17733 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017734fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017735 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017736_ACEOF
17737
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017738# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17739# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740# trailing colons and then remove the whole line if VPATH becomes empty
17741# (actually we leave an empty line to preserve line numbers).
17742if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017743 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17744h
17745s///
17746s/^/:/
17747s/[ ]*$/:/
17748s/:\$(srcdir):/:/g
17749s/:\${srcdir}:/:/g
17750s/:@srcdir@:/:/g
17751s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017753x
17754s/\(=[ ]*\).*/\1/
17755G
17756s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017757s/^[^=]*=[ ]*$//
17758}'
17759fi
17760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017762fi # test -n "$CONFIG_FILES"
17763
Matthias Kloseb9621712010-04-24 17:59:49 +000017764# Set up the scripts for CONFIG_HEADERS section.
17765# No need to generate them if there are no CONFIG_HEADERS.
17766# This happens for instance with `./config.status Makefile'.
17767if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017768cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017769BEGIN {
17770_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771
Matthias Kloseb9621712010-04-24 17:59:49 +000017772# Transform confdefs.h into an awk script `defines.awk', embedded as
17773# here-document in config.status, that substitutes the proper values into
17774# config.h.in to produce config.h.
17775
17776# Create a delimiter string that does not exist in confdefs.h, to ease
17777# handling of long lines.
17778ac_delim='%!_!# '
17779for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017780 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17781 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017782 break
17783 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017784 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017785 else
17786 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17787 fi
17788done
17789
17790# For the awk script, D is an array of macro values keyed by name,
17791# likewise P contains macro parameters if any. Preserve backslash
17792# newline sequences.
17793
17794ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17795sed -n '
17796s/.\{148\}/&'"$ac_delim"'/g
17797t rset
17798:rset
17799s/^[ ]*#[ ]*define[ ][ ]*/ /
17800t def
17801d
17802:def
17803s/\\$//
17804t bsnl
17805s/["\\]/\\&/g
17806s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17807D["\1"]=" \3"/p
17808s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17809d
17810:bsnl
17811s/["\\]/\\&/g
17812s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17813D["\1"]=" \3\\\\\\n"\\/p
17814t cont
17815s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17816t cont
17817d
17818:cont
17819n
17820s/.\{148\}/&'"$ac_delim"'/g
17821t clear
17822:clear
17823s/\\$//
17824t bsnlc
17825s/["\\]/\\&/g; s/^/"/; s/$/"/p
17826d
17827:bsnlc
17828s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17829b cont
17830' <confdefs.h | sed '
17831s/'"$ac_delim"'/"\\\
17832"/g' >>$CONFIG_STATUS || ac_write_fail=1
17833
17834cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17835 for (key in D) D_is_set[key] = 1
17836 FS = ""
17837}
17838/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17839 line = \$ 0
17840 split(line, arg, " ")
17841 if (arg[1] == "#") {
17842 defundef = arg[2]
17843 mac1 = arg[3]
17844 } else {
17845 defundef = substr(arg[1], 2)
17846 mac1 = arg[2]
17847 }
17848 split(mac1, mac2, "(") #)
17849 macro = mac2[1]
17850 prefix = substr(line, 1, index(line, defundef) - 1)
17851 if (D_is_set[macro]) {
17852 # Preserve the white space surrounding the "#".
17853 print prefix "define", macro P[macro] D[macro]
17854 next
17855 } else {
17856 # Replace #undef with comments. This is necessary, for example,
17857 # in the case of _POSIX_SOURCE, which is predefined and required
17858 # on some systems where configure will not decide to define it.
17859 if (defundef == "undef") {
17860 print "/*", prefix defundef, macro, "*/"
17861 next
17862 }
17863 }
17864}
17865{ print }
17866_ACAWK
17867_ACEOF
17868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017869 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017870fi # test -n "$CONFIG_HEADERS"
17871
17872
17873eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17874shift
17875for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876do
17877 case $ac_tag in
17878 :[FHLC]) ac_mode=$ac_tag; continue;;
17879 esac
17880 case $ac_mode$ac_tag in
17881 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017882 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017883 :[FH]-) ac_tag=-:-;;
17884 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17885 esac
17886 ac_save_IFS=$IFS
17887 IFS=:
17888 set x $ac_tag
17889 IFS=$ac_save_IFS
17890 shift
17891 ac_file=$1
17892 shift
17893
17894 case $ac_mode in
17895 :L) ac_source=$1;;
17896 :[FH])
17897 ac_file_inputs=
17898 for ac_f
17899 do
17900 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017901 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 *) # Look for the file first in the build tree, then in the source tree
17903 # (if the path is not absolute). The absolute path cannot be DOS-style,
17904 # because $ac_f cannot contain `:'.
17905 test -f "$ac_f" ||
17906 case $ac_f in
17907 [\\/$]*) false;;
17908 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17909 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017910 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017911 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17913 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017914 done
17915
17916 # Let's still pretend it is `configure' which instantiates (i.e., don't
17917 # use $as_me), people would be surprised to read:
17918 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 configure_input='Generated from '`
17920 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17921 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 if test x"$ac_file" != x-; then
17923 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17925$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 # Neutralize special characters interpreted by sed in replacement strings.
17928 case $configure_input in #(
17929 *\&* | *\|* | *\\* )
17930 ac_sed_conf_input=`$as_echo "$configure_input" |
17931 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17932 *) ac_sed_conf_input=$configure_input;;
17933 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017934
17935 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017936 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17937 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938 esac
17939 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 esac
17941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017942 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017943$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017944 X"$ac_file" : 'X\(//\)[^/]' \| \
17945 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017947$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17949 s//\1/
17950 q
17951 }
17952 /^X\(\/\/\)[^/].*/{
17953 s//\1/
17954 q
17955 }
17956 /^X\(\/\/\)$/{
17957 s//\1/
17958 q
17959 }
17960 /^X\(\/\).*/{
17961 s//\1/
17962 q
17963 }
17964 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 ac_builddir=.
17967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968case "$ac_dir" in
17969.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17970*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017971 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017973 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017974 case $ac_top_builddir_sub in
17975 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17976 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17977 esac ;;
17978esac
17979ac_abs_top_builddir=$ac_pwd
17980ac_abs_builddir=$ac_pwd$ac_dir_suffix
17981# for backward compatibility:
17982ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
17984case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987 ac_top_srcdir=$ac_top_builddir_sub
17988 ac_abs_top_srcdir=$ac_pwd ;;
17989 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017991 ac_top_srcdir=$srcdir
17992 ac_abs_top_srcdir=$srcdir ;;
17993 *) # Relative name.
17994 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17995 ac_top_srcdir=$ac_top_build_prefix$srcdir
17996 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017997esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017999
Martin v. Löwis11437992002-04-12 09:54:03 +000018000
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018001 case $ac_mode in
18002 :F)
18003 #
18004 # CONFIG_FILE
18005 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018006
18007 case $INSTALL in
18008 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018011 ac_MKDIR_P=$MKDIR_P
18012 case $MKDIR_P in
18013 [\\/$]* | ?:[\\/]* ) ;;
18014 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18015 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018016_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017
Matthias Kloseb9621712010-04-24 17:59:49 +000018018cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019# If the template does not know about datarootdir, expand it.
18020# FIXME: This hack should be removed a few years after 2.60.
18021ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018022ac_sed_dataroot='
18023/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024 p
18025 q
18026}
18027/@datadir@/p
18028/@docdir@/p
18029/@infodir@/p
18030/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018031/@mandir@/p'
18032case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033*datarootdir*) ac_datarootdir_seen=yes;;
18034*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018035 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18036$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018038cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039 ac_datarootdir_hack='
18040 s&@datadir@&$datadir&g
18041 s&@docdir@&$docdir&g
18042 s&@infodir@&$infodir&g
18043 s&@localedir@&$localedir&g
18044 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018045 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018046esac
18047_ACEOF
18048
18049# Neutralize VPATH when `$srcdir' = `.'.
18050# Shell code in configure.ac might set extrasub.
18051# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018052cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18053ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018054$extrasub
18055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018056cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018057:t
18058/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018059s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018061s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062s&@srcdir@&$ac_srcdir&;t t
18063s&@abs_srcdir@&$ac_abs_srcdir&;t t
18064s&@top_srcdir@&$ac_top_srcdir&;t t
18065s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18066s&@builddir@&$ac_builddir&;t t
18067s&@abs_builddir@&$ac_abs_builddir&;t t
18068s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18069s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018070s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018072"
Victor Stinnere0be4232011-10-25 13:06:09 +020018073eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18074 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018076test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018077 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18078 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18079 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018081which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018082$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018083which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018084
Victor Stinnere0be4232011-10-25 13:06:09 +020018085 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018086 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018087 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18088 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018089 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018090 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 ;;
18092 :H)
18093 #
18094 # CONFIG_HEADER
18095 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018097 {
18098 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018099 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18100 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018102 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018103 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18104$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018105 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018106 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018107 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018108 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018109 fi
18110 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018111 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018112 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018113 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117
18118 esac
18119
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018120
18121 case $ac_file$ac_mode in
18122 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18123
18124 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018125done # for ac_tag
18126
Guido van Rossum627b2d71993-12-24 10:39:16 +000018127
Matthias Kloseb9621712010-04-24 17:59:49 +000018128as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018129_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018130ac_clean_files=$ac_clean_files_save
18131
Matthias Kloseb9621712010-04-24 17:59:49 +000018132test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018133 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018134
Martin v. Löwis11437992002-04-12 09:54:03 +000018135
18136# configure is writing to config.log, and then calls config.status.
18137# config.status does its own redirection, appending to config.log.
18138# Unfortunately, on DOS this fails, as config.log is still kept open
18139# by configure, so config.status won't be able to write to it; its
18140# output is simply discarded. So we exec the FD to /dev/null,
18141# effectively closing config.log, so it can be properly (re)opened and
18142# appended to by config.status. When coming back to configure, we
18143# need to make the FD available again.
18144if test "$no_create" != yes; then
18145 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018146 ac_config_status_args=
18147 test "$silent" = yes &&
18148 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018149 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018150 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018151 exec 5>>config.log
18152 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18153 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018154 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018155fi
18156if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18158$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018159fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018160
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018161
Christian Heimes75ed8902013-11-20 01:11:18 +010018162echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018163if test ! -f Modules/Setup.local
18164then
18165 echo "# Edit this file for local setup changes" >Modules/Setup.local
18166fi
18167
Christian Heimes75ed8902013-11-20 01:11:18 +010018168echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018169$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018170 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018171 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018172mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018173
18174if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18175 echo "" >&6
18176 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018177 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 +000018178 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018179 echo "" >&6
18180 echo "" >&6
18181fi
18182