blob: 3d66c1cb1c2f6e7b8a9d9ebe41c3539e5ca40cf7 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700675LLVM_PROF_ERR
676LLVM_PROF_FILE
677LLVM_PROF_MERGER
678PGO_PROF_USE_FLAG
679PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200680LLVM_AR_FOUND
681target_os
682target_vendor
683target_cpu
684target
685LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700686DEF_MAKE_RULE
687DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000688ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000689LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100690MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000691INSTALL_DATA
692INSTALL_SCRIPT
693INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200694ac_ct_READELF
695READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000696ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200697ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000698AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200731_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000732MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000733FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000734FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800735FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000736FRAMEWORKALTINSTALLLAST
737FRAMEWORKALTINSTALLFIRST
738FRAMEWORKINSTALLLAST
739FRAMEWORKINSTALLFIRST
740PYTHONFRAMEWORKINSTALLDIR
741PYTHONFRAMEWORKPREFIX
742PYTHONFRAMEWORKDIR
743PYTHONFRAMEWORKIDENTIFIER
744PYTHONFRAMEWORK
745LIPO_32BIT_FLAGS
746ARCH_RUN_32BIT
747UNIVERSALSDK
748CONFIG_ARGS
749SOVERSION
750VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200751PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200752PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100753host_os
754host_vendor
755host_cpu
756host
757build_os
758build_vendor
759build_cpu
760build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500761HAS_GIT
762GITBRANCH
763GITTAG
764GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400765BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000766target_alias
767host_alias
768build_alias
769LIBS
770ECHO_T
771ECHO_N
772ECHO_C
773DEFS
774mandir
775localedir
776libdir
777psdir
778pdfdir
779dvidir
780htmldir
781infodir
782docdir
783oldincludedir
784includedir
William Grzybowski23e65b22018-09-07 09:06:15 -0300785runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_libs
823with_system_expat
824with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100825with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000826enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700827with_tcltk_includes
828with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000829with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000830enable_ipv6
831with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000833with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700835with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_libm
837with_libc
838enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800840with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100841with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100842with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000843'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844 ac_precious_vars='build_alias
845host_alias
846target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100847MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848CC
849CFLAGS
850LDFLAGS
851LIBS
852CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800853CPP
854PKG_CONFIG
855PKG_CONFIG_PATH
856PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860ac_init_help=
861ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000862ac_unrecognized_opts=
863ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# The variables have the same names as the options, with
865# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000866cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869no_recursion=
870prefix=NONE
871program_prefix=NONE
872program_suffix=NONE
873program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878x_includes=NONE
879x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000880
881# Installation directory options.
882# These are left unexpanded so users can "make install exec_prefix=/foo"
883# and all the variables that are supposed to be based on exec_prefix
884# by default will actually change.
885# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887bindir='${exec_prefix}/bin'
888sbindir='${exec_prefix}/sbin'
889libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890datarootdir='${prefix}/share'
891datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892sysconfdir='${prefix}/etc'
893sharedstatedir='${prefix}/com'
894localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300895runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896includedir='${prefix}/include'
897oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
899infodir='${datarootdir}/info'
900htmldir='${docdir}'
901dvidir='${docdir}'
902pdfdir='${docdir}'
903psdir='${docdir}'
904libdir='${exec_prefix}/lib'
905localedir='${datarootdir}/locale'
906mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 # If the previous option needs an argument, assign it.
913 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 ac_prev=
916 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200920 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
921 *=) ac_optarg= ;;
922 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 # Accept the important Cygnus configure options, so we can diagnose typos.
926
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 case $ac_dashdash$ac_option in
928 --)
929 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -bindir | --bindir | --bindi | --bind | --bin | --bi)
932 ac_prev=bindir ;;
933 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935
936 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000940
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000941 -cache-file | --cache-file | --cache-fil | --cache-fi \
942 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
943 ac_prev=cache_file ;;
944 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
945 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 cache_file=$ac_optarg ;;
947
948 --config-cache | -C)
949 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000954 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
957 | --dataroo | --dataro | --datar)
958 ac_prev=datarootdir ;;
959 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
960 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
961 datarootdir=$ac_optarg ;;
962
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000964 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000965 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200967 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt_orig=$ac_useropt
969 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
970 case $ac_user_opts in
971 *"
972"enable_$ac_useropt"
973"*) ;;
974 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
975 ac_unrecognized_sep=', ';;
976 esac
977 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000978
979 -docdir | --docdir | --docdi | --doc | --do)
980 ac_prev=docdir ;;
981 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
982 docdir=$ac_optarg ;;
983
984 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
985 ac_prev=dvidir ;;
986 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
987 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
989 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000990 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000991 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200993 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt_orig=$ac_useropt
995 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
996 case $ac_user_opts in
997 *"
998"enable_$ac_useropt"
999"*) ;;
1000 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1001 ac_unrecognized_sep=', ';;
1002 esac
1003 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1006 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1007 | --exec | --exe | --ex)
1008 ac_prev=exec_prefix ;;
1009 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1010 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1011 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
1014 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001015 # Obsolete; use --with-gas.
1016 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 -help | --help | --hel | --he | -h)
1019 ac_init_help=long ;;
1020 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1021 ac_init_help=recursive ;;
1022 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1023 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1031 ac_prev=htmldir ;;
1032 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1033 | --ht=*)
1034 htmldir=$ac_optarg ;;
1035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 -includedir | --includedir | --includedi | --included | --include \
1037 | --includ | --inclu | --incl | --inc)
1038 ac_prev=includedir ;;
1039 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1040 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -infodir | --infodir | --infodi | --infod | --info | --inf)
1044 ac_prev=infodir ;;
1045 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libdir | --libdir | --libdi | --libd)
1049 ac_prev=libdir ;;
1050 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
1053 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1054 | --libexe | --libex | --libe)
1055 ac_prev=libexecdir ;;
1056 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1057 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 -localedir | --localedir | --localedi | --localed | --locale)
1061 ac_prev=localedir ;;
1062 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1063 localedir=$ac_optarg ;;
1064
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 ac_prev=localstatedir ;;
1068 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
1072 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1073 ac_prev=mandir ;;
1074 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 # Obsolete; use --without-fp.
1079 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
1081 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083 no_create=yes ;;
1084
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001085 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1086 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1087 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1090 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1091 | --oldin | --oldi | --old | --ol | --o)
1092 ac_prev=oldincludedir ;;
1093 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1094 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1095 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1099 ac_prev=prefix ;;
1100 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1104 | --program-pre | --program-pr | --program-p)
1105 ac_prev=program_prefix ;;
1106 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1107 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1111 | --program-suf | --program-su | --program-s)
1112 ac_prev=program_suffix ;;
1113 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1114 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116
1117 -program-transform-name | --program-transform-name \
1118 | --program-transform-nam | --program-transform-na \
1119 | --program-transform-n | --program-transform- \
1120 | --program-transform | --program-transfor \
1121 | --program-transfo | --program-transf \
1122 | --program-trans | --program-tran \
1123 | --progr-tra | --program-tr | --program-t)
1124 ac_prev=program_transform_name ;;
1125 -program-transform-name=* | --program-transform-name=* \
1126 | --program-transform-nam=* | --program-transform-na=* \
1127 | --program-transform-n=* | --program-transform-=* \
1128 | --program-transform=* | --program-transfor=* \
1129 | --program-transfo=* | --program-transf=* \
1130 | --program-trans=* | --program-tran=* \
1131 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001134 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1135 ac_prev=pdfdir ;;
1136 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1137 pdfdir=$ac_optarg ;;
1138
1139 -psdir | --psdir | --psdi | --psd | --ps)
1140 ac_prev=psdir ;;
1141 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1142 psdir=$ac_optarg ;;
1143
Guido van Rossum7f43da71994-08-01 12:15:30 +00001144 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1145 | -silent | --silent | --silen | --sile | --sil)
1146 silent=yes ;;
1147
William Grzybowski23e65b22018-09-07 09:06:15 -03001148 -runstatedir | --runstatedir | --runstatedi | --runstated \
1149 | --runstate | --runstat | --runsta | --runst | --runs \
1150 | --run | --ru | --r)
1151 ac_prev=runstatedir ;;
1152 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1153 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1154 | --run=* | --ru=* | --r=*)
1155 runstatedir=$ac_optarg ;;
1156
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1158 ac_prev=sbindir ;;
1159 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1160 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001162
1163 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1164 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1165 | --sharedst | --shareds | --shared | --share | --shar \
1166 | --sha | --sh)
1167 ac_prev=sharedstatedir ;;
1168 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1169 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1170 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1171 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 -site | --site | --sit)
1175 ac_prev=site ;;
1176 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1180 ac_prev=srcdir ;;
1181 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1185 | --syscon | --sysco | --sysc | --sys | --sy)
1186 ac_prev=sysconfdir ;;
1187 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1188 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001190
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1197 verbose=yes ;;
1198
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 -version | --version | --versio | --versi | --vers | -V)
1200 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
1218 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001221 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001222 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001223 ac_useropt_orig=$ac_useropt
1224 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1225 case $ac_user_opts in
1226 *"
1227"with_$ac_useropt"
1228"*) ;;
1229 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1230 ac_unrecognized_sep=', ';;
1231 esac
1232 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234 --x)
1235 # Obsolete; use --with-x.
1236 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1239 | --x-incl | --x-inc | --x-in | --x-i)
1240 ac_prev=x_includes ;;
1241 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1242 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
1245 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1246 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1247 ac_prev=x_libraries ;;
1248 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1249 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001252 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1253Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254 ;;
1255
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 *=*)
1257 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1258 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 case $ac_envvar in #(
1260 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001261 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 export $ac_envvar ;;
1265
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001266 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001268 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001269 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001271 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272 ;;
1273
1274 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275done
1276
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001278 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280fi
1281
Matthias Kloseb9621712010-04-24 17:59:49 +00001282if test -n "$ac_unrecognized_opts"; then
1283 case $enable_option_checking in
1284 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001285 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001286 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1287 esac
1288fi
1289
1290# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1292 datadir sysconfdir sharedstatedir localstatedir includedir \
1293 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001294 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001297 # Remove trailing slashes.
1298 case $ac_val in
1299 */ )
1300 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1301 eval $ac_var=\$ac_val;;
1302 esac
1303 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001304 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 [\\/$]* | ?:[\\/]* ) continue;;
1306 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001307 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001308 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001309done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# There might be people who depend on the old broken behavior: `$host'
1312# used to hold the argument of --host etc.
1313# FIXME: To remove some day.
1314build=$build_alias
1315host=$host_alias
1316target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001317
Martin v. Löwis11437992002-04-12 09:54:03 +00001318# FIXME: To remove some day.
1319if test "x$host_alias" != x; then
1320 if test "x$build_alias" = x; then
1321 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 elif test "x$build_alias" != "x$host_alias"; then
1323 cross_compiling=yes
1324 fi
1325fi
1326
1327ac_tool_prefix=
1328test -n "$host_alias" && ac_tool_prefix=$host_alias-
1329
1330test "$silent" = yes && exec 6>/dev/null
1331
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333ac_pwd=`pwd` && test -n "$ac_pwd" &&
1334ac_ls_di=`ls -di .` &&
1335ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001336 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001338 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339
1340
Guido van Rossum627b2d71993-12-24 10:39:16 +00001341# Find the source files, if location was not specified.
1342if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001343 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001345 ac_confdir=`$as_dirname -- "$as_myself" ||
1346$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1347 X"$as_myself" : 'X\(//\)[^/]' \| \
1348 X"$as_myself" : 'X\(//\)$' \| \
1349 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1350$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001351 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\/\)[^/].*/{
1356 s//\1/
1357 q
1358 }
1359 /^X\(\/\/\)$/{
1360 s//\1/
1361 q
1362 }
1363 /^X\(\/\).*/{
1364 s//\1/
1365 q
1366 }
1367 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001368 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001370 srcdir=..
1371 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001372else
1373 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375if test ! -r "$srcdir/$ac_unique_file"; then
1376 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001377 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1380ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382 pwd)`
1383# When building in place, set srcdir=.
1384if test "$ac_abs_confdir" = "$ac_pwd"; then
1385 srcdir=.
1386fi
1387# Remove unnecessary trailing slashes from srcdir.
1388# Double slashes in file names in object file debugging info
1389# mess up M-x gdb in Emacs.
1390case $srcdir in
1391*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1392esac
1393for ac_var in $ac_precious_vars; do
1394 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1395 eval ac_env_${ac_var}_value=\$${ac_var}
1396 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1397 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1398done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400#
1401# Report the --help message.
1402#
1403if test "$ac_init_help" = "long"; then
1404 # Omit some internal or obsolete options to make the list less imposing.
1405 # This message is too long to be a string in the A/UX 3.1 sh.
1406 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001407\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408
1409Usage: $0 [OPTION]... [VAR=VALUE]...
1410
1411To assign environment variables (e.g., CC, CFLAGS...), specify them as
1412VAR=VALUE. See below for descriptions of some of the useful variables.
1413
1414Defaults for the options are specified in brackets.
1415
1416Configuration:
1417 -h, --help display this help and exit
1418 --help=short display options specific to this package
1419 --help=recursive display the short help of all the included packages
1420 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001421 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --cache-file=FILE cache test results in FILE [disabled]
1423 -C, --config-cache alias for \`--cache-file=config.cache'
1424 -n, --no-create do not create output files
1425 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1426
Martin v. Löwis11437992002-04-12 09:54:03 +00001427Installation directories:
1428 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433By default, \`make install' will install all the files in
1434\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1435an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1436for instance \`--prefix=\$HOME'.
1437
1438For better control, use the options below.
1439
1440Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001441 --bindir=DIR user executables [EPREFIX/bin]
1442 --sbindir=DIR system admin executables [EPREFIX/sbin]
1443 --libexecdir=DIR program executables [EPREFIX/libexec]
1444 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1445 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1446 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001447 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001448 --libdir=DIR object code libraries [EPREFIX/lib]
1449 --includedir=DIR C header files [PREFIX/include]
1450 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1451 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1452 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1453 --infodir=DIR info documentation [DATAROOTDIR/info]
1454 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1455 --mandir=DIR man documentation [DATAROOTDIR/man]
1456 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1457 --htmldir=DIR html documentation [DOCDIR]
1458 --dvidir=DIR dvi documentation [DOCDIR]
1459 --pdfdir=DIR pdf documentation [DOCDIR]
1460 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462
1463 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001464
1465System types:
1466 --build=BUILD configure for building on BUILD [guessed]
1467 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001468 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001469_ACEOF
1470fi
1471
1472if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001473 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001474 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001475 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 cat <<\_ACEOF
1477
1478Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001479 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1481 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001482 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001483 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-framework[=INSTALLDIR]
1485 Build (MacOSX|Darwin) framework
1486 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001487 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001488 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1489 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001490 --enable-loadable-sqlite-extensions
1491 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --enable-ipv6 Enable ipv6 (with ipv4) support
1493 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001494 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001496
1497Optional Packages:
1498 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1499 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001500 --with-universal-archs=ARCH
1501 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001502 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1503 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001504 --with-framework-name=FRAMEWORK
1505 specify an alternate name of the framework built
1506 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001507 --with-cxx-main=<compiler>
1508 compile main() and link python executable with C++
1509 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-suffix=.exe set executable suffix
1511 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001512 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001513 --with-lto Enable Link Time Optimization in any build. Disabled
1514 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001515 --with-hash-algorithm=[fnv|siphash24]
1516 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001517 --with-address-sanitizer
1518 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001520 --with-system-expat build pyexpat module using an installed expat
1521 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001522 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001523 --with-system-libmpdec build _decimal module using an installed libmpdec
1524 library
Ned Deilyd819b932013-09-06 01:07:05 -07001525 --with-tcltk-includes='-I...'
1526 override search for Tcl and Tk include files
1527 --with-tcltk-libs='-L...'
1528 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001529 --with-dbmliborder=db1:db2:...
1530 order to check db backends for dbm. Valid value is a
1531 colon separated string with the backend names
1532 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with(out)-doc-strings disable/enable documentation strings
1534 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001535 --with(out)-c-locale-coercion
1536 disable/enable C locale coercion to a UTF-8 based
1537 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001538 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001539 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with-libm=STRING math library
1541 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001542 --with(out)-computed-gotos
1543 Use computed gotos in evaluation loop (enabled by
1544 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001545 --with(out)-ensurepip=[=upgrade]
1546 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001547 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001548 --with-ssl-default-suites=[python|openssl|STRING]
1549 Override default cipher suites string, python: use
1550 Python's preferred selection (default), openssl:
1551 leave OpenSSL's defaults untouched, STRING: use a
1552 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001553
1554Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001555 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CC C compiler command
1557 CFLAGS C compiler flags
1558 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1559 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001561 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001564 PKG_CONFIG path to pkg-config utility
1565 PKG_CONFIG_PATH
1566 directories to add to pkg-config's search path
1567 PKG_CONFIG_LIBDIR
1568 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001569
1570Use these variables to override the choices made by `configure' or to help
1571it to find libraries and programs with nonstandard names/locations.
1572
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001573Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001575ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001576fi
1577
1578if test "$ac_init_help" = "recursive"; then
1579 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001581 test -d "$ac_dir" ||
1582 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1583 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_builddir=.
1585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586case "$ac_dir" in
1587.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001591 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592 case $ac_top_builddir_sub in
1593 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1595 esac ;;
1596esac
1597ac_abs_top_builddir=$ac_pwd
1598ac_abs_builddir=$ac_pwd$ac_dir_suffix
1599# for backward compatibility:
1600ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001601
1602case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 ac_top_srcdir=$ac_top_builddir_sub
1606 ac_abs_top_srcdir=$ac_pwd ;;
1607 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001608 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 ac_top_srcdir=$srcdir
1610 ac_abs_top_srcdir=$srcdir ;;
1611 *) # Relative name.
1612 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1613 ac_top_srcdir=$ac_top_build_prefix$srcdir
1614 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001615esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001618 cd "$ac_dir" || { ac_status=$?; continue; }
1619 # Check for guested configure.
1620 if test -f "$ac_srcdir/configure.gnu"; then
1621 echo &&
1622 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1623 elif test -f "$ac_srcdir/configure"; then
1624 echo &&
1625 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001627 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001628 fi || ac_status=$?
1629 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 done
1631fi
1632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001634if $ac_init_version; then
1635 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001636python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001638
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001639Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001640This configure script is free software; the Free Software Foundation
1641gives unlimited permission to copy, distribute and modify it.
1642_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001643 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001645
1646## ------------------------ ##
1647## Autoconf initialization. ##
1648## ------------------------ ##
1649
1650# ac_fn_c_try_compile LINENO
1651# --------------------------
1652# Try to compile conftest.$ac_ext, and return whether this succeeded.
1653ac_fn_c_try_compile ()
1654{
1655 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656 rm -f conftest.$ac_objext
1657 if { { ac_try="$ac_compile"
1658case "(($ac_try" in
1659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1660 *) ac_try_echo=$ac_try;;
1661esac
1662eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1663$as_echo "$ac_try_echo"; } >&5
1664 (eval "$ac_compile") 2>conftest.err
1665 ac_status=$?
1666 if test -s conftest.err; then
1667 grep -v '^ *+' conftest.err >conftest.er1
1668 cat conftest.er1 >&5
1669 mv -f conftest.er1 conftest.err
1670 fi
1671 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1672 test $ac_status = 0; } && {
1673 test -z "$ac_c_werror_flag" ||
1674 test ! -s conftest.err
1675 } && test -s conftest.$ac_objext; then :
1676 ac_retval=0
1677else
1678 $as_echo "$as_me: failed program was:" >&5
1679sed 's/^/| /' conftest.$ac_ext >&5
1680
1681 ac_retval=1
1682fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001683 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001684 as_fn_set_status $ac_retval
1685
1686} # ac_fn_c_try_compile
1687
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001688# ac_fn_c_try_cpp LINENO
1689# ----------------------
1690# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1691ac_fn_c_try_cpp ()
1692{
1693 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694 if { { ac_try="$ac_cpp conftest.$ac_ext"
1695case "(($ac_try" in
1696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1697 *) ac_try_echo=$ac_try;;
1698esac
1699eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1700$as_echo "$ac_try_echo"; } >&5
1701 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1702 ac_status=$?
1703 if test -s conftest.err; then
1704 grep -v '^ *+' conftest.err >conftest.er1
1705 cat conftest.er1 >&5
1706 mv -f conftest.er1 conftest.err
1707 fi
1708 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1709 test $ac_status = 0; } > conftest.i && {
1710 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1711 test ! -s conftest.err
1712 }; then :
1713 ac_retval=0
1714else
1715 $as_echo "$as_me: failed program was:" >&5
1716sed 's/^/| /' conftest.$ac_ext >&5
1717
1718 ac_retval=1
1719fi
1720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1721 as_fn_set_status $ac_retval
1722
1723} # ac_fn_c_try_cpp
1724
Matthias Kloseb9621712010-04-24 17:59:49 +00001725# ac_fn_c_try_link LINENO
1726# -----------------------
1727# Try to link conftest.$ac_ext, and return whether this succeeded.
1728ac_fn_c_try_link ()
1729{
1730 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1731 rm -f conftest.$ac_objext conftest$ac_exeext
1732 if { { ac_try="$ac_link"
1733case "(($ac_try" in
1734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1735 *) ac_try_echo=$ac_try;;
1736esac
1737eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1738$as_echo "$ac_try_echo"; } >&5
1739 (eval "$ac_link") 2>conftest.err
1740 ac_status=$?
1741 if test -s conftest.err; then
1742 grep -v '^ *+' conftest.err >conftest.er1
1743 cat conftest.er1 >&5
1744 mv -f conftest.er1 conftest.err
1745 fi
1746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1747 test $ac_status = 0; } && {
1748 test -z "$ac_c_werror_flag" ||
1749 test ! -s conftest.err
1750 } && test -s conftest$ac_exeext && {
1751 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001752 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001753 }; then :
1754 ac_retval=0
1755else
1756 $as_echo "$as_me: failed program was:" >&5
1757sed 's/^/| /' conftest.$ac_ext >&5
1758
1759 ac_retval=1
1760fi
1761 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1762 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1763 # interfere with the next link command; also delete a directory that is
1764 # left behind by Apple's compiler. We do this before executing the actions.
1765 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001766 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001767 as_fn_set_status $ac_retval
1768
1769} # ac_fn_c_try_link
1770
Matthias Kloseb9621712010-04-24 17:59:49 +00001771# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1772# -------------------------------------------------------
1773# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1774# the include files in INCLUDES and setting the cache variable VAR
1775# accordingly.
1776ac_fn_c_check_header_mongrel ()
1777{
1778 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001779 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1781$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001782if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 $as_echo_n "(cached) " >&6
1784fi
1785eval ac_res=\$$3
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1787$as_echo "$ac_res" >&6; }
1788else
1789 # Is the header compilable?
1790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1791$as_echo_n "checking $2 usability... " >&6; }
1792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793/* end confdefs.h. */
1794$4
1795#include <$2>
1796_ACEOF
1797if ac_fn_c_try_compile "$LINENO"; then :
1798 ac_header_compiler=yes
1799else
1800 ac_header_compiler=no
1801fi
1802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1804$as_echo "$ac_header_compiler" >&6; }
1805
1806# Is the header present?
1807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1808$as_echo_n "checking $2 presence... " >&6; }
1809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1810/* end confdefs.h. */
1811#include <$2>
1812_ACEOF
1813if ac_fn_c_try_cpp "$LINENO"; then :
1814 ac_header_preproc=yes
1815else
1816 ac_header_preproc=no
1817fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1820$as_echo "$ac_header_preproc" >&6; }
1821
1822# So? What about this header?
1823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1824 yes:no: )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1826$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1829 ;;
1830 no:yes:* )
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1832$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1834$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1836$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1838$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1840$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001841( $as_echo "## --------------------------------------- ##
1842## Report this to https://bugs.python.org/ ##
1843## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 ) | sed "s/^/$as_me: WARNING: /" >&2
1845 ;;
1846esac
1847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1848$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001849if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001850 $as_echo_n "(cached) " >&6
1851else
1852 eval "$3=\$ac_header_compiler"
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
1857fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001858 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001859
1860} # ac_fn_c_check_header_mongrel
1861
1862# ac_fn_c_try_run LINENO
1863# ----------------------
1864# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1865# that executables *can* be run.
1866ac_fn_c_try_run ()
1867{
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if { { ac_try="$ac_link"
1870case "(($ac_try" in
1871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1872 *) ac_try_echo=$ac_try;;
1873esac
1874eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1875$as_echo "$ac_try_echo"; } >&5
1876 (eval "$ac_link") 2>&5
1877 ac_status=$?
1878 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1879 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1880 { { case "(($ac_try" in
1881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1882 *) ac_try_echo=$ac_try;;
1883esac
1884eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1885$as_echo "$ac_try_echo"; } >&5
1886 (eval "$ac_try") 2>&5
1887 ac_status=$?
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; }; }; then :
1890 ac_retval=0
1891else
1892 $as_echo "$as_me: program exited with status $ac_status" >&5
1893 $as_echo "$as_me: failed program was:" >&5
1894sed 's/^/| /' conftest.$ac_ext >&5
1895
1896 ac_retval=$ac_status
1897fi
1898 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001899 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001900 as_fn_set_status $ac_retval
1901
1902} # ac_fn_c_try_run
1903
1904# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1905# -------------------------------------------------------
1906# Tests whether HEADER exists and can be compiled using the include files in
1907# INCLUDES, setting the cache variable VAR accordingly.
1908ac_fn_c_check_header_compile ()
1909{
1910 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1912$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001913if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001914 $as_echo_n "(cached) " >&6
1915else
1916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1917/* end confdefs.h. */
1918$4
1919#include <$2>
1920_ACEOF
1921if ac_fn_c_try_compile "$LINENO"; then :
1922 eval "$3=yes"
1923else
1924 eval "$3=no"
1925fi
1926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1927fi
1928eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001931 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001932
1933} # ac_fn_c_check_header_compile
1934
Matthias Kloseb9621712010-04-24 17:59:49 +00001935# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1936# -------------------------------------------
1937# Tests whether TYPE exists after having included INCLUDES, setting cache
1938# variable VAR accordingly.
1939ac_fn_c_check_type ()
1940{
1941 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001944if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001945 $as_echo_n "(cached) " >&6
1946else
1947 eval "$3=no"
1948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1949/* end confdefs.h. */
1950$4
1951int
1952main ()
1953{
1954if (sizeof ($2))
1955 return 0;
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_compile "$LINENO"; then :
1961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1962/* end confdefs.h. */
1963$4
1964int
1965main ()
1966{
1967if (sizeof (($2)))
1968 return 0;
1969 ;
1970 return 0;
1971}
1972_ACEOF
1973if ac_fn_c_try_compile "$LINENO"; then :
1974
1975else
1976 eval "$3=yes"
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1981fi
1982eval ac_res=\$$3
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1984$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001986
1987} # ac_fn_c_check_type
1988
Matthias Kloseb9621712010-04-24 17:59:49 +00001989# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1990# --------------------------------------------
1991# Tries to find the compile-time value of EXPR in a program that includes
1992# INCLUDES, setting VAR accordingly. Returns whether the value could be
1993# computed
1994ac_fn_c_compute_int ()
1995{
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 if test "$cross_compiling" = yes; then
1998 # Depending upon the size, compute the lo and hi bounds.
1999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$4
2002int
2003main ()
2004{
2005static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002006test_array [0] = 0;
2007return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002008
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014 ac_lo=0 ac_mid=0
2015 while :; do
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017/* end confdefs.h. */
2018$4
2019int
2020main ()
2021{
2022static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002023test_array [0] = 0;
2024return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002025
2026 ;
2027 return 0;
2028}
2029_ACEOF
2030if ac_fn_c_try_compile "$LINENO"; then :
2031 ac_hi=$ac_mid; break
2032else
2033 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2034 if test $ac_lo -le $ac_mid; then
2035 ac_lo= ac_hi=
2036 break
2037 fi
2038 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2039fi
2040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2041 done
2042else
2043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2044/* end confdefs.h. */
2045$4
2046int
2047main ()
2048{
2049static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002050test_array [0] = 0;
2051return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002052
2053 ;
2054 return 0;
2055}
2056_ACEOF
2057if ac_fn_c_try_compile "$LINENO"; then :
2058 ac_hi=-1 ac_mid=-1
2059 while :; do
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061/* end confdefs.h. */
2062$4
2063int
2064main ()
2065{
2066static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002067test_array [0] = 0;
2068return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002069
2070 ;
2071 return 0;
2072}
2073_ACEOF
2074if ac_fn_c_try_compile "$LINENO"; then :
2075 ac_lo=$ac_mid; break
2076else
2077 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2078 if test $ac_mid -le $ac_hi; then
2079 ac_lo= ac_hi=
2080 break
2081 fi
2082 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085 done
2086else
2087 ac_lo= ac_hi=
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090fi
2091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2092# Binary search between lo and hi bounds.
2093while test "x$ac_lo" != "x$ac_hi"; do
2094 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2096/* end confdefs.h. */
2097$4
2098int
2099main ()
2100{
2101static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002102test_array [0] = 0;
2103return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105 ;
2106 return 0;
2107}
2108_ACEOF
2109if ac_fn_c_try_compile "$LINENO"; then :
2110 ac_hi=$ac_mid
2111else
2112 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2113fi
2114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115done
2116case $ac_lo in #((
2117?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2118'') ac_retval=1 ;;
2119esac
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122/* end confdefs.h. */
2123$4
2124static long int longval () { return $2; }
2125static unsigned long int ulongval () { return $2; }
2126#include <stdio.h>
2127#include <stdlib.h>
2128int
2129main ()
2130{
2131
2132 FILE *f = fopen ("conftest.val", "w");
2133 if (! f)
2134 return 1;
2135 if (($2) < 0)
2136 {
2137 long int i = longval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%ld", i);
2141 }
2142 else
2143 {
2144 unsigned long int i = ulongval ();
2145 if (i != ($2))
2146 return 1;
2147 fprintf (f, "%lu", i);
2148 }
2149 /* Do not output a trailing newline, as this causes \r\n confusion
2150 on some platforms. */
2151 return ferror (f) || fclose (f) != 0;
2152
2153 ;
2154 return 0;
2155}
2156_ACEOF
2157if ac_fn_c_try_run "$LINENO"; then :
2158 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2159else
2160 ac_retval=1
2161fi
2162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2163 conftest.$ac_objext conftest.beam conftest.$ac_ext
2164rm -f conftest.val
2165
2166 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002167 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002168 as_fn_set_status $ac_retval
2169
2170} # ac_fn_c_compute_int
2171
2172# ac_fn_c_check_func LINENO FUNC VAR
2173# ----------------------------------
2174# Tests whether FUNC exists, setting the cache variable VAR accordingly
2175ac_fn_c_check_func ()
2176{
2177 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2179$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002180if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002181 $as_echo_n "(cached) " >&6
2182else
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184/* end confdefs.h. */
2185/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2186 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2187#define $2 innocuous_$2
2188
2189/* System header to define __stub macros and hopefully few prototypes,
2190 which can conflict with char $2 (); below.
2191 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2192 <limits.h> exists even on freestanding compilers. */
2193
2194#ifdef __STDC__
2195# include <limits.h>
2196#else
2197# include <assert.h>
2198#endif
2199
2200#undef $2
2201
2202/* Override any GCC internal prototype to avoid an error.
2203 Use char because int might match the return type of a GCC
2204 builtin and then its argument prototype would still apply. */
2205#ifdef __cplusplus
2206extern "C"
2207#endif
2208char $2 ();
2209/* The GNU C library defines this for functions which it implements
2210 to always fail with ENOSYS. Some functions are actually named
2211 something starting with __ and the normal name is an alias. */
2212#if defined __stub_$2 || defined __stub___$2
2213choke me
2214#endif
2215
2216int
2217main ()
2218{
2219return $2 ();
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_link "$LINENO"; then :
2225 eval "$3=yes"
2226else
2227 eval "$3=no"
2228fi
2229rm -f core conftest.err conftest.$ac_objext \
2230 conftest$ac_exeext conftest.$ac_ext
2231fi
2232eval ac_res=\$$3
2233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2234$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002235 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002236
2237} # ac_fn_c_check_func
2238
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002239# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2240# ---------------------------------------------
2241# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2242# accordingly.
2243ac_fn_c_check_decl ()
2244{
2245 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2246 as_decl_name=`echo $2|sed 's/ *(.*//'`
2247 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2249$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2250if eval \${$3+:} false; then :
2251 $as_echo_n "(cached) " >&6
2252else
2253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2254/* end confdefs.h. */
2255$4
2256int
2257main ()
2258{
2259#ifndef $as_decl_name
2260#ifdef __cplusplus
2261 (void) $as_decl_use;
2262#else
2263 (void) $as_decl_name;
2264#endif
2265#endif
2266
2267 ;
2268 return 0;
2269}
2270_ACEOF
2271if ac_fn_c_try_compile "$LINENO"; then :
2272 eval "$3=yes"
2273else
2274 eval "$3=no"
2275fi
2276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2277fi
2278eval ac_res=\$$3
2279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2280$as_echo "$ac_res" >&6; }
2281 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2282
2283} # ac_fn_c_check_decl
2284
Matthias Kloseb9621712010-04-24 17:59:49 +00002285# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2286# ----------------------------------------------------
2287# Tries to find if the field MEMBER exists in type AGGR, after including
2288# INCLUDES, setting cache variable VAR accordingly.
2289ac_fn_c_check_member ()
2290{
2291 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2293$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002294if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002295 $as_echo_n "(cached) " >&6
2296else
2297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2298/* end confdefs.h. */
2299$5
2300int
2301main ()
2302{
2303static $2 ac_aggr;
2304if (ac_aggr.$3)
2305return 0;
2306 ;
2307 return 0;
2308}
2309_ACEOF
2310if ac_fn_c_try_compile "$LINENO"; then :
2311 eval "$4=yes"
2312else
2313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2314/* end confdefs.h. */
2315$5
2316int
2317main ()
2318{
2319static $2 ac_aggr;
2320if (sizeof ac_aggr.$3)
2321return 0;
2322 ;
2323 return 0;
2324}
2325_ACEOF
2326if ac_fn_c_try_compile "$LINENO"; then :
2327 eval "$4=yes"
2328else
2329 eval "$4=no"
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334fi
2335eval ac_res=\$$4
2336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002338 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002339
2340} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002341cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002342This file contains any messages produced by compilers while
2343running configure, to aid debugging if configure makes a mistake.
2344
Ned Deily5489bda2018-01-31 17:44:09 -05002345It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002346generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002347
2348 $ $0 $@
2349
2350_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002352{
2353cat <<_ASUNAME
2354## --------- ##
2355## Platform. ##
2356## --------- ##
2357
2358hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2359uname -m = `(uname -m) 2>/dev/null || echo unknown`
2360uname -r = `(uname -r) 2>/dev/null || echo unknown`
2361uname -s = `(uname -s) 2>/dev/null || echo unknown`
2362uname -v = `(uname -v) 2>/dev/null || echo unknown`
2363
2364/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2365/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2366
2367/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2368/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2369/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002371/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2372/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2373/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2374
2375_ASUNAME
2376
2377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2378for as_dir in $PATH
2379do
2380 IFS=$as_save_IFS
2381 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002382 $as_echo "PATH: $as_dir"
2383 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386} >&5
2387
2388cat >&5 <<_ACEOF
2389
2390
2391## ----------- ##
2392## Core tests. ##
2393## ----------- ##
2394
2395_ACEOF
2396
2397
2398# Keep a trace of the command line.
2399# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002402# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002403ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_configure_args0=
2405ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002406ac_must_keep_next=false
2407for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002408do
Skip Montanaro6dead952003-09-25 14:50:04 +00002409 for ac_arg
2410 do
2411 case $ac_arg in
2412 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2413 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2414 | -silent | --silent | --silen | --sile | --sil)
2415 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002416 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002417 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 esac
2419 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002422 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002426 case $ac_arg in
2427 *=* | --config-cache | -C | -disable-* | --disable-* \
2428 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2429 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2430 | -with-* | --with-* | -without-* | --without-* | --x)
2431 case "$ac_configure_args0 " in
2432 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2433 esac
2434 ;;
2435 -* ) ac_must_keep_next=true ;;
2436 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002439 ;;
2440 esac
2441 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002442done
Matthias Kloseb9621712010-04-24 17:59:49 +00002443{ ac_configure_args0=; unset ac_configure_args0;}
2444{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002445
2446# When interrupted or exit'd, cleanup temporary files, and complete
2447# config.log. We remove comments because anyway the quotes in there
2448# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002449# WARNING: Use '\'' to represent an apostrophe within the trap.
2450# 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 +00002451trap 'exit_status=$?
2452 # Save into config.log some information that might help in debugging.
2453 {
2454 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002455
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002457## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002458## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002459 echo
2460 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461(
2462 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2463 eval ac_val=\$$ac_var
2464 case $ac_val in #(
2465 *${as_nl}*)
2466 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002467 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2468$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469 esac
2470 case $ac_var in #(
2471 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002472 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2473 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 esac ;;
2475 esac
2476 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002477 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2479 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002480 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 "s/'\''/'\''\\\\'\'''\''/g;
2482 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2483 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002486 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 esac |
2488 sort
2489)
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002491
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002493## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002494## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 echo
2496 for ac_var in $ac_subst_vars
2497 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002498 eval ac_val=\$$ac_var
2499 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002502 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 done | sort
2504 echo
2505
2506 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002509## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 echo
2511 for ac_var in $ac_subst_files
2512 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 eval ac_val=\$$ac_var
2514 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002517 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002518 done | sort
2519 echo
2520 fi
2521
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 fi
2530 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 $as_echo "$as_me: caught signal $ac_signal"
2532 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 rm -f core *.core core.conftest.* &&
2535 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002538for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002540done
2541ac_signal=0
2542
2543# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002545
Matthias Kloseb9621712010-04-24 17:59:49 +00002546$as_echo "/* confdefs.h */" > confdefs.h
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548# Predefined preprocessor variables.
2549
2550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_NAME "$PACKAGE_NAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_VERSION "$PACKAGE_VERSION"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_STRING "$PACKAGE_STRING"
2564_ACEOF
2565
Martin v. Löwis11437992002-04-12 09:54:03 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2568_ACEOF
2569
Matthias Kloseb9621712010-04-24 17:59:49 +00002570cat >>confdefs.h <<_ACEOF
2571#define PACKAGE_URL "$PACKAGE_URL"
2572_ACEOF
2573
Martin v. Löwis11437992002-04-12 09:54:03 +00002574
2575# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002576# Prefer an explicitly selected file to automatically selected ones.
2577ac_site_file1=NONE
2578ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002580 # We do not want a PATH search for config.site.
2581 case $CONFIG_SITE in #((
2582 -*) ac_site_file1=./$CONFIG_SITE;;
2583 */*) ac_site_file1=$CONFIG_SITE;;
2584 *) ac_site_file1=./$CONFIG_SITE;;
2585 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 ac_site_file1=$prefix/share/config.site
2588 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002589else
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 ac_site_file1=$ac_default_prefix/share/config.site
2591 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002592fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002593for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 test "x$ac_site_file" = xNONE && continue
2596 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2597 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2598$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600 . "$ac_site_file" \
2601 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2602$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2603as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002604See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002605 fi
2606done
2607
2608if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 # Some versions of bash will fail to source /dev/null (special files
2610 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2611 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2612 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2613$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2616 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 esac
2618 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002619else
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2621$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 >$cache_file
2623fi
2624
2625# Check that the precious variables saved in the cache have kept the same
2626# value.
2627ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002628for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2630 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2632 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 case $ac_old_set,$ac_new_set in
2634 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2636$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 +00002637 ac_cache_corrupted=: ;;
2638 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2640$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002641 ac_cache_corrupted=: ;;
2642 ,);;
2643 *)
2644 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 # differences in whitespace do not lead to failure.
2646 ac_old_val_w=`echo x $ac_old_val`
2647 ac_new_val_w=`echo x $ac_new_val`
2648 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2650$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2651 ac_cache_corrupted=:
2652 else
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2654$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2655 eval $ac_var=\$ac_old_val
2656 fi
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2658$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2660$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 fi;;
2662 esac
2663 # Pass precious variables to config.status.
2664 if test "$ac_new_set" = set; then
2665 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002666 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 *) ac_arg=$ac_var=$ac_new_val ;;
2668 esac
2669 case " $ac_configure_args " in
2670 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002671 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 esac
2673 fi
2674done
2675if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2678 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2679$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002680 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002682## -------------------- ##
2683## Main body of script. ##
2684## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685
Guido van Rossum7f43da71994-08-01 12:15:30 +00002686ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002688ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2689ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2690ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002691
Guido van Rossum627b2d71993-12-24 10:39:16 +00002692
Michael W. Hudson54241132001-12-07 15:38:26 +00002693
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694
Christian Heimesff5be6e2018-01-20 13:19:21 +01002695
2696
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002697if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002698 # If we're building out-of-tree, we need to make sure the following
2699 # resources get picked up before their $srcdir counterparts.
2700 # Objects/ -> typeslots.inc
2701 # Include/ -> Python-ast.h, graminit.h
2702 # Python/ -> importlib.h
2703 # (A side effect of this is that these resources will automatically be
2704 # regenerated when building out-of-tree, regardless of whether or not
2705 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2706 # off.)
2707 BASECPPFLAGS="-IObjects -IInclude -IPython"
2708else
2709 BASECPPFLAGS=""
2710fi
2711
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002712
2713
2714
2715
Victor Stinner9ed34a82017-05-02 22:35:58 +02002716if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718# Extract the first word of "git", so it can be a program name with args.
2719set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2721$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723 $as_echo_n "(cached) " >&6
2724else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002725 if test -n "$HAS_GIT"; then
2726 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002727else
2728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2729for as_dir in $PATH
2730do
2731 IFS=$as_save_IFS
2732 test -z "$as_dir" && as_dir=.
2733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002735 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2737 break 2
2738 fi
2739done
2740 done
2741IFS=$as_save_IFS
2742
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744fi
2745fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002746HAS_GIT=$ac_cv_prog_HAS_GIT
2747if test -n "$HAS_GIT"; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2749$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750else
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2752$as_echo "no" >&6; }
2753fi
2754
2755
2756else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760then
Xiang Zhang4c855572018-08-20 22:36:19 +08002761 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2762 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2763 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765 GITVERSION=""
2766 GITTAG=""
2767 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002768fi
2769
2770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002772
2773
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002774ac_aux_dir=
2775for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2776 if test -f "$ac_dir/install-sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install-sh -c"
2779 break
2780 elif test -f "$ac_dir/install.sh"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/install.sh -c"
2783 break
2784 elif test -f "$ac_dir/shtool"; then
2785 ac_aux_dir=$ac_dir
2786 ac_install_sh="$ac_aux_dir/shtool install -c"
2787 break
2788 fi
2789done
2790if test -z "$ac_aux_dir"; then
2791 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2792fi
2793
2794# These three variables are undocumented and unsupported,
2795# and are intended to be withdrawn in a future Autoconf release.
2796# They can cause serious problems if a builder's source tree is in a directory
2797# whose full name contains unusual characters.
2798ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2799ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2800ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2801
2802
2803# Make sure we can run config.sub.
2804$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2805 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2806
2807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2808$as_echo_n "checking build system type... " >&6; }
2809if ${ac_cv_build+:} false; then :
2810 $as_echo_n "(cached) " >&6
2811else
2812 ac_build_alias=$build_alias
2813test "x$ac_build_alias" = x &&
2814 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2815test "x$ac_build_alias" = x &&
2816 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2817ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2818 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2819
2820fi
2821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2822$as_echo "$ac_cv_build" >&6; }
2823case $ac_cv_build in
2824*-*-*) ;;
2825*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2826esac
2827build=$ac_cv_build
2828ac_save_IFS=$IFS; IFS='-'
2829set x $ac_cv_build
2830shift
2831build_cpu=$1
2832build_vendor=$2
2833shift; shift
2834# Remember, the first character of IFS is used to create $*,
2835# except with old shells:
2836build_os=$*
2837IFS=$ac_save_IFS
2838case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2839
2840
2841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2842$as_echo_n "checking host system type... " >&6; }
2843if ${ac_cv_host+:} false; then :
2844 $as_echo_n "(cached) " >&6
2845else
2846 if test "x$host_alias" = x; then
2847 ac_cv_host=$ac_cv_build
2848else
2849 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2850 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2851fi
2852
2853fi
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2855$as_echo "$ac_cv_host" >&6; }
2856case $ac_cv_host in
2857*-*-*) ;;
2858*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2859esac
2860host=$ac_cv_host
2861ac_save_IFS=$IFS; IFS='-'
2862set x $ac_cv_host
2863shift
2864host_cpu=$1
2865host_vendor=$2
2866shift; shift
2867# Remember, the first character of IFS is used to create $*,
2868# except with old shells:
2869host_os=$*
2870IFS=$ac_save_IFS
2871case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2872
2873
2874
doko@python.orga10e4a92013-01-25 18:45:12 +01002875
2876
Ned Deilyfcbc2462014-08-22 13:32:49 -07002877# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2878rm -f pybuilddir.txt
2879
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002880for ac_prog in python$PACKAGE_VERSION python3 python
2881do
2882 # Extract the first word of "$ac_prog", so it can be a program name with args.
2883set dummy $ac_prog; ac_word=$2
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2885$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002886if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887 $as_echo_n "(cached) " >&6
2888else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002889 if test -n "$PYTHON_FOR_REGEN"; then
2890 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002891else
2892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2893for as_dir in $PATH
2894do
2895 IFS=$as_save_IFS
2896 test -z "$as_dir" && as_dir=.
2897 for ac_exec_ext in '' $ac_executable_extensions; do
2898 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002899 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002900 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2901 break 2
2902 fi
2903done
2904 done
2905IFS=$as_save_IFS
2906
2907fi
2908fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002909PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2910if test -n "$PYTHON_FOR_REGEN"; then
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2912$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002913else
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2915$as_echo "no" >&6; }
2916fi
2917
2918
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002921test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002922
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002923
2924
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002925if test "$cross_compiling" = yes; then
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2927$as_echo_n "checking for python interpreter for cross build... " >&6; }
2928 if test -z "$PYTHON_FOR_BUILD"; then
2929 for interp in python$PACKAGE_VERSION python3 python; do
2930 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002931 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 +02002932 break
2933 fi
2934 interp=
2935 done
2936 if test x$interp = x; then
2937 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2938 fi
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2940$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002941 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 +02002942 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002943elif test "$cross_compiling" = maybe; then
2944 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002945else
2946 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
Benjamin Petersond23f8222009-04-05 19:13:16 +00002951if test "$prefix" != "/"; then
2952 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
2957
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002958# We don't use PACKAGE_ variables, and they cause conflicts
2959# with other autoconf-based packages that include Python.h
2960grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2961rm confdefs.h
2962mv confdefs.h.new confdefs.h
2963
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002964
Ned Deily5489bda2018-01-31 17:44:09 -05002965VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002966
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002967# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002968
2969SOVERSION=1.0
2970
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971# The later defininition of _XOPEN_SOURCE disables certain features
2972# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975
2976
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982
2983
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989
2990
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2993# them.
2994
Matthias Kloseb9621712010-04-24 17:59:49 +00002995$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002996
2997
2998
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002999define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003000
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003001# Arguments passed to configure.
3002
3003CONFIG_ARGS="$ac_configure_args"
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3006$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003008if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003009 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003010 case $enableval in
3011 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003012 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 # information
3014 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003015 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003017 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3018 if test ! -d "${enableval}"
3019 then
3020 enableval=/
3021 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003023 ;;
3024 esac
3025 case $enableval in
3026 no)
3027 UNIVERSALSDK=
3028 enable_universalsdk=
3029 ;;
3030 *)
3031 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003032 if test ! -d "${UNIVERSALSDK}"
3033 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003034 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036 ;;
3037 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003038
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040else
3041
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003045fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047if test -n "${UNIVERSALSDK}"
3048then
Matthias Kloseb9621712010-04-24 17:59:49 +00003049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3050$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051else
Matthias Kloseb9621712010-04-24 17:59:49 +00003052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003056
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deily87adb6e2013-10-18 21:09:56 -07003058ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003059
Ned Deilycbfb9a52012-06-23 16:02:19 -07003060# For backward compatibility reasons we prefer to select '32-bit' if available,
3061# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003062UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003063if test "`uname -s`" = "Darwin"
3064then
3065 if test -n "${UNIVERSALSDK}"
3066 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003067 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003068 then
3069 UNIVERSAL_ARCHS="intel"
3070 fi
3071 fi
3072fi
3073
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003074
Matthias Kloseb9621712010-04-24 17:59:49 +00003075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3076$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077
3078# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003079if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003080 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081 UNIVERSAL_ARCHS="$withval"
3082
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083fi
3084
Ned Deily87adb6e2013-10-18 21:09:56 -07003085if test -n "${UNIVERSALSDK}"
3086then
3087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3088$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3089else
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3091$as_echo "no" >&6; }
3092fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003094
3095# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003096if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003097 withval=$with_framework_name;
3098 PYTHONFRAMEWORK=${withval}
3099 PYTHONFRAMEWORKDIR=${withval}.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3101
3102else
3103
3104 PYTHONFRAMEWORK=Python
3105 PYTHONFRAMEWORKDIR=Python.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3107
3108fi
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003113 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003114 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003115 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 esac
3117 case $enableval in
3118 no)
3119 PYTHONFRAMEWORK=
3120 PYTHONFRAMEWORKDIR=no-framework
3121 PYTHONFRAMEWORKPREFIX=
3122 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003123 FRAMEWORKINSTALLFIRST=
3124 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003125 FRAMEWORKALTINSTALLFIRST=
3126 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003127 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003128 if test "x${prefix}" = "xNONE"; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003134 ;;
3135 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003136 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003137 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003139 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003140 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3141 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003142 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003145 if test "x${prefix}" = "xNONE" ; then
3146 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 else
3149 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3150 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003151
3152 case "${enableval}" in
3153 /System*)
3154 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3155 if test "${prefix}" = "NONE" ; then
3156 # See below
3157 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3158 fi
3159 ;;
3160
3161 /Library*)
3162 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3163 ;;
3164
3165 */Library/Frameworks)
3166 MDIR="`dirname "${enableval}"`"
3167 MDIR="`dirname "${MDIR}"`"
3168 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3169
3170 if test "${prefix}" = "NONE"; then
3171 # User hasn't specified the
3172 # --prefix option, but wants to install
3173 # the framework in a non-default location,
3174 # ensure that the compatibility links get
3175 # installed relative to that prefix as well
3176 # instead of in /usr/local.
3177 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3178 fi
3179 ;;
3180
3181 *)
3182 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3183 ;;
3184 esac
3185
Jack Jansen127e56e2001-09-11 14:41:54 +00003186 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003192 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3195
3196 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3197
Jack Jansene578a632001-08-15 01:27:14 +00003198 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Guido van Rossum563e7081996-09-10 18:20:48 +00003200else
Martin v. Löwis11437992002-04-12 09:54:03 +00003201
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003203 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003204 PYTHONFRAMEWORKPREFIX=
3205 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206 FRAMEWORKINSTALLFIRST=
3207 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003208 FRAMEWORKALTINSTALLFIRST=
3209 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003210 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003211 if test "x${prefix}" = "xNONE" ; then
3212 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Jack Jansene578a632001-08-15 01:27:14 +00003216 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003217
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003218
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219fi
3220
Thomas Wouters477c8d52006-05-27 19:21:47 +00003221
3222
Michael W. Hudson54241132001-12-07 15:38:26 +00003223
3224
3225
3226
Jack Jansene578a632001-08-15 01:27:14 +00003227
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003228
3229
3230
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003231
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003232
Ned Deilyb8f944f2013-11-21 22:42:25 -08003233
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003234
3235cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003236#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003237_ACEOF
3238
3239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003256 *-*-linux-android*)
3257 ac_sys_system=Linux-android
3258 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003259 *-*-linux*)
3260 ac_sys_system=Linux
3261 ;;
3262 *-*-cygwin*)
3263 ac_sys_system=Cygwin
3264 ;;
3265 *)
3266 # for now, limit cross builds to known configurations
3267 MACHDEP="unknown"
3268 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3269 esac
3270 ac_sys_release=
3271 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003273 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003274 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003275 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003276 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003279 fi
3280 ac_md_system=`echo $ac_sys_system |
3281 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3282 ac_md_release=`echo $ac_sys_release |
3283 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3284 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003285
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003286 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003287 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003288 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003289 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003290 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003292fi
Guido van Rossum91922671997-10-09 20:24:13 +00003293
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003294
3295if test "$cross_compiling" = yes; then
3296 case "$host" in
3297 *-*-linux*)
3298 case "$host_cpu" in
3299 arm*)
3300 _host_cpu=arm
3301 ;;
3302 *)
3303 _host_cpu=$host_cpu
3304 esac
3305 ;;
3306 *-*-cygwin*)
3307 _host_cpu=
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3315fi
3316
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003317# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3318# disable features if it is defined, without any means to access these
3319# features as extensions. For these systems, we skip the definition of
3320# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3321# some feature, make sure there is no alternative way to access this
3322# feature. Also, when using wildcards, make sure you have verified the
3323# need for not defining _XOPEN_SOURCE on all systems matching the
3324# wildcard, and that the wildcard does not include future systems
3325# (which may remove their limitations).
3326case $ac_sys_system/$ac_sys_release in
3327 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3328 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003329 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003330 # In addition, Stefan Krah confirms that issue #1244610 exists through
3331 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003332 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003333 define_xopen_source=no
3334 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3335 # also defined. This can be overridden by defining _BSD_SOURCE
3336 # As this has a different meaning on Linux, only define it on OpenBSD
3337
Matthias Kloseb9621712010-04-24 17:59:49 +00003338$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339
3340 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003341 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3343 # also defined. This can be overridden by defining _BSD_SOURCE
3344 # As this has a different meaning on Linux, only define it on OpenBSD
3345
Matthias Kloseb9621712010-04-24 17:59:49 +00003346$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347
3348 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003349 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3350 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3351 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003352 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 +00003353 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003354 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3355 # request to enable features supported by the standard as a request
3356 # to disable features not supported by the standard. The best way
3357 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3358 # entirely and define __EXTENSIONS__ instead.
3359 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003360 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3362 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003363 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003364 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 define_xopen_source=no;;
3366 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003369 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003370 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3371 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3372 # identifies itself as Darwin/7.*
3373 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3374 # disables platform specific features beyond repair.
3375 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # has no effect, don't bother defining them
3377 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003378 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003379 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003380 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003381 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3382 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3383 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003384 AIX/4)
3385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 AIX/5)
3387 if test `uname -r` -eq 1; then
3388 define_xopen_source=no
3389 fi
3390 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003391 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3392 # defining NI_NUMERICHOST.
3393 QNX/6.3.2)
3394 define_xopen_source=no
3395 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003396
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397esac
3398
3399if test $define_xopen_source = yes
3400then
Victor Stinner14d098d2011-09-07 22:29:43 +02003401 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
Victor Stinner14d098d2011-09-07 22:29:43 +02003403$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003405
3406 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3407 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3408 # several APIs are not declared. Since this is also needed in some
3409 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Matthias Kloseb9621712010-04-24 17:59:49 +00003411$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003414
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003415$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003417fi
3418
Christian Heimes647cd872013-12-07 23:39:33 +01003419# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3420case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003421 hp*|HP*)
3422 define_stdc_a1=yes;;
3423 *)
3424 define_stdc_a1=no;;
3425esac
3426
3427if test $define_stdc_a1 = yes
3428then
Christian Heimes647cd872013-12-07 23:39:33 +01003429
3430$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3431
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432fi
Christian Heimes647cd872013-12-07 23:39:33 +01003433
Jack Jansen6b08a402004-06-03 12:41:45 +00003434# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3435# it may influence the way we can build extensions, so distutils
3436# needs to check it
3437
Thomas Wouters477c8d52006-05-27 19:21:47 +00003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003440EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003441
Guido van Rossum627b2d71993-12-24 10:39:16 +00003442# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003443
3444# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3445# for debug/optimization stuff. BASECFLAGS is for flags that are required
3446# just to get things to compile and link. Users are free to override OPT
3447# when running configure or make. The build should not break if they do.
3448# BASECFLAGS should generally not be messed with, however.
3449
Guido van Rossum8b131c51995-03-09 14:10:13 +00003450# If the user switches compilers, we can't believe the cache
3451if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3452then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003453 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003454(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003455fi
3456
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003457# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3458# when the compiler supports them, but we don't always want -O2, and
3459# we set -g later.
3460if test -z "$CFLAGS"; then
3461 CFLAGS=
3462fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003463
3464if test "$ac_sys_system" = "Darwin"
3465then
3466 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003467 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003468 # information
3469 if test -z "${CC}"
3470 then
3471 found_gcc=
3472 found_clang=
3473 as_save_IFS=$IFS; IFS=:
3474 for as_dir in $PATH
3475 do
3476 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003477 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003479 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003480 fi
3481 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003482 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003483 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003484 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003485 fi
3486 fi
3487 done
3488 IFS=$as_save_IFS
3489
3490 if test -n "$found_gcc" -a -n "$found_clang"
3491 then
3492 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3493 then
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3495$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3496 CC="$found_clang"
3497 CXX="$found_clang++"
3498 fi
3499
3500
3501 elif test -z "$found_gcc" -a -n "$found_clang"
3502 then
3503 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3504$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3505 CC="$found_clang"
3506 CXX="$found_clang++"
3507
3508 elif test -z "$found_gcc" -a -z "$found_clang"
3509 then
3510 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3511 if test -n "${found_clang}"
3512 then
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3514$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3515 CC="${found_clang}"
3516 CXX="`/usr/bin/xcrun -find clang++`"
3517
3518 # else: use default behaviour
3519 fi
3520 fi
3521 fi
3522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003523ac_ext=c
3524ac_cpp='$CPP $CPPFLAGS'
3525ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3526ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3527ac_compiler_gnu=$ac_cv_c_compiler_gnu
3528if test -n "$ac_tool_prefix"; then
3529 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3530set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3532$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003533if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003534 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003535else
3536 if test -n "$CC"; then
3537 ac_cv_prog_CC="$CC" # Let the user override the test.
3538else
Martin v. Löwis11437992002-04-12 09:54:03 +00003539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3540for as_dir in $PATH
3541do
3542 IFS=$as_save_IFS
3543 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003546 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003547 $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 +00003548 break 2
3549 fi
3550done
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003552IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003553
Jack Jansendd19cf82001-12-06 22:36:17 +00003554fi
3555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003556CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003557if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3559$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003560else
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3562$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003563fi
3564
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003565
Martin v. Löwis11437992002-04-12 09:54:03 +00003566fi
3567if test -z "$ac_cv_prog_CC"; then
3568 ac_ct_CC=$CC
3569 # Extract the first word of "gcc", so it can be a program name with args.
3570set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003573if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003574 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003575else
3576 if test -n "$ac_ct_CC"; then
3577 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3578else
3579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3580for as_dir in $PATH
3581do
3582 IFS=$as_save_IFS
3583 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 $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 +00003588 break 2
3589 fi
3590done
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003593
3594fi
3595fi
3596ac_ct_CC=$ac_cv_prog_ac_ct_CC
3597if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3599$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600else
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3602$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003603fi
3604
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003605 if test "x$ac_ct_CC" = x; then
3606 CC=""
3607 else
3608 case $cross_compiling:$ac_tool_warned in
3609yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3611$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612ac_tool_warned=yes ;;
3613esac
3614 CC=$ac_ct_CC
3615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616else
3617 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003618fi
3619
Jack Jansendd19cf82001-12-06 22:36:17 +00003620if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003621 if test -n "$ac_tool_prefix"; then
3622 # 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 +00003623set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3625$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003626if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003628else
3629 if test -n "$CC"; then
3630 ac_cv_prog_CC="$CC" # Let the user override the test.
3631else
Martin v. Löwis11437992002-04-12 09:54:03 +00003632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3633for as_dir in $PATH
3634do
3635 IFS=$as_save_IFS
3636 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003639 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 $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 +00003641 break 2
3642 fi
3643done
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003645IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003646
3647fi
3648fi
3649CC=$ac_cv_prog_CC
3650if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3652$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653else
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3655$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003656fi
3657
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003658
Martin v. Löwis11437992002-04-12 09:54:03 +00003659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003660fi
3661if test -z "$CC"; then
3662 # Extract the first word of "cc", so it can be a program name with args.
3663set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3665$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003666if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003667 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003668else
3669 if test -n "$CC"; then
3670 ac_cv_prog_CC="$CC" # Let the user override the test.
3671else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003672 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003673as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3674for as_dir in $PATH
3675do
3676 IFS=$as_save_IFS
3677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003680 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3681 ac_prog_rejected=yes
3682 continue
3683 fi
3684 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003685 $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 +00003686 break 2
3687 fi
3688done
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003690IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003691
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003692if test $ac_prog_rejected = yes; then
3693 # We found a bogon in the path, so make sure we never use it.
3694 set dummy $ac_cv_prog_CC
3695 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003696 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697 # We chose a different compiler from the bogus one.
3698 # However, it has the same basename, so the bogon will be chosen
3699 # first if we set CC to just the basename; use the full file name.
3700 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702 fi
3703fi
3704fi
3705fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003706CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3709$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710else
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3712$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713fi
3714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003715
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717if test -z "$CC"; then
3718 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003719 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 do
3721 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3722set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003725if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003727else
3728 if test -n "$CC"; then
3729 ac_cv_prog_CC="$CC" # Let the user override the test.
3730else
Martin v. Löwis11437992002-04-12 09:54:03 +00003731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3732for as_dir in $PATH
3733do
3734 IFS=$as_save_IFS
3735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003738 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $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 +00003740 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003742done
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003744IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003745
3746fi
3747fi
3748CC=$ac_cv_prog_CC
3749if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3751$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752else
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3754$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003755fi
3756
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003757
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 test -n "$CC" && break
3759 done
3760fi
3761if test -z "$CC"; then
3762 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003764do
3765 # Extract the first word of "$ac_prog", so it can be a program name with args.
3766set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3768$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003769if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003771else
3772 if test -n "$ac_ct_CC"; then
3773 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3774else
3775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3776for as_dir in $PATH
3777do
3778 IFS=$as_save_IFS
3779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003782 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 $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 +00003784 break 2
3785 fi
3786done
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003789
Martin v. Löwis11437992002-04-12 09:54:03 +00003790fi
3791fi
3792ac_ct_CC=$ac_cv_prog_ac_ct_CC
3793if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3795$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003796else
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 test -n "$ac_ct_CC" && break
3803done
Michael W. Hudson54241132001-12-07 15:38:26 +00003804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805 if test "x$ac_ct_CC" = x; then
3806 CC=""
3807 else
3808 case $cross_compiling:$ac_tool_warned in
3809yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3811$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812ac_tool_warned=yes ;;
3813esac
3814 CC=$ac_ct_CC
3815 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003816fi
3817
3818fi
3819
3820
Matthias Kloseb9621712010-04-24 17:59:49 +00003821test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003823as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003824See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003825
3826# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003827$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3828set X $ac_compile
3829ac_compiler=$2
3830for ac_option in --version -v -V -qversion; do
3831 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832case "(($ac_try" in
3833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3834 *) ac_try_echo=$ac_try;;
3835esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003836eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3837$as_echo "$ac_try_echo"; } >&5
3838 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 if test -s conftest.err; then
3841 sed '10a\
3842... rest of stderr output deleted ...
3843 10q' conftest.err >conftest.er1
3844 cat conftest.er1 >&5
3845 fi
3846 rm -f conftest.er1 conftest.err
3847 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3848 test $ac_status = 0; }
3849done
Martin v. Löwis11437992002-04-12 09:54:03 +00003850
Matthias Kloseb9621712010-04-24 17:59:49 +00003851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003852/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003853
Martin v. Löwis11437992002-04-12 09:54:03 +00003854int
3855main ()
3856{
3857
3858 ;
3859 return 0;
3860}
3861_ACEOF
3862ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003863ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003864# Try to create an executable without -o first, disregard a.out.
3865# It will help us diagnose broken compilers, and finding out an intuition
3866# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3868$as_echo_n "checking whether the C compiler works... " >&6; }
3869ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3870
3871# The possible output files:
3872ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874ac_rmfiles=
3875for ac_file in $ac_files
3876do
3877 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3880 esac
3881done
3882rm -f $ac_rmfiles
3883
Matthias Kloseb9621712010-04-24 17:59:49 +00003884if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885case "(($ac_try" in
3886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3887 *) ac_try_echo=$ac_try;;
3888esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003889eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3890$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003892 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003893 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3894 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3896# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3897# in a Makefile. We should not override ac_cv_exeext if it was cached,
3898# so that the user can short-circuit this test for compilers unknown to
3899# Autoconf.
3900for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003901do
3902 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003903 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003904 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003905 ;;
3906 [ab].out )
3907 # We found the default executable, but exeext='' is most
3908 # certainly right.
3909 break;;
3910 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 then :; else
3913 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3914 fi
3915 # We set ac_cv_exeext here because the later test for it is not
3916 # safe: cross compilers may not add the suffix if given an `-o'
3917 # argument, so we may need to know it at that point already.
3918 # Even if this section looks crufty: it has the advantage of
3919 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003920 break;;
3921 * )
3922 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003923 esac
3924done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003925test "$ac_cv_exeext" = no && ac_cv_exeext=
3926
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003927else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 ac_file=''
3929fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003930if test -z "$ac_file"; then :
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3932$as_echo "no" >&6; }
3933$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003934sed 's/^/| /' conftest.$ac_ext >&5
3935
Matthias Kloseb9621712010-04-24 17:59:49 +00003936{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003938as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003939See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003940else
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3942$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3945$as_echo_n "checking for C compiler default output file name... " >&6; }
3946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3947$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003948ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003949
Matthias Kloseb9621712010-04-24 17:59:49 +00003950rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003951ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3953$as_echo_n "checking for suffix of executables... " >&6; }
3954if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955case "(($ac_try" in
3956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3957 *) ac_try_echo=$ac_try;;
3958esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003959eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3960$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003963 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3964 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3966# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3967# work properly (i.e., refer to `conftest.exe'), while it won't with
3968# `rm'.
3969for ac_file in conftest.exe conftest conftest.*; do
3970 test -f "$ac_file" || continue
3971 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003973 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 break;;
3975 * ) break;;
3976 esac
3977done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003978else
Matthias Kloseb9621712010-04-24 17:59:49 +00003979 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3980$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003981as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003982See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003983fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003984rm -f conftest conftest$ac_cv_exeext
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3986$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987
3988rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003989EXEEXT=$ac_cv_exeext
3990ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3992/* end confdefs.h. */
3993#include <stdio.h>
3994int
3995main ()
3996{
3997FILE *f = fopen ("conftest.out", "w");
3998 return ferror (f) || fclose (f) != 0;
3999
4000 ;
4001 return 0;
4002}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004004ac_clean_files="$ac_clean_files conftest.out"
4005# Check that the compiler produces executables we can run. If not, either
4006# the compiler is broken, or we cross compile.
4007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4008$as_echo_n "checking whether we are cross compiling... " >&6; }
4009if test "$cross_compiling" != yes; then
4010 { { ac_try="$ac_link"
4011case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
4015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016$as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_link") 2>&5
4018 ac_status=$?
4019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4020 test $ac_status = 0; }
4021 if { ac_try='./conftest$ac_cv_exeext'
4022 { { case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
4026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4027$as_echo "$ac_try_echo"; } >&5
4028 (eval "$ac_try") 2>&5
4029 ac_status=$?
4030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4031 test $ac_status = 0; }; }; then
4032 cross_compiling=no
4033 else
4034 if test "$cross_compiling" = maybe; then
4035 cross_compiling=yes
4036 else
4037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004039as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004040If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004041See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 fi
4043 fi
4044fi
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4046$as_echo "$cross_compiling" >&6; }
4047
4048rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4049ac_clean_files=$ac_clean_files_save
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4051$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004052if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 $as_echo_n "(cached) " >&6
4054else
4055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004056/* end confdefs.h. */
4057
4058int
4059main ()
4060{
4061
4062 ;
4063 return 0;
4064}
4065_ACEOF
4066rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004067if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004068case "(($ac_try" in
4069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4070 *) ac_try_echo=$ac_try;;
4071esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4073$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004076 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4077 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078 for ac_file in conftest.o conftest.obj conftest.*; do
4079 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004082 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4083 break;;
4084 esac
4085done
4086else
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004088sed 's/^/| /' conftest.$ac_ext >&5
4089
Matthias Kloseb9621712010-04-24 17:59:49 +00004090{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004092as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004093See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004094fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004096fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4098$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004099OBJEXT=$ac_cv_objext
4100ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4102$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004103if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004105else
Matthias Kloseb9621712010-04-24 17:59:49 +00004106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004108
Martin v. Löwis11437992002-04-12 09:54:03 +00004109int
4110main ()
4111{
4112#ifndef __GNUC__
4113 choke me
4114#endif
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004120if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 ac_compiler_gnu=yes
4122else
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004126ac_cv_c_compiler_gnu=$ac_compiler_gnu
4127
4128fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4130$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4131if test $ac_compiler_gnu = yes; then
4132 GCC=yes
4133else
4134 GCC=
4135fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004136ac_test_CFLAGS=${CFLAGS+set}
4137ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4139$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004140if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004142else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004143 ac_save_c_werror_flag=$ac_c_werror_flag
4144 ac_c_werror_flag=yes
4145 ac_cv_prog_cc_g=no
4146 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004148/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004149
Martin v. Löwis11437992002-04-12 09:54:03 +00004150int
4151main ()
4152{
4153
4154 ;
4155 return 0;
4156}
4157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004158if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004159 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160else
Matthias Kloseb9621712010-04-24 17:59:49 +00004161 CFLAGS=""
4162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004163/* end confdefs.h. */
4164
4165int
4166main ()
4167{
4168
4169 ;
4170 return 0;
4171}
4172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004173if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174
Matthias Kloseb9621712010-04-24 17:59:49 +00004175else
4176 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004177 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179/* end confdefs.h. */
4180
4181int
4182main ()
4183{
4184
4185 ;
4186 return 0;
4187}
4188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004189if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4197 ac_c_werror_flag=$ac_save_c_werror_flag
4198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4200$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004201if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004203elif test $ac_cv_prog_cc_g = yes; then
4204 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004205 CFLAGS="-g -O2"
4206 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004207 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208 fi
4209else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004210 if test "$GCC" = yes; then
4211 CFLAGS="-O2"
4212 else
4213 CFLAGS=
4214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4217$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004218if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004220else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004222ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004224/* end confdefs.h. */
4225#include <stdarg.h>
4226#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004227struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4229struct buf { int x; };
4230FILE * (*rcsopen) (struct buf *, struct stat *, int);
4231static char *e (p, i)
4232 char **p;
4233 int i;
4234{
4235 return p[i];
4236}
4237static char *f (char * (*g) (char **, int), char **p, ...)
4238{
4239 char *s;
4240 va_list v;
4241 va_start (v,p);
4242 s = g (p, va_arg (v,int));
4243 va_end (v);
4244 return s;
4245}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004246
4247/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4248 function prototypes and stuff, but not '\xHH' hex character constants.
4249 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004251 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4252 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004253 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004254int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4257 inside strings and character constants. */
4258#define FOO(x) 'x'
4259int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4260
Skip Montanaro6dead952003-09-25 14:50:04 +00004261int test (int i, double x);
4262struct s1 {int (*f) (int a);};
4263struct s2 {int (*f) (double a);};
4264int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4265int argc;
4266char **argv;
4267int
4268main ()
4269{
4270return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4271 ;
4272 return 0;
4273}
4274_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4276 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004277do
4278 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004282rm -f core conftest.err conftest.$ac_objext
4283 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004284done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004286CC=$ac_save_CC
4287
4288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289# AC_CACHE_VAL
4290case "x$ac_cv_prog_cc_c89" in
4291 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4293$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4296$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004297 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004298 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4300$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004301esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004302if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004303
Matthias Kloseb9621712010-04-24 17:59:49 +00004304fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306ac_ext=c
4307ac_cpp='$CPP $CPPFLAGS'
4308ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4309ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4310ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
4317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4318$as_echo_n "checking how to run the C preprocessor... " >&6; }
4319# On Suns, sometimes $CPP names a directory.
4320if test -n "$CPP" && test -d "$CPP"; then
4321 CPP=
4322fi
4323if test -z "$CPP"; then
4324 if ${ac_cv_prog_CPP+:} false; then :
4325 $as_echo_n "(cached) " >&6
4326else
4327 # Double quotes because CPP needs to be expanded
4328 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4329 do
4330 ac_preproc_ok=false
4331for ac_c_preproc_warn_flag in '' yes
4332do
4333 # Use a header file that comes with gcc, so configuring glibc
4334 # with a fresh cross-compiler works.
4335 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4336 # <limits.h> exists even on freestanding compilers.
4337 # On the NeXT, cc -E runs the code through the compiler's parser,
4338 # not just through cpp. "Syntax error" is here to catch this case.
4339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4340/* end confdefs.h. */
4341#ifdef __STDC__
4342# include <limits.h>
4343#else
4344# include <assert.h>
4345#endif
4346 Syntax error
4347_ACEOF
4348if ac_fn_c_try_cpp "$LINENO"; then :
4349
4350else
4351 # Broken: fails on valid input.
4352continue
4353fi
4354rm -f conftest.err conftest.i conftest.$ac_ext
4355
4356 # OK, works on sane cases. Now check whether nonexistent headers
4357 # can be detected and how.
4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4359/* end confdefs.h. */
4360#include <ac_nonexistent.h>
4361_ACEOF
4362if ac_fn_c_try_cpp "$LINENO"; then :
4363 # Broken: success on invalid input.
4364continue
4365else
4366 # Passes both tests.
4367ac_preproc_ok=:
4368break
4369fi
4370rm -f conftest.err conftest.i conftest.$ac_ext
4371
4372done
4373# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4374rm -f conftest.i conftest.err conftest.$ac_ext
4375if $ac_preproc_ok; then :
4376 break
4377fi
4378
4379 done
4380 ac_cv_prog_CPP=$CPP
4381
4382fi
4383 CPP=$ac_cv_prog_CPP
4384else
4385 ac_cv_prog_CPP=$CPP
4386fi
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4388$as_echo "$CPP" >&6; }
4389ac_preproc_ok=false
4390for ac_c_preproc_warn_flag in '' yes
4391do
4392 # Use a header file that comes with gcc, so configuring glibc
4393 # with a fresh cross-compiler works.
4394 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4395 # <limits.h> exists even on freestanding compilers.
4396 # On the NeXT, cc -E runs the code through the compiler's parser,
4397 # not just through cpp. "Syntax error" is here to catch this case.
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399/* end confdefs.h. */
4400#ifdef __STDC__
4401# include <limits.h>
4402#else
4403# include <assert.h>
4404#endif
4405 Syntax error
4406_ACEOF
4407if ac_fn_c_try_cpp "$LINENO"; then :
4408
4409else
4410 # Broken: fails on valid input.
4411continue
4412fi
4413rm -f conftest.err conftest.i conftest.$ac_ext
4414
4415 # OK, works on sane cases. Now check whether nonexistent headers
4416 # can be detected and how.
4417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4418/* end confdefs.h. */
4419#include <ac_nonexistent.h>
4420_ACEOF
4421if ac_fn_c_try_cpp "$LINENO"; then :
4422 # Broken: success on invalid input.
4423continue
4424else
4425 # Passes both tests.
4426ac_preproc_ok=:
4427break
4428fi
4429rm -f conftest.err conftest.i conftest.$ac_ext
4430
4431done
4432# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4433rm -f conftest.i conftest.err conftest.$ac_ext
4434if $ac_preproc_ok; then :
4435
4436else
4437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4438$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4439as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4440See \`config.log' for more details" "$LINENO" 5; }
4441fi
4442
4443ac_ext=c
4444ac_cpp='$CPP $CPPFLAGS'
4445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4447ac_compiler_gnu=$ac_cv_c_compiler_gnu
4448
4449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4450$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4451if ${ac_cv_path_GREP+:} false; then :
4452 $as_echo_n "(cached) " >&6
4453else
4454 if test -z "$GREP"; then
4455 ac_path_GREP_found=false
4456 # Loop through the user's path and test for each of PROGNAME-LIST
4457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4459do
4460 IFS=$as_save_IFS
4461 test -z "$as_dir" && as_dir=.
4462 for ac_prog in grep ggrep; do
4463 for ac_exec_ext in '' $ac_executable_extensions; do
4464 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4465 as_fn_executable_p "$ac_path_GREP" || continue
4466# Check for GNU ac_path_GREP and select it if it is found.
4467 # Check for GNU $ac_path_GREP
4468case `"$ac_path_GREP" --version 2>&1` in
4469*GNU*)
4470 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4471*)
4472 ac_count=0
4473 $as_echo_n 0123456789 >"conftest.in"
4474 while :
4475 do
4476 cat "conftest.in" "conftest.in" >"conftest.tmp"
4477 mv "conftest.tmp" "conftest.in"
4478 cp "conftest.in" "conftest.nl"
4479 $as_echo 'GREP' >> "conftest.nl"
4480 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4481 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4482 as_fn_arith $ac_count + 1 && ac_count=$as_val
4483 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4484 # Best one so far, save it but keep looking for a better one
4485 ac_cv_path_GREP="$ac_path_GREP"
4486 ac_path_GREP_max=$ac_count
4487 fi
4488 # 10*(2^10) chars as input seems more than enough
4489 test $ac_count -gt 10 && break
4490 done
4491 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4492esac
4493
4494 $ac_path_GREP_found && break 3
4495 done
4496 done
4497 done
4498IFS=$as_save_IFS
4499 if test -z "$ac_cv_path_GREP"; then
4500 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4501 fi
4502else
4503 ac_cv_path_GREP=$GREP
4504fi
4505
4506fi
4507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4508$as_echo "$ac_cv_path_GREP" >&6; }
4509 GREP="$ac_cv_path_GREP"
4510
4511
Łukasz Langaa785c872016-09-09 17:37:37 -07004512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4513$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4514if ${ac_cv_path_SED+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516else
4517 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4518 for ac_i in 1 2 3 4 5 6 7; do
4519 ac_script="$ac_script$as_nl$ac_script"
4520 done
4521 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4522 { ac_script=; unset ac_script;}
4523 if test -z "$SED"; then
4524 ac_path_SED_found=false
4525 # Loop through the user's path and test for each of PROGNAME-LIST
4526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in sed gsed; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4534 as_fn_executable_p "$ac_path_SED" || continue
4535# Check for GNU ac_path_SED and select it if it is found.
4536 # Check for GNU $ac_path_SED
4537case `"$ac_path_SED" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4540*)
4541 ac_count=0
4542 $as_echo_n 0123456789 >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 $as_echo '' >> "conftest.nl"
4549 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 as_fn_arith $ac_count + 1 && ac_count=$as_val
4552 if test $ac_count -gt ${ac_path_SED_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_SED="$ac_path_SED"
4555 ac_path_SED_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563 $ac_path_SED_found && break 3
4564 done
4565 done
4566 done
4567IFS=$as_save_IFS
4568 if test -z "$ac_cv_path_SED"; then
4569 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4570 fi
4571else
4572 ac_cv_path_SED=$SED
4573fi
4574
4575fi
4576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4577$as_echo "$ac_cv_path_SED" >&6; }
4578 SED="$ac_cv_path_SED"
4579 rm -f conftest.sed
4580
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004581
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582
4583
Matthias Kloseb9621712010-04-24 17:59:49 +00004584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4585$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004587# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004588if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004589 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590
4591 case $withval in
4592 no) with_cxx_main=no
4593 MAINCC='$(CC)';;
4594 yes) with_cxx_main=yes
4595 MAINCC='$(CXX)';;
4596 *) with_cxx_main=yes
4597 MAINCC=$withval
4598 if test -z "$CXX"
4599 then
4600 CXX=$withval
4601 fi;;
4602 esac
4603else
4604
4605 with_cxx_main=no
4606 MAINCC='$(CC)'
4607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004608fi
4609
Matthias Kloseb9621712010-04-24 17:59:49 +00004610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4611$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004612
4613preset_cxx="$CXX"
4614if test -z "$CXX"
4615then
4616 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004617 gcc) if test -n "$ac_tool_prefix"; then
4618 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4619set dummy ${ac_tool_prefix}g++; ac_word=$2
4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4621$as_echo_n "checking for $ac_word... " >&6; }
4622if ${ac_cv_path_CXX+:} false; then :
4623 $as_echo_n "(cached) " >&6
4624else
4625 case $CXX in
4626 [\\/]* | ?:[\\/]*)
4627 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4628 ;;
4629 *)
4630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4631for as_dir in notfound
4632do
4633 IFS=$as_save_IFS
4634 test -z "$as_dir" && as_dir=.
4635 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004637 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4639 break 2
4640 fi
4641done
4642 done
4643IFS=$as_save_IFS
4644
4645 ;;
4646esac
4647fi
4648CXX=$ac_cv_path_CXX
4649if test -n "$CXX"; then
4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4651$as_echo "$CXX" >&6; }
4652else
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4654$as_echo "no" >&6; }
4655fi
4656
4657
4658fi
4659if test -z "$ac_cv_path_CXX"; then
4660 ac_pt_CXX=$CXX
4661 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004662set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4664$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004665if ${ac_cv_path_ac_pt_CXX+:} false; then :
4666 $as_echo_n "(cached) " >&6
4667else
4668 case $ac_pt_CXX in
4669 [\\/]* | ?:[\\/]*)
4670 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4671 ;;
4672 *)
4673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4674for as_dir in notfound
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
4678 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004680 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4682 break 2
4683 fi
4684done
4685 done
4686IFS=$as_save_IFS
4687
4688 ;;
4689esac
4690fi
4691ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4692if test -n "$ac_pt_CXX"; then
4693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4694$as_echo "$ac_pt_CXX" >&6; }
4695else
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4697$as_echo "no" >&6; }
4698fi
4699
4700 if test "x$ac_pt_CXX" = x; then
4701 CXX="g++"
4702 else
4703 case $cross_compiling:$ac_tool_warned in
4704yes:)
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4706$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4707ac_tool_warned=yes ;;
4708esac
4709 CXX=$ac_pt_CXX
4710 fi
4711else
4712 CXX="$ac_cv_path_CXX"
4713fi
4714 ;;
4715 cc) if test -n "$ac_tool_prefix"; then
4716 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4717set dummy ${ac_tool_prefix}c++; ac_word=$2
4718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4719$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004720if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004721 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004722else
4723 case $CXX in
4724 [\\/]* | ?:[\\/]*)
4725 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4726 ;;
4727 *)
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729for as_dir in notfound
4730do
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004733 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004735 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004737 break 2
4738 fi
4739done
Matthias Kloseb9621712010-04-24 17:59:49 +00004740 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004741IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743 ;;
4744esac
4745fi
4746CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004747if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4749$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750else
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4752$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004754
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755
4756fi
4757if test -z "$ac_cv_path_CXX"; then
4758 ac_pt_CXX=$CXX
4759 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4762$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004763if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004764 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 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 +00004769 ;;
4770 *)
4771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4772for as_dir in notfound
4773do
4774 IFS=$as_save_IFS
4775 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004776 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004780 break 2
4781 fi
4782done
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004784IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 ;;
4787esac
4788fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4790if test -n "$ac_pt_CXX"; then
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4792$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004793else
Matthias Kloseb9621712010-04-24 17:59:49 +00004794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4795$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004797
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004798 if test "x$ac_pt_CXX" = x; then
4799 CXX="c++"
4800 else
4801 case $cross_compiling:$ac_tool_warned in
4802yes:)
4803{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4804$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4805ac_tool_warned=yes ;;
4806esac
4807 CXX=$ac_pt_CXX
4808 fi
4809else
4810 CXX="$ac_cv_path_CXX"
4811fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004813 clang|*/clang) if test -n "$ac_tool_prefix"; then
4814 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4815set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4817$as_echo_n "checking for $ac_word... " >&6; }
4818if ${ac_cv_path_CXX+:} false; then :
4819 $as_echo_n "(cached) " >&6
4820else
4821 case $CXX in
4822 [\\/]* | ?:[\\/]*)
4823 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4824 ;;
4825 *)
4826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4827for as_dir in notfound
4828do
4829 IFS=$as_save_IFS
4830 test -z "$as_dir" && as_dir=.
4831 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004833 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4835 break 2
4836 fi
4837done
4838 done
4839IFS=$as_save_IFS
4840
Ned Deilycbfb9a52012-06-23 16:02:19 -07004841 ;;
4842esac
4843fi
4844CXX=$ac_cv_path_CXX
4845if test -n "$CXX"; then
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4847$as_echo "$CXX" >&6; }
4848else
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4850$as_echo "no" >&6; }
4851fi
4852
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004853
4854fi
4855if test -z "$ac_cv_path_CXX"; then
4856 ac_pt_CXX=$CXX
4857 # Extract the first word of "clang++", so it can be a program name with args.
4858set dummy clang++; ac_word=$2
4859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4860$as_echo_n "checking for $ac_word... " >&6; }
4861if ${ac_cv_path_ac_pt_CXX+:} false; then :
4862 $as_echo_n "(cached) " >&6
4863else
4864 case $ac_pt_CXX in
4865 [\\/]* | ?:[\\/]*)
4866 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4867 ;;
4868 *)
4869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4870for as_dir in notfound
4871do
4872 IFS=$as_save_IFS
4873 test -z "$as_dir" && as_dir=.
4874 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004876 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4878 break 2
4879 fi
4880done
4881 done
4882IFS=$as_save_IFS
4883
4884 ;;
4885esac
4886fi
4887ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4888if test -n "$ac_pt_CXX"; then
4889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4890$as_echo "$ac_pt_CXX" >&6; }
4891else
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4893$as_echo "no" >&6; }
4894fi
4895
4896 if test "x$ac_pt_CXX" = x; then
4897 CXX="clang++"
4898 else
4899 case $cross_compiling:$ac_tool_warned in
4900yes:)
4901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4903ac_tool_warned=yes ;;
4904esac
4905 CXX=$ac_pt_CXX
4906 fi
4907else
4908 CXX="$ac_cv_path_CXX"
4909fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004910 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004911 icc|*/icc) if test -n "$ac_tool_prefix"; then
4912 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4913set dummy ${ac_tool_prefix}icpc; ac_word=$2
4914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4915$as_echo_n "checking for $ac_word... " >&6; }
4916if ${ac_cv_path_CXX+:} false; then :
4917 $as_echo_n "(cached) " >&6
4918else
4919 case $CXX in
4920 [\\/]* | ?:[\\/]*)
4921 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4922 ;;
4923 *)
4924 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4925for as_dir in notfound
4926do
4927 IFS=$as_save_IFS
4928 test -z "$as_dir" && as_dir=.
4929 for ac_exec_ext in '' $ac_executable_extensions; do
4930 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4931 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4932 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4933 break 2
4934 fi
4935done
4936 done
4937IFS=$as_save_IFS
4938
4939 ;;
4940esac
4941fi
4942CXX=$ac_cv_path_CXX
4943if test -n "$CXX"; then
4944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4945$as_echo "$CXX" >&6; }
4946else
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4948$as_echo "no" >&6; }
4949fi
4950
4951
4952fi
4953if test -z "$ac_cv_path_CXX"; then
4954 ac_pt_CXX=$CXX
4955 # Extract the first word of "icpc", so it can be a program name with args.
4956set dummy icpc; ac_word=$2
4957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4958$as_echo_n "checking for $ac_word... " >&6; }
4959if ${ac_cv_path_ac_pt_CXX+:} false; then :
4960 $as_echo_n "(cached) " >&6
4961else
4962 case $ac_pt_CXX in
4963 [\\/]* | ?:[\\/]*)
4964 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4965 ;;
4966 *)
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in notfound
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 for ac_exec_ext in '' $ac_executable_extensions; do
4973 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4974 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4975 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4976 break 2
4977 fi
4978done
4979 done
4980IFS=$as_save_IFS
4981
4982 ;;
4983esac
4984fi
4985ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4986if test -n "$ac_pt_CXX"; then
4987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4988$as_echo "$ac_pt_CXX" >&6; }
4989else
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4991$as_echo "no" >&6; }
4992fi
4993
4994 if test "x$ac_pt_CXX" = x; then
4995 CXX="icpc"
4996 else
4997 case $cross_compiling:$ac_tool_warned in
4998yes:)
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5001ac_tool_warned=yes ;;
5002esac
5003 CXX=$ac_pt_CXX
5004 fi
5005else
5006 CXX="$ac_cv_path_CXX"
5007fi
5008 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005009 esac
5010 if test "$CXX" = "notfound"
5011 then
5012 CXX=""
5013 fi
5014fi
5015if test -z "$CXX"
5016then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005017 if test -n "$ac_tool_prefix"; then
5018 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5019 do
5020 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5021set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5023$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005024if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005025 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005026else
5027 if test -n "$CXX"; then
5028 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5029else
5030as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005037 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005039 break 2
5040 fi
5041done
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005044
5045fi
5046fi
5047CXX=$ac_cv_prog_CXX
5048if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5050$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005051else
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054fi
5055
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005057 test -n "$CXX" && break
5058 done
5059fi
5060if test -z "$CXX"; then
5061 ac_ct_CXX=$CXX
5062 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5063do
5064 # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5069 $as_echo_n "(cached) " >&6
5070else
5071 if test -n "$ac_ct_CXX"; then
5072 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5073else
5074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077 IFS=$as_save_IFS
5078 test -z "$as_dir" && as_dir=.
5079 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005081 ac_cv_prog_ac_ct_CXX="$ac_prog"
5082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083 break 2
5084 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005085done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 done
5087IFS=$as_save_IFS
5088
5089fi
5090fi
5091ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5092if test -n "$ac_ct_CXX"; then
5093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5094$as_echo "$ac_ct_CXX" >&6; }
5095else
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5097$as_echo "no" >&6; }
5098fi
5099
5100
5101 test -n "$ac_ct_CXX" && break
5102done
5103
5104 if test "x$ac_ct_CXX" = x; then
5105 CXX="notfound"
5106 else
5107 case $cross_compiling:$ac_tool_warned in
5108yes:)
5109{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5110$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5111ac_tool_warned=yes ;;
5112esac
5113 CXX=$ac_ct_CXX
5114 fi
5115fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116
5117 if test "$CXX" = "notfound"
5118 then
5119 CXX=""
5120 fi
5121fi
5122if test "$preset_cxx" != "$CXX"
5123then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005124 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126 By default, distutils will build C++ extension modules with \"$CXX\".
5127 If this is not intended, then set CXX on the configure command line.
5128 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005129$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005130
5131 By default, distutils will build C++ extension modules with \"$CXX\".
5132 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005133 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005134fi
5135
5136
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005137MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5138
5139
5140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5141$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5142cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005143#undef bfin
5144#undef cris
5145#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005146#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005147#undef hppa
5148#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005151#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005152#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005153#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005154#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005155 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005156#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005157# if defined(__x86_64__) && defined(__LP64__)
5158 x86_64-linux-gnu
5159# elif defined(__x86_64__) && defined(__ILP32__)
5160 x86_64-linux-gnux32
5161# elif defined(__i386__)
5162 i386-linux-gnu
5163# elif defined(__aarch64__) && defined(__AARCH64EL__)
5164# if defined(__ILP32__)
5165 aarch64_ilp32-linux-gnu
5166# else
5167 aarch64-linux-gnu
5168# endif
5169# elif defined(__aarch64__) && defined(__AARCH64EB__)
5170# if defined(__ILP32__)
5171 aarch64_be_ilp32-linux-gnu
5172# else
5173 aarch64_be-linux-gnu
5174# endif
5175# elif defined(__alpha__)
5176 alpha-linux-gnu
5177# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5178# if defined(__ARMEL__)
5179 arm-linux-gnueabihf
5180# else
5181 armeb-linux-gnueabihf
5182# endif
5183# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5184# if defined(__ARMEL__)
5185 arm-linux-gnueabi
5186# else
5187 armeb-linux-gnueabi
5188# endif
5189# elif defined(__hppa__)
5190 hppa-linux-gnu
5191# elif defined(__ia64__)
5192 ia64-linux-gnu
5193# elif defined(__m68k__) && !defined(__mcoldfire__)
5194 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005195# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5196# if _MIPS_SIM == _ABIO32
5197 mipsisa32r6el-linux-gnu
5198# elif _MIPS_SIM == _ABIN32
5199 mipsisa64r6el-linux-gnuabin32
5200# elif _MIPS_SIM == _ABI64
5201 mipsisa64r6el-linux-gnuabi64
5202# else
5203# error unknown platform triplet
5204# endif
5205# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5206# if _MIPS_SIM == _ABIO32
5207 mipsisa32r6-linux-gnu
5208# elif _MIPS_SIM == _ABIN32
5209 mipsisa64r6-linux-gnuabin32
5210# elif _MIPS_SIM == _ABI64
5211 mipsisa64r6-linux-gnuabi64
5212# else
5213# error unknown platform triplet
5214# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215# elif defined(__mips_hard_float) && defined(_MIPSEL)
5216# if _MIPS_SIM == _ABIO32
5217 mipsel-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mips64el-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mips64el-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
5225# elif defined(__mips_hard_float)
5226# if _MIPS_SIM == _ABIO32
5227 mips-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__or1k__)
5236 or1k-linux-gnu
5237# elif defined(__powerpc__) && defined(__SPE__)
5238 powerpc-linux-gnuspe
5239# elif defined(__powerpc64__)
5240# if defined(__LITTLE_ENDIAN__)
5241 powerpc64le-linux-gnu
5242# else
5243 powerpc64-linux-gnu
5244# endif
5245# elif defined(__powerpc__)
5246 powerpc-linux-gnu
5247# elif defined(__s390x__)
5248 s390x-linux-gnu
5249# elif defined(__s390__)
5250 s390-linux-gnu
5251# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5252 sh4-linux-gnu
5253# elif defined(__sparc__) && defined(__arch64__)
5254 sparc64-linux-gnu
5255# elif defined(__sparc__)
5256 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005257# elif defined(__riscv)
5258# if __riscv_xlen == 32
5259 riscv32-linux-gnu
5260# elif __riscv_xlen == 64
5261 riscv64-linux-gnu
5262# else
5263# error unknown platform triplet
5264# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265# else
5266# error unknown platform triplet
5267# endif
5268#elif defined(__FreeBSD_kernel__)
5269# if defined(__LP64__)
5270 x86_64-kfreebsd-gnu
5271# elif defined(__i386__)
5272 i386-kfreebsd-gnu
5273# else
5274# error unknown platform triplet
5275# endif
5276#elif defined(__gnu_hurd__)
5277 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005278#elif defined(__APPLE__)
5279 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005280#else
5281# error unknown platform triplet
5282#endif
5283
5284EOF
5285
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005286if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005287 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5289$as_echo "$PLATFORM_TRIPLET" >&6; }
5290else
5291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5292$as_echo "none" >&6; }
5293fi
5294rm -f conftest.c conftest.out
5295
5296if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5297 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5298 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5299 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005300elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5301 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005302fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005303
doko@ubuntu.com55532312016-06-14 08:55:19 +02005304if test x$MULTIARCH != x; then
5305 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5306fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005307
5308
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5310$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5311save_LDFLAGS="$LDFLAGS"
5312LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005313
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315/* end confdefs.h. */
5316
5317int
5318main ()
5319{
5320
5321 ;
5322 return 0;
5323}
5324_ACEOF
5325if ac_fn_c_try_link "$LINENO"; then :
5326 NO_AS_NEEDED="-Wl,--no-as-needed"
5327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5328$as_echo "yes" >&6; }
5329else
5330 NO_AS_NEEDED=""
5331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332$as_echo "no" >&6; }
5333fi
5334rm -f core conftest.err conftest.$ac_objext \
5335 conftest$ac_exeext conftest.$ac_ext
5336LDFLAGS="$save_LDFLAGS"
5337
5338
5339
5340# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005341
Matthias Kloseb9621712010-04-24 17:59:49 +00005342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5343$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005344if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005345 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005346else
5347 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5348 then ac_cv_path_EGREP="$GREP -E"
5349 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005351 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005352 # Loop through the user's path and test for each of PROGNAME-LIST
5353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5355do
5356 IFS=$as_save_IFS
5357 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 for ac_prog in egrep; do
5359 for ac_exec_ext in '' $ac_executable_extensions; do
5360 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005361 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005362# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 # Check for GNU $ac_path_EGREP
5364case `"$ac_path_EGREP" --version 2>&1` in
5365*GNU*)
5366 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5367*)
5368 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370 while :
5371 do
5372 cat "conftest.in" "conftest.in" >"conftest.tmp"
5373 mv "conftest.tmp" "conftest.in"
5374 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5377 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5380 # Best one so far, save it but keep looking for a better one
5381 ac_cv_path_EGREP="$ac_path_EGREP"
5382 ac_path_EGREP_max=$ac_count
5383 fi
5384 # 10*(2^10) chars as input seems more than enough
5385 test $ac_count -gt 10 && break
5386 done
5387 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5388esac
5389
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 $ac_path_EGREP_found && break 3
5391 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005395 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005396 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 +00005397 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398else
5399 ac_cv_path_EGREP=$EGREP
5400fi
5401
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 fi
5403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5405$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005407
5408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5410$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005411if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 $as_echo_n "(cached) " >&6
5413else
5414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005415/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005416#include <stdlib.h>
5417#include <stdarg.h>
5418#include <string.h>
5419#include <float.h>
5420
5421int
5422main ()
5423{
5424
5425 ;
5426 return 0;
5427}
5428_ACEOF
5429if ac_fn_c_try_compile "$LINENO"; then :
5430 ac_cv_header_stdc=yes
5431else
5432 ac_cv_header_stdc=no
5433fi
5434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5435
5436if test $ac_cv_header_stdc = yes; then
5437 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5439/* end confdefs.h. */
5440#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005442_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005444 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005445
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446else
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005449rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451fi
5452
5453if test $ac_cv_header_stdc = yes; then
5454 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5456/* end confdefs.h. */
5457#include <stdlib.h>
5458
5459_ACEOF
5460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5461 $EGREP "free" >/dev/null 2>&1; then :
5462
5463else
5464 ac_cv_header_stdc=no
5465fi
5466rm -f conftest*
5467
5468fi
5469
5470if test $ac_cv_header_stdc = yes; then
5471 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5472 if test "$cross_compiling" = yes; then :
5473 :
5474else
5475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5476/* end confdefs.h. */
5477#include <ctype.h>
5478#include <stdlib.h>
5479#if ((' ' & 0x0FF) == 0x020)
5480# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5481# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5482#else
5483# define ISLOWER(c) \
5484 (('a' <= (c) && (c) <= 'i') \
5485 || ('j' <= (c) && (c) <= 'r') \
5486 || ('s' <= (c) && (c) <= 'z'))
5487# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5488#endif
5489
5490#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5491int
5492main ()
5493{
5494 int i;
5495 for (i = 0; i < 256; i++)
5496 if (XOR (islower (i), ISLOWER (i))
5497 || toupper (i) != TOUPPER (i))
5498 return 2;
5499 return 0;
5500}
5501_ACEOF
5502if ac_fn_c_try_run "$LINENO"; then :
5503
5504else
5505 ac_cv_header_stdc=no
5506fi
5507rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5508 conftest.$ac_objext conftest.beam conftest.$ac_ext
5509fi
5510
5511fi
5512fi
5513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5514$as_echo "$ac_cv_header_stdc" >&6; }
5515if test $ac_cv_header_stdc = yes; then
5516
5517$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5518
5519fi
5520
5521# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5522for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5523 inttypes.h stdint.h unistd.h
5524do :
5525 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5526ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5527"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005528if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005529 cat >>confdefs.h <<_ACEOF
5530#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5531_ACEOF
5532
5533fi
5534
5535done
5536
5537
5538
5539 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 +02005540if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005541 MINIX=yes
5542else
5543 MINIX=
5544fi
5545
5546
5547 if test "$MINIX" = yes; then
5548
5549$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5550
5551
5552$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5553
5554
5555$as_echo "#define _MINIX 1" >>confdefs.h
5556
5557 fi
5558
5559
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5561$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005562if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005563 $as_echo_n "(cached) " >&6
5564else
5565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5566/* end confdefs.h. */
5567
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005568# define __EXTENSIONS__ 1
5569 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005570int
5571main ()
5572{
5573
5574 ;
5575 return 0;
5576}
5577_ACEOF
5578if ac_fn_c_try_compile "$LINENO"; then :
5579 ac_cv_safe_to_define___extensions__=yes
5580else
5581 ac_cv_safe_to_define___extensions__=no
5582fi
5583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5584fi
5585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5586$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5587 test $ac_cv_safe_to_define___extensions__ = yes &&
5588 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5589
5590 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5591
5592 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5593
5594 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5595
5596 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5597
5598
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005599
Xavier de Gaye95750b12016-07-09 11:05:42 +02005600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5601$as_echo_n "checking for the Android API level... " >&6; }
5602cat >> conftest.c <<EOF
5603#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005604android_api = __ANDROID_API__
5605arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005606#else
5607#error not Android
5608#endif
5609EOF
5610
5611if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005612 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5613 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5615$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005616 if test -z "$ANDROID_API_LEVEL"; then
5617 echo 'Fatal: you must define __ANDROID_API__'
5618 exit 1
5619 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620
5621cat >>confdefs.h <<_ACEOF
5622#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5623_ACEOF
5624
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005625
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5627$as_echo_n "checking for the Android arm ABI... " >&6; }
5628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5629$as_echo "$_arm_arch" >&6; }
5630 if test "$_arm_arch" = 7; then
5631 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5632 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5633 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005634else
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5636$as_echo "not Android" >&6; }
5637fi
5638rm -f conftest.c conftest.out
5639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640# Check for unsupported systems
5641case $ac_sys_system/$ac_sys_release in
5642atheos*|Linux*/1*)
5643 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5644 echo See README for details.
5645 exit 1;;
5646esac
5647
5648
Matthias Kloseb9621712010-04-24 17:59:49 +00005649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5650$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005651
5652# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005653if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005654 withval=$with_suffix;
5655 case $withval in
5656 no) EXEEXT=;;
5657 yes) EXEEXT=.exe;;
5658 *) EXEEXT=$withval;;
5659 esac
5660fi
5661
Matthias Kloseb9621712010-04-24 17:59:49 +00005662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5663$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664
5665# Test whether we're running on a non-case-sensitive system, in which
5666# case we give a warning if no ext is given
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5669$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670if test ! -d CaseSensitiveTestDir; then
5671mkdir CaseSensitiveTestDir
5672fi
5673
5674if test -d casesensitivetestdir
5675then
Matthias Kloseb9621712010-04-24 17:59:49 +00005676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5677$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678 BUILDEXEEXT=.exe
5679else
Matthias Kloseb9621712010-04-24 17:59:49 +00005680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682 BUILDEXEEXT=$EXEEXT
5683fi
5684rmdir CaseSensitiveTestDir
5685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686case $ac_sys_system in
5687hp*|HP*)
5688 case $CC in
5689 cc|*/cc) CC="$CC -Ae";;
5690 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691esac
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5695$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696if test -z "$LIBRARY"
5697then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005698 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5701$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702
5703# LDLIBRARY is the name of the library to link against (as opposed to the
5704# name of the library into which to insert object files). BLDLIBRARY is also
5705# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5706# is blank as the main program is not linked directly against LDLIBRARY.
5707# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5708# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5709# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5710# DLLLIBRARY is the shared (i.e., DLL) library.
5711#
5712# RUNSHARED is used to run shared python without installed libraries
5713#
5714# INSTSONAME is the name of the shared library that will be use to install
5715# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005716#
5717# LDVERSION is the shared library version number, normally the Python version
5718# with the ABI build flags appended.
5719
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720
5721
5722
5723
5724
5725
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727LDLIBRARY="$LIBRARY"
5728BLDLIBRARY='$(LDLIBRARY)'
5729INSTSONAME='$(LDLIBRARY)'
5730DLLLIBRARY=''
5731LDLIBRARYDIR=''
5732RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005733LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734
5735# LINKCC is the command that links the python executable -- default is $(CC).
5736# If CXX is set, and if it is needed to link a main function that was
5737# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5738# python might then depend on the C++ runtime
5739# This is altered for AIX in order to build the export list before
5740# linking.
5741
Matthias Kloseb9621712010-04-24 17:59:49 +00005742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5743$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744if test -z "$LINKCC"
5745then
5746 LINKCC='$(PURIFY) $(MAINCC)'
5747 case $ac_sys_system in
5748 AIX*)
5749 exp_extra="\"\""
5750 if test $ac_sys_release -ge 5 -o \
5751 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5752 exp_extra="."
5753 fi
5754 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 QNX*)
5756 # qcc must be used because the other compilers do not
5757 # support -N.
5758 LINKCC=qcc;;
5759 esac
5760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5762$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763
5764# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5765# make sure we default having it set to "no": this is used by
5766# distutils.unixccompiler to know if it should add --enable-new-dtags
5767# to linker command lines, and failing to detect GNU ld simply results
5768# in the same bahaviour as before.
5769
Matthias Kloseb9621712010-04-24 17:59:49 +00005770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5771$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005772ac_prog=ld
5773if test "$GCC" = yes; then
5774 ac_prog=`$CC -print-prog-name=ld`
5775fi
5776case `"$ac_prog" -V 2>&1 < /dev/null` in
5777 *GNU*)
5778 GNULD=yes;;
5779 *)
5780 GNULD=no;;
5781esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5783$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784
Matthias Kloseb9621712010-04-24 17:59:49 +00005785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5786$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005787# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005788if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789 enableval=$enable_shared;
5790fi
5791
5792
5793if test -z "$enable_shared"
5794then
5795 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005796 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 enable_shared="yes";;
5798 *)
5799 enable_shared="no";;
5800 esac
5801fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5803$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
Matthias Kloseb9621712010-04-24 17:59:49 +00005805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5806$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005808if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005809 enableval=$enable_profiling;
5810fi
5811
5812if test "x$enable_profiling" = xyes; then
5813 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005814 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816/* end confdefs.h. */
5817int main() { return 0; }
5818_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005819if ac_fn_c_try_link "$LINENO"; then :
5820
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005822 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005824rm -f core conftest.err conftest.$ac_objext \
5825 conftest$ac_exeext conftest.$ac_ext
5826 CC="$ac_save_cc"
5827else
5828 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5831$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005832
doko@ubuntu.comba015832012-06-30 16:52:05 +02005833if test "x$enable_profiling" = xyes; then
5834 BASECFLAGS="-pg $BASECFLAGS"
5835 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
5837
Matthias Kloseb9621712010-04-24 17:59:49 +00005838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5839$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
5841# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5842# library that we build, but we do not want to link against it (we
5843# will find it with a -framework option). For this reason there is an
5844# extra variable BLDLIBRARY against which Python and the extension
5845# modules are linked, BLDLIBRARY. This is normally the same as
5846# LDLIBRARY, but empty for MacOSX framework builds.
5847if test "$enable_framework"
5848then
5849 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005850 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851 BLDLIBRARY=''
5852else
5853 BLDLIBRARY='$(LDLIBRARY)'
5854fi
5855
5856# Other platforms follow
5857if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005858 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859
Matthias Kloseb9621712010-04-24 17:59:49 +00005860$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
5862 case $ac_sys_system in
5863 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005864 LDLIBRARY='libpython$(LDVERSION).dll.a'
5865 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866 ;;
5867 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005868 LDLIBRARY='libpython$(LDVERSION).so'
5869 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005870 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005872 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005873 then
5874 PY3LIBRARY=libpython3.so
5875 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005877 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005878 LDLIBRARY='libpython$(LDVERSION).so'
5879 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005880 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005882 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005883 then
5884 PY3LIBRARY=libpython3.so
5885 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ;;
5887 hp*|HP*)
5888 case `uname -m` in
5889 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 ;;
5892 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005893 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
5895 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005897 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).dylib'
5901 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005902 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005904 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005906 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005907 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908
5909 esac
5910else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005911 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 case $ac_sys_system in
5913 CYGWIN*)
5914 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916 ;;
5917 esac
5918fi
5919
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005920if test "$cross_compiling" = yes; then
5921 RUNSHARED=
5922fi
5923
Matthias Kloseb9621712010-04-24 17:59:49 +00005924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5925$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005928if test -n "$ac_tool_prefix"; then
5929 for ac_prog in ar aal
5930 do
5931 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5932set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5934$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005935if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005936 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937else
5938 if test -n "$AR"; then
5939 ac_cv_prog_AR="$AR" # Let the user override the test.
5940else
5941as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5942for as_dir in $PATH
5943do
5944 IFS=$as_save_IFS
5945 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005946 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005948 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 break 2
5951 fi
5952done
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954IFS=$as_save_IFS
5955
5956fi
5957fi
5958AR=$ac_cv_prog_AR
5959if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5961$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962else
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5964$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965fi
5966
5967
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005968 test -n "$AR" && break
5969 done
5970fi
5971if test -z "$AR"; then
5972 ac_ct_AR=$AR
5973 for ac_prog in ar aal
5974do
5975 # Extract the first word of "$ac_prog", so it can be a program name with args.
5976set dummy $ac_prog; ac_word=$2
5977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5978$as_echo_n "checking for $ac_word... " >&6; }
5979if ${ac_cv_prog_ac_ct_AR+:} false; then :
5980 $as_echo_n "(cached) " >&6
5981else
5982 if test -n "$ac_ct_AR"; then
5983 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5984else
5985as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5986for as_dir in $PATH
5987do
5988 IFS=$as_save_IFS
5989 test -z "$as_dir" && as_dir=.
5990 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005992 ac_cv_prog_ac_ct_AR="$ac_prog"
5993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5994 break 2
5995 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005997 done
5998IFS=$as_save_IFS
5999
6000fi
6001fi
6002ac_ct_AR=$ac_cv_prog_ac_ct_AR
6003if test -n "$ac_ct_AR"; then
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6005$as_echo "$ac_ct_AR" >&6; }
6006else
6007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6008$as_echo "no" >&6; }
6009fi
6010
6011
6012 test -n "$ac_ct_AR" && break
6013done
6014
6015 if test "x$ac_ct_AR" = x; then
6016 AR="ar"
6017 else
6018 case $cross_compiling:$ac_tool_warned in
6019yes:)
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6021$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6022ac_tool_warned=yes ;;
6023esac
6024 AR=$ac_ct_AR
6025 fi
6026fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006027
6028
6029# tweak ARFLAGS only if the user didn't set it on the command line
6030
6031if test -z "$ARFLAGS"
6032then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006033 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034fi
6035
doko@ubuntu.com58844492012-06-30 18:25:32 +02006036if test -n "$ac_tool_prefix"; then
6037 for ac_prog in readelf
6038 do
6039 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6040set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_prog_READELF+:} false; then :
6044 $as_echo_n "(cached) " >&6
6045else
6046 if test -n "$READELF"; then
6047 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6048else
6049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6050for as_dir in $PATH
6051do
6052 IFS=$as_save_IFS
6053 test -z "$as_dir" && as_dir=.
6054 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006055 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006056 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6057 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6058 break 2
6059 fi
6060done
6061 done
6062IFS=$as_save_IFS
6063
6064fi
6065fi
6066READELF=$ac_cv_prog_READELF
6067if test -n "$READELF"; then
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6069$as_echo "$READELF" >&6; }
6070else
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6072$as_echo "no" >&6; }
6073fi
6074
6075
6076 test -n "$READELF" && break
6077 done
6078fi
6079if test -z "$READELF"; then
6080 ac_ct_READELF=$READELF
6081 for ac_prog in readelf
6082do
6083 # Extract the first word of "$ac_prog", so it can be a program name with args.
6084set dummy $ac_prog; ac_word=$2
6085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6086$as_echo_n "checking for $ac_word... " >&6; }
6087if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6088 $as_echo_n "(cached) " >&6
6089else
6090 if test -n "$ac_ct_READELF"; then
6091 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6092else
6093as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6094for as_dir in $PATH
6095do
6096 IFS=$as_save_IFS
6097 test -z "$as_dir" && as_dir=.
6098 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006100 ac_cv_prog_ac_ct_READELF="$ac_prog"
6101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6102 break 2
6103 fi
6104done
6105 done
6106IFS=$as_save_IFS
6107
6108fi
6109fi
6110ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6111if test -n "$ac_ct_READELF"; then
6112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6113$as_echo "$ac_ct_READELF" >&6; }
6114else
6115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6116$as_echo "no" >&6; }
6117fi
6118
6119
6120 test -n "$ac_ct_READELF" && break
6121done
6122
6123 if test "x$ac_ct_READELF" = x; then
6124 READELF=":"
6125 else
6126 case $cross_compiling:$ac_tool_warned in
6127yes:)
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6129$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6130ac_tool_warned=yes ;;
6131esac
6132 READELF=$ac_ct_READELF
6133 fi
6134fi
6135
6136if test "$cross_compiling" = yes; then
6137 case "$READELF" in
6138 readelf|:)
6139 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6140 ;;
6141 esac
6142fi
6143
6144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006146case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006147hp*|HP*)
6148 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006149 if test -z "$INSTALL"
6150 then
6151 INSTALL="${srcdir}/install-sh -c"
6152 fi
6153esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154# Find a good install program. We prefer a C program (faster),
6155# so one script is as good as another. But avoid the broken or
6156# incompatible versions:
6157# SysV /etc/install, /usr/sbin/install
6158# SunOS /usr/etc/install
6159# IRIX /sbin/install
6160# AIX /bin/install
6161# AmigaOS /C/install, which installs bootblocks on floppy discs
6162# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6163# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6164# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6165# OS/2's system install, which has a completely different semantic
6166# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006167# Reject install programs that cannot install multiple files.
6168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6169$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006170if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006171if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173else
6174 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6175for as_dir in $PATH
6176do
6177 IFS=$as_save_IFS
6178 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 # Account for people who put trailing slashes in PATH elements.
6180case $as_dir/ in #((
6181 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184 /usr/ucb/* ) ;;
6185 *)
6186 # OSF1 and SCO ODT 3.0 have their own names for install.
6187 # Don't use installbsd from OSF since it installs stuff as root
6188 # by default.
6189 for ac_prog in ginstall scoinst install; do
6190 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006191 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 if test $ac_prog = install &&
6193 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6194 # AIX install. It has an incompatible calling convention.
6195 :
6196 elif test $ac_prog = install &&
6197 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6198 # program-specific install script used by HP pwplus--don't use.
6199 :
6200 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 rm -rf conftest.one conftest.two conftest.dir
6202 echo one > conftest.one
6203 echo two > conftest.two
6204 mkdir conftest.dir
6205 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6206 test -s conftest.one && test -s conftest.two &&
6207 test -s conftest.dir/conftest.one &&
6208 test -s conftest.dir/conftest.two
6209 then
6210 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6211 break 3
6212 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006213 fi
6214 fi
6215 done
6216 done
6217 ;;
6218esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006219
6220 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221IFS=$as_save_IFS
6222
Matthias Kloseb9621712010-04-24 17:59:49 +00006223rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006224
6225fi
6226 if test "${ac_cv_path_install+set}" = set; then
6227 INSTALL=$ac_cv_path_install
6228 else
6229 # As a last resort, use the slow shell script. Don't cache a
6230 # value for INSTALL within a source directory, because that will
6231 # break other packages using the cache if that directory is
6232 # removed, or if the value is a relative name.
6233 INSTALL=$ac_install_sh
6234 fi
6235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6237$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006238
6239# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6240# It thinks the first close brace ends the variable substitution.
6241test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6242
6243test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6244
6245test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6246
Matthias Klose93a0ef12012-03-15 18:08:34 +01006247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6248$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6249if test -z "$MKDIR_P"; then
6250 if ${ac_cv_path_mkdir+:} false; then :
6251 $as_echo_n "(cached) " >&6
6252else
6253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6254for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6255do
6256 IFS=$as_save_IFS
6257 test -z "$as_dir" && as_dir=.
6258 for ac_prog in mkdir gmkdir; do
6259 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006260 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006261 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6262 'mkdir (GNU coreutils) '* | \
6263 'mkdir (coreutils) '* | \
6264 'mkdir (fileutils) '4.1*)
6265 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6266 break 3;;
6267 esac
6268 done
6269 done
6270 done
6271IFS=$as_save_IFS
6272
6273fi
6274
6275 test -d ./--version && rmdir ./--version
6276 if test "${ac_cv_path_mkdir+set}" = set; then
6277 MKDIR_P="$ac_cv_path_mkdir -p"
6278 else
6279 # As a last resort, use the slow shell script. Don't cache a
6280 # value for MKDIR_P within a source directory, because that will
6281 # break other packages using the cache if that directory is
6282 # removed, or if the value is a relative name.
6283 MKDIR_P="$ac_install_sh -d"
6284 fi
6285fi
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6287$as_echo "$MKDIR_P" >&6; }
6288
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289
6290# Not every filesystem supports hard links
6291
6292if test -z "$LN" ; then
6293 case $ac_sys_system in
6294 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295 *) LN=ln;;
6296 esac
6297fi
6298
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006299# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006300
6301ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006302
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6305$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306
6307# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006308if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309 withval=$with_pydebug;
6310if test "$withval" != no
6311then
6312
Matthias Kloseb9621712010-04-24 17:59:49 +00006313$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
Matthias Kloseb9621712010-04-24 17:59:49 +00006315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6316$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006318 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006319else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321fi
6322else
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6324$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325fi
6326
6327
T. Woutersddbfa2c2017-05-23 01:30:49 +02006328# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6329# the ABI. This allows enabling assertions without changing the ABI.
6330assertions='false'
6331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6332$as_echo_n "checking for --with-assertions... " >&6; }
6333
6334# Check whether --with-assertions was given.
6335if test "${with_assertions+set}" = set; then :
6336 withval=$with_assertions;
6337if test "$withval" != no
6338then
6339 assertions='true'
6340fi
6341fi
6342
6343if test "$assertions" = 'true'; then
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6345$as_echo "yes" >&6; }
6346elif test "$Py_DEBUG" = 'true'; then
6347 assertions='true'
6348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6349$as_echo "implied by --with-pydebug" >&6; }
6350else
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6352$as_echo "no" >&6; }
6353fi
6354
Brett Cannon63d98bc2016-09-06 17:12:40 -07006355# Enable optimization flags
6356
6357
6358Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6360$as_echo_n "checking for --enable-optimizations... " >&6; }
6361# Check whether --enable-optimizations was given.
6362if test "${enable_optimizations+set}" = set; then :
6363 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006364if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006365then
6366 Py_OPT='true'
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6368$as_echo "yes" >&6; };
6369else
6370 Py_OPT='false'
6371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6372$as_echo "no" >&6; };
6373fi
6374else
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376$as_echo "no" >&6; }
6377fi
6378
6379if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006380 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6381 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006382 # 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 +00006383 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006384 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006385 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006386 DEF_MAKE_RULE="build_all"
6387else
6388 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006389 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006390 DEF_MAKE_RULE="all"
6391fi
6392
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006393# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6394# normal names in the default $PATH (ie: Ubuntu). They exist under the
6395# non-suffixed name in their versioned llvm directory.
6396
6397llvm_bin_dir=''
6398llvm_path="${PATH}"
6399if test "${CC}" = "clang"
6400then
6401 clang_bin=`which clang`
6402 # Some systems install clang elsewhere as a symlink to the real path
6403 # which is where the related llvm tools are located.
6404 if test -L "${clang_bin}"
6405 then
6406 clang_dir=`dirname "${clang_bin}"`
6407 clang_bin=`readlink "${clang_bin}"`
6408 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6409 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6410 fi
6411fi
6412
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006413# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6415$as_echo_n "checking for --with-lto... " >&6; }
6416
6417# Check whether --with-lto was given.
6418if test "${with_lto+set}" = set; then :
6419 withval=$with_lto;
6420if test "$withval" != no
6421then
6422 Py_LTO='true'
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; };
6425else
6426 Py_LTO='false'
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428$as_echo "no" >&6; };
6429fi
6430else
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6432$as_echo "no" >&6; }
6433fi
6434
6435if test "$Py_LTO" = 'true' ; then
6436 case $CC in
6437 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006438
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006440$as_echo_n "checking target system type... " >&6; }
6441if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006442 $as_echo_n "(cached) " >&6
6443else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006444 if test "x$target_alias" = x; then
6445 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006446else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006447 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6448 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6449fi
6450
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6453$as_echo "$ac_cv_target" >&6; }
6454case $ac_cv_target in
6455*-*-*) ;;
6456*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6457esac
6458target=$ac_cv_target
6459ac_save_IFS=$IFS; IFS='-'
6460set x $ac_cv_target
6461shift
6462target_cpu=$1
6463target_vendor=$2
6464shift; shift
6465# Remember, the first character of IFS is used to create $*,
6466# except with old shells:
6467target_os=$*
6468IFS=$ac_save_IFS
6469case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6470
6471
6472# The aliases save the names the user supplied, while $host etc.
6473# will get canonicalized.
6474test -n "$target_alias" &&
6475 test "$program_prefix$program_suffix$program_transform_name" = \
6476 NONENONEs,x,x, &&
6477 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006478# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6479set dummy $target_alias-llvm-ar; ac_word=$2
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481$as_echo_n "checking for $ac_word... " >&6; }
6482if ${ac_cv_path_LLVM_AR+:} false; then :
6483 $as_echo_n "(cached) " >&6
6484else
6485 case $LLVM_AR in
6486 [\\/]* | ?:[\\/]*)
6487 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6488 ;;
6489 *)
6490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in ${llvm_path}
6492do
6493 IFS=$as_save_IFS
6494 test -z "$as_dir" && as_dir=.
6495 for ac_exec_ext in '' $ac_executable_extensions; do
6496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6497 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499 break 2
6500 fi
6501done
6502 done
6503IFS=$as_save_IFS
6504
6505 ;;
6506esac
6507fi
6508LLVM_AR=$ac_cv_path_LLVM_AR
6509if test -n "$LLVM_AR"; then
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6511$as_echo "$LLVM_AR" >&6; }
6512else
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517
6518if test -z "$ac_cv_path_LLVM_AR"; then
6519 if test "$build" = "$target"; then
6520 ac_pt_LLVM_AR=$LLVM_AR
6521 # Extract the first word of "llvm-ar", so it can be a program name with args.
6522set dummy llvm-ar; ac_word=$2
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6524$as_echo_n "checking for $ac_word... " >&6; }
6525if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6526 $as_echo_n "(cached) " >&6
6527else
6528 case $ac_pt_LLVM_AR in
6529 [\\/]* | ?:[\\/]*)
6530 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6531 ;;
6532 *)
6533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6534for as_dir in ${llvm_path}
6535do
6536 IFS=$as_save_IFS
6537 test -z "$as_dir" && as_dir=.
6538 for ac_exec_ext in '' $ac_executable_extensions; do
6539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6540 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6541 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6542 break 2
6543 fi
6544done
6545 done
6546IFS=$as_save_IFS
6547
6548 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6549 ;;
6550esac
6551fi
6552ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6553if test -n "$ac_pt_LLVM_AR"; then
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6555$as_echo "$ac_pt_LLVM_AR" >&6; }
6556else
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6558$as_echo "no" >&6; }
6559fi
6560
6561 LLVM_AR=$ac_pt_LLVM_AR
6562 else
6563 LLVM_AR="''"
6564 fi
6565else
6566 LLVM_AR="$ac_cv_path_LLVM_AR"
6567fi
6568
6569
6570 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6571 then
6572 LLVM_AR_FOUND="found"
6573 else
6574 LLVM_AR_FOUND="not-found"
6575 fi
6576 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6577 then
6578 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6579 if test -n "${found_llvm_ar}"
6580 then
6581 LLVM_AR='/usr/bin/xcrun llvm-ar'
6582 LLVM_AR_FOUND=found
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6584$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6585 fi
6586 fi
6587 if test $LLVM_AR_FOUND = not-found
6588 then
6589 LLVM_PROFR_ERR=yes
6590 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6591 else
6592 LLVM_AR_ERR=no
6593 fi
6594 AR="${LLVM_AR}"
6595 case $ac_sys_system in
6596 Darwin*)
6597 # Any changes made here should be reflected in the GCC+Darwin case below
6598 LTOFLAGS="-flto -Wl,-export_dynamic"
6599 ;;
6600 *)
6601 LTOFLAGS="-flto"
6602 ;;
6603 esac
6604 ;;
6605 *gcc*)
6606 case $ac_sys_system in
6607 Darwin*)
6608 LTOFLAGS="-flto -Wl,-export_dynamic"
6609 ;;
6610 *)
6611 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6612 ;;
6613 esac
6614 ;;
6615 esac
6616
6617 if test "$ac_cv_prog_cc_g" = "yes"
6618 then
6619 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6620 # to get debug symbols.
6621 LTOFLAGS="$LTOFLAGS -g"
6622 fi
6623
6624 BASECFLAGS="$BASECFLAGS $LTOFLAGS"
6625 LDFLAGS="$LDFLAGS $LTOFLAGS"
6626fi
6627
6628# Enable PGO flags.
6629
6630
6631
6632
6633
6634
Gregory P. Smith799520c2016-09-07 16:10:00 -07006635# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6636set dummy $target_alias-llvm-profdata; ac_word=$2
6637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638$as_echo_n "checking for $ac_word... " >&6; }
6639if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6640 $as_echo_n "(cached) " >&6
6641else
6642 case $LLVM_PROFDATA in
6643 [\\/]* | ?:[\\/]*)
6644 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6645 ;;
6646 *)
6647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006649do
6650 IFS=$as_save_IFS
6651 test -z "$as_dir" && as_dir=.
6652 for ac_exec_ext in '' $ac_executable_extensions; do
6653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656 break 2
6657 fi
6658done
6659 done
6660IFS=$as_save_IFS
6661
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 ;;
6663esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006664fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006665LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6666if test -n "$LLVM_PROFDATA"; then
6667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6668$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006669else
6670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671$as_echo "no" >&6; }
6672fi
6673
6674
Gregory P. Smith799520c2016-09-07 16:10:00 -07006675if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6676 if test "$build" = "$target"; then
6677 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6678 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6679set dummy llvm-profdata; ac_word=$2
6680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6681$as_echo_n "checking for $ac_word... " >&6; }
6682if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6683 $as_echo_n "(cached) " >&6
6684else
6685 case $ac_pt_LLVM_PROFDATA in
6686 [\\/]* | ?:[\\/]*)
6687 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6688 ;;
6689 *)
6690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6691for as_dir in ${llvm_path}
6692do
6693 IFS=$as_save_IFS
6694 test -z "$as_dir" && as_dir=.
6695 for ac_exec_ext in '' $ac_executable_extensions; do
6696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6697 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6699 break 2
6700 fi
6701done
6702 done
6703IFS=$as_save_IFS
6704
6705 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6706 ;;
6707esac
6708fi
6709ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6710if test -n "$ac_pt_LLVM_PROFDATA"; then
6711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6712$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6713else
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6715$as_echo "no" >&6; }
6716fi
6717
6718 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6719 else
6720 LLVM_PROFDATA="''"
6721 fi
6722else
6723 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6724fi
6725
6726
6727if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6728then
6729 LLVM_PROF_FOUND="found"
6730else
6731 LLVM_PROF_FOUND="not-found"
6732fi
6733if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6734then
6735 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6736 if test -n "${found_llvm_profdata}"
6737 then
6738 # llvm-profdata isn't directly in $PATH in some cases.
6739 # https://apple.stackexchange.com/questions/197053/
6740 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6741 LLVM_PROF_FOUND=found
6742 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6743$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6744 fi
6745fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006746LLVM_PROF_ERR=no
6747case $CC in
6748 *clang*)
6749 # Any changes made here should be reflected in the GCC+Darwin case below
6750 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6751 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006752 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6754 if test $LLVM_PROF_FOUND = not-found
6755 then
6756 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006757 if test "${REQUIRE_PGO}" = "yes"
6758 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006759 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 -07006760 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 fi
6762 ;;
6763 *gcc*)
6764 case $ac_sys_system in
6765 Darwin*)
6766 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6767 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006768 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006770 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006771 then
6772 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006773 if test "${REQUIRE_PGO}" = "yes"
6774 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006775 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 -07006776 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 fi
6778 ;;
6779 *)
6780 PGO_PROF_GEN_FLAG="-fprofile-generate"
6781 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6782 LLVM_PROF_MERGER="true"
6783 LLVM_PROF_FILE=""
6784 ;;
6785 esac
6786 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006787 *icc*)
6788 PGO_PROF_GEN_FLAG="-prof-gen"
6789 PGO_PROF_USE_FLAG="-prof-use"
6790 LLVM_PROF_MERGER="true"
6791 LLVM_PROF_FILE=""
6792 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793esac
6794
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006795# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6796# merged with this chunk of code?
6797
6798# Optimizer/debugger flags
6799# ------------------------
6800# (The following bit of code is complicated enough - please keep things
6801# indented properly. Just pretend you're editing Python code. ;-)
6802
6803# There are two parallel sets of case statements below, one that checks to
6804# see if OPT was set and one that does BASECFLAGS setting based upon
6805# compiler and platform. BASECFLAGS tweaks need to be made even if the
6806# user set OPT.
6807
6808# tweak OPT based on compiler and platform, only if the user didn't set
6809# it on the command line
6810
Victor Stinner9ed34a82017-05-02 22:35:58 +02006811
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006812if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813then
6814 case $GCC in
6815 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006816 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6817 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6818 WRAP="-fwrapv"
6819 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006820
Stefan Krahaf04ff22011-12-08 22:20:31 +01006821 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006822 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006823 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006824 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006825 *)
6826 if $CC --version 2>&1 | grep -q clang
6827 then
6828 cc_is_clang=1
6829 else
6830 cc_is_clang=
6831 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006832 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006833
Victor Stinner35f3d242017-04-21 12:35:24 +02006834 if test -n "${cc_is_clang}"
6835 then
6836 # Clang also needs -fwrapv
6837 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006838 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6839 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006840 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006841 fi
6842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 case $ac_cv_prog_cc_g in
6844 yes)
6845 if test "$Py_DEBUG" = 'true' ; then
6846 # Optimization messes up debuggers, so turn it off for
6847 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006848 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006849 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006850 else
Victor Stinner28205b22017-04-21 11:24:34 +02006851 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006852 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853 else
Victor Stinner28205b22017-04-21 11:24:34 +02006854 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855 fi
6856 ;;
6857 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006858 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 ;;
6860 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 case $ac_sys_system in
6863 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6864 ;;
6865 esac
6866 ;;
6867
6868 *)
6869 OPT="-O"
6870 ;;
6871 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872fi
6873
6874
6875
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877# The -arch flags for universal builds on OSX
6878UNIVERSAL_ARCH_FLAGS=
6879
6880
6881# tweak BASECFLAGS based on compiler and platform
6882case $GCC in
6883yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006884 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006885
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6887$as_echo_n "checking for -Wextra... " >&6; }
6888 ac_save_cc="$CC"
6889 CC="$CC -Wextra -Werror"
6890 if ${ac_cv_extra_warnings+:} false; then :
6891 $as_echo_n "(cached) " >&6
6892else
6893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6894/* end confdefs.h. */
6895
6896
6897int
6898main ()
6899{
6900
6901 ;
6902 return 0;
6903}
6904
6905_ACEOF
6906if ac_fn_c_try_compile "$LINENO"; then :
6907
6908 ac_cv_extra_warnings=yes
6909
6910else
6911
6912 ac_cv_extra_warnings=no
6913
6914fi
6915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6916fi
6917
6918 CC="$ac_save_cc"
6919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6920$as_echo "$ac_cv_extra_warnings" >&6; }
6921
6922 if test $ac_cv_extra_warnings = yes
6923 then
6924 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6925 fi
6926
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006927 # Python doesn't violate C99 aliasing rules, but older versions of
6928 # GCC produce warnings for legal Python code. Enable
6929 # -fno-strict-aliasing on versions of GCC that support but produce
6930 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6932$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933 ac_save_cc="$CC"
6934 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006935 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006936 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006937 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006938else
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006941
Matthias Kloseb159a552010-04-25 21:00:44 +00006942
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006943int
6944main ()
6945{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006946
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006947 ;
6948 return 0;
6949}
Matthias Kloseb159a552010-04-25 21:00:44 +00006950
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006951_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006952if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006953
6954 CC="$ac_save_cc -fstrict-aliasing"
6955 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006957/* end confdefs.h. */
6958
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006959 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006960int
6961main ()
6962{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006963double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964 ;
6965 return 0;
6966}
Matthias Kloseb159a552010-04-25 21:00:44 +00006967
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006969if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
6971 ac_cv_no_strict_aliasing=no
6972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006973else
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
6975 ac_cv_no_strict_aliasing=yes
6976
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006979
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980else
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 ac_cv_no_strict_aliasing=no
6983
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006986fi
6987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006989 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6991$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993 then
6994 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6995 fi
6996
Zachary Ware5af85642015-12-21 12:09:17 -06006997 # ICC doesn't recognize the option, but only emits a warning
6998 ## XXX does it emit an unused result warning and can it be disabled?
6999 case "$CC" in
7000 *icc*)
7001 ac_cv_disable_unused_result_warning=no
7002 ;;
7003 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7005$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7006 ac_save_cc="$CC"
7007 CC="$CC -Wunused-result -Werror"
7008 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007009 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007010 $as_echo_n "(cached) " >&6
7011else
7012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7013/* end confdefs.h. */
7014
7015
7016int
7017main ()
7018{
7019
7020 ;
7021 return 0;
7022}
7023
7024_ACEOF
7025if ac_fn_c_try_compile "$LINENO"; then :
7026
7027 ac_cv_disable_unused_result_warning=yes
7028
7029else
7030
7031 ac_cv_disable_unused_result_warning=no
7032
7033fi
7034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7035fi
7036
7037 CFLAGS="$save_CFLAGS"
7038 CC="$ac_save_cc"
7039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7040$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007041 ;;
7042 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007043
7044 if test $ac_cv_disable_unused_result_warning = yes
7045 then
7046 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007047 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7048 fi
7049
7050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7051$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7052 ac_save_cc="$CC"
7053 CC="$CC -Wunused-parameter -Werror"
7054 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7055 $as_echo_n "(cached) " >&6
7056else
7057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7058/* end confdefs.h. */
7059
7060
7061int
7062main ()
7063{
7064
7065 ;
7066 return 0;
7067}
7068
7069_ACEOF
7070if ac_fn_c_try_compile "$LINENO"; then :
7071
7072 ac_cv_disable_unused_parameter_warning=yes
7073
7074else
7075
7076 ac_cv_disable_unused_parameter_warning=no
7077
7078fi
7079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7080fi
7081
7082 CC="$ac_save_cc"
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7084$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7085
7086 if test $ac_cv_disable_unused_parameter_warning = yes
7087 then
7088 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7089 fi
7090
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7092$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7093 ac_save_cc="$CC"
7094 CC="$CC -Wmissing-field-initializers -Werror"
7095 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7096 $as_echo_n "(cached) " >&6
7097else
7098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7099/* end confdefs.h. */
7100
7101
7102int
7103main ()
7104{
7105
7106 ;
7107 return 0;
7108}
7109
7110_ACEOF
7111if ac_fn_c_try_compile "$LINENO"; then :
7112
7113 ac_cv_disable_missing_field_initializers=yes
7114
7115else
7116
7117 ac_cv_disable_missing_field_initializers=no
7118
7119fi
7120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7121fi
7122
7123 CC="$ac_save_cc"
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7125$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7126
7127 if test $ac_cv_disable_missing_field_initializers = yes
7128 then
7129 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007130 fi
7131
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7133$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7134 ac_save_cc="$CC"
7135 CC="$CC -Wsign-compare"
7136 save_CFLAGS="$CFLAGS"
7137 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7138 $as_echo_n "(cached) " >&6
7139else
7140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7141/* end confdefs.h. */
7142
7143
7144int
7145main ()
7146{
7147
7148 ;
7149 return 0;
7150}
7151
7152_ACEOF
7153if ac_fn_c_try_compile "$LINENO"; then :
7154
7155 ac_cv_enable_sign_compare_warning=yes
7156
7157else
7158
7159 ac_cv_enable_sign_compare_warning=no
7160
7161fi
7162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7163fi
7164
7165 CFLAGS="$save_CFLAGS"
7166 CC="$ac_save_cc"
7167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7168$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7169
7170 if test $ac_cv_enable_sign_compare_warning = yes
7171 then
7172 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7173 fi
7174
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7176$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7177 ac_save_cc="$CC"
7178 CC="$CC -Wunreachable-code"
7179 save_CFLAGS="$CFLAGS"
7180 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7184/* end confdefs.h. */
7185
7186
7187int
7188main ()
7189{
7190
7191 ;
7192 return 0;
7193}
7194
7195_ACEOF
7196if ac_fn_c_try_compile "$LINENO"; then :
7197
7198 ac_cv_enable_unreachable_code_warning=yes
7199
7200else
7201
7202 ac_cv_enable_unreachable_code_warning=no
7203
7204fi
7205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7206fi
7207
7208 CFLAGS="$save_CFLAGS"
7209 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007210
7211 # Don't enable unreachable code warning in debug mode, since it usually
7212 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007213 # Issue #24324: Unfortunately, the unreachable code warning does not work
7214 # correctly on gcc and has been silently removed from the compiler.
7215 # It is supported on clang but on OS X systems gcc may be an alias
7216 # for clang. Try to determine if the compiler is not really gcc and,
7217 # if so, only then enable the warning.
7218 if test $ac_cv_enable_unreachable_code_warning = yes && \
7219 test "$Py_DEBUG" != "true" && \
7220 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007221 then
7222 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007223 else
7224 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007225 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7227$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007228
INADA Naokie3364842018-06-05 20:40:53 +09007229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7230$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7231 ac_save_cc="$CC"
7232 CC="$CC -Werror -Wstrict-prototypes"
7233 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7234 $as_echo_n "(cached) " >&6
7235else
7236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h. */
7238
7239
7240int
7241main ()
7242{
7243
7244 ;
7245 return 0;
7246}
7247
7248_ACEOF
7249if ac_fn_c_try_compile "$LINENO"; then :
7250
7251 ac_cv_enable_strict_prototypes_warning=yes
7252
7253else
7254
7255 ac_cv_enable_strict_prototypes_warning=no
7256
7257fi
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259fi
7260
7261 CC="$ac_save_cc"
7262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7263$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7264
7265 if test $ac_cv_enable_strict_prototypes_warning = yes
7266 then
7267 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7268 fi
7269
Victor Stinner193ee0a2017-02-06 14:24:00 +01007270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7271$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7272 ac_save_cc="$CC"
7273 CC="$CC -Werror=implicit-function-declaration"
7274 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7275 $as_echo_n "(cached) " >&6
7276else
7277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7278/* end confdefs.h. */
7279
7280
7281int
7282main ()
7283{
7284
7285 ;
7286 return 0;
7287}
7288
7289_ACEOF
7290if ac_fn_c_try_compile "$LINENO"; then :
7291
7292 ac_cv_enable_implicit_function_declaration_error=yes
7293
7294else
7295
7296 ac_cv_enable_implicit_function_declaration_error=no
7297
7298fi
7299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7300fi
7301
7302 CC="$ac_save_cc"
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7304$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7305
7306 if test $ac_cv_enable_implicit_function_declaration_error = yes
7307 then
7308 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7309 fi
7310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7312 # support. Without this, treatment of subnormals doesn't follow
7313 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007314 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007315 alpha*)
7316 BASECFLAGS="$BASECFLAGS -mieee"
7317 ;;
7318 esac
7319
7320 case $ac_sys_system in
7321 SCO_SV*)
7322 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7323 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007324
Ned Deily87adb6e2013-10-18 21:09:56 -07007325 Darwin*)
7326 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7327 # used to be here, but non-Apple gcc doesn't accept them.
7328 if test "${CC}" = gcc
7329 then
7330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007331$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 case "${UNIVERSALSDK}" in
7333 */MacOSX10.4u.sdk)
7334 # Build using 10.4 SDK, force usage of gcc when the
7335 # compiler is gcc, otherwise the user will get very
7336 # confusing error messages when building on OSX 10.6
7337 CC=gcc-4.0
7338 CPP=cpp-4.0
7339 ;;
7340 esac
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007342$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007343 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344
Ned Deily87adb6e2013-10-18 21:09:56 -07007345 if test "${enable_universalsdk}"
7346 then
7347 case "$UNIVERSAL_ARCHS" in
7348 32-bit)
7349 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7350 LIPO_32BIT_FLAGS=""
7351 ARCH_RUN_32BIT=""
7352 ;;
7353 64-bit)
7354 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7355 LIPO_32BIT_FLAGS=""
7356 ARCH_RUN_32BIT="true"
7357 ;;
7358 all)
7359 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7360 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7361 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7362 ;;
7363 intel)
7364 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7365 LIPO_32BIT_FLAGS="-extract i386"
7366 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7367 ;;
7368 intel-32)
7369 UNIVERSAL_ARCH_FLAGS="-arch i386"
7370 LIPO_32BIT_FLAGS=""
7371 ARCH_RUN_32BIT=""
7372 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007373 intel-64)
7374 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7375 LIPO_32BIT_FLAGS=""
7376 ARCH_RUN_32BIT="true"
7377 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 3-way)
7379 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7380 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7381 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7382 ;;
7383 *)
7384 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7385 ;;
7386 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387
Ned Deily87adb6e2013-10-18 21:09:56 -07007388 if test "${UNIVERSALSDK}" != "/"
7389 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007390 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7391 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007392 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007393 else
7394 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7395 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007396 fi
7397 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 # Calculate an appropriate deployment target for this build:
7400 # The deployment target value is used explicitly to enable certain
7401 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007402 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007403 # component of the string returned by distutils.get_platform().
7404 #
7405 # Use the value from:
7406 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7407 # 2. the operating system version of the build machine if >= 10.6
7408 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7409 # below to pick either 10.3, 10.4, or 10.5 as the target.
7410 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411
Ned Deily87adb6e2013-10-18 21:09:56 -07007412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7413$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007414 cur_target_major=`sw_vers -productVersion | \
7415 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7416 cur_target_minor=`sw_vers -productVersion | \
7417 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7418 cur_target="${cur_target_major}.${cur_target_minor}"
7419 if test ${cur_target_major} -eq 10 && \
7420 test ${cur_target_minor} -ge 3 && \
7421 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007422 then
Ned Deily36820b62014-06-25 13:44:22 -07007423 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007424 cur_target=10.3
7425 if test ${enable_universalsdk}
7426 then
7427 case "$UNIVERSAL_ARCHS" in
7428 all|3-way|intel|64-bit)
7429 # These configurations were first supported in 10.5
7430 cur_target='10.5'
7431 ;;
7432 esac
7433 else
7434 if test `/usr/bin/arch` = "i386"
7435 then
7436 # 10.4 was the first release to support Intel archs
7437 cur_target="10.4"
7438 fi
7439 fi
7440 fi
7441 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007442
Ned Deily87adb6e2013-10-18 21:09:56 -07007443 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7444 # environment with a value that is the same as what we'll use
7445 # in the Makefile to ensure that we'll get the same compiler
7446 # environment during configure and build time.
7447 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7448 export MACOSX_DEPLOYMENT_TARGET
7449 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7451$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007452
Ned Deily87adb6e2013-10-18 21:09:56 -07007453 # end of Darwin* tests
7454 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007455 esac
7456 ;;
7457
7458*)
7459 case $ac_sys_system in
7460 OpenUNIX*|UnixWare*)
7461 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7462 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463 SCO_SV*)
7464 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7465 ;;
7466 esac
7467 ;;
7468esac
7469
Zachary Ware5af85642015-12-21 12:09:17 -06007470# ICC needs -fp-model strict or floats behave badly
7471case "$CC" in
7472*icc*)
7473 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7474 ;;
7475esac
7476
T. Woutersddbfa2c2017-05-23 01:30:49 +02007477if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007478 :
7479else
7480 OPT="-DNDEBUG $OPT"
7481fi
7482
7483if test "$ac_arch_flags"
7484then
7485 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7486fi
7487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007488# On some compilers, pthreads are available without further options
7489# (e.g. MacOS X). On some of these systems, the compiler will not
7490# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7491# So we have to see first whether pthreads are available without
7492# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7494$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007495if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497else
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 ac_cv_pthread_is_default=no
7500else
Matthias Kloseb9621712010-04-24 17:59:49 +00007501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502/* end confdefs.h. */
7503
Stefan Krah7dba5942012-11-22 22:49:11 +01007504#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505#include <pthread.h>
7506
7507void* routine(void* p){return NULL;}
7508
7509int main(){
7510 pthread_t p;
7511 if(pthread_create(&p,NULL,routine,NULL)!=0)
7512 return 1;
7513 (void)pthread_detach(p);
7514 return 0;
7515}
7516
7517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007518if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519
7520 ac_cv_pthread_is_default=yes
7521 ac_cv_kthread=no
7522 ac_cv_pthread=no
7523
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007527rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7528 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529fi
7530
7531
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532fi
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7535$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536
7537
7538if test $ac_cv_pthread_is_default = yes
7539then
7540 ac_cv_kpthread=no
7541else
7542# -Kpthread, if available, provides the right #defines
7543# and linker options to make pthread_create available
7544# Some compilers won't report that they do not support -Kpthread,
7545# so we need to run a program to see whether it really made the
7546# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7548$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007549if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007550 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551else
7552 ac_save_cc="$CC"
7553CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007554if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555 ac_cv_kpthread=no
7556else
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558/* end confdefs.h. */
7559
Stefan Krah7dba5942012-11-22 22:49:11 +01007560#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561#include <pthread.h>
7562
7563void* routine(void* p){return NULL;}
7564
7565int main(){
7566 pthread_t p;
7567 if(pthread_create(&p,NULL,routine,NULL)!=0)
7568 return 1;
7569 (void)pthread_detach(p);
7570 return 0;
7571}
7572
7573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007574if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575 ac_cv_kpthread=yes
7576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581fi
7582
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583CC="$ac_save_cc"
7584fi
7585
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7587$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
7590if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7591then
7592# -Kthread, if available, provides the right #defines
7593# and linker options to make pthread_create available
7594# Some compilers won't report that they do not support -Kthread,
7595# so we need to run a program to see whether it really made the
7596# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7598$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007599if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007600 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601else
7602 ac_save_cc="$CC"
7603CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 ac_cv_kthread=no
7606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608/* end confdefs.h. */
7609
Stefan Krah7dba5942012-11-22 22:49:11 +01007610#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611#include <pthread.h>
7612
7613void* routine(void* p){return NULL;}
7614
7615int main(){
7616 pthread_t p;
7617 if(pthread_create(&p,NULL,routine,NULL)!=0)
7618 return 1;
7619 (void)pthread_detach(p);
7620 return 0;
7621}
7622
7623_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625 ac_cv_kthread=yes
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007629rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7630 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
7632
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633CC="$ac_save_cc"
7634fi
7635
Matthias Kloseb9621712010-04-24 17:59:49 +00007636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7637$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
7640if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7641then
7642# -pthread, if available, provides the right #defines
7643# and linker options to make pthread_create available
7644# Some compilers won't report that they do not support -pthread,
7645# so we need to run a program to see whether it really made the
7646# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7648$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007649if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651else
7652 ac_save_cc="$CC"
7653CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007654if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655 ac_cv_pthread=no
7656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658/* end confdefs.h. */
7659
Stefan Krah7dba5942012-11-22 22:49:11 +01007660#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661#include <pthread.h>
7662
7663void* routine(void* p){return NULL;}
7664
7665int main(){
7666 pthread_t p;
7667 if(pthread_create(&p,NULL,routine,NULL)!=0)
7668 return 1;
7669 (void)pthread_detach(p);
7670 return 0;
7671}
7672
7673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007674if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675 ac_cv_pthread=yes
7676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
7682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683CC="$ac_save_cc"
7684fi
7685
Matthias Kloseb9621712010-04-24 17:59:49 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7687$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688fi
7689
7690# If we have set a CC compiler flag for thread support then
7691# check if it works for CXX, too.
7692ac_cv_cxx_thread=no
7693if test ! -z "$CXX"
7694then
Matthias Kloseb9621712010-04-24 17:59:49 +00007695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7696$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697ac_save_cxx="$CXX"
7698
7699if test "$ac_cv_kpthread" = "yes"
7700then
7701 CXX="$CXX -Kpthread"
7702 ac_cv_cxx_thread=yes
7703elif test "$ac_cv_kthread" = "yes"
7704then
7705 CXX="$CXX -Kthread"
7706 ac_cv_cxx_thread=yes
7707elif test "$ac_cv_pthread" = "yes"
7708then
7709 CXX="$CXX -pthread"
7710 ac_cv_cxx_thread=yes
7711fi
7712
7713if test $ac_cv_cxx_thread = yes
7714then
7715 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7716 $CXX -c conftest.$ac_ext 2>&5
7717 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7718 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7719 then
7720 ac_cv_cxx_thread=yes
7721 else
7722 ac_cv_cxx_thread=no
7723 fi
7724 rm -fr conftest*
7725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7727$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728fi
7729CXX="$ac_save_cxx"
7730
7731
7732# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7734$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007735if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007737else
Matthias Kloseb9621712010-04-24 17:59:49 +00007738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007739/* end confdefs.h. */
7740#include <stdlib.h>
7741#include <stdarg.h>
7742#include <string.h>
7743#include <float.h>
7744
7745int
7746main ()
7747{
7748
7749 ;
7750 return 0;
7751}
7752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007753if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007754 ac_cv_header_stdc=yes
7755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7759
7760if test $ac_cv_header_stdc = yes; then
7761 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763/* end confdefs.h. */
7764#include <string.h>
7765
7766_ACEOF
7767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 $EGREP "memchr" >/dev/null 2>&1; then :
7769
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770else
7771 ac_cv_header_stdc=no
7772fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007773rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774
7775fi
7776
7777if test $ac_cv_header_stdc = yes; then
7778 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780/* end confdefs.h. */
7781#include <stdlib.h>
7782
7783_ACEOF
7784if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007785 $EGREP "free" >/dev/null 2>&1; then :
7786
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787else
7788 ac_cv_header_stdc=no
7789fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007790rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007791
7792fi
7793
7794if test $ac_cv_header_stdc = yes; then
7795 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007796 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007797 :
7798else
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800/* end confdefs.h. */
7801#include <ctype.h>
7802#include <stdlib.h>
7803#if ((' ' & 0x0FF) == 0x020)
7804# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7805# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7806#else
7807# define ISLOWER(c) \
7808 (('a' <= (c) && (c) <= 'i') \
7809 || ('j' <= (c) && (c) <= 'r') \
7810 || ('s' <= (c) && (c) <= 'z'))
7811# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7812#endif
7813
7814#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7815int
7816main ()
7817{
7818 int i;
7819 for (i = 0; i < 256; i++)
7820 if (XOR (islower (i), ISLOWER (i))
7821 || toupper (i) != TOUPPER (i))
7822 return 2;
7823 return 0;
7824}
7825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007826if ac_fn_c_try_run "$LINENO"; then :
7827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007828else
Matthias Kloseb9621712010-04-24 17:59:49 +00007829 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833fi
7834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835fi
7836fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7838$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007839if test $ac_cv_header_stdc = yes; then
7840
Matthias Kloseb9621712010-04-24 17:59:49 +00007841$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842
7843fi
7844
stratakise768c862018-01-23 16:11:24 +01007845for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007846fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007847ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007848sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007849utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007850poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007851sys/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 +01007852sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007853sys/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 +01007854sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007855sys/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 -07007856libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007857linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007858sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007859do :
7860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7861ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007863 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007865_ACEOF
7866
7867fi
7868
Guido van Rossum627b2d71993-12-24 10:39:16 +00007869done
7870
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007872for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007873 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7875$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007876if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007877 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007878else
Matthias Kloseb9621712010-04-24 17:59:49 +00007879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007880/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007881#include <sys/types.h>
7882#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007883
Martin v. Löwis11437992002-04-12 09:54:03 +00007884int
7885main ()
7886{
7887if ((DIR *) 0)
7888return 0;
7889 ;
7890 return 0;
7891}
7892_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007893if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007894 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007895else
Matthias Kloseb9621712010-04-24 17:59:49 +00007896 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007900eval ac_res=\$$as_ac_Header
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7902$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007903if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007905#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007906_ACEOF
7907
7908ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007910
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007911done
7912# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7913if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7915$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007916if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007917 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918else
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923/* Override any GCC internal prototype to avoid an error.
7924 Use char because int might match the return type of a GCC
7925 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926#ifdef __cplusplus
7927extern "C"
7928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007929char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007930int
7931main ()
7932{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007934 ;
7935 return 0;
7936}
7937_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938for ac_lib in '' dir; do
7939 if test -z "$ac_lib"; then
7940 ac_res="none required"
7941 else
7942 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007944 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007947fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007948rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007950 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953done
Victor Stinnere0be4232011-10-25 13:06:09 +02007954if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007955
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007956else
7957 ac_cv_search_opendir=no
7958fi
7959rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007960LIBS=$ac_func_search_save_LIBS
7961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7963$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007965if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007969
Michael W. Hudson54241132001-12-07 15:38:26 +00007970else
Matthias Kloseb9621712010-04-24 17:59:49 +00007971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7972$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007975else
7976 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980/* Override any GCC internal prototype to avoid an error.
7981 Use char because int might match the return type of a GCC
7982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007983#ifdef __cplusplus
7984extern "C"
7985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007986char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987int
7988main ()
7989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ;
7992 return 0;
7993}
7994_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007995for ac_lib in '' x; do
7996 if test -z "$ac_lib"; then
7997 ac_res="none required"
7998 else
7999 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008000 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008002 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008005rm -f core conftest.err conftest.$ac_objext \
8006 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008007 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010done
Victor Stinnere0be4232011-10-25 13:06:09 +02008011if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013else
8014 ac_cv_search_opendir=no
8015fi
8016rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008017LIBS=$ac_func_search_save_LIBS
8018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8020$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008022if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008025fi
8026
8027fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008028
Matthias Kloseb9621712010-04-24 17:59:49 +00008029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8030$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008031if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008032 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008033else
Matthias Kloseb9621712010-04-24 17:59:49 +00008034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008036#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008037int
8038main ()
8039{
8040return makedev(0, 0);
8041 ;
8042 return 0;
8043}
8044_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008045if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008046 ac_cv_header_sys_types_h_makedev=yes
8047else
Matthias Kloseb9621712010-04-24 17:59:49 +00008048 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050rm -f core conftest.err conftest.$ac_objext \
8051 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008052
8053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8055$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008056
8057if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008058ac_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 +02008059if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008060
Matthias Kloseb9621712010-04-24 17:59:49 +00008061$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008062
8063fi
8064
8065
8066
8067 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 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 +02008069if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008070
Matthias Kloseb9621712010-04-24 17:59:49 +00008071$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008072
8073fi
8074
8075
8076 fi
8077fi
8078
Michael W. Hudson54241132001-12-07 15:38:26 +00008079
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008080# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8081# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8082SAVE_CFLAGS=$CFLAGS
8083CFLAGS="-std=c99 $CFLAGS"
8084for ac_header in bluetooth/bluetooth.h
8085do :
8086 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8087if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8088 cat >>confdefs.h <<_ACEOF
8089#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8090_ACEOF
8091
8092fi
8093
8094done
8095
8096CFLAGS=$SAVE_CFLAGS
8097
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008098# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8099for ac_header in net/if.h
8100do :
8101 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8102#ifdef STDC_HEADERS
8103# include <stdlib.h>
8104# include <stddef.h>
8105#else
8106# ifdef HAVE_STDLIB_H
8107# include <stdlib.h>
8108# endif
8109#endif
8110#ifdef HAVE_SYS_SOCKET_H
8111# include <sys/socket.h>
8112#endif
8113
8114"
Victor Stinnere0be4232011-10-25 13:06:09 +02008115if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008116 cat >>confdefs.h <<_ACEOF
8117#define HAVE_NET_IF_H 1
8118_ACEOF
8119
8120fi
8121
8122done
8123
8124
Martin v. Löwis11017b12006-01-14 18:12:57 +00008125# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008126for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008127do :
8128 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 +00008129#ifdef HAVE_ASM_TYPES_H
8130#include <asm/types.h>
8131#endif
8132#ifdef HAVE_SYS_SOCKET_H
8133#include <sys/socket.h>
8134#endif
8135
Matthias Kloseb9621712010-04-24 17:59:49 +00008136"
Victor Stinnere0be4232011-10-25 13:06:09 +02008137if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008138 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008139#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008140_ACEOF
8141
8142fi
8143
8144done
8145
8146
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008147# On Linux, qrtr.h requires asm/types.h
8148for ac_header in linux/qrtr.h
8149do :
8150 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8151#ifdef HAVE_ASM_TYPES_H
8152#include <asm/types.h>
8153#endif
8154#ifdef HAVE_SYS_SOCKET_H
8155#include <sys/socket.h>
8156#endif
8157
8158"
8159if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8160 cat >>confdefs.h <<_ACEOF
8161#define HAVE_LINUX_QRTR_H 1
8162_ACEOF
8163
8164fi
8165
8166done
8167
8168
caaveryeffc12f2017-09-06 18:18:10 -04008169for ac_header in linux/vm_sockets.h
8170do :
8171 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8172#ifdef HAVE_SYS_SOCKET_H
8173#include <sys/socket.h>
8174#endif
8175
8176"
8177if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8178 cat >>confdefs.h <<_ACEOF
8179#define HAVE_LINUX_VM_SOCKETS_H 1
8180_ACEOF
8181
8182fi
8183
8184done
8185
8186
Charles-François Natali47413c12011-10-06 19:47:44 +02008187# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008188for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008189do :
8190 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8191ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8192#ifdef HAVE_SYS_SOCKET_H
8193#include <sys/socket.h>
8194#endif
8195
8196"
8197if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8198 cat >>confdefs.h <<_ACEOF
8199#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8200_ACEOF
8201
8202fi
8203
8204done
8205
8206
Guido van Rossum627b2d71993-12-24 10:39:16 +00008207# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008208was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8210$as_echo_n "checking for clock_t in time.h... " >&6; }
8211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008212/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008213#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008214
8215_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008216if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008218 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008219else
Martin v. Löwis11437992002-04-12 09:54:03 +00008220
8221
Matthias Kloseb9621712010-04-24 17:59:49 +00008222$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008223
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008224
Guido van Rossum627b2d71993-12-24 10:39:16 +00008225fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008226rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008227
Matthias Kloseb9621712010-04-24 17:59:49 +00008228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8229$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008230
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8232$as_echo_n "checking for makedev... " >&6; }
8233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008235
Jesus Cea740f53a2010-04-28 11:35:30 +00008236#if defined(MAJOR_IN_MKDEV)
8237#include <sys/mkdev.h>
8238#elif defined(MAJOR_IN_SYSMACROS)
8239#include <sys/sysmacros.h>
8240#else
8241#include <sys/types.h>
8242#endif
8243
Neal Norwitz11690112002-07-30 01:08:28 +00008244int
8245main ()
8246{
Jesus Cea740f53a2010-04-28 11:35:30 +00008247
8248 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008249 ;
8250 return 0;
8251}
Matthias Kloseb159a552010-04-25 21:00:44 +00008252
Neal Norwitz11690112002-07-30 01:08:28 +00008253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008254if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008255 ac_cv_has_makedev=yes
8256else
Matthias Kloseb9621712010-04-24 17:59:49 +00008257 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008259rm -f core conftest.err conftest.$ac_objext \
8260 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8262$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008263if test "$ac_cv_has_makedev" = "yes"; then
8264
Matthias Kloseb9621712010-04-24 17:59:49 +00008265$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008266
8267fi
8268
Christian Heimes985ecdc2013-11-20 11:46:18 +01008269# byte swapping
8270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8271$as_echo_n "checking for le64toh... " >&6; }
8272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8273/* end confdefs.h. */
8274
8275#ifdef HAVE_ENDIAN_H
8276#include <endian.h>
8277#elif defined(HAVE_SYS_ENDIAN_H)
8278#include <sys/endian.h>
8279#endif
8280
8281int
8282main ()
8283{
8284
8285 le64toh(1)
8286 ;
8287 return 0;
8288}
8289
8290_ACEOF
8291if ac_fn_c_try_link "$LINENO"; then :
8292 ac_cv_has_le64toh=yes
8293else
8294 ac_cv_has_le64toh=no
8295fi
8296rm -f core conftest.err conftest.$ac_objext \
8297 conftest$ac_exeext conftest.$ac_ext
8298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8299$as_echo "$ac_cv_has_le64toh" >&6; }
8300if test "$ac_cv_has_le64toh" = "yes"; then
8301
8302$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8303
8304fi
8305
Martin v. Löwis399a6892002-10-04 10:22:02 +00008306use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008307# Don't use largefile support for GNU/Hurd
8308case $ac_sys_system in GNU*)
8309 use_lfs=no
8310esac
8311
Martin v. Löwis399a6892002-10-04 10:22:02 +00008312if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008313# Two defines needed to enable largefile support on various platforms
8314# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008315case $ac_sys_system/$ac_sys_release in
8316AIX*)
8317
8318$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8319
8320 ;;
8321esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008322
Matthias Kloseb9621712010-04-24 17:59:49 +00008323$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008324
8325
Matthias Kloseb9621712010-04-24 17:59:49 +00008326$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008327
Martin v. Löwis399a6892002-10-04 10:22:02 +00008328fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008329
Guido van Rossum84e7b241996-08-19 21:59:00 +00008330# Add some code to confdefs.h so that the test for off_t works on SCO
8331cat >> confdefs.h <<\EOF
8332#if defined(SCO_DS)
8333#undef _OFF_T
8334#endif
8335EOF
8336
Guido van Rossumef2255b2000-03-10 22:30:29 +00008337# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008338ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008339if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008340
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341else
Martin v. Löwis11437992002-04-12 09:54:03 +00008342
8343cat >>confdefs.h <<_ACEOF
8344#define mode_t int
8345_ACEOF
8346
8347fi
8348
Matthias Kloseb9621712010-04-24 17:59:49 +00008349ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008350if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008351
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008352else
Martin v. Löwis11437992002-04-12 09:54:03 +00008353
8354cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008355#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008356_ACEOF
8357
8358fi
8359
Matthias Kloseb9621712010-04-24 17:59:49 +00008360ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008361if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008362
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008363else
Martin v. Löwis11437992002-04-12 09:54:03 +00008364
8365cat >>confdefs.h <<_ACEOF
8366#define pid_t int
8367_ACEOF
8368
8369fi
8370
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008371
Martin v. Löwis11437992002-04-12 09:54:03 +00008372cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008373#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008374_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008377if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008379else
Martin v. Löwis11437992002-04-12 09:54:03 +00008380
8381cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008383_ACEOF
8384
8385fi
8386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8388$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008389if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008391else
Matthias Kloseb9621712010-04-24 17:59:49 +00008392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008394#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008397if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008399 ac_cv_type_uid_t=yes
8400else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008401 ac_cv_type_uid_t=no
8402fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008403rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008404
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8407$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008408if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409
Matthias Kloseb9621712010-04-24 17:59:49 +00008410$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008411
8412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414
8415fi
8416
Mark Dickinson983bc162012-12-02 12:11:38 +00008417
Matthias Kloseb9621712010-04-24 17:59:49 +00008418ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008419if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008422
8423fi
8424
Stefan Krah1919b7e2012-03-21 18:25:23 +01008425ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8426if test "x$ac_cv_type___uint128_t" = xyes; then :
8427
8428$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8429
8430fi
8431
Jack Jansendd19cf82001-12-06 22:36:17 +00008432
Michael W. Hudson54241132001-12-07 15:38:26 +00008433# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008434# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435# The cast to long int works around a bug in the HP C Compiler
8436# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8437# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8438# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8440$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008441if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008443else
Matthias Kloseb9621712010-04-24 17:59:49 +00008444 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 +00008445
Martin v. Löwis11437992002-04-12 09:54:03 +00008446else
Matthias Kloseb9621712010-04-24 17:59:49 +00008447 if test "$ac_cv_type_int" = yes; then
8448 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008450as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008451See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452 else
8453 ac_cv_sizeof_int=0
8454 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8459$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460
8461
8462
Martin v. Löwis11437992002-04-12 09:54:03 +00008463cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008464#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008465_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008466
8467
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468# The cast to long int works around a bug in the HP C Compiler
8469# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8470# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8471# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8473$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008474if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008476else
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 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 +00008478
Martin v. Löwis11437992002-04-12 09:54:03 +00008479else
Matthias Kloseb9621712010-04-24 17:59:49 +00008480 if test "$ac_cv_type_long" = yes; then
8481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8482$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008483as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008484See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008485 else
8486 ac_cv_sizeof_long=0
8487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8492$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493
8494
8495
Martin v. Löwis11437992002-04-12 09:54:03 +00008496cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008497#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008498_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008499
8500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501# The cast to long int works around a bug in the HP C Compiler
8502# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8503# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8504# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8506$as_echo_n "checking size of long long... " >&6; }
8507if ${ac_cv_sizeof_long_long+:} false; then :
8508 $as_echo_n "(cached) " >&6
8509else
8510 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8511
8512else
8513 if test "$ac_cv_type_long_long" = yes; then
8514 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8516as_fn_error 77 "cannot compute sizeof (long long)
8517See \`config.log' for more details" "$LINENO" 5; }
8518 else
8519 ac_cv_sizeof_long_long=0
8520 fi
8521fi
8522
8523fi
8524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8525$as_echo "$ac_cv_sizeof_long_long" >&6; }
8526
8527
8528
8529cat >>confdefs.h <<_ACEOF
8530#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8531_ACEOF
8532
8533
8534# The cast to long int works around a bug in the HP C Compiler
8535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8537# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8539$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008540if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 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 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 if test "$ac_cv_type_void_p" = yes; then
8547 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008549as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008550See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 else
8552 ac_cv_sizeof_void_p=0
8553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8558$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559
8560
8561
Martin v. Löwis11437992002-04-12 09:54:03 +00008562cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008563#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008564_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008565
8566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567# The cast to long int works around a bug in the HP C Compiler
8568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8570# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8572$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008573if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008574 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008575else
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 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 +00008577
Martin v. Löwis11437992002-04-12 09:54:03 +00008578else
Matthias Kloseb9621712010-04-24 17:59:49 +00008579 if test "$ac_cv_type_short" = yes; then
8580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008582as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008583See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 else
8585 ac_cv_sizeof_short=0
8586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008587fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008588
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8591$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592
8593
8594
Martin v. Löwis11437992002-04-12 09:54:03 +00008595cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008596#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008597_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008598
8599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8605$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 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 +00008610
Martin v. Löwis11437992002-04-12 09:54:03 +00008611else
Matthias Kloseb9621712010-04-24 17:59:49 +00008612 if test "$ac_cv_type_float" = yes; then
8613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008615as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008616See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008617 else
8618 ac_cv_sizeof_float=0
8619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8624$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625
8626
8627
Martin v. Löwis11437992002-04-12 09:54:03 +00008628cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008629#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008630_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008631
8632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633# The cast to long int works around a bug in the HP C Compiler
8634# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8635# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8636# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8638$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008639if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008640 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008641else
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 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 +00008643
Martin v. Löwis11437992002-04-12 09:54:03 +00008644else
Matthias Kloseb9621712010-04-24 17:59:49 +00008645 if test "$ac_cv_type_double" = yes; then
8646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008648as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008649See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 else
8651 ac_cv_sizeof_double=0
8652 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008654
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8657$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658
8659
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008662#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008663_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664
8665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666# The cast to long int works around a bug in the HP C Compiler
8667# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8668# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8669# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8671$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008672if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008674else
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 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 +00008676
Martin v. Löwis11437992002-04-12 09:54:03 +00008677else
Matthias Kloseb9621712010-04-24 17:59:49 +00008678 if test "$ac_cv_type_fpos_t" = yes; then
8679 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8680$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008681as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008682See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008683 else
8684 ac_cv_sizeof_fpos_t=0
8685 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8690$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691
8692
8693
Martin v. Löwis11437992002-04-12 09:54:03 +00008694cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008695#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008696_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008697
Michael W. Hudson54241132001-12-07 15:38:26 +00008698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699# The cast to long int works around a bug in the HP C Compiler
8700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8702# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8704$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008705if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008707else
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 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 +00008709
Martin v. Löwis18e16552006-02-15 17:27:45 +00008710else
Matthias Kloseb9621712010-04-24 17:59:49 +00008711 if test "$ac_cv_type_size_t" = yes; then
8712 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8713$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008714as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008715See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716 else
8717 ac_cv_sizeof_size_t=0
8718 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720
Martin v. Löwis18e16552006-02-15 17:27:45 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8723$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724
8725
8726
Martin v. Löwis18e16552006-02-15 17:27:45 +00008727cat >>confdefs.h <<_ACEOF
8728#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8729_ACEOF
8730
8731
Christian Heimes400adb02008-02-01 08:12:03 +00008732# The cast to long int works around a bug in the HP C Compiler
8733# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8734# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8735# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8737$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008740else
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 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 +00008742
Christian Heimes400adb02008-02-01 08:12:03 +00008743else
Matthias Kloseb9621712010-04-24 17:59:49 +00008744 if test "$ac_cv_type_pid_t" = yes; then
8745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008747as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008748See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008749 else
8750 ac_cv_sizeof_pid_t=0
8751 fi
8752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008753
Christian Heimes400adb02008-02-01 08:12:03 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8756$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008757
8758
8759
8760cat >>confdefs.h <<_ACEOF
8761#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8762_ACEOF
8763
8764
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008765# The cast to long int works around a bug in the HP C Compiler
8766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8768# This bug is HP SR number 8606223364.
8769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8770$as_echo_n "checking size of uintptr_t... " >&6; }
8771if ${ac_cv_sizeof_uintptr_t+:} false; then :
8772 $as_echo_n "(cached) " >&6
8773else
8774 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8775
8776else
8777 if test "$ac_cv_type_uintptr_t" = yes; then
8778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8780as_fn_error 77 "cannot compute sizeof (uintptr_t)
8781See \`config.log' for more details" "$LINENO" 5; }
8782 else
8783 ac_cv_sizeof_uintptr_t=0
8784 fi
8785fi
8786
8787fi
8788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8789$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8790
8791
8792
8793cat >>confdefs.h <<_ACEOF
8794#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8795_ACEOF
8796
8797
Michael W. Hudson54241132001-12-07 15:38:26 +00008798
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008799
Eitan Adler3055c942018-05-15 22:58:09 -07008800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8801$as_echo_n "checking for long double... " >&6; }
8802if ${ac_cv_type_long_double+:} false; then :
8803 $as_echo_n "(cached) " >&6
8804else
8805 if test "$GCC" = yes; then
8806 ac_cv_type_long_double=yes
8807 else
8808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8809/* end confdefs.h. */
8810/* The Stardent Vistra knows sizeof (long double), but does
8811 not support it. */
8812 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008813int
8814main ()
8815{
Eitan Adler3055c942018-05-15 22:58:09 -07008816static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8817 sizeof (double) <= sizeof (long double))];
8818test_array [0] = 0;
8819return test_array [0];
8820
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008821 ;
8822 return 0;
8823}
8824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008825if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008826 ac_cv_type_long_double=yes
8827else
8828 ac_cv_type_long_double=no
8829fi
8830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8831 fi
8832fi
8833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8834$as_echo "$ac_cv_type_long_double" >&6; }
8835 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008836
Matthias Kloseb9621712010-04-24 17:59:49 +00008837$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008838
Eitan Adler3055c942018-05-15 22:58:09 -07008839 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008840
Travis E. Oliphant9b307842007-10-12 22:06: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 long double" >&5
8846$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008847if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008848 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008849else
Matthias Kloseb9621712010-04-24 17:59:49 +00008850 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 +00008851
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008852else
Matthias Kloseb9621712010-04-24 17:59:49 +00008853 if test "$ac_cv_type_long_double" = yes; then
8854 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008856as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008857See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008858 else
8859 ac_cv_sizeof_long_double=0
8860 fi
8861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008862
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008863fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8865$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008866
8867
8868
8869cat >>confdefs.h <<_ACEOF
8870#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8871_ACEOF
8872
8873
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875# The cast to long int works around a bug in the HP C Compiler
8876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8878# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8880$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008881if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 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 +00008885
Thomas Woutersb2137042007-02-01 18:02:27 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if test "$ac_cv_type__Bool" = yes; then
8888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008890as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008891See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892 else
8893 ac_cv_sizeof__Bool=0
8894 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008896
Thomas Woutersb2137042007-02-01 18:02:27 +00008897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8899$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900
8901
8902
Thomas Woutersb2137042007-02-01 18:02:27 +00008903cat >>confdefs.h <<_ACEOF
8904#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8905_ACEOF
8906
8907
Thomas Woutersb2137042007-02-01 18:02:27 +00008908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909# The cast to long int works around a bug in the HP C Compiler
8910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8912# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8914$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008915if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008916 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917else
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008919#ifdef HAVE_SYS_TYPES_H
8920#include <sys/types.h>
8921#endif
8922
Matthias Kloseb9621712010-04-24 17:59:49 +00008923"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 if test "$ac_cv_type_off_t" = yes; then
8927 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8928$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008929as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008930See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931 else
8932 ac_cv_sizeof_off_t=0
8933 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8938$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008939
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008940
8941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008944_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008945
Michael W. Hudson54241132001-12-07 15:38:26 +00008946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8949$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008950if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008951 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008952
Matthias Kloseb9621712010-04-24 17:59:49 +00008953$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008954
Matthias Kloseb9621712010-04-24 17:59:49 +00008955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8956$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008960fi
8961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962# The cast to long int works around a bug in the HP C Compiler
8963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8965# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8967$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008968if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972#ifdef HAVE_SYS_TYPES_H
8973#include <sys/types.h>
8974#endif
8975#ifdef HAVE_TIME_H
8976#include <time.h>
8977#endif
8978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 if test "$ac_cv_type_time_t" = yes; then
8983 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008985as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008986See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987 else
8988 ac_cv_sizeof_time_t=0
8989 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8994$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996
8997
Martin v. Löwis11437992002-04-12 09:54:03 +00008998cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008999#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009001
Michael W. Hudson54241132001-12-07 15:38:26 +00009002
9003
Trent Mick635f6fb2000-08-23 21:33:05 +00009004# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009005ac_save_cc="$CC"
9006if test "$ac_cv_kpthread" = "yes"
9007then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009008elif test "$ac_cv_kthread" = "yes"
9009then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009010elif test "$ac_cv_pthread" = "yes"
9011then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009012fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9015$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009016have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009018/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009019
9020 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009021int
9022main ()
9023{
Guido van Rossum12580492000-09-24 16:47:19 +00009024pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009025 ;
9026 return 0;
9027}
Matthias Kloseb159a552010-04-25 21:00:44 +00009028
Martin v. Löwis11437992002-04-12 09:54:03 +00009029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009030if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009031 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9035$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009036if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009037 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009038# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9039# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9040# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9042$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045else
Matthias Kloseb9621712010-04-24 17:59:49 +00009046 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009047#ifdef HAVE_PTHREAD_H
9048#include <pthread.h>
9049#endif
9050
Matthias Kloseb9621712010-04-24 17:59:49 +00009051"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if test "$ac_cv_type_pthread_t" = yes; then
9055 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9056$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009057as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009058See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059 else
9060 ac_cv_sizeof_pthread_t=0
9061 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009062fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009063
Trent Mick635f6fb2000-08-23 21:33:05 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9066$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009067
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009068
9069
Martin v. Löwis11437992002-04-12 09:54:03 +00009070cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009071#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009072_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009073
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009074
Trent Mick635f6fb2000-08-23 21:33:05 +00009075fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009076
9077# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9078# This checking will be unnecessary after removing deprecated TLS API.
9079# The cast to long int works around a bug in the HP C Compiler
9080# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9081# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9082# This bug is HP SR number 8606223364.
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9084$as_echo_n "checking size of pthread_key_t... " >&6; }
9085if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9086 $as_echo_n "(cached) " >&6
9087else
9088 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9089"; then :
9090
9091else
9092 if test "$ac_cv_type_pthread_key_t" = yes; then
9093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9095as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9096See \`config.log' for more details" "$LINENO" 5; }
9097 else
9098 ac_cv_sizeof_pthread_key_t=0
9099 fi
9100fi
9101
9102fi
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9104$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9105
9106
9107
9108cat >>confdefs.h <<_ACEOF
9109#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9110_ACEOF
9111
9112
9113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9114$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9115if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9117/* end confdefs.h. */
9118#include <pthread.h>
9119int
9120main ()
9121{
9122pthread_key_t k; k * 1;
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127if ac_fn_c_try_compile "$LINENO"; then :
9128 ac_pthread_key_t_is_arithmetic_type=yes
9129else
9130 ac_pthread_key_t_is_arithmetic_type=no
9131
9132fi
9133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9135$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9136 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9137
9138$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9139
9140 fi
9141else
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143$as_echo "no" >&6; }
9144fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009145CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009146
Michael W. Hudson54241132001-12-07 15:38:26 +00009147
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009148case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009149 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009150 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9151 ;;
9152 Darwin/*)
9153 OTHER_LIBTOOL_OPT=""
9154 ;;
9155esac
9156
9157
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009158
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009159case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009160 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009161 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9162 if test "${enable_universalsdk}"; then
9163 :
9164 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009165 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009166 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009167 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009168 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009169 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009170 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009171 if test ${gcc_version} '<' 4.0
9172 then
9173 LIBTOOL_CRUFT="-lcc_dynamic"
9174 else
9175 LIBTOOL_CRUFT=""
9176 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009177 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009178 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009179else
Matthias Kloseb9621712010-04-24 17:59:49 +00009180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009181/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009182
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009183 #include <unistd.h>
9184 int main(int argc, char*argv[])
9185 {
9186 if (sizeof(long) == 4) {
9187 return 0;
9188 } else {
9189 return 1;
9190 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009191 }
9192
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009194if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009195 ac_osx_32bit=yes
9196else
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9200 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009201fi
9202
9203
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009204 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009205 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009206 i386)
9207 MACOSX_DEFAULT_ARCH="i386"
9208 ;;
9209 ppc)
9210 MACOSX_DEFAULT_ARCH="ppc"
9211 ;;
9212 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009213 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214 ;;
9215 esac
9216 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009217 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009218 i386)
9219 MACOSX_DEFAULT_ARCH="x86_64"
9220 ;;
9221 ppc)
9222 MACOSX_DEFAULT_ARCH="ppc64"
9223 ;;
9224 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009225 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226 ;;
9227 esac
9228
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009229 fi
9230
9231 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009232 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009233 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009234esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9236$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009237if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009238then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009239 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009241 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009242
Matthias Kloseb9621712010-04-24 17:59:49 +00009243$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009244
Matthias Kloseb9621712010-04-24 17:59:49 +00009245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9246$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009247 if test $enable_shared = "yes"
9248 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009249 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 +00009250 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009251else
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9253$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009254fi
9255
Matthias Kloseb9621712010-04-24 17:59:49 +00009256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9257$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009258case $ac_sys_system/$ac_sys_release in
9259 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009260
Matthias Kloseb9621712010-04-24 17:59:49 +00009261$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9264$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009265 ;;
9266 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9268$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009269 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009270esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271
Guido van Rossum0a516c91994-09-12 10:58:40 +00009272# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009273
Michael W. Hudson54241132001-12-07 15:38:26 +00009274
9275
9276
9277
Benjamin Peterson99f03762010-04-11 22:15:28 +00009278
Thomas Wouters477c8d52006-05-27 19:21:47 +00009279
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009280# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9281# -- usually .so, .sl on HP-UX, .dll on Cygwin
9282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9283$as_echo_n "checking the extension of shared libraries... " >&6; }
9284if test -z "$SHLIB_SUFFIX"; then
9285 case $ac_sys_system in
9286 hp*|HP*)
9287 case `uname -m` in
9288 ia64) SHLIB_SUFFIX=.so;;
9289 *) SHLIB_SUFFIX=.sl;;
9290 esac
9291 ;;
9292 CYGWIN*) SHLIB_SUFFIX=.dll;;
9293 *) SHLIB_SUFFIX=.so;;
9294 esac
9295fi
9296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9297$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009298
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009300# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009301# (Shared libraries in this instance are shared modules to be loaded into
9302# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9304$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305if test -z "$LDSHARED"
9306then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009307 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009308 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009309 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009310 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009311 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009312 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009313 if test "$GCC" = "yes" ; then
9314 LDSHARED='$(CC) -shared'
9315 LDCXXSHARED='$(CXX) -shared'
9316 else
9317 LDSHARED='$(CC) -G'
9318 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009319 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009320 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009321 if test "$GCC" = "yes" ; then
9322 LDSHARED='$(CC) -shared'
9323 LDCXXSHARED='$(CXX) -shared'
9324 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009325 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009326 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009327 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009328 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009329 LDSHARED='$(CC) -bundle'
9330 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009331 if test "$enable_framework" ; then
9332 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009333 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9334 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009335 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009336 else
9337 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009338 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009339 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009340 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009341 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009342 LDSHARED='$(CC) -bundle'
9343 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009344 if test "$enable_framework" ; then
9345 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009346 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9347 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009348 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009349 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009350 # No framework, use the Python app as bundle-loader
9351 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009352 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009353 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009354 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009355 Darwin/*)
9356 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9357 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009358
Ned Deily36820b62014-06-25 13:44:22 -07009359 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9360 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9361 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9362 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9363 if test ${dep_target_major} -eq 10 && \
9364 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009365 then
Ned Deily36820b62014-06-25 13:44:22 -07009366 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009367 LDSHARED='$(CC) -bundle'
9368 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009369 if test "$enable_framework" ; then
9370 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009371 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9372 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009373 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009374 else
9375 # No framework, use the Python app as bundle-loader
9376 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9377 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009378 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009379 fi
Ned Deily36820b62014-06-25 13:44:22 -07009380 else
9381 # building for OS X 10.3 and later
9382 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9383 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9384 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009385 fi
9386 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009387 Linux*|GNU*|QNX*)
9388 LDSHARED='$(CC) -shared'
9389 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009390 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009391 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009392 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009393 LDSHARED='$(CC) -shared'
9394 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009395 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009396 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009397 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009398 OpenBSD*)
9399 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9400 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009401 LDSHARED='$(CC) -shared $(CCSHARED)'
9402 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009403 else
9404 case `uname -r` in
9405 [01].* | 2.[0-7] | 2.[0-7].*)
9406 LDSHARED="ld -Bshareable ${LDFLAGS}"
9407 ;;
9408 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009409 LDSHARED='$(CC) -shared $(CCSHARED)'
9410 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009411 ;;
9412 esac
9413 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009414 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009415 LDSHARED='$(CC) -shared'
9416 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009417 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009418 if test "$GCC" = "yes" ; then
9419 LDSHARED='$(CC) -shared'
9420 LDCXXSHARED='$(CXX) -shared'
9421 else
9422 LDSHARED='$(CC) -G'
9423 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009424 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009425 SCO_SV*)
9426 LDSHARED='$(CC) -Wl,-G,-Bexport'
9427 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9428 CYGWIN*)
9429 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9430 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009431 *) LDSHARED="ld";;
9432 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9435$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009436LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009437BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009438# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009439# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9441$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009442if test -z "$CCSHARED"
9443then
Guido van Rossum07397971997-04-29 21:49:50 +00009444 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009445 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009446 then CCSHARED="-fPIC";
9447 elif test `uname -p` = sparc;
9448 then CCSHARED="-xcode=pic32";
9449 else CCSHARED="-Kpic";
9450 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009451 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009452 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009453 else CCSHARED="+z";
9454 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009455 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009456 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009457 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009458 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009459 if test "$GCC" = "yes"
9460 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009461 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009462 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009463 SCO_SV*)
9464 if test "$GCC" = "yes"
9465 then CCSHARED="-fPIC"
9466 else CCSHARED="-Kpic -belf"
9467 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9471$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009472# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009473# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9475$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476if test -z "$LINKFORSHARED"
9477then
Guido van Rossum07397971997-04-29 21:49:50 +00009478 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009479 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009480 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009481 LINKFORSHARED="-Wl,-E -Wl,+s";;
9482# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009483 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009484 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009485 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009487 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009488
9489 # Issue #18075: the default maximum stack size (8MBytes) is too
9490 # small for the default recursion limit. Increase the stack size
9491 # to ensure that tests don't crash
9492 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9493
Jack Jansene578a632001-08-15 01:27:14 +00009494 if test "$enable_framework"
9495 then
Jack Jansenda49e192005-01-07 13:08:22 +00009496 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009497 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009498 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009499 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009500 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009501 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009502 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009503 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9504 then
9505 LINKFORSHARED="-Wl,--export-dynamic"
9506 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009507 SunOS/5*) case $CC in
9508 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009509 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009510 then
9511 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009512 fi;;
9513 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009514 CYGWIN*)
9515 if test $enable_shared = "no"
9516 then
9517 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9518 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009519 QNX*)
9520 # -Wl,-E causes the symbols to be added to the dynamic
9521 # symbol table so that they can be found when a module
9522 # is loaded. -N 2048K causes the stack size to be set
9523 # to 2048 kilobytes so that the stack doesn't overflow
9524 # when running test_compile.py.
9525 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009526 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9529$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009530
Michael W. Hudson54241132001-12-07 15:38:26 +00009531
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009532
Matthias Kloseb9621712010-04-24 17:59:49 +00009533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9534$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009535if test ! "$LIBRARY" = "$LDLIBRARY"
9536then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009537 case $ac_sys_system in
9538 CYGWIN*)
9539 # Cygwin needs CCSHARED when building extension DLLs
9540 # but not when building the interpreter DLL.
9541 CFLAGSFORSHARED='';;
9542 *)
9543 CFLAGSFORSHARED='$(CCSHARED)'
9544 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9547$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009548
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009549# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9550# library (with --enable-shared).
9551# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009552# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9553# if it is not required, since it creates a dependency of the shared library
9554# to LIBS. This, in turn, means that applications linking the shared libpython
9555# don't need to link LIBS explicitly. The default should be only changed
9556# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009557
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9559$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009560case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009562 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009563esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9565$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009566
9567
Guido van Rossum627b2d71993-12-24 10:39:16 +00009568# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9570$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009571if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009572 $as_echo_n "(cached) " >&6
9573else
9574 ac_check_lib_save_LIBS=$LIBS
9575LIBS="-lsendfile $LIBS"
9576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9577/* end confdefs.h. */
9578
9579/* Override any GCC internal prototype to avoid an error.
9580 Use char because int might match the return type of a GCC
9581 builtin and then its argument prototype would still apply. */
9582#ifdef __cplusplus
9583extern "C"
9584#endif
9585char sendfile ();
9586int
9587main ()
9588{
9589return sendfile ();
9590 ;
9591 return 0;
9592}
9593_ACEOF
9594if ac_fn_c_try_link "$LINENO"; then :
9595 ac_cv_lib_sendfile_sendfile=yes
9596else
9597 ac_cv_lib_sendfile_sendfile=no
9598fi
9599rm -f core conftest.err conftest.$ac_objext \
9600 conftest$ac_exeext conftest.$ac_ext
9601LIBS=$ac_check_lib_save_LIBS
9602fi
9603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9604$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009605if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009606 cat >>confdefs.h <<_ACEOF
9607#define HAVE_LIBSENDFILE 1
9608_ACEOF
9609
9610 LIBS="-lsendfile $LIBS"
9611
9612fi
9613
Matthias Kloseb9621712010-04-24 17:59:49 +00009614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9615$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009618else
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009620LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009624/* Override any GCC internal prototype to avoid an error.
9625 Use char because int might match the return type of a GCC
9626 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009627#ifdef __cplusplus
9628extern "C"
9629#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009630char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009634return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ;
9636 return 0;
9637}
9638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009639if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009641else
Matthias Kloseb9621712010-04-24 17:59:49 +00009642 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009644rm -f core conftest.err conftest.$ac_objext \
9645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9649$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009650if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 cat >>confdefs.h <<_ACEOF
9652#define HAVE_LIBDL 1
9653_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009655 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009656
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009657fi
9658 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9660$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009661if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009662 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009663else
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009665LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009667/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009669/* Override any GCC internal prototype to avoid an error.
9670 Use char because int might match the return type of a GCC
9671 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009672#ifdef __cplusplus
9673extern "C"
9674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009675char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009676int
9677main ()
9678{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ;
9681 return 0;
9682}
9683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009684if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009686else
Matthias Kloseb9621712010-04-24 17:59:49 +00009687 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009689rm -f core conftest.err conftest.$ac_objext \
9690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9694$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009695if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 cat >>confdefs.h <<_ACEOF
9697#define HAVE_LIBDLD 1
9698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009700 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009702fi
9703 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009704
Michael Felt0d3ccb42017-12-30 22:39:20 +01009705# checks for uuid.h location
9706for ac_header in uuid/uuid.h uuid.h
9707do :
9708 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9709ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9710if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9711 cat >>confdefs.h <<_ACEOF
9712#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9713_ACEOF
9714
9715fi
9716
9717done
9718
9719
Berker Peksag9a10ff42017-11-08 23:09:16 +03009720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9721$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9723/* end confdefs.h. */
9724#include <uuid/uuid.h>
9725int
9726main ()
9727{
9728
9729#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009730void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009731#endif
9732
9733 ;
9734 return 0;
9735}
9736_ACEOF
9737if ac_fn_c_try_compile "$LINENO"; then :
9738
9739$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9740
9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9742$as_echo "yes" >&6; }
9743else
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9745$as_echo "no" >&6; }
9746
9747fi
9748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9749
Michael Felt0d3ccb42017-12-30 22:39:20 +01009750# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009751# FreeBSD and OpenBSD provides support as well
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9753$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9755/* end confdefs.h. */
9756#include <uuid.h>
9757int
9758main ()
9759{
9760
9761#ifndef uuid_create
9762void *x = uuid_create
9763#endif
9764
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769if ac_fn_c_try_compile "$LINENO"; then :
9770
9771$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9772
9773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9774$as_echo "yes" >&6; }
9775else
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9777$as_echo "no" >&6; }
9778
9779fi
9780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9781
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009782# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9783# stream in big-endian byte-order
9784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9785$as_echo_n "checking for uuid_enc_be... " >&6; }
9786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9787/* end confdefs.h. */
9788#include <uuid.h>
9789int
9790main ()
9791{
9792
9793#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009794void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009795#endif
9796
9797 ;
9798 return 0;
9799}
9800_ACEOF
9801if ac_fn_c_try_compile "$LINENO"; then :
9802
9803$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9804
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9806$as_echo "yes" >&6; }
9807else
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
9810
9811fi
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9813
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009814# 'Real Time' functions on Solaris
9815# posix4 on Solaris 2.6
9816# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009818$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009819if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009821else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009822 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826/* Override any GCC internal prototype to avoid an error.
9827 Use char because int might match the return type of a GCC
9828 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009829#ifdef __cplusplus
9830extern "C"
9831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009832char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009833int
9834main ()
9835{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009836return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ;
9838 return 0;
9839}
9840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841for ac_lib in '' pthread rt posix4; do
9842 if test -z "$ac_lib"; then
9843 ac_res="none required"
9844 else
9845 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009846 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009851rm -f core conftest.err conftest.$ac_objext \
9852 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009853 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009855fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856done
Victor Stinnere0be4232011-10-25 13:06:09 +02009857if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859else
9860 ac_cv_search_sem_init=no
9861fi
9862rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009863LIBS=$ac_func_search_save_LIBS
9864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9866$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009867ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009868if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009870
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009871fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009872
Martin v. Löwis519adae2003-09-20 10:47:47 +00009873
Martin v. Löwis19d17342003-06-14 21:03:05 +00009874# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9876$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009877if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009878 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009879else
9880 ac_check_lib_save_LIBS=$LIBS
9881LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009883/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885/* Override any GCC internal prototype to avoid an error.
9886 Use char because int might match the return type of a GCC
9887 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009888#ifdef __cplusplus
9889extern "C"
9890#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009891char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009892int
9893main ()
9894{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009896 ;
9897 return 0;
9898}
9899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009900if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009901 ac_cv_lib_intl_textdomain=yes
9902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905rm -f core conftest.err conftest.$ac_objext \
9906 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907LIBS=$ac_check_lib_save_LIBS
9908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9910$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009911if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912
Matthias Kloseb9621712010-04-24 17:59:49 +00009913$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009914
Brett Cannonc6d936e2009-06-07 20:09:53 +00009915 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009916fi
9917
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009918
9919# checks for system dependent C++ extensions support
9920case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9922$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009924/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009925
Georg Brandl59e87bd2011-02-15 19:48:59 +00009926 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009930loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ;
9932 return 0;
9933}
Matthias Kloseb159a552010-04-25 21:00:44 +00009934
Martin v. Löwis11437992002-04-12 09:54:03 +00009935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009936if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009937
Matthias Kloseb159a552010-04-25 21:00:44 +00009938
Matthias Kloseb9621712010-04-24 17:59:49 +00009939$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009940
Matthias Kloseb159a552010-04-25 21:00:44 +00009941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009942$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009943
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009944else
Matthias Kloseb159a552010-04-25 21:00:44 +00009945
9946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009947$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009948
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009950rm -f core conftest.err conftest.$ac_objext \
9951 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009952 *) ;;
9953esac
9954
Christian Heimes985ecdc2013-11-20 11:46:18 +01009955# check for systems that require aligned memory access
9956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9957$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009958if ${ac_cv_aligned_required+:} false; then :
9959 $as_echo_n "(cached) " >&6
9960else
9961 if test "$cross_compiling" = yes; then :
9962 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009963else
9964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9965/* end confdefs.h. */
9966
9967int main()
9968{
9969 char s[16];
9970 int i, *p1, *p2;
9971 for (i=0; i < 16; i++)
9972 s[i] = i;
9973 p1 = (int*)(s+1);
9974 p2 = (int*)(s+2);
9975 if (*p1 == *p2)
9976 return 1;
9977 return 0;
9978}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009979_ACEOF
9980if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009981 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009982else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009983 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009984fi
9985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9986 conftest.$ac_objext conftest.beam conftest.$ac_ext
9987fi
9988
9989
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009990fi
9991
9992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9993$as_echo "$ac_cv_aligned_required" >&6; }
9994if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009995
9996$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9997
9998fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009999
10000# str, bytes and memoryview hash algorithm
10001
10002
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10004$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10005
10006# Check whether --with-hash_algorithm was given.
10007if test "${with_hash_algorithm+set}" = set; then :
10008 withval=$with_hash_algorithm;
10009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10010$as_echo "$withval" >&6; }
10011case "$withval" in
10012 siphash24)
10013 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10014
10015 ;;
10016 fnv)
10017 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10018
10019 ;;
10020 *)
10021 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10022 ;;
10023esac
10024
10025else
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10027$as_echo "default" >&6; }
10028fi
10029
10030
Charles-François Natalid30b0222014-05-08 23:08:51 +010010031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10032$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10033
10034# Check whether --with-address_sanitizer was given.
10035if test "${with_address_sanitizer+set}" = set; then :
10036 withval=$with_address_sanitizer;
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10038$as_echo "$withval" >&6; }
10039BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10040LDFLAGS="-fsanitize=address $LDFLAGS"
10041
10042else
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10044$as_echo "no" >&6; }
10045fi
10046
10047
Guido van Rossum70c7f481998-03-26 18:44:10 +000010048# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10050$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010051if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010053else
Martin v. Löwis11437992002-04-12 09:54:03 +000010054 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010055LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010057/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010059/* Override any GCC internal prototype to avoid an error.
10060 Use char because int might match the return type of a GCC
10061 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010062#ifdef __cplusplus
10063extern "C"
10064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010065char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010066int
10067main ()
10068{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010069return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010070 ;
10071 return 0;
10072}
10073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010076else
Matthias Kloseb9621712010-04-24 17:59:49 +000010077 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010079rm -f core conftest.err conftest.$ac_objext \
10080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010081LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010082fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10084$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010085if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010086 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010087fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010088 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10090$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010091if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010093else
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010095LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099/* Override any GCC internal prototype to avoid an error.
10100 Use char because int might match the return type of a GCC
10101 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010102#ifdef __cplusplus
10103extern "C"
10104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010105char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010106int
10107main ()
10108{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 ;
10111 return 0;
10112}
10113_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010114if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010116else
Matthias Kloseb9621712010-04-24 17:59:49 +000010117 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010118fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010119rm -f core conftest.err conftest.$ac_objext \
10120 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010121LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10124$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010125if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010126 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010127fi
10128 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010129
Matthias Kloseb9621712010-04-24 17:59:49 +000010130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10131$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010133# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010134if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10137$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010138LIBS="$withval $LIBS"
10139
10140else
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10142$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143fi
10144
Guido van Rossum7f43da71994-08-01 12:15:30 +000010145
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010146
10147
10148
10149
10150
10151
10152
10153if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10154 if test -n "$ac_tool_prefix"; then
10155 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10156set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10158$as_echo_n "checking for $ac_word... " >&6; }
10159if ${ac_cv_path_PKG_CONFIG+:} false; then :
10160 $as_echo_n "(cached) " >&6
10161else
10162 case $PKG_CONFIG in
10163 [\\/]* | ?:[\\/]*)
10164 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10165 ;;
10166 *)
10167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10168for as_dir in $PATH
10169do
10170 IFS=$as_save_IFS
10171 test -z "$as_dir" && as_dir=.
10172 for ac_exec_ext in '' $ac_executable_extensions; do
10173 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10174 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10176 break 2
10177 fi
10178done
10179 done
10180IFS=$as_save_IFS
10181
10182 ;;
10183esac
10184fi
10185PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10186if test -n "$PKG_CONFIG"; then
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10188$as_echo "$PKG_CONFIG" >&6; }
10189else
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
10192fi
10193
10194
10195fi
10196if test -z "$ac_cv_path_PKG_CONFIG"; then
10197 ac_pt_PKG_CONFIG=$PKG_CONFIG
10198 # Extract the first word of "pkg-config", so it can be a program name with args.
10199set dummy pkg-config; ac_word=$2
10200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10201$as_echo_n "checking for $ac_word... " >&6; }
10202if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10203 $as_echo_n "(cached) " >&6
10204else
10205 case $ac_pt_PKG_CONFIG in
10206 [\\/]* | ?:[\\/]*)
10207 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10208 ;;
10209 *)
10210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10211for as_dir in $PATH
10212do
10213 IFS=$as_save_IFS
10214 test -z "$as_dir" && as_dir=.
10215 for ac_exec_ext in '' $ac_executable_extensions; do
10216 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10217 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10218 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10219 break 2
10220 fi
10221done
10222 done
10223IFS=$as_save_IFS
10224
10225 ;;
10226esac
10227fi
10228ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10229if test -n "$ac_pt_PKG_CONFIG"; then
10230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10231$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10232else
10233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10234$as_echo "no" >&6; }
10235fi
10236
10237 if test "x$ac_pt_PKG_CONFIG" = x; then
10238 PKG_CONFIG=""
10239 else
10240 case $cross_compiling:$ac_tool_warned in
10241yes:)
10242{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10243$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10244ac_tool_warned=yes ;;
10245esac
10246 PKG_CONFIG=$ac_pt_PKG_CONFIG
10247 fi
10248else
10249 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10250fi
10251
10252fi
10253if test -n "$PKG_CONFIG"; then
10254 _pkg_min_version=0.9.0
10255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10256$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10257 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10259$as_echo "yes" >&6; }
10260 else
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263 PKG_CONFIG=""
10264 fi
10265fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010266
10267# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10269$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010270
10271# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010272if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010273 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010274else
10275 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010276fi
10277
10278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10280$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010281
10282# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10284$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010285
10286# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010287if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010288 withval=$with_system_ffi;
10289fi
10290
10291
Zachary Waref40d4dd2016-09-17 01:25:24 -050010292if test "$ac_sys_system" = "Darwin"
10293then
10294 case "$with_system_ffi" in
10295 "")
10296 with_system_ffi="no"
10297 ;;
10298 yes|no)
10299 ;;
10300 *)
10301 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10302 ;;
10303 esac
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10305$as_echo "$with_system_ffi" >&6; }
10306else
10307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10308$as_echo "yes" >&6; }
10309 if test "$with_system_ffi" != ""
10310 then
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10312$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10313 fi
10314 with_system_ffi="yes"
10315fi
Zachary Ware935043d2016-09-09 17:01:21 -070010316
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010317if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010318 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10319else
10320 LIBFFI_INCLUDEDIR=""
10321fi
10322
10323
Stefan Krah60187b52012-03-23 19:06:27 +010010324# Check for use of the system libmpdec library
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10326$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10327
10328# Check whether --with-system_libmpdec was given.
10329if test "${with_system_libmpdec+set}" = set; then :
10330 withval=$with_system_libmpdec;
10331else
10332 with_system_libmpdec="no"
10333fi
10334
10335
10336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10337$as_echo "$with_system_libmpdec" >&6; }
10338
Benjamin Peterson076ed002010-10-31 17:11:02 +000010339# Check for support for loadable sqlite extensions
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10341$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10342# Check whether --enable-loadable-sqlite-extensions was given.
10343if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10344 enableval=$enable_loadable_sqlite_extensions;
10345else
10346 enable_loadable_sqlite_extensions="no"
10347fi
10348
10349
10350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10351$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10352
Ned Deilyd819b932013-09-06 01:07:05 -070010353# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10354
10355
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10357$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10358
10359# Check whether --with-tcltk-includes was given.
10360if test "${with_tcltk_includes+set}" = set; then :
10361 withval=$with_tcltk_includes;
10362else
10363 with_tcltk_includes="default"
10364fi
10365
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10367$as_echo "$with_tcltk_includes" >&6; }
10368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10369$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10370
10371# Check whether --with-tcltk-libs was given.
10372if test "${with_tcltk_libs+set}" = set; then :
10373 withval=$with_tcltk_libs;
10374else
10375 with_tcltk_libs="default"
10376fi
10377
10378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10379$as_echo "$with_tcltk_libs" >&6; }
10380if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10381then
10382 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10383 then
10384 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10385 fi
10386 TCLTK_INCLUDES=""
10387 TCLTK_LIBS=""
10388else
10389 TCLTK_INCLUDES="$with_tcltk_includes"
10390 TCLTK_LIBS="$with_tcltk_libs"
10391fi
10392
Matthias Klose55708cc2009-04-30 08:06:49 +000010393# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10395$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010396
10397# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010399 withval=$with_dbmliborder;
10400if test x$with_dbmliborder = xyes
10401then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010402as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010403else
10404 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10405 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10406 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010407 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010408 fi
10409 done
10410fi
10411fi
10412
Matthias Kloseb9621712010-04-24 17:59:49 +000010413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10414$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010415
Martin v. Löwis11437992002-04-12 09:54:03 +000010416# Templates for things AC_DEFINEd more than once.
10417# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010418
10419
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010420if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010421then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010422 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010424
10425 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010426elif test "$ac_cv_kpthread" = "yes"
10427then
10428 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010429 if test "$ac_cv_cxx_thread" = "yes"; then
10430 CXX="$CXX -Kpthread"
10431 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010432 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010433elif test "$ac_cv_kthread" = "yes"
10434then
10435 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010436 if test "$ac_cv_cxx_thread" = "yes"; then
10437 CXX="$CXX -Kthread"
10438 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010439 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010440elif test "$ac_cv_pthread" = "yes"
10441then
10442 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010443 if test "$ac_cv_cxx_thread" = "yes"; then
10444 CXX="$CXX -pthread"
10445 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010447else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010448 if test ! -z "$withval" -a -d "$withval"
10449 then LDFLAGS="$LDFLAGS -L$withval"
10450 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010451
10452 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010453 # define _POSIX_THREADS in unistd.h. Some apparently don't
10454 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10456$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010458/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010459
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010460#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010461#ifdef _POSIX_THREADS
10462yes
10463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010464
10465_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010468 unistd_defines_pthreads=yes
10469else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010470 unistd_defines_pthreads=no
10471fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010472rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010473
Matthias Kloseb9621712010-04-24 17:59:49 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10475$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010478
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010479 # Just looking for pthread_create in libpthread is not enough:
10480 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10481 # So we really have to include pthread.h, and then link.
10482 _libs=$LIBS
10483 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10485$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010487/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010488
10489#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010490#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010491
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010492void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010493int
10494main ()
10495{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010496
10497pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 ;
10499 return 0;
10500}
10501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503
Matthias Kloseb9621712010-04-24 17:59:49 +000010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10505$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010506 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010507
Guido van Rossum02a1c402000-02-25 19:26:31 +000010508else
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010510 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010511 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010512if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010513
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010514 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010515
Guido van Rossumad678af1998-10-02 14:42:15 +000010516else
Guido van Rossumad678af1998-10-02 14:42:15 +000010517
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10519$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010520if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010522else
Martin v. Löwis11437992002-04-12 09:54:03 +000010523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010524LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010525cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010526/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528/* Override any GCC internal prototype to avoid an error.
10529 Use char because int might match the return type of a GCC
10530 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010531#ifdef __cplusplus
10532extern "C"
10533#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010534char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010535int
10536main ()
10537{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010538return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010539 ;
10540 return 0;
10541}
10542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010543if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010548rm -f core conftest.err conftest.$ac_objext \
10549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010550LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010551fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10553$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010554if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010555
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010556 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010557 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010558
Greg Steinadf63d62000-07-05 10:38:09 +000010559else
Greg Steinadf63d62000-07-05 10:38:09 +000010560
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10562$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010563if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010564 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010565else
Martin v. Löwis11437992002-04-12 09:54:03 +000010566 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010567LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010568cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010571/* Override any GCC internal prototype to avoid an error.
10572 Use char because int might match the return type of a GCC
10573 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010574#ifdef __cplusplus
10575extern "C"
10576#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010577char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010578int
10579main ()
10580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 ;
10583 return 0;
10584}
10585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010586if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010588else
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010591rm -f core conftest.err conftest.$ac_objext \
10592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010593LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10596$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010597if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010598
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010599 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010600 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010601
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010602else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010603
Matthias Kloseb9621712010-04-24 17:59:49 +000010604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10605$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010606if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010608else
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010610LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614/* Override any GCC internal prototype to avoid an error.
10615 Use char because int might match the return type of a GCC
10616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010617#ifdef __cplusplus
10618extern "C"
10619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010620char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010621int
10622main ()
10623{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010625 ;
10626 return 0;
10627}
10628_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010633fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010634rm -f core conftest.err conftest.$ac_objext \
10635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10639$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010640if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010641
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010642 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010643 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010644
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010645else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10648$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010649if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010651else
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010653LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010657/* Override any GCC internal prototype to avoid an error.
10658 Use char because int might match the return type of a GCC
10659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010660#ifdef __cplusplus
10661extern "C"
10662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010663char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010664int
10665main ()
10666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 ;
10669 return 0;
10670}
10671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010673 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010674else
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010676fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010677rm -f core conftest.err conftest.$ac_objext \
10678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010679LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010680fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10682$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010683if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010684
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010685 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010686 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010687
Guido van Rossumb93a8621998-05-07 13:27:32 +000010688else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010689
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010690 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10691
Guido van Rossum2d38f911996-06-26 19:47:01 +000010692fi
10693
Guido van Rossum627b2d71993-12-24 10:39:16 +000010694
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010695fi
10696
Guido van Rossum0be3e491997-05-22 20:33:33 +000010697fi
10698
Guido van Rossum49545951997-12-02 19:28:29 +000010699fi
10700
Guido van Rossumb93a8621998-05-07 13:27:32 +000010701fi
10702
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704rm -f core conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10708$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010709if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010711else
Martin v. Löwis11437992002-04-12 09:54:03 +000010712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010713LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717/* Override any GCC internal prototype to avoid an error.
10718 Use char because int might match the return type of a GCC
10719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010720#ifdef __cplusplus
10721extern "C"
10722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010723char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010724int
10725main ()
10726{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 ;
10729 return 0;
10730}
10731_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010734else
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010737rm -f core conftest.err conftest.$ac_objext \
10738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10742$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010743if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010744
Martin v. Löwis130fb172001-07-19 11:00:41 +000010745 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010746
Guido van Rossum627b2d71993-12-24 10:39:16 +000010747fi
10748
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010749
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010750fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010751
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010752if test "$posix_threads" = "yes"; then
10753 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010754
Matthias Kloseb9621712010-04-24 17:59:49 +000010755$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010756
10757 fi
10758
10759 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10760 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010761 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010762$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010763
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010764 ;;
10765 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010766$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010767
10768 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010769 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010770$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010771
10772 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010773 esac
10774
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10776$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010777 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010781 ac_cv_pthread_system_supported=no
10782else
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010784/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010785
10786 #include <stdio.h>
10787 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010788 void *foo(void *parm) {
10789 return NULL;
10790 }
10791 main() {
10792 pthread_attr_t attr;
10793 pthread_t id;
10794 if (pthread_attr_init(&attr)) exit(-1);
10795 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10796 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10797 exit(0);
10798 }
10799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010800if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010801 ac_cv_pthread_system_supported=yes
10802else
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010804fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10806 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010807fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809
Guido van Rossum627b2d71993-12-24 10:39:16 +000010810fi
10811
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10813$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010814 if test "$ac_cv_pthread_system_supported" = "yes"; then
10815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010817
10818 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 for ac_func in pthread_sigmask
10820do :
10821 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010822if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010824#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010825_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010826 case $ac_sys_system in
10827 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010828
Matthias Kloseb9621712010-04-24 17:59:49 +000010829$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010830
10831 ;;
10832 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833fi
10834done
10835
pdoxe14679c2017-10-05 00:01:56 -070010836 for ac_func in pthread_getcpuclockid
10837do :
10838 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10839if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10840 cat >>confdefs.h <<_ACEOF
10841#define HAVE_PTHREAD_GETCPUCLOCKID 1
10842_ACEOF
10843
10844fi
10845done
10846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847fi
10848
10849
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010850# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010851
Matthias Kloseb9621712010-04-24 17:59:49 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10853$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010855if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010857 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10859$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860 ipv6=no
10861 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10863$as_echo "yes" >&6; }
10864 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010865
10866 ipv6=yes
10867 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010869else
Martin v. Löwis11437992002-04-12 09:54:03 +000010870
Matthias Kloseb9621712010-04-24 17:59:49 +000010871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010872/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010873 /* AF_INET6 available check */
10874#include <sys/types.h>
10875#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010876int
10877main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010879int domain = AF_INET6;
10880 ;
10881 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010882}
Martin v. Löwis11437992002-04-12 09:54:03 +000010883_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010884if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010885
Matthias Kloseb9621712010-04-24 17:59:49 +000010886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10887$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010889
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890else
Matthias Kloseb159a552010-04-25 21:00:44 +000010891
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010894 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010895
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010896fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010898
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010899if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10901$as_echo_n "checking if RFC2553 API is available... " >&6; }
10902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010903/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010904
10905 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010906#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010907int
10908main ()
10909{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010910struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010911 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010912 ;
10913 return 0;
10914}
Matthias Kloseb159a552010-04-25 21:00:44 +000010915
Martin v. Löwis11437992002-04-12 09:54:03 +000010916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010918
10919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010920$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010921 ipv6=yes
10922
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010923else
Matthias Kloseb159a552010-04-25 21:00:44 +000010924
10925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010927 ipv6=no
10928
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010931fi
10932
10933if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010934 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010935
10936fi
10937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938fi
10939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940
10941ipv6type=unknown
10942ipv6lib=none
10943ipv6trylibc=no
10944
10945if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10947$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010948 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10949 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 case $i in
10951 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955#include <netinet/in.h>
10956#ifdef IPV6_INRIA_VERSION
10957yes
10958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010959_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010961 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010962 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010963fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010964rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965
10966 ;;
10967 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010971#include <netinet/in.h>
10972#ifdef __KAME__
10973yes
10974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010977 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010978 ipv6type=$i;
10979 ipv6lib=inet6
10980 ipv6libdir=/usr/local/v6/lib
10981 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010982fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010983rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010984
10985 ;;
10986 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010988/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990#include <features.h>
10991#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10992yes
10993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010994_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010997 ipv6type=$i;
10998 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010999fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011000rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011001
11002 ;;
11003 linux-inet6)
11004 if test -d /usr/inet6; then
11005 ipv6type=$i
11006 ipv6lib=inet6
11007 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011008 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011009 fi
11010 ;;
11011 solaris)
11012 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011013 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011014 ipv6type=$i
11015 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016 fi
11017 fi
11018 ;;
11019 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011021/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011022
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023#include <sys/param.h>
11024#ifdef _TOSHIBA_INET6
11025yes
11026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011027_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011030 ipv6type=$i;
11031 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011032 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011034rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035
11036 ;;
11037 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011039/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011040
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011041#include </usr/local/v6/include/sys/v6config.h>
11042#ifdef __V6D__
11043yes
11044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011045_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048 ipv6type=$i;
11049 ipv6lib=v6;
11050 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011051 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011053rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054
11055 ;;
11056 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011058/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011059
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060#include <sys/param.h>
11061#ifdef _ZETA_MINAMI_INET6
11062yes
11063#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011064_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011066 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067 ipv6type=$i;
11068 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011069 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072
11073 ;;
11074 esac
11075 if test "$ipv6type" != "unknown"; then
11076 break
11077 fi
11078 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11080$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011081fi
11082
11083if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11084 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11085 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11086 echo "using lib$ipv6lib"
11087 else
11088 if test $ipv6trylibc = "yes"; then
11089 echo "using libc"
11090 else
11091 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11092 echo "You need to fetch lib$ipv6lib.a from appropriate"
11093 echo 'ipv6 kit and compile beforehand.'
11094 exit 1
11095 fi
11096 fi
11097fi
11098
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11100$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11102/* end confdefs.h. */
11103 /* CAN_RAW_FD_FRAMES available check */
11104#include <linux/can/raw.h>
11105int
11106main ()
11107{
11108int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11109 ;
11110 return 0;
11111}
11112_ACEOF
11113if ac_fn_c_try_compile "$LINENO"; then :
11114
11115
11116$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11117
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11119$as_echo "yes" >&6; }
11120
11121else
11122
11123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
11125
11126fi
11127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11128
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011129# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11131$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011132
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011134if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 withval=$with_doc_strings;
11136fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011137
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011138
11139if test -z "$with_doc_strings"
11140then with_doc_strings="yes"
11141fi
11142if test "$with_doc_strings" != "no"
11143then
11144
Matthias Kloseb9621712010-04-24 17:59:49 +000011145$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011146
11147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11149$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011150
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011151# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11153$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011155# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011156if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011157 withval=$with_pymalloc;
11158fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011159
Neil Schemenauera35c6882001-02-27 04:45:05 +000011160
Neil Schemenauer16c22972002-03-22 15:34:49 +000011161if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011162then
11163 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011164fi
11165if test "$with_pymalloc" != "no"
11166then
Martin v. Löwis11437992002-04-12 09:54:03 +000011167
Matthias Kloseb9621712010-04-24 17:59:49 +000011168$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011169
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011170 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11173$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011174
Nick Coghlan6ea41862017-06-11 13:16:15 +100011175# Check for --with-c-locale-coercion
11176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11177$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11178
11179# Check whether --with-c-locale-coercion was given.
11180if test "${with_c_locale_coercion+set}" = set; then :
11181 withval=$with_c_locale_coercion;
11182fi
11183
11184
11185if test -z "$with_c_locale_coercion"
11186then
11187 with_c_locale_coercion="yes"
11188fi
11189if test "$with_c_locale_coercion" != "no"
11190then
11191
11192$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11193
11194fi
11195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11196$as_echo "$with_c_locale_coercion" >&6; }
11197
Benjamin Peterson05159c42009-12-03 03:01:27 +000011198# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11200$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011201
11202# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011203if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011204 withval=$with_valgrind;
11205else
11206 with_valgrind=no
11207fi
11208
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11210$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011211if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 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 +020011213if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011214
Matthias Kloseb9621712010-04-24 17:59:49 +000011215$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011216
11217else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011218 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011219
11220fi
11221
11222
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011223 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011224fi
11225
Łukasz Langaa785c872016-09-09 17:37:37 -070011226# Check for DTrace support
11227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11228$as_echo_n "checking for --with-dtrace... " >&6; }
11229
11230# Check whether --with-dtrace was given.
11231if test "${with_dtrace+set}" = set; then :
11232 withval=$with_dtrace;
11233else
11234 with_dtrace=no
11235fi
11236
11237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11238$as_echo "$with_dtrace" >&6; }
11239
11240
11241
11242
11243
11244DTRACE=
11245DFLAGS=
11246DTRACE_HEADERS=
11247DTRACE_OBJS=
11248
11249if test "$with_dtrace" = "yes"
11250then
11251 # Extract the first word of "dtrace", so it can be a program name with args.
11252set dummy dtrace; ac_word=$2
11253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11254$as_echo_n "checking for $ac_word... " >&6; }
11255if ${ac_cv_path_DTRACE+:} false; then :
11256 $as_echo_n "(cached) " >&6
11257else
11258 case $DTRACE in
11259 [\\/]* | ?:[\\/]*)
11260 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11261 ;;
11262 *)
11263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11264for as_dir in $PATH
11265do
11266 IFS=$as_save_IFS
11267 test -z "$as_dir" && as_dir=.
11268 for ac_exec_ext in '' $ac_executable_extensions; do
11269 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11270 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11271 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11272 break 2
11273 fi
11274done
11275 done
11276IFS=$as_save_IFS
11277
11278 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11279 ;;
11280esac
11281fi
11282DTRACE=$ac_cv_path_DTRACE
11283if test -n "$DTRACE"; then
11284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11285$as_echo "$DTRACE" >&6; }
11286else
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11288$as_echo "no" >&6; }
11289fi
11290
11291
11292 if test "$DTRACE" = "not found"; then
11293 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11294 fi
11295
11296$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11297
11298 DTRACE_HEADERS="Include/pydtrace_probes.h"
11299
11300 # On OS X, DTrace providers do not need to be explicitly compiled and
11301 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11302 # generation flag '-G'. We check for presence of this flag, rather than
11303 # hardcoding support by OS, in the interest of robustness.
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11305$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11306if ${ac_cv_dtrace_link+:} false; then :
11307 $as_echo_n "(cached) " >&6
11308else
11309 ac_cv_dtrace_link=no
11310 echo 'BEGIN' > conftest.d
11311 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11312 ac_cv_dtrace_link=yes
11313
11314fi
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11316$as_echo "$ac_cv_dtrace_link" >&6; }
11317 if test "$ac_cv_dtrace_link" = "yes"; then
11318 DTRACE_OBJS="Python/pydtrace.o"
11319 fi
11320fi
11321
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011322# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011323
Guido van Rossum98935bf2001-09-05 19:13:16 +000011324DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011325
Guido van Rossume97ee181999-12-20 21:27:22 +000011326# the dlopen() function means we might want to use dynload_shlib.o. some
11327# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011328for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011329do :
11330 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011331if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011335
Guido van Rossume97ee181999-12-20 21:27:22 +000011336fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011337done
Guido van Rossume97ee181999-12-20 21:27:22 +000011338
Michael W. Hudson54241132001-12-07 15:38:26 +000011339
Guido van Rossume97ee181999-12-20 21:27:22 +000011340# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11341# loading of modules.
11342
Matthias Kloseb9621712010-04-24 17:59:49 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11344$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011345if test -z "$DYNLOADFILE"
11346then
11347 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011348 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11349 if test "$ac_cv_func_dlopen" = yes
11350 then DYNLOADFILE="dynload_shlib.o"
11351 else DYNLOADFILE="dynload_aix.o"
11352 fi
11353 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011354 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011355 *)
11356 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11357 # out any dynamic loading
11358 if test "$ac_cv_func_dlopen" = yes
11359 then DYNLOADFILE="dynload_shlib.o"
11360 else DYNLOADFILE="dynload_stub.o"
11361 fi
11362 ;;
11363 esac
11364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11366$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011367if test "$DYNLOADFILE" != "dynload_stub.o"
11368then
Martin v. Löwis11437992002-04-12 09:54:03 +000011369
Matthias Kloseb9621712010-04-24 17:59:49 +000011370$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011371
11372fi
11373
Neil Schemenauer4e425612001-06-19 15:44:15 +000011374# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11375
Michael W. Hudson54241132001-12-07 15:38:26 +000011376
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11378$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011379if test -z "$MACHDEP_OBJS"
11380then
Jack Jansene578a632001-08-15 01:27:14 +000011381 MACHDEP_OBJS=$extra_machdep_objs
11382else
11383 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011384fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011385if test -z "$MACHDEP_OBJS"; then
11386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11387$as_echo "none" >&6; }
11388else
11389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11390$as_echo "$MACHDEP_OBJS" >&6; }
11391fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011392
Guido van Rossum627b2d71993-12-24 10:39:16 +000011393# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011394for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011395 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011396 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011397 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011398 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011399 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011400 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011401 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011402 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011403 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011404 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Pablo Galindo6c6ddf92018-01-29 01:56:10 +000011405 posix_fallocate posix_fadvise posix_spawn pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011406 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011407 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011408 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011409 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011410 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11411 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011412 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011413 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011414 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011415 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011416 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011417do :
11418 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11419ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011420if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011423_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011424
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011425fi
11426done
11427
Michael W. Hudson54241132001-12-07 15:38:26 +000011428
Benjamin Peterson40caa052018-09-12 15:52:40 -070011429# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11430# links. Some libc implementations have a stub lchmod implementation that always
11431# returns an error.
11432if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011433 for ac_func in lchmod
11434do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011435 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11436if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011437 cat >>confdefs.h <<_ACEOF
11438#define HAVE_LCHMOD 1
11439_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011440
11441fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011442done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011443
11444fi
11445
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011446ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11447 #include <dirent.h>
11448"
11449if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11450
11451$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11452
11453fi
11454
11455
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011456# For some functions, having a definition is not sufficient, since
11457# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11459$as_echo_n "checking for chroot... " >&6; }
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011462#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011463int
11464main ()
11465{
11466void *x=chroot
11467 ;
11468 return 0;
11469}
11470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011471if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011472
Matthias Kloseb9621712010-04-24 17:59:49 +000011473$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011474
Matthias Kloseb159a552010-04-25 21:00:44 +000011475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011476$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011477else
Matthias Kloseb9621712010-04-24 17:59:49 +000011478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011480
11481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11484$as_echo_n "checking for link... " >&6; }
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011486/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011487#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011488int
11489main ()
11490{
11491void *x=link
11492 ;
11493 return 0;
11494}
11495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011497
Matthias Kloseb9621712010-04-24 17:59:49 +000011498$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011499
Matthias Kloseb159a552010-04-25 21:00:44 +000011500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011501$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011502else
Matthias Kloseb9621712010-04-24 17:59:49 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11504$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011505
11506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11509$as_echo_n "checking for symlink... " >&6; }
11510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011511/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011512#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011513int
11514main ()
11515{
11516void *x=symlink
11517 ;
11518 return 0;
11519}
11520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011521if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011522
Matthias Kloseb9621712010-04-24 17:59:49 +000011523$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011524
Matthias Kloseb159a552010-04-25 21:00:44 +000011525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011526$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11529$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011530
11531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11534$as_echo_n "checking for fchdir... " >&6; }
11535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011536/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011537#include <unistd.h>
11538int
11539main ()
11540{
11541void *x=fchdir
11542 ;
11543 return 0;
11544}
11545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011547
Matthias Kloseb9621712010-04-24 17:59:49 +000011548$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011549
Matthias Kloseb159a552010-04-25 21:00:44 +000011550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011551$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011552else
Matthias Kloseb9621712010-04-24 17:59:49 +000011553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011555
11556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11559$as_echo_n "checking for fsync... " >&6; }
11560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011561/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011562#include <unistd.h>
11563int
11564main ()
11565{
11566void *x=fsync
11567 ;
11568 return 0;
11569}
11570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011571if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011572
Matthias Kloseb9621712010-04-24 17:59:49 +000011573$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011574
Matthias Kloseb159a552010-04-25 21:00:44 +000011575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011576$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011577else
Matthias Kloseb9621712010-04-24 17:59:49 +000011578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011580
11581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11584$as_echo_n "checking for fdatasync... " >&6; }
11585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011586/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011587#include <unistd.h>
11588int
11589main ()
11590{
11591void *x=fdatasync
11592 ;
11593 return 0;
11594}
11595_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011596if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011597
Matthias Kloseb9621712010-04-24 17:59:49 +000011598$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011599
Matthias Kloseb159a552010-04-25 21:00:44 +000011600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011602else
Matthias Kloseb9621712010-04-24 17:59:49 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11604$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011605
11606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11609$as_echo_n "checking for epoll... " >&6; }
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011611/* end confdefs.h. */
11612#include <sys/epoll.h>
11613int
11614main ()
11615{
11616void *x=epoll_create
11617 ;
11618 return 0;
11619}
11620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011621if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011624
Matthias Kloseb159a552010-04-25 21:00:44 +000011625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011626$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011627else
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11629$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011630
11631fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11634$as_echo_n "checking for epoll_create1... " >&6; }
11635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11636/* end confdefs.h. */
11637#include <sys/epoll.h>
11638int
11639main ()
11640{
11641void *x=epoll_create1
11642 ;
11643 return 0;
11644}
11645_ACEOF
11646if ac_fn_c_try_compile "$LINENO"; then :
11647
11648$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11649
11650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11651$as_echo "yes" >&6; }
11652else
11653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11654$as_echo "no" >&6; }
11655
11656fi
11657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11659$as_echo_n "checking for kqueue... " >&6; }
11660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011661/* end confdefs.h. */
11662
11663#include <sys/types.h>
11664#include <sys/event.h>
11665
11666int
11667main ()
11668{
11669int x=kqueue()
11670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011675
Matthias Kloseb9621712010-04-24 17:59:49 +000011676$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011677
Matthias Kloseb159a552010-04-25 21:00:44 +000011678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011679$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011680else
Matthias Kloseb9621712010-04-24 17:59:49 +000011681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11682$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011683
11684fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11687$as_echo_n "checking for prlimit... " >&6; }
11688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11689/* end confdefs.h. */
11690
11691#include <sys/time.h>
11692#include <sys/resource.h>
11693
11694int
11695main ()
11696{
11697void *x=prlimit
11698 ;
11699 return 0;
11700}
11701_ACEOF
11702if ac_fn_c_try_compile "$LINENO"; then :
11703
11704$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11705
11706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11707$as_echo "yes" >&6; }
11708else
11709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11710$as_echo "no" >&6; }
11711
11712fi
11713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11714
Martin v. Löwisd5843682002-11-21 20:41:28 +000011715# On some systems (eg. FreeBSD 5), we would find a definition of the
11716# functions ctermid_r, setgroups in the library, but no prototype
11717# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11718# address to avoid compiler warnings and potential miscompilations
11719# because of the missing prototypes.
11720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11722$as_echo_n "checking for ctermid_r... " >&6; }
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011724/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011725
Martin v. Löwisd5843682002-11-21 20:41:28 +000011726#include <stdio.h>
11727
Martin v. Löwisd5843682002-11-21 20:41:28 +000011728int
11729main ()
11730{
11731void* p = ctermid_r
11732 ;
11733 return 0;
11734}
11735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011737
Matthias Kloseb9621712010-04-24 17:59:49 +000011738$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011739
Matthias Kloseb159a552010-04-25 21:00:44 +000011740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011741$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011742else
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11744$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011745
11746fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11748
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11750$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011751if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011752 $as_echo_n "(cached) " >&6
11753else
11754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011755/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011756#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011757int
11758main ()
11759{
11760void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011761
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011762 ;
11763 return 0;
11764}
11765_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011766if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011767 ac_cv_flock_decl=yes
11768else
11769 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011770
11771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011773
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011774fi
11775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11776$as_echo "$ac_cv_flock_decl" >&6; }
11777if test "x${ac_cv_flock_decl}" = xyes; then
11778 for ac_func in flock
11779do :
11780 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011781if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011782 cat >>confdefs.h <<_ACEOF
11783#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011784_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011785
Antoine Pitroua3000072010-09-07 14:52:42 +000011786else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011788$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011789if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011790 $as_echo_n "(cached) " >&6
11791else
11792 ac_check_lib_save_LIBS=$LIBS
11793LIBS="-lbsd $LIBS"
11794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795/* end confdefs.h. */
11796
11797/* Override any GCC internal prototype to avoid an error.
11798 Use char because int might match the return type of a GCC
11799 builtin and then its argument prototype would still apply. */
11800#ifdef __cplusplus
11801extern "C"
11802#endif
11803char flock ();
11804int
11805main ()
11806{
11807return flock ();
11808 ;
11809 return 0;
11810}
11811_ACEOF
11812if ac_fn_c_try_link "$LINENO"; then :
11813 ac_cv_lib_bsd_flock=yes
11814else
11815 ac_cv_lib_bsd_flock=no
11816fi
11817rm -f core conftest.err conftest.$ac_objext \
11818 conftest$ac_exeext conftest.$ac_ext
11819LIBS=$ac_check_lib_save_LIBS
11820fi
11821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11822$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011824 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011825
11826
11827$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11828
11829
11830fi
11831
11832
11833fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011834done
11835
Antoine Pitroua3000072010-09-07 14:52:42 +000011836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011837
Matthias Kloseb9621712010-04-24 17:59:49 +000011838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11839$as_echo_n "checking for getpagesize... " >&6; }
11840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011841/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011842
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011843#include <unistd.h>
11844
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011845int
11846main ()
11847{
11848void* p = getpagesize
11849 ;
11850 return 0;
11851}
11852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011853if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011854
Matthias Kloseb9621712010-04-24 17:59:49 +000011855$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011856
Matthias Kloseb159a552010-04-25 21:00:44 +000011857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011858$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011859else
Matthias Kloseb9621712010-04-24 17:59:49 +000011860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11861$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011862
11863fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011865
Victor Stinner984890f2011-11-24 13:53:38 +010011866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11867$as_echo_n "checking for broken unsetenv... " >&6; }
11868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11869/* end confdefs.h. */
11870
11871#include <stdlib.h>
11872
11873int
11874main ()
11875{
11876int res = unsetenv("DUMMY")
11877 ;
11878 return 0;
11879}
11880_ACEOF
11881if ac_fn_c_try_compile "$LINENO"; then :
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11883$as_echo "no" >&6; }
11884else
11885
11886$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11887
11888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11889$as_echo "yes" >&6; }
11890
11891fi
11892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11893
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011894for ac_prog in true
11895do
11896 # Extract the first word of "$ac_prog", so it can be a program name with args.
11897set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11899$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011900if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011902else
11903 if test -n "$TRUE"; then
11904 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11905else
11906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11907for as_dir in $PATH
11908do
11909 IFS=$as_save_IFS
11910 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011913 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 $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 +000011915 break 2
11916 fi
11917done
Matthias Kloseb9621712010-04-24 17:59:49 +000011918 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011919IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011920
11921fi
11922fi
11923TRUE=$ac_cv_prog_TRUE
11924if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11926$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011927else
Matthias Kloseb9621712010-04-24 17:59:49 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11929$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011930fi
11931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011933 test -n "$TRUE" && break
11934done
11935test -n "$TRUE" || TRUE="/bin/true"
11936
11937
Matthias Kloseb9621712010-04-24 17:59:49 +000011938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11939$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011940if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011941 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011942else
11943 ac_check_lib_save_LIBS=$LIBS
11944LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011948/* Override any GCC internal prototype to avoid an error.
11949 Use char because int might match the return type of a GCC
11950 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011951#ifdef __cplusplus
11952extern "C"
11953#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011954char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011955int
11956main ()
11957{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011958return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011959 ;
11960 return 0;
11961}
11962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011964 ac_cv_lib_c_inet_aton=yes
11965else
Matthias Kloseb9621712010-04-24 17:59:49 +000011966 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011967fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011968rm -f core conftest.err conftest.$ac_objext \
11969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011970LIBS=$ac_check_lib_save_LIBS
11971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11973$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011974if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011975 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011976else
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11978$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011979if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011981else
11982 ac_check_lib_save_LIBS=$LIBS
11983LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011985/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011987/* Override any GCC internal prototype to avoid an error.
11988 Use char because int might match the return type of a GCC
11989 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011990#ifdef __cplusplus
11991extern "C"
11992#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011993char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011994int
11995main ()
11996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011997return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011998 ;
11999 return 0;
12000}
12001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012002if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012003 ac_cv_lib_resolv_inet_aton=yes
12004else
Matthias Kloseb9621712010-04-24 17:59:49 +000012005 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012007rm -f core conftest.err conftest.$ac_objext \
12008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009LIBS=$ac_check_lib_save_LIBS
12010fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012011{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12012$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014 cat >>confdefs.h <<_ACEOF
12015#define HAVE_LIBRESOLV 1
12016_ACEOF
12017
12018 LIBS="-lresolv $LIBS"
12019
12020fi
12021
12022
12023fi
12024
12025
Christian Heimesd0764e22007-12-04 15:00:33 +000012026# On Tru64, chflags seems to be present, but calling it will
12027# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12029$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012030if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012034 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012037/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012038
Christian Heimesd0764e22007-12-04 15:00:33 +000012039#include <sys/stat.h>
12040#include <unistd.h>
12041int main(int argc, char*argv[])
12042{
12043 if(chflags(argv[0], 0) != 0)
12044 return 1;
12045 return 0;
12046}
Ned Deily3eb67d52011-06-28 00:00:28 -070012047
Christian Heimesd0764e22007-12-04 15:00:33 +000012048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012049if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012050 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012051else
Matthias Kloseb9621712010-04-24 17:59:49 +000012052 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012056fi
12057
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012058
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12061$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012062if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012064if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012065 ac_cv_have_chflags="yes"
12066else
12067 ac_cv_have_chflags="no"
12068fi
12069
12070fi
12071if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012072
Matthias Kloseb9621712010-04-24 17:59:49 +000012073$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012074
12075fi
12076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12078$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012079if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012081else
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012083 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012086/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012087
Christian Heimesd0764e22007-12-04 15:00:33 +000012088#include <sys/stat.h>
12089#include <unistd.h>
12090int main(int argc, char*argv[])
12091{
12092 if(lchflags(argv[0], 0) != 0)
12093 return 1;
12094 return 0;
12095}
Ned Deily3eb67d52011-06-28 00:00:28 -070012096
Christian Heimesd0764e22007-12-04 15:00:33 +000012097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012098if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012099 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012100else
Matthias Kloseb9621712010-04-24 17:59:49 +000012101 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012102fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12104 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012105fi
12106
12107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012108fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012109{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12110$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012111if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012112 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012113if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012114 ac_cv_have_lchflags="yes"
12115else
12116 ac_cv_have_lchflags="no"
12117fi
12118
12119fi
12120if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012123
12124fi
12125
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012126case $ac_sys_system/$ac_sys_release in
12127Darwin/*)
12128 _CUR_CFLAGS="${CFLAGS}"
12129 _CUR_LDFLAGS="${LDFLAGS}"
12130 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12131 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12132 ;;
12133esac
12134
Matthias Kloseb9621712010-04-24 17:59:49 +000012135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12136$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012137if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012138 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012139else
12140 ac_check_lib_save_LIBS=$LIBS
12141LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012143/* end confdefs.h. */
12144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145/* Override any GCC internal prototype to avoid an error.
12146 Use char because int might match the return type of a GCC
12147 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012148#ifdef __cplusplus
12149extern "C"
12150#endif
12151char inflateCopy ();
12152int
12153main ()
12154{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012156 ;
12157 return 0;
12158}
12159_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012160if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012161 ac_cv_lib_z_inflateCopy=yes
12162else
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012165rm -f core conftest.err conftest.$ac_objext \
12166 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012167LIBS=$ac_check_lib_save_LIBS
12168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12170$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012171if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012174
12175fi
12176
12177
12178case $ac_sys_system/$ac_sys_release in
12179Darwin/*)
12180 CFLAGS="${_CUR_CFLAGS}"
12181 LDFLAGS="${_CUR_LDFLAGS}"
12182 ;;
12183esac
12184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12186$as_echo_n "checking for hstrerror... " >&6; }
12187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012189
Martin v. Löwise9416172003-05-03 10:12:45 +000012190#include <netdb.h>
12191
Martin v. Löwise9416172003-05-03 10:12:45 +000012192int
12193main ()
12194{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012195void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012196 ;
12197 return 0;
12198}
12199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012203
Matthias Kloseb159a552010-04-25 21:00:44 +000012204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012205$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012206else
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12208$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012209
12210fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012211rm -f core conftest.err conftest.$ac_objext \
12212 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12215$as_echo_n "checking for inet_aton... " >&6; }
12216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012217/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012218
Martin v. Löwis86d66262006-02-17 08:40:11 +000012219#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012220#include <sys/socket.h>
12221#include <netinet/in.h>
12222#include <arpa/inet.h>
12223
Martin v. Löwise9416172003-05-03 10:12:45 +000012224int
12225main ()
12226{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012227void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012228 ;
12229 return 0;
12230}
12231_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012232if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012233
Matthias Kloseb9621712010-04-24 17:59:49 +000012234$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012235
Matthias Kloseb159a552010-04-25 21:00:44 +000012236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012237$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012238else
Matthias Kloseb9621712010-04-24 17:59:49 +000012239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012241
12242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012243rm -f core conftest.err conftest.$ac_objext \
12244 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012245
Matthias Kloseb9621712010-04-24 17:59:49 +000012246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12247$as_echo_n "checking for inet_pton... " >&6; }
12248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012249/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012250
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012251#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012252#include <sys/socket.h>
12253#include <netinet/in.h>
12254#include <arpa/inet.h>
12255
Martin v. Löwise9416172003-05-03 10:12:45 +000012256int
12257main ()
12258{
12259void* p = inet_pton
12260 ;
12261 return 0;
12262}
12263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012265
Matthias Kloseb9621712010-04-24 17:59:49 +000012266$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012267
Matthias Kloseb159a552010-04-25 21:00:44 +000012268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012270else
Matthias Kloseb9621712010-04-24 17:59:49 +000012271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12272$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012273
12274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012276
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012277# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12279$as_echo_n "checking for setgroups... " >&6; }
12280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012281/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012282
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012283#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012284#ifdef HAVE_GRP_H
12285#include <grp.h>
12286#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012287
Martin v. Löwisd5843682002-11-21 20:41:28 +000012288int
12289main ()
12290{
12291void* p = setgroups
12292 ;
12293 return 0;
12294}
12295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012297
Matthias Kloseb9621712010-04-24 17:59:49 +000012298$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012299
Matthias Kloseb159a552010-04-25 21:00:44 +000012300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012302else
Matthias Kloseb9621712010-04-24 17:59:49 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012305
12306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012309# check for openpty and forkpty
12310
12311for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012312do :
12313 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012314if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012316#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012317_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012318
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012319else
Matthias Kloseb9621712010-04-24 17:59:49 +000012320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12321$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012322if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012324else
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012326LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012330/* Override any GCC internal prototype to avoid an error.
12331 Use char because int might match the return type of a GCC
12332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333#ifdef __cplusplus
12334extern "C"
12335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012336char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012337int
12338main ()
12339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012345if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012346 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012350rm -f core conftest.err conftest.$ac_objext \
12351 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012352LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12355$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012356if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012357 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012358 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012359else
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12361$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012362if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012363 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012364else
12365 ac_check_lib_save_LIBS=$LIBS
12366LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012368/* end confdefs.h. */
12369
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370/* Override any GCC internal prototype to avoid an error.
12371 Use char because int might match the return type of a GCC
12372 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012373#ifdef __cplusplus
12374extern "C"
12375#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012376char openpty ();
12377int
12378main ()
12379{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012380return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012381 ;
12382 return 0;
12383}
12384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012385if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012386 ac_cv_lib_bsd_openpty=yes
12387else
Matthias Kloseb9621712010-04-24 17:59:49 +000012388 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012389fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012390rm -f core conftest.err conftest.$ac_objext \
12391 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012392LIBS=$ac_check_lib_save_LIBS
12393fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12395$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012396if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012397 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012398 LIBS="$LIBS -lbsd"
12399fi
12400
12401
12402fi
12403
Fred Drake8cef4cf2000-06-28 16:40:38 +000012404
12405fi
12406done
12407
12408for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012409do :
12410 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012411if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012413#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012414_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012415
Fred Drake8cef4cf2000-06-28 16:40:38 +000012416else
Matthias Kloseb9621712010-04-24 17:59:49 +000012417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12418$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421else
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012423LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427/* Override any GCC internal prototype to avoid an error.
12428 Use char because int might match the return type of a GCC
12429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012430#ifdef __cplusplus
12431extern "C"
12432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012433char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ;
12439 return 0;
12440}
12441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012443 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444else
Matthias Kloseb9621712010-04-24 17:59:49 +000012445 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012447rm -f core conftest.err conftest.$ac_objext \
12448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012449LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12452$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012453if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012456else
Matthias Kloseb9621712010-04-24 17:59:49 +000012457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12458$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012461else
12462 ac_check_lib_save_LIBS=$LIBS
12463LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012465/* end confdefs.h. */
12466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467/* Override any GCC internal prototype to avoid an error.
12468 Use char because int might match the return type of a GCC
12469 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012470#ifdef __cplusplus
12471extern "C"
12472#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012473char forkpty ();
12474int
12475main ()
12476{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012477return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012483 ac_cv_lib_bsd_forkpty=yes
12484else
Matthias Kloseb9621712010-04-24 17:59:49 +000012485 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012486fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012487rm -f core conftest.err conftest.$ac_objext \
12488 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012489LIBS=$ac_check_lib_save_LIBS
12490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12492$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012493if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012495 LIBS="$LIBS -lbsd"
12496fi
12497
12498
12499fi
12500
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501
12502fi
12503done
12504
Jack Jansendd19cf82001-12-06 22:36:17 +000012505
Michael W. Hudson54241132001-12-07 15:38:26 +000012506# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012508do :
12509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12510ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012511if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012512 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012514_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012516fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012517done
12518
Michael W. Hudson54241132001-12-07 15:38:26 +000012519
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012520ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012521if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012522 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012523
Martin v. Löwis1142de32002-03-29 16:28:31 +000012524else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012526 *" dup2.$ac_objext "* ) ;;
12527 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012529esac
12530
Martin v. Löwis1142de32002-03-29 16:28:31 +000012531fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012532
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012533ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012534if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012535 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12536
12537else
12538 case " $LIBOBJS " in
12539 *" strdup.$ac_objext "* ) ;;
12540 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12541 ;;
12542esac
12543
12544fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012545
12546
12547for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012548do :
12549 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012550if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012552#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012555/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012557int
12558main ()
12559{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012560getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 ;
12562 return 0;
12563}
12564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012568
Guido van Rossum627b2d71993-12-24 10:39:16 +000012569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012571
Guido van Rossum627b2d71993-12-24 10:39:16 +000012572fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012573done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574
Jack Jansen150753c2003-03-29 22:07:47 +000012575for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012576do :
12577 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012578if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012579 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012580#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012583/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012584#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012585int
12586main ()
12587{
12588setpgrp(0,0);
12589 ;
12590 return 0;
12591}
12592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Matthias Kloseb9621712010-04-24 17:59:49 +000012595$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012596
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012599
12600fi
12601done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012602
Thomas Wouters3a584202000-08-05 23:28:51 +000012603for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012604do :
12605 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012606if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012608#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012613int
12614main ()
12615{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012616gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012617 ;
12618 return 0;
12619}
12620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621if ac_fn_c_try_compile "$LINENO"; then :
12622
Guido van Rossum627b2d71993-12-24 10:39:16 +000012623else
Skip Montanaro6dead952003-09-25 14:50:04 +000012624
Matthias Kloseb9621712010-04-24 17:59:49 +000012625$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012626
Martin v. Löwis11437992002-04-12 09:54:03 +000012627
Guido van Rossum627b2d71993-12-24 10:39:16 +000012628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012630
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012632done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012633
Michael W. Hudson54241132001-12-07 15:38:26 +000012634
Victor Stinnere0be4232011-10-25 13:06:09 +020012635for ac_func in clock_gettime
12636do :
12637 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12638if test "x$ac_cv_func_clock_gettime" = xyes; then :
12639 cat >>confdefs.h <<_ACEOF
12640#define HAVE_CLOCK_GETTIME 1
12641_ACEOF
12642
12643else
12644
12645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12646$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12647if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12648 $as_echo_n "(cached) " >&6
12649else
12650 ac_check_lib_save_LIBS=$LIBS
12651LIBS="-lrt $LIBS"
12652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12653/* end confdefs.h. */
12654
12655/* Override any GCC internal prototype to avoid an error.
12656 Use char because int might match the return type of a GCC
12657 builtin and then its argument prototype would still apply. */
12658#ifdef __cplusplus
12659extern "C"
12660#endif
12661char clock_gettime ();
12662int
12663main ()
12664{
12665return clock_gettime ();
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670if ac_fn_c_try_link "$LINENO"; then :
12671 ac_cv_lib_rt_clock_gettime=yes
12672else
12673 ac_cv_lib_rt_clock_gettime=no
12674fi
12675rm -f core conftest.err conftest.$ac_objext \
12676 conftest$ac_exeext conftest.$ac_ext
12677LIBS=$ac_check_lib_save_LIBS
12678fi
12679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12680$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12681if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12682
Victor Stinner7efb8332014-08-29 15:41:08 +020012683 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012684 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12685
12686
12687$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12688
12689
12690fi
12691
12692
12693fi
12694done
12695
12696
12697for ac_func in clock_getres
12698do :
12699 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12700if test "x$ac_cv_func_clock_getres" = xyes; then :
12701 cat >>confdefs.h <<_ACEOF
12702#define HAVE_CLOCK_GETRES 1
12703_ACEOF
12704
12705else
12706
12707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12708$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12709if ${ac_cv_lib_rt_clock_getres+:} false; then :
12710 $as_echo_n "(cached) " >&6
12711else
12712 ac_check_lib_save_LIBS=$LIBS
12713LIBS="-lrt $LIBS"
12714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12715/* end confdefs.h. */
12716
12717/* Override any GCC internal prototype to avoid an error.
12718 Use char because int might match the return type of a GCC
12719 builtin and then its argument prototype would still apply. */
12720#ifdef __cplusplus
12721extern "C"
12722#endif
12723char clock_getres ();
12724int
12725main ()
12726{
12727return clock_getres ();
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732if ac_fn_c_try_link "$LINENO"; then :
12733 ac_cv_lib_rt_clock_getres=yes
12734else
12735 ac_cv_lib_rt_clock_getres=no
12736fi
12737rm -f core conftest.err conftest.$ac_objext \
12738 conftest$ac_exeext conftest.$ac_ext
12739LIBS=$ac_check_lib_save_LIBS
12740fi
12741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12742$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12743if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12744
12745 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12746
12747
12748fi
12749
12750
12751fi
12752done
12753
12754
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012755for ac_func in clock_settime
12756do :
12757 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12758if test "x$ac_cv_func_clock_settime" = xyes; then :
12759 cat >>confdefs.h <<_ACEOF
12760#define HAVE_CLOCK_SETTIME 1
12761_ACEOF
12762
12763else
12764
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12766$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12767if ${ac_cv_lib_rt_clock_settime+:} false; then :
12768 $as_echo_n "(cached) " >&6
12769else
12770 ac_check_lib_save_LIBS=$LIBS
12771LIBS="-lrt $LIBS"
12772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12773/* end confdefs.h. */
12774
12775/* Override any GCC internal prototype to avoid an error.
12776 Use char because int might match the return type of a GCC
12777 builtin and then its argument prototype would still apply. */
12778#ifdef __cplusplus
12779extern "C"
12780#endif
12781char clock_settime ();
12782int
12783main ()
12784{
12785return clock_settime ();
12786 ;
12787 return 0;
12788}
12789_ACEOF
12790if ac_fn_c_try_link "$LINENO"; then :
12791 ac_cv_lib_rt_clock_settime=yes
12792else
12793 ac_cv_lib_rt_clock_settime=no
12794fi
12795rm -f core conftest.err conftest.$ac_objext \
12796 conftest$ac_exeext conftest.$ac_ext
12797LIBS=$ac_check_lib_save_LIBS
12798fi
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12800$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12801if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12802
12803 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12804
12805
12806fi
12807
12808
12809fi
12810done
12811
12812
Matthias Kloseb9621712010-04-24 17:59:49 +000012813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12814$as_echo_n "checking for major... " >&6; }
12815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012816/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012817
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012818#if defined(MAJOR_IN_MKDEV)
12819#include <sys/mkdev.h>
12820#elif defined(MAJOR_IN_SYSMACROS)
12821#include <sys/sysmacros.h>
12822#else
12823#include <sys/types.h>
12824#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012825
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012826int
12827main ()
12828{
12829
12830 makedev(major(0),minor(0));
12831
12832 ;
12833 return 0;
12834}
12835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012837
12838
Matthias Kloseb9621712010-04-24 17:59:49 +000012839$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12842$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012843
12844else
Skip Montanaro6dead952003-09-25 14:50:04 +000012845
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12847$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012848
12849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012850rm -f core conftest.err conftest.$ac_objext \
12851 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012852
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012853# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012854# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12856$as_echo_n "checking for getaddrinfo... " >&6; }
12857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012858/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012859
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012860#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012861#include <sys/socket.h>
12862#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012863#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012864
Martin v. Löwis11437992002-04-12 09:54:03 +000012865int
12866main ()
12867{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012868getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ;
12870 return 0;
12871}
12872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012873if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012874 have_getaddrinfo=yes
12875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012878rm -f core conftest.err conftest.$ac_objext \
12879 conftest$ac_exeext conftest.$ac_ext
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12881$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012882if test $have_getaddrinfo = yes
12883then
Matthias Kloseb9621712010-04-24 17:59:49 +000012884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12885$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012886 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012888else
Matthias Kloseb9621712010-04-24 17:59:49 +000012889 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012890
12891if test "${enable_ipv6+set}" = set; then
12892 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12893else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012894 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012895fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899
Stefan Krah19c21392012-11-22 23:47:32 +010012900#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012901#include <sys/types.h>
12902#include <netdb.h>
12903#include <string.h>
12904#include <sys/socket.h>
12905#include <netinet/in.h>
12906
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012907int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012908{
12909 int passive, gaierr, inet4 = 0, inet6 = 0;
12910 struct addrinfo hints, *ai, *aitop;
12911 char straddr[INET6_ADDRSTRLEN], strport[16];
12912
12913 for (passive = 0; passive <= 1; passive++) {
12914 memset(&hints, 0, sizeof(hints));
12915 hints.ai_family = AF_UNSPEC;
12916 hints.ai_flags = passive ? AI_PASSIVE : 0;
12917 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012918 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012919 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12920 (void)gai_strerror(gaierr);
12921 goto bad;
12922 }
12923 for (ai = aitop; ai; ai = ai->ai_next) {
12924 if (ai->ai_addr == NULL ||
12925 ai->ai_addrlen == 0 ||
12926 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12927 straddr, sizeof(straddr), strport, sizeof(strport),
12928 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12929 goto bad;
12930 }
12931 switch (ai->ai_family) {
12932 case AF_INET:
12933 if (strcmp(strport, "54321") != 0) {
12934 goto bad;
12935 }
12936 if (passive) {
12937 if (strcmp(straddr, "0.0.0.0") != 0) {
12938 goto bad;
12939 }
12940 } else {
12941 if (strcmp(straddr, "127.0.0.1") != 0) {
12942 goto bad;
12943 }
12944 }
12945 inet4++;
12946 break;
12947 case AF_INET6:
12948 if (strcmp(strport, "54321") != 0) {
12949 goto bad;
12950 }
12951 if (passive) {
12952 if (strcmp(straddr, "::") != 0) {
12953 goto bad;
12954 }
12955 } else {
12956 if (strcmp(straddr, "::1") != 0) {
12957 goto bad;
12958 }
12959 }
12960 inet6++;
12961 break;
12962 case AF_UNSPEC:
12963 goto bad;
12964 break;
12965 default:
12966 /* another family support? */
12967 break;
12968 }
12969 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012970 freeaddrinfo(aitop);
12971 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012972 }
12973
12974 if (!(inet4 == 0 || inet4 == 2))
12975 goto bad;
12976 if (!(inet6 == 0 || inet6 == 2))
12977 goto bad;
12978
12979 if (aitop)
12980 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012981 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012982
12983 bad:
12984 if (aitop)
12985 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012986 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012987}
12988
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012990if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012991 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012992else
Matthias Kloseb9621712010-04-24 17:59:49 +000012993 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012999fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013000
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013002
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13004$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13005
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013006if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013007then
13008 if test $ipv6 = yes
13009 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013010 echo 'Fatal: You must get working getaddrinfo() function.'
13011 echo ' or you can specify "--disable-ipv6"'.
13012 exit 1
13013 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013014else
Martin v. Löwis11437992002-04-12 09:54:03 +000013015
Matthias Kloseb9621712010-04-24 17:59:49 +000013016$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013017
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013018fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013019
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013020for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013021do :
13022 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013023if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013025#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013026_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013028fi
13029done
13030
Michael W. Hudson54241132001-12-07 15:38:26 +000013031
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013032# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13034$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013035if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013040#include <sys/types.h>
13041#include <sys/time.h>
13042#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Martin v. Löwis11437992002-04-12 09:54:03 +000013044int
13045main ()
13046{
13047if ((struct tm *) 0)
13048return 0;
13049 ;
13050 return 0;
13051}
13052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013053if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013054 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055else
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013059fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13061$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013062if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013063
Matthias Kloseb9621712010-04-24 17:59:49 +000013064$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013065
13066fi
13067
Matthias Kloseb9621712010-04-24 17:59:49 +000013068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13069$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013070if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013072else
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013074/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013075#include <sys/types.h>
13076#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013077
Martin v. Löwis11437992002-04-12 09:54:03 +000013078int
13079main ()
13080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081struct tm tm;
13082 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ;
13085 return 0;
13086}
13087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013089 ac_cv_struct_tm=time.h
13090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13096$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013097if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013098
Matthias Kloseb9621712010-04-24 17:59:49 +000013099$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013100
13101fi
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103ac_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 +000013104#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013105
Matthias Kloseb9621712010-04-24 17:59:49 +000013106"
Victor Stinnere0be4232011-10-25 13:06:09 +020013107if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013108
13109cat >>confdefs.h <<_ACEOF
13110#define HAVE_STRUCT_TM_TM_ZONE 1
13111_ACEOF
13112
13113
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013114fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013115
Martin v. Löwis11437992002-04-12 09:54:03 +000013116if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13117
Matthias Kloseb9621712010-04-24 17:59:49 +000013118$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013119
13120else
Matthias Kloseb9621712010-04-24 17:59:49 +000013121 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13122"
Victor Stinnere0be4232011-10-25 13:06:09 +020013123if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013124 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013127fi
13128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013129cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013130#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131_ACEOF
13132
Matthias Kloseb9621712010-04-24 17:59:49 +000013133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13134$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013135if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013137else
Matthias Kloseb9621712010-04-24 17:59:49 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013140#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013141#if !HAVE_DECL_TZNAME
13142extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013144
Martin v. Löwis11437992002-04-12 09:54:03 +000013145int
13146main ()
13147{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013148return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ;
13150 return 0;
13151}
13152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013153if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154 ac_cv_var_tzname=yes
13155else
Matthias Kloseb9621712010-04-24 17:59:49 +000013156 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013158rm -f core conftest.err conftest.$ac_objext \
13159 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13162$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013163 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013164
Matthias Kloseb9621712010-04-24 17:59:49 +000013165$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167 fi
13168fi
13169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170ac_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 +020013171if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013172
13173cat >>confdefs.h <<_ACEOF
13174#define HAVE_STRUCT_STAT_ST_RDEV 1
13175_ACEOF
13176
13177
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013178fi
13179
Matthias Kloseb9621712010-04-24 17:59:49 +000013180ac_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 +020013181if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013182
Martin v. Löwis11437992002-04-12 09:54:03 +000013183cat >>confdefs.h <<_ACEOF
13184#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13185_ACEOF
13186
13187
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013188fi
13189
Matthias Kloseb9621712010-04-24 17:59:49 +000013190ac_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 +020013191if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013192
13193cat >>confdefs.h <<_ACEOF
13194#define HAVE_STRUCT_STAT_ST_FLAGS 1
13195_ACEOF
13196
13197
13198fi
13199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200ac_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 +020013201if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013202
13203cat >>confdefs.h <<_ACEOF
13204#define HAVE_STRUCT_STAT_ST_GEN 1
13205_ACEOF
13206
13207
13208fi
13209
Matthias Kloseb9621712010-04-24 17:59:49 +000013210ac_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 +020013211if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013212
13213cat >>confdefs.h <<_ACEOF
13214#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13215_ACEOF
13216
13217
13218fi
13219
Matthias Kloseb9621712010-04-24 17:59:49 +000013220ac_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 +020013221if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013222
Martin v. Löwis11437992002-04-12 09:54:03 +000013223cat >>confdefs.h <<_ACEOF
13224#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13225_ACEOF
13226
13227
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013228fi
13229
Stefan Krah267b6392016-04-26 01:09:18 +020013230ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13231 #include <sys/types.h>
13232 #include <pwd.h>
13233
13234"
13235if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13236
13237cat >>confdefs.h <<_ACEOF
13238#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13239_ACEOF
13240
13241
13242fi
13243ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13244 #include <sys/types.h>
13245 #include <pwd.h>
13246
13247"
13248if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13249
13250cat >>confdefs.h <<_ACEOF
13251#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13252_ACEOF
13253
13254
13255fi
13256
Zachary Ware6a6967e2016-10-01 00:47:27 -050013257# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13258ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13259"
13260if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13261
13262cat >>confdefs.h <<_ACEOF
13263#define HAVE_SIGINFO_T_SI_BAND 1
13264_ACEOF
13265
13266
13267fi
13268
Michael W. Hudson54241132001-12-07 15:38:26 +000013269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13271$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013272if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013273 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274else
Matthias Kloseb159a552010-04-25 21:00:44 +000013275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013277/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013278#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013279int
13280main ()
13281{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013283 ;
13284 return 0;
13285}
13286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013287if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013288 ac_cv_header_time_altzone=yes
13289else
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013294fi
13295
Matthias Kloseb9621712010-04-24 17:59:49 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13297$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013299
Matthias Kloseb9621712010-04-24 17:59:49 +000013300$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301
13302fi
13303
Guido van Rossumda88dad1995-01-26 00:46:29 +000013304was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13306$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013308/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013309
13310#include <sys/types.h>
13311#include <sys/select.h>
13312#include <sys/time.h>
13313
Martin v. Löwis11437992002-04-12 09:54:03 +000013314int
13315main ()
13316{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013317;
Martin v. Löwis11437992002-04-12 09:54:03 +000013318 ;
13319 return 0;
13320}
13321_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013322if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013326
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013327 was_it_defined=yes
13328
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13332$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013333
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13335$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013336if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013340/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013341#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013342int
13343main ()
13344{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013345struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013346 ;
13347 return 0;
13348}
13349_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013351 ac_cv_struct_addrinfo=yes
13352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13356fi
13357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13359$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013360if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
Matthias Kloseb9621712010-04-24 17:59:49 +000013362$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013363
13364fi
13365
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13367$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013368if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013372/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013373
13374# include <sys/types.h>
13375# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013376int
13377main ()
13378{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013379struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013380 ;
13381 return 0;
13382}
13383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013385 ac_cv_struct_sockaddr_storage=yes
13386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13390fi
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13393$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013394if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013397
13398fi
13399
Christian Heimesdffa3942016-09-05 23:54:41 +020013400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13401$as_echo_n "checking for sockaddr_alg... " >&6; }
13402if ${ac_cv_struct_sockaddr_alg+:} false; then :
13403 $as_echo_n "(cached) " >&6
13404else
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406/* end confdefs.h. */
13407
13408# include <sys/types.h>
13409# include <sys/socket.h>
13410# include <linux/if_alg.h>
13411int
13412main ()
13413{
13414struct sockaddr_alg s
13415 ;
13416 return 0;
13417}
13418_ACEOF
13419if ac_fn_c_try_compile "$LINENO"; then :
13420 ac_cv_struct_sockaddr_alg=yes
13421else
13422 ac_cv_struct_sockaddr_alg=no
13423fi
13424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13425fi
13426
13427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13428$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13429if test $ac_cv_struct_sockaddr_alg = yes; then
13430
13431$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13432
13433fi
13434
Guido van Rossum627b2d71993-12-24 10:39:16 +000013435# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013436
Matthias Kloseb9621712010-04-24 17:59:49 +000013437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13438$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013439if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013440 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013441else
Matthias Kloseb9621712010-04-24 17:59:49 +000013442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013444$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013445int
13446main ()
13447{
13448static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013449test_array [0] = 0;
13450return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013451
13452 ;
13453 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013454}
Martin v. Löwis11437992002-04-12 09:54:03 +000013455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013456if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013457 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013458else
Matthias Kloseb9621712010-04-24 17:59:49 +000013459 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13464$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013465if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013466 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013467
13468fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013469
Matthias Kloseb9621712010-04-24 17:59:49 +000013470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13471$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013472if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013474else
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013476/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477
Martin v. Löwis11437992002-04-12 09:54:03 +000013478int
13479main ()
13480{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013483 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013485 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487 char const *const *pcpcc;
13488 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 /* NEC SVR4.0.2 mips cc rejects this. */
13490 struct point {int x, y;};
13491 static struct point const zero = {0,0};
13492 /* AIX XL C 1.02.0.0 rejects this.
13493 It does not let you subtract one const X* pointer from another in
13494 an arm of an if-expression whose if-part is not a constant
13495 expression */
13496 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499 ++pcpcc;
13500 ppc = (char**) pcpcc;
13501 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013502 { /* SCO 3.2v4 cc rejects this sort of thing. */
13503 char tx;
13504 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013508 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 }
13510 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13511 int x[] = {25, 17};
13512 const int *foo = &x[0];
13513 ++foo;
13514 }
13515 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13516 typedef const int *iptr;
13517 iptr p = 0;
13518 ++p;
13519 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013520 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013521 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013522 struct s { int j; const int *ap[3]; } bx;
13523 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013524 }
13525 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13526 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013527 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013529 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013530#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ;
13533 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013534}
Martin v. Löwis11437992002-04-12 09:54:03 +000013535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537 ac_cv_c_const=yes
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013542fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13544$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013545if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013548
13549fi
13550
Michael W. Hudson54241132001-12-07 15:38:26 +000013551
Guido van Rossumda88dad1995-01-26 00:46:29 +000013552works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13554$as_echo_n "checking for working signed char... " >&6; }
13555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013556/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558int
13559main ()
13560{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013562 ;
13563 return 0;
13564}
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013567 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013568else
Skip Montanaro6dead952003-09-25 14:50:04 +000013569
Matthias Kloseb9621712010-04-24 17:59:49 +000013570$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013571
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013572
Guido van Rossum7f43da71994-08-01 12:15:30 +000013573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13576$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013577
Guido van Rossumda88dad1995-01-26 00:46:29 +000013578have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13580$as_echo_n "checking for prototypes... " >&6; }
13581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013582/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013583int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013584int
13585main ()
13586{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013587return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013588 ;
13589 return 0;
13590}
13591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013595
Matthias Kloseb159a552010-04-25 21:00:44 +000013596 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13600$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013601
Guido van Rossumda88dad1995-01-26 00:46:29 +000013602works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13604$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013607
13608#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013609int foo(int x, ...) {
13610 va_list va;
13611 va_start(va, x);
13612 va_arg(va, int);
13613 va_arg(va, char *);
13614 va_arg(va, double);
13615 return 0;
13616}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013617
Martin v. Löwis11437992002-04-12 09:54:03 +000013618int
13619main ()
13620{
Guido van Rossum90eea071996-08-30 20:58:57 +000013621return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 ;
13623 return 0;
13624}
13625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013626if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013627
13628
Matthias Kloseb9621712010-04-24 17:59:49 +000013629$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013630
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013631 works=yes
13632
Guido van Rossum627b2d71993-12-24 10:39:16 +000013633fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13636$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013637
Martin v. Löwisd6320502004-08-12 13:45:08 +000013638# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13640$as_echo_n "checking for socketpair... " >&6; }
13641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013642/* end confdefs.h. */
13643
13644#include <sys/types.h>
13645#include <sys/socket.h>
13646
13647int
13648main ()
13649{
13650void *x=socketpair
13651 ;
13652 return 0;
13653}
13654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013655if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013656
Matthias Kloseb9621712010-04-24 17:59:49 +000013657$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013658
Matthias Kloseb159a552010-04-25 21:00:44 +000013659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013660$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13663$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013664
13665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013667
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013668# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13670$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013672/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013673#include <sys/types.h>
13674#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013675int
13676main ()
13677{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013678struct sockaddr x;
13679x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013680 ;
13681 return 0;
13682}
13683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013684if ac_fn_c_try_compile "$LINENO"; then :
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13686$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013687
Matthias Kloseb9621712010-04-24 17:59:49 +000013688$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013689
13690else
Matthias Kloseb9621712010-04-24 17:59:49 +000013691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13692$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013693
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013697# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013698
13699
Matthias Kloseb9621712010-04-24 17:59:49 +000013700ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013701if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013702
Matthias Kloseb9621712010-04-24 17:59:49 +000013703 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013704
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13706$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013707 OLD_CFLAGS=$CFLAGS
13708 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013710/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
13712# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714int
13715main ()
13716{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013717
13718 char *name;
13719 struct hostent *he, *res;
13720 char buffer[2048];
13721 int buflen = 2048;
13722 int h_errnop;
13723
13724 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013725
13726 ;
13727 return 0;
13728}
13729_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013733
Martin v. Löwis11437992002-04-12 09:54:03 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13738$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013739
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013740else
Skip Montanaro6dead952003-09-25 14:50:04 +000013741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13743$as_echo "no" >&6; }
13744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13745$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013747/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013748
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013749# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013750
Martin v. Löwis11437992002-04-12 09:54:03 +000013751int
13752main ()
13753{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013754
13755 char *name;
13756 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013757 char buffer[2048];
13758 int buflen = 2048;
13759 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013760
Matthias Kloseb159a552010-04-25 21:00:44 +000013761 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013762
13763 ;
13764 return 0;
13765}
13766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771
Matthias Kloseb159a552010-04-25 21:00:44 +000013772$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013773
Matthias Kloseb9621712010-04-24 17:59:49 +000013774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13775$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777else
Skip Montanaro6dead952003-09-25 14:50:04 +000013778
Matthias Kloseb9621712010-04-24 17:59:49 +000013779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13780$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13782$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13784/* end confdefs.h. */
13785
13786# include <netdb.h>
13787
13788int
13789main ()
13790{
13791
13792 char *name;
13793 struct hostent *he;
13794 struct hostent_data data;
13795
13796 (void) gethostbyname_r(name, he, &data);
13797
13798 ;
13799 return 0;
13800}
13801_ACEOF
13802if ac_fn_c_try_compile "$LINENO"; then :
13803
13804 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13805
13806
13807$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13808
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13810$as_echo "yes" >&6; }
13811
13812else
13813
13814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13815$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013825 CFLAGS=$OLD_CFLAGS
13826
13827else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013828
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 for ac_func in gethostbyname
13830do :
13831 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013832if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013834#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013835_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013836
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013837fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013838done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013839
Michael W. Hudson54241132001-12-07 15:38:26 +000013840
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013841fi
13842
Michael W. Hudson54241132001-12-07 15:38:26 +000013843
13844
13845
13846
13847
13848
Guido van Rossum627b2d71993-12-24 10:39:16 +000013849# checks for system services
13850# (none yet)
13851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013853ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013854if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013855
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13858$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013859if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013860 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013861else
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013863LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013867/* Override any GCC internal prototype to avoid an error.
13868 Use char because int might match the return type of a GCC
13869 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013870#ifdef __cplusplus
13871extern "C"
13872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013873char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013874int
13875main ()
13876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013878 ;
13879 return 0;
13880}
13881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013882if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013883 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013884else
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013886fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013887rm -f core conftest.err conftest.$ac_objext \
13888 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013889LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13892$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013893if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 cat >>confdefs.h <<_ACEOF
13895#define HAVE_LIBIEEE 1
13896_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013897
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013898 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013899
Guido van Rossum627b2d71993-12-24 10:39:16 +000013900fi
13901
Michael W. Hudson54241132001-12-07 15:38:26 +000013902
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013903fi
13904
Michael W. Hudson54241132001-12-07 15:38:26 +000013905
Guido van Rossum7f43da71994-08-01 12:15:30 +000013906# check for --with-libm=...
13907
Guido van Rossum563e7081996-09-10 18:20:48 +000013908case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013909Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013910*) LIBM=-lm
13911esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13913$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013915# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013916if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013917 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013918if test "$withval" = no
13919then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13921$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013922elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013923then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13925$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013926else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013927fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13930$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013931fi
13932
Guido van Rossum7f43da71994-08-01 12:15:30 +000013933
13934# check for --with-libc=...
13935
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13937$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013939# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013940if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013942if test "$withval" = no
13943then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13945$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013946elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013947then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13949$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013950else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013951fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013952else
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13954$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013955fi
13956
Guido van Rossum7f43da71994-08-01 12:15:30 +000013957
Stefan Krah1919b7e2012-03-21 18:25:23 +010013958# **************************************
13959# * Check for gcc x64 inline assembler *
13960# **************************************
13961
13962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13963$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965/* end confdefs.h. */
13966
13967int
13968main ()
13969{
13970
13971 __asm__ __volatile__ ("movq %rcx, %rax");
13972
13973 ;
13974 return 0;
13975}
13976_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013977if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013978 have_gcc_asm_for_x64=yes
13979else
13980 have_gcc_asm_for_x64=no
13981fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013982rm -f core conftest.err conftest.$ac_objext \
13983 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13985$as_echo "$have_gcc_asm_for_x64" >&6; }
13986if test "$have_gcc_asm_for_x64" = yes
13987then
13988
13989$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13990
13991fi
13992
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993# **************************************************
13994# * Check for various properties of floating point *
13995# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013996
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
13998$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
13999if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014000 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014001else
14002
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014003
14004ax_cv_c_float_words_bigendian=unknown
14005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014006/* end confdefs.h. */
14007
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014008
14009double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14010
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014011
14012_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014013if ac_fn_c_try_compile "$LINENO"; then :
14014
14015
14016if grep noonsees conftest.$ac_objext >/dev/null ; then
14017 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014018fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014019if grep seesnoon conftest.$ac_objext >/dev/null ; then
14020 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14021 ax_cv_c_float_words_bigendian=no
14022 else
14023 ax_cv_c_float_words_bigendian=unknown
14024 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014025fi
14026
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014027
14028fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014030fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14032$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014033
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014034case $ax_cv_c_float_words_bigendian in
14035 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014036
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014037$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14038 ;;
14039 no)
14040 ;;
14041 *)
14042 as_fn_error $? "
14043
14044Unknown float word ordering. You need to manually preset
14045ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14046
14047 " "$LINENO" 5 ;;
14048esac
14049
14050
14051if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014052then
14053
Matthias Kloseb9621712010-04-24 17:59:49 +000014054$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014055
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014056elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014057then
14058
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014059$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14060
14061else
14062 # Some ARM platforms use a mixed-endian representation for doubles.
14063 # While Python doesn't currently have full support for these platforms
14064 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14065 # conversions work.
14066 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14067 # or little, then it must be this?
14068
Matthias Kloseb9621712010-04-24 17:59:49 +000014069$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014070
14071fi
14072
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014073# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014074# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014075# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014076# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014077# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014078# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014079
14080# This inline assembler syntax may also work for suncc and icc,
14081# so we try it on all platforms.
14082
Matthias Kloseb9621712010-04-24 17:59:49 +000014083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14084$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014086/* end confdefs.h. */
14087
14088int
14089main ()
14090{
14091
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014092 unsigned short cw;
14093 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14094 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014095
14096 ;
14097 return 0;
14098}
14099_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014100if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101 have_gcc_asm_for_x87=yes
14102else
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014104fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014105rm -f core conftest.err conftest.$ac_objext \
14106 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14108$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014109if test "$have_gcc_asm_for_x87" = yes
14110then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014111
Matthias Kloseb9621712010-04-24 17:59:49 +000014112$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014113
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014114fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14117$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119/* end confdefs.h. */
14120
14121int
14122main ()
14123{
14124
14125 unsigned int fpcr;
14126 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14127 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14128
14129 ;
14130 return 0;
14131}
14132_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014133if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014134 have_gcc_asm_for_mc68881=yes
14135else
14136 have_gcc_asm_for_mc68881=no
14137fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014138rm -f core conftest.err conftest.$ac_objext \
14139 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14141$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14142if test "$have_gcc_asm_for_mc68881" = yes
14143then
14144
14145$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14146
14147fi
14148
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014149# Detect whether system arithmetic is subject to x87-style double
14150# rounding issues. The result of this test has little meaning on non
14151# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14152# mode is round-to-nearest and double rounding issues are present, and
14153# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14155$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014156# $BASECFLAGS may affect the result
14157ac_save_cc="$CC"
14158CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014159if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014160 ac_cv_x87_double_rounding=no
14161else
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014163/* end confdefs.h. */
14164
14165#include <stdlib.h>
14166#include <math.h>
14167int main() {
14168 volatile double x, y, z;
14169 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14170 x = 0.99999999999999989; /* 1-2**-53 */
14171 y = 1./x;
14172 if (y != 1.)
14173 exit(0);
14174 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14175 x = 1e16;
14176 y = 2.99999;
14177 z = x + y;
14178 if (z != 1e16+4.)
14179 exit(0);
14180 /* both tests show evidence of double rounding */
14181 exit(1);
14182}
14183
14184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014185if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014186 ac_cv_x87_double_rounding=no
14187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +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 Dickinson3dc7c6a2009-01-04 15:09:02 +000014192fi
14193
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014194CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14196$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014197if test "$ac_cv_x87_double_rounding" = yes
14198then
14199
Matthias Kloseb9621712010-04-24 17:59:49 +000014200$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014201
14202fi
14203
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014204# ************************************
14205# * Check for mathematical functions *
14206# ************************************
14207
14208LIBS_SAVE=$LIBS
14209LIBS="$LIBS $LIBM"
14210
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014211for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14212do :
14213 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14214ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014215if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014216 cat >>confdefs.h <<_ACEOF
14217#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14218_ACEOF
14219
14220fi
14221done
14222
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014223for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014224do :
14225 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14226ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014227if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014228 cat >>confdefs.h <<_ACEOF
14229#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14230_ACEOF
14231
14232fi
14233done
14234
14235ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14236"
Victor Stinnere0be4232011-10-25 13:06:09 +020014237if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014238 ac_have_decl=1
14239else
14240 ac_have_decl=0
14241fi
14242
14243cat >>confdefs.h <<_ACEOF
14244#define HAVE_DECL_ISINF $ac_have_decl
14245_ACEOF
14246ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14247"
Victor Stinnere0be4232011-10-25 13:06:09 +020014248if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014249 ac_have_decl=1
14250else
14251 ac_have_decl=0
14252fi
14253
14254cat >>confdefs.h <<_ACEOF
14255#define HAVE_DECL_ISNAN $ac_have_decl
14256_ACEOF
14257ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14258"
Victor Stinnere0be4232011-10-25 13:06:09 +020014259if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014260 ac_have_decl=1
14261else
14262 ac_have_decl=0
14263fi
14264
14265cat >>confdefs.h <<_ACEOF
14266#define HAVE_DECL_ISFINITE $ac_have_decl
14267_ACEOF
14268
14269
Mark Dickinsona614f042009-11-28 12:48:43 +000014270# For multiprocessing module, check that sem_open
14271# actually works. For FreeBSD versions <= 7.2,
14272# the kernel module that provides POSIX semaphores
14273# isn't loaded by default, so an attempt to call
14274# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14276$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014277if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014279else
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014281 ac_cv_posix_semaphores_enabled=yes
14282else
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014284/* end confdefs.h. */
14285
14286#include <unistd.h>
14287#include <fcntl.h>
14288#include <stdio.h>
14289#include <semaphore.h>
14290#include <sys/stat.h>
14291
14292int main(void) {
14293 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14294 if (a == SEM_FAILED) {
14295 perror("sem_open");
14296 return 1;
14297 }
14298 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014299 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014300 return 0;
14301}
14302
14303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014304if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014305 ac_cv_posix_semaphores_enabled=yes
14306else
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014309rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14310 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014311fi
14312
14313
Mark Dickinsona614f042009-11-28 12:48:43 +000014314fi
14315
Matthias Kloseb9621712010-04-24 17:59:49 +000014316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14317$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014318if test $ac_cv_posix_semaphores_enabled = no
14319then
14320
Matthias Kloseb9621712010-04-24 17:59:49 +000014321$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014322
14323fi
14324
Mark Dickinson10683072009-04-18 21:18:19 +000014325# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14327$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014328if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014329 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014330else
Matthias Kloseb9621712010-04-24 17:59:49 +000014331 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014332 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014333else
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014335/* end confdefs.h. */
14336
14337#include <unistd.h>
14338#include <fcntl.h>
14339#include <stdio.h>
14340#include <semaphore.h>
14341#include <sys/stat.h>
14342
14343int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014344 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014345 int count;
14346 int res;
14347 if(a==SEM_FAILED){
14348 perror("sem_open");
14349 return 1;
14350
14351 }
14352 res = sem_getvalue(a, &count);
14353 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014354 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014355 return res==-1 ? 1 : 0;
14356}
14357
Mark Dickinson10683072009-04-18 21:18:19 +000014358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014360 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014361else
Matthias Kloseb9621712010-04-24 17:59:49 +000014362 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014366fi
14367
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014368
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014369fi
14370
Matthias Kloseb9621712010-04-24 17:59:49 +000014371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14372$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014373if test $ac_cv_broken_sem_getvalue = yes
14374then
14375
Matthias Kloseb9621712010-04-24 17:59:49 +000014376$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014377
14378fi
14379
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014380ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14381"
14382if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14383 ac_have_decl=1
14384else
14385 ac_have_decl=0
14386fi
14387
14388cat >>confdefs.h <<_ACEOF
14389#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14390_ACEOF
14391ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14392"
14393if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14394 ac_have_decl=1
14395else
14396 ac_have_decl=0
14397fi
14398
14399cat >>confdefs.h <<_ACEOF
14400#define HAVE_DECL_RTLD_NOW $ac_have_decl
14401_ACEOF
14402ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14403"
14404if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14405 ac_have_decl=1
14406else
14407 ac_have_decl=0
14408fi
14409
14410cat >>confdefs.h <<_ACEOF
14411#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14412_ACEOF
14413ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14414"
14415if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14416 ac_have_decl=1
14417else
14418 ac_have_decl=0
14419fi
14420
14421cat >>confdefs.h <<_ACEOF
14422#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14423_ACEOF
14424ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14425"
14426if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14427 ac_have_decl=1
14428else
14429 ac_have_decl=0
14430fi
14431
14432cat >>confdefs.h <<_ACEOF
14433#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14434_ACEOF
14435ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14436"
14437if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14438 ac_have_decl=1
14439else
14440 ac_have_decl=0
14441fi
14442
14443cat >>confdefs.h <<_ACEOF
14444#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14445_ACEOF
14446ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14447"
14448if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14449 ac_have_decl=1
14450else
14451 ac_have_decl=0
14452fi
14453
14454cat >>confdefs.h <<_ACEOF
14455#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14456_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014457ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14458"
14459if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14460 ac_have_decl=1
14461else
14462 ac_have_decl=0
14463fi
14464
14465cat >>confdefs.h <<_ACEOF
14466#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14467_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014468
14469
Mark Dickinsonbd792642009-03-18 20:06:12 +000014470# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14472$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014473# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014474if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014475 enableval=$enable_big_digits; case $enable_big_digits in
14476yes)
14477 enable_big_digits=30 ;;
14478no)
14479 enable_big_digits=15 ;;
1448015|30)
14481 ;;
14482*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014483 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 +000014484esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14486$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014487
14488cat >>confdefs.h <<_ACEOF
14489#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14490_ACEOF
14491
14492
14493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14495$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014496fi
14497
14498
Guido van Rossumef2255b2000-03-10 22:30:29 +000014499# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014500ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014501if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014502
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014505
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014506 wchar_h="yes"
14507
Guido van Rossumef2255b2000-03-10 22:30:29 +000014508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014510
14511fi
14512
Michael W. Hudson54241132001-12-07 15:38:26 +000014513
Martin v. Löwis11437992002-04-12 09:54:03 +000014514
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014515# determine wchar_t size
14516if test "$wchar_h" = yes
14517then
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14521# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14523$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014524if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14528"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Martin v. Löwis11437992002-04-12 09:54:03 +000014530else
Matthias Kloseb9621712010-04-24 17:59:49 +000014531 if test "$ac_cv_type_wchar_t" = yes; then
14532 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14533$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014534as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014535See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 else
14537 ac_cv_sizeof_wchar_t=0
14538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14543$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014544
14545
14546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014548#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014549_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014550
Michael W. Hudson54241132001-12-07 15:38:26 +000014551
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014552fi
14553
Matthias Kloseb9621712010-04-24 17:59:49 +000014554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14555$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014556have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014558/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014559
14560#include <tcl.h>
14561#if TCL_UTF_MAX != 6
14562# error "NOT UCS4_TCL"
14563#endif
14564int
14565main ()
14566{
14567
14568 ;
14569 return 0;
14570}
14571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014573
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014576
14577 have_ucs4_tcl=yes
14578
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14582$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014583
Skip Montanaro6dead952003-09-25 14:50:04 +000014584# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014585if test "$wchar_h" = yes
14586then
14587 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14589$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014590 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014591 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014592else
14593
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014595 ac_cv_wchar_t_signed=yes
14596else
Matthias Kloseb9621712010-04-24 17:59:49 +000014597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014598/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014599
14600 #include <wchar.h>
14601 int main()
14602 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014603 /* Success: exit code 0 */
14604 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014605 }
14606
14607_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014608if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014609 ac_cv_wchar_t_signed=yes
14610else
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014612fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14614 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014615fi
14616
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014617fi
14618
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14620$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621fi
14622
Michael Osipov3738fad2018-08-24 18:17:19 +020014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14624$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014625# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014626if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014627 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014628then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
Michael Osipov3738fad2018-08-24 18:17:19 +020014632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14633$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014634else
Michael Osipov3738fad2018-08-24 18:17:19 +020014635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14636$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014637fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014638
14639# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14641$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014642if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014643 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014644else
Matthias Kloseb9621712010-04-24 17:59:49 +000014645 ac_cv_c_bigendian=unknown
14646 # See if we're dealing with a universal compiler.
14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14648/* end confdefs.h. */
14649#ifndef __APPLE_CC__
14650 not a universal capable compiler
14651 #endif
14652 typedef int dummy;
14653
Skip Montanaro6dead952003-09-25 14:50:04 +000014654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014655if ac_fn_c_try_compile "$LINENO"; then :
14656
14657 # Check for potential -arch flags. It is not universal unless
14658 # there are at least two -arch flags with different values.
14659 ac_arch=
14660 ac_prev=
14661 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14662 if test -n "$ac_prev"; then
14663 case $ac_word in
14664 i?86 | x86_64 | ppc | ppc64)
14665 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14666 ac_arch=$ac_word
14667 else
14668 ac_cv_c_bigendian=universal
14669 break
14670 fi
14671 ;;
14672 esac
14673 ac_prev=
14674 elif test "x$ac_word" = "x-arch"; then
14675 ac_prev=arch
14676 fi
14677 done
14678fi
14679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680 if test $ac_cv_c_bigendian = unknown; then
14681 # See if sys/param.h defines the BYTE_ORDER macro.
14682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014683/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014684#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014685 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687int
14688main ()
14689{
Matthias Kloseb9621712010-04-24 17:59:49 +000014690#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14691 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14692 && LITTLE_ENDIAN)
14693 bogus endian macros
14694 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014695
14696 ;
14697 return 0;
14698}
14699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014700if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014701 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014703/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014704#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706
Martin v. Löwis11437992002-04-12 09:54:03 +000014707int
14708main ()
14709{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014711 not big endian
14712 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714 ;
14715 return 0;
14716}
14717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014718if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014719 ac_cv_c_bigendian=yes
14720else
Matthias Kloseb9621712010-04-24 17:59:49 +000014721 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014724fi
14725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14726 fi
14727 if test $ac_cv_c_bigendian = unknown; then
14728 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014730/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014731#include <limits.h>
14732
Martin v. Löwis11437992002-04-12 09:54:03 +000014733int
14734main ()
14735{
Matthias Kloseb9621712010-04-24 17:59:49 +000014736#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14737 bogus endian macros
14738 #endif
14739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 ;
14741 return 0;
14742}
14743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014744if ac_fn_c_try_compile "$LINENO"; then :
14745 # It does; now see whether it defined to _BIG_ENDIAN or not.
14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747/* end confdefs.h. */
14748#include <limits.h>
14749
14750int
14751main ()
14752{
14753#ifndef _BIG_ENDIAN
14754 not big endian
14755 #endif
14756
14757 ;
14758 return 0;
14759}
14760_ACEOF
14761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014762 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014763else
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14767fi
14768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14769 fi
14770 if test $ac_cv_c_bigendian = unknown; then
14771 # Compile a test program.
14772 if test "$cross_compiling" = yes; then :
14773 # Try to guess by grepping values from an object file.
14774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14775/* end confdefs.h. */
14776short int ascii_mm[] =
14777 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14778 short int ascii_ii[] =
14779 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14780 int use_ascii (int i) {
14781 return ascii_mm[i] + ascii_ii[i];
14782 }
14783 short int ebcdic_ii[] =
14784 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14785 short int ebcdic_mm[] =
14786 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14787 int use_ebcdic (int i) {
14788 return ebcdic_mm[i] + ebcdic_ii[i];
14789 }
14790 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791
Matthias Kloseb9621712010-04-24 17:59:49 +000014792int
14793main ()
14794{
14795return use_ascii (foo) == use_ebcdic (foo);
14796 ;
14797 return 0;
14798}
14799_ACEOF
14800if ac_fn_c_try_compile "$LINENO"; then :
14801 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14802 ac_cv_c_bigendian=yes
14803 fi
14804 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14805 if test "$ac_cv_c_bigendian" = unknown; then
14806 ac_cv_c_bigendian=no
14807 else
14808 # finding both strings is unlikely to happen, but who knows?
14809 ac_cv_c_bigendian=unknown
14810 fi
14811 fi
14812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014814else
Matthias Kloseb9621712010-04-24 17:59:49 +000014815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014816/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014818int
14819main ()
14820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014821
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 /* Are we little or big endian? From Harbison&Steele. */
14823 union
14824 {
14825 long int l;
14826 char c[sizeof (long int)];
14827 } u;
14828 u.l = 1;
14829 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014830
14831 ;
14832 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833}
Martin v. Löwis11437992002-04-12 09:54:03 +000014834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014835if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014836 ac_cv_c_bigendian=no
14837else
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14847$as_echo "$ac_cv_c_bigendian" >&6; }
14848 case $ac_cv_c_bigendian in #(
14849 yes)
14850 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14851;; #(
14852 no)
14853 ;; #(
14854 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014855
Matthias Kloseb9621712010-04-24 17:59:49 +000014856$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 ;; #(
14859 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014860 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014861 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014863
Michael W. Hudson54241132001-12-07 15:38:26 +000014864
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014865# ABI version string for Python extension modules. This appears between the
14866# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14867# from the following attributes which affect the ABI of this Python build (in
14868# this order):
14869#
14870# * The Python implementation (always 'cpython-' for us)
14871# * The major and minor version numbers
14872# * --with-pydebug (adds a 'd')
14873# * --with-pymalloc (adds a 'm')
14874# * --with-wide-unicode (adds a 'u')
14875#
14876# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014877# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14878# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014879
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14881$as_echo_n "checking ABIFLAGS... " >&6; }
14882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14883$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14885$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014886SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14888$as_echo "$SOABI" >&6; }
14889
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014890
14891case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014892 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014893 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14894 *)
14895 EXT_SUFFIX=${SHLIB_SUFFIX};;
14896esac
14897
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14899$as_echo_n "checking LDVERSION... " >&6; }
14900LDVERSION='$(VERSION)$(ABIFLAGS)'
14901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14902$as_echo "$LDVERSION" >&6; }
14903
doko@python.org87421192013-01-26 11:39:31 +010014904
doko@ubuntu.com55532312016-06-14 08:55:19 +020014905if test x$PLATFORM_TRIPLET = x; then
14906 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14907else
14908 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14909fi
doko@python.org87421192013-01-26 11:39:31 +010014910
14911
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014912# Check whether right shifting a negative integer extends the sign bit
14913# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14915$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014916if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014921 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014922else
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014924/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014925
14926int main()
14927{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014928 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014929}
14930
Martin v. Löwis11437992002-04-12 09:54:03 +000014931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014932if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014933 ac_cv_rshift_extends_sign=yes
14934else
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014936fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014937rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14938 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014939fi
14940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941fi
14942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14944$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014945if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014946then
Martin v. Löwis11437992002-04-12 09:54:03 +000014947
Matthias Kloseb9621712010-04-24 17:59:49 +000014948$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014949
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014950fi
14951
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014952# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14954$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014955if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014957else
Martin v. Löwis11437992002-04-12 09:54:03 +000014958
Matthias Kloseb9621712010-04-24 17:59:49 +000014959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014960/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014962int
14963main ()
14964{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014965
14966 FILE *f = fopen("/dev/null", "r");
14967 flockfile(f);
14968 getc_unlocked(f);
14969 funlockfile(f);
14970
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ;
14972 return 0;
14973}
14974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014975if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014976 ac_cv_have_getc_unlocked=yes
14977else
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 ac_cv_have_getc_unlocked=no
14979fi
14980rm -f core conftest.err conftest.$ac_objext \
14981 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983
Matthias Kloseb9621712010-04-24 17:59:49 +000014984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14985$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014986if test "$ac_cv_have_getc_unlocked" = yes
14987then
Martin v. Löwis11437992002-04-12 09:54:03 +000014988
Matthias Kloseb9621712010-04-24 17:59:49 +000014989$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014990
14991fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014992
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014993# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014994# save the value of LIBS so we don't actually link Python with readline
14995LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014996
Gregory P. Smith18820942008-09-07 06:24:49 +000014997# On some systems we need to link readline to a termcap compatible
14998# library. NOTE: Keep the precedence of listed libraries synchronised
14999# with setup.py.
15000py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15002$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015003for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015004 if test -z "$py_libtermcap"; then
15005 READLINE_LIBS="-lreadline"
15006 else
15007 READLINE_LIBS="-lreadline -l$py_libtermcap"
15008 fi
15009 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015011/* end confdefs.h. */
15012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015013/* Override any GCC internal prototype to avoid an error.
15014 Use char because int might match the return type of a GCC
15015 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015016#ifdef __cplusplus
15017extern "C"
15018#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015019char readline ();
15020int
15021main ()
15022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015023return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015024 ;
15025 return 0;
15026}
15027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015028if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015029 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015031rm -f core conftest.err conftest.$ac_objext \
15032 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015033 if test $py_cv_lib_readline = yes; then
15034 break
15035 fi
15036done
15037# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15038#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015039if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15041$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015042else
Matthias Kloseb9621712010-04-24 17:59:49 +000015043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15044$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015047
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015048fi
15049
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015050# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015052/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015053#include <readline/readline.h>
15054_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015055if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015056 have_readline=yes
15057else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015058 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015059
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015060fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015061rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015062if test $have_readline = yes
15063then
Matthias Kloseb9621712010-04-24 17:59:49 +000015064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015065/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015066#include <readline/readline.h>
15067
15068_ACEOF
15069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015071
Matthias Kloseb9621712010-04-24 17:59:49 +000015072$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015073
15074fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015075rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015076
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015078/* end confdefs.h. */
15079#include <readline/readline.h>
15080
15081_ACEOF
15082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015084
Matthias Kloseb9621712010-04-24 17:59:49 +000015085$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015086
15087fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015088rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015089
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015090fi
15091
Martin v. Löwis0daad592001-09-30 21:09:59 +000015092# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15094$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015095if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015096 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015097else
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015099LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103/* Override any GCC internal prototype to avoid an error.
15104 Use char because int might match the return type of a GCC
15105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015106#ifdef __cplusplus
15107extern "C"
15108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015109char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015110int
15111main ()
15112{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 ;
15115 return 0;
15116}
15117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015118if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015119 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015120else
Matthias Kloseb9621712010-04-24 17:59:49 +000015121 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015123rm -f core conftest.err conftest.$ac_objext \
15124 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015125LIBS=$ac_check_lib_save_LIBS
15126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15128$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015129if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015132
Martin v. Löwis0daad592001-09-30 21:09:59 +000015133fi
15134
Michael W. Hudson54241132001-12-07 15:38:26 +000015135
Thomas Wouters89d996e2007-09-08 17:39:28 +000015136# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15138$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015139if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015141else
15142 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015143LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015145/* end confdefs.h. */
15146
15147/* Override any GCC internal prototype to avoid an error.
15148 Use char because int might match the return type of a GCC
15149 builtin and then its argument prototype would still apply. */
15150#ifdef __cplusplus
15151extern "C"
15152#endif
15153char rl_completion_display_matches_hook ();
15154int
15155main ()
15156{
15157return rl_completion_display_matches_hook ();
15158 ;
15159 return 0;
15160}
15161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015162if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015163 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15164else
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015167rm -f core conftest.err conftest.$ac_objext \
15168 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015169LIBS=$ac_check_lib_save_LIBS
15170fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15172$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015173if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015174
Matthias Kloseb9621712010-04-24 17:59:49 +000015175$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015176
15177fi
15178
15179
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015180# also in 4.0, but not in editline
15181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15182$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15183if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15184 $as_echo_n "(cached) " >&6
15185else
15186 ac_check_lib_save_LIBS=$LIBS
15187LIBS="-lreadline $READLINE_LIBS $LIBS"
15188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15189/* end confdefs.h. */
15190
15191/* Override any GCC internal prototype to avoid an error.
15192 Use char because int might match the return type of a GCC
15193 builtin and then its argument prototype would still apply. */
15194#ifdef __cplusplus
15195extern "C"
15196#endif
15197char rl_resize_terminal ();
15198int
15199main ()
15200{
15201return rl_resize_terminal ();
15202 ;
15203 return 0;
15204}
15205_ACEOF
15206if ac_fn_c_try_link "$LINENO"; then :
15207 ac_cv_lib_readline_rl_resize_terminal=yes
15208else
15209 ac_cv_lib_readline_rl_resize_terminal=no
15210fi
15211rm -f core conftest.err conftest.$ac_objext \
15212 conftest$ac_exeext conftest.$ac_ext
15213LIBS=$ac_check_lib_save_LIBS
15214fi
15215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15216$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15217if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15218
15219$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15220
15221fi
15222
15223
Martin v. Löwis0daad592001-09-30 21:09:59 +000015224# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15226$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015227if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015228 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015229else
Martin v. Löwis11437992002-04-12 09:54:03 +000015230 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015231LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015233/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015234
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235/* Override any GCC internal prototype to avoid an error.
15236 Use char because int might match the return type of a GCC
15237 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015238#ifdef __cplusplus
15239extern "C"
15240#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015241char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015242int
15243main ()
15244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ;
15247 return 0;
15248}
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015255rm -f core conftest.err conftest.$ac_objext \
15256 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015257LIBS=$ac_check_lib_save_LIBS
15258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15260$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015261if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015264
Guido van Rossum353ae582001-07-10 16:45:32 +000015265fi
15266
Jack Jansendd19cf82001-12-06 22:36:17 +000015267
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015268# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015270/* end confdefs.h. */
15271#include <readline/readline.h>
15272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015274 have_readline=yes
15275else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015276 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015277
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015278fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015279rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015280if test $have_readline = yes
15281then
Matthias Kloseb9621712010-04-24 17:59:49 +000015282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015283/* end confdefs.h. */
15284#include <readline/readline.h>
15285
15286_ACEOF
15287if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015289
Matthias Kloseb9621712010-04-24 17:59:49 +000015290$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015291
15292fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015293rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015294
15295fi
15296
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15298$as_echo_n "checking for append_history in -lreadline... " >&6; }
15299if ${ac_cv_lib_readline_append_history+:} false; then :
15300 $as_echo_n "(cached) " >&6
15301else
15302 ac_check_lib_save_LIBS=$LIBS
15303LIBS="-lreadline $READLINE_LIBS $LIBS"
15304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15305/* end confdefs.h. */
15306
15307/* Override any GCC internal prototype to avoid an error.
15308 Use char because int might match the return type of a GCC
15309 builtin and then its argument prototype would still apply. */
15310#ifdef __cplusplus
15311extern "C"
15312#endif
15313char append_history ();
15314int
15315main ()
15316{
15317return append_history ();
15318 ;
15319 return 0;
15320}
15321_ACEOF
15322if ac_fn_c_try_link "$LINENO"; then :
15323 ac_cv_lib_readline_append_history=yes
15324else
15325 ac_cv_lib_readline_append_history=no
15326fi
15327rm -f core conftest.err conftest.$ac_objext \
15328 conftest$ac_exeext conftest.$ac_ext
15329LIBS=$ac_check_lib_save_LIBS
15330fi
15331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15332$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15333if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15334
15335$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15336
15337fi
15338
15339
Martin v. Löwis82bca632006-02-10 20:49:30 +000015340# End of readline checks: restore LIBS
15341LIBS=$LIBS_no_readline
15342
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15344$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015345if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015347else
Martin v. Löwis11437992002-04-12 09:54:03 +000015348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015350 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015351else
Matthias Kloseb9621712010-04-24 17:59:49 +000015352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015353/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015354
15355int main()
15356{
15357 int val1 = nice(1);
15358 if (val1 != -1 && val1 == nice(2))
15359 exit(0);
15360 exit(1);
15361}
15362
Martin v. Löwis11437992002-04-12 09:54:03 +000015363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015364if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015365 ac_cv_broken_nice=yes
15366else
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015369rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15370 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015371fi
15372
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015373fi
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15376$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015377if test "$ac_cv_broken_nice" = yes
15378then
Martin v. Löwis11437992002-04-12 09:54:03 +000015379
Matthias Kloseb9621712010-04-24 17:59:49 +000015380$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015381
15382fi
15383
Matthias Kloseb9621712010-04-24 17:59:49 +000015384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15385$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015386if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015387 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015388else
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015390 ac_cv_broken_poll=no
15391else
Matthias Kloseb9621712010-04-24 17:59:49 +000015392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015393/* end confdefs.h. */
15394
15395#include <poll.h>
15396
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015397int main()
15398{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015399 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015400 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015401
15402 close (42);
15403
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015404 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015405 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015406 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015407 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015408 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015409 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015410 return 1;
15411}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015412
15413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015414if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015415 ac_cv_broken_poll=yes
15416else
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015422
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015423fi
15424
Matthias Kloseb9621712010-04-24 17:59:49 +000015425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15426$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015427if test "$ac_cv_broken_poll" = yes
15428then
15429
Matthias Kloseb9621712010-04-24 17:59:49 +000015430$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015431
15432fi
15433
Martin v. Löwis1d459062005-03-14 21:23:33 +000015434# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15436$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015437if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015438 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015439else
15440
Matthias Kloseb9621712010-04-24 17:59:49 +000015441if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015442 ac_cv_working_tzset=no
15443else
Matthias Kloseb9621712010-04-24 17:59:49 +000015444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015445/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015446
15447#include <stdlib.h>
15448#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015449#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015450
15451#if HAVE_TZNAME
15452extern char *tzname[];
15453#endif
15454
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015455int main()
15456{
Brett Cannon18367812003-09-19 00:59:16 +000015457 /* Note that we need to ensure that not only does tzset(3)
15458 do 'something' with localtime, but it works as documented
15459 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015460 This includes making sure that tzname is set properly if
15461 tm->tm_zone does not exist since it is the alternative way
15462 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015463
15464 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015465 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015466 */
15467
Martin v. Löwis1d459062005-03-14 21:23:33 +000015468 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015469 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15470
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015471 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015472 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015473 if (localtime(&groundhogday)->tm_hour != 0)
15474 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015475#if HAVE_TZNAME
15476 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15477 if (strcmp(tzname[0], "UTC") ||
15478 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15479 exit(1);
15480#endif
Brett Cannon18367812003-09-19 00:59:16 +000015481
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015482 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015483 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015484 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015485 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015486#if HAVE_TZNAME
15487 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15488 exit(1);
15489#endif
Brett Cannon18367812003-09-19 00:59:16 +000015490
15491 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15492 tzset();
15493 if (localtime(&groundhogday)->tm_hour != 11)
15494 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015495#if HAVE_TZNAME
15496 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15497 exit(1);
15498#endif
15499
15500#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015501 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15502 exit(1);
15503 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15504 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015505#endif
Brett Cannon18367812003-09-19 00:59:16 +000015506
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015507 exit(0);
15508}
15509
15510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015511if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015512 ac_cv_working_tzset=yes
15513else
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015518fi
15519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520fi
15521
Matthias Kloseb9621712010-04-24 17:59:49 +000015522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15523$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015524if test "$ac_cv_working_tzset" = yes
15525then
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015528
15529fi
15530
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015531# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15533$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015534if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015536else
Matthias Kloseb9621712010-04-24 17:59:49 +000015537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015538/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015539#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015540int
15541main ()
15542{
15543
15544struct stat st;
15545st.st_mtim.tv_nsec = 1;
15546
15547 ;
15548 return 0;
15549}
15550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015552 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15557fi
15558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15560$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015561if test "$ac_cv_stat_tv_nsec" = yes
15562then
15563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015565
15566fi
15567
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015568# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15570$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015571if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015572 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015573else
Matthias Kloseb9621712010-04-24 17:59:49 +000015574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015575/* end confdefs.h. */
15576#include <sys/stat.h>
15577int
15578main ()
15579{
15580
15581struct stat st;
15582st.st_mtimespec.tv_nsec = 1;
15583
15584 ;
15585 return 0;
15586}
15587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015589 ac_cv_stat_tv_nsec2=yes
15590else
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15594fi
15595
Matthias Kloseb9621712010-04-24 17:59:49 +000015596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15597$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015598if test "$ac_cv_stat_tv_nsec2" = yes
15599then
15600
Matthias Kloseb9621712010-04-24 17:59:49 +000015601$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015602
15603fi
15604
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015605# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015606ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015607if test "$cross_compiling" = no; then
15608 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15609fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015610
15611for ac_header in curses.h ncurses.h
15612do :
15613 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15614ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15615if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15616 cat >>confdefs.h <<_ACEOF
15617#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15618_ACEOF
15619
15620fi
15621
15622done
15623
15624
15625# On Solaris, term.h requires curses.h
15626for ac_header in term.h
15627do :
15628 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15629#ifdef HAVE_CURSES_H
15630#include <curses.h>
15631#endif
15632
15633"
15634if test "x$ac_cv_header_term_h" = xyes; then :
15635 cat >>confdefs.h <<_ACEOF
15636#define HAVE_TERM_H 1
15637_ACEOF
15638
15639fi
15640
15641done
15642
15643
Jack Jansen666b1e72001-10-31 12:11:48 +000015644# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15646$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015647if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015648 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015649else
Matthias Kloseb9621712010-04-24 17:59:49 +000015650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015651/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015652#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015653int
15654main ()
15655{
Jack Jansen666b1e72001-10-31 12:11:48 +000015656
15657 int rtn;
15658 rtn = mvwdelch(0,0,0);
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660 ;
15661 return 0;
15662}
15663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015664if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015665 ac_cv_mvwdelch_is_expression=yes
15666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15670fi
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15673$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015674
15675if test "$ac_cv_mvwdelch_is_expression" = yes
15676then
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Matthias Kloseb9621712010-04-24 17:59:49 +000015678$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015679
15680fi
15681
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015682# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15683# structs since version 5.7. If the macro is defined as zero before including
15684# [n]curses.h, ncurses will expose fields of the structs regardless of the
15685# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15687$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015688if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015689 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015690else
Matthias Kloseb9621712010-04-24 17:59:49 +000015691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015693
15694 #define NCURSES_OPAQUE 0
15695 #include <curses.h>
15696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697int
15698main ()
15699{
Jack Jansen666b1e72001-10-31 12:11:48 +000015700
15701 WINDOW *w;
15702 w->_flags = 0;
15703
Martin v. Löwis11437992002-04-12 09:54:03 +000015704 ;
15705 return 0;
15706}
15707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015709 ac_cv_window_has_flags=yes
15710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015712fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15714fi
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15717$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015718
Jack Jansen666b1e72001-10-31 12:11:48 +000015719
15720if test "$ac_cv_window_has_flags" = yes
15721then
Martin v. Löwis11437992002-04-12 09:54:03 +000015722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015724
15725fi
15726
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15728$as_echo_n "checking for is_pad... " >&6; }
15729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15730/* end confdefs.h. */
15731#include <curses.h>
15732int
15733main ()
15734{
15735
15736#ifndef is_pad
15737void *x=is_pad
15738#endif
15739
15740 ;
15741 return 0;
15742}
15743_ACEOF
15744if ac_fn_c_try_compile "$LINENO"; then :
15745
15746$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15747
15748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15749$as_echo "yes" >&6; }
15750else
15751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15752$as_echo "no" >&6; }
15753
15754fi
15755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15756
Matthias Kloseb9621712010-04-24 17:59:49 +000015757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15758$as_echo_n "checking for is_term_resized... " >&6; }
15759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015760/* end confdefs.h. */
15761#include <curses.h>
15762int
15763main ()
15764{
15765void *x=is_term_resized
15766 ;
15767 return 0;
15768}
15769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015770if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015773
Matthias Kloseb159a552010-04-25 21:00:44 +000015774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015775$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015776else
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15778$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015779
15780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15784$as_echo_n "checking for resize_term... " >&6; }
15785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015786/* end confdefs.h. */
15787#include <curses.h>
15788int
15789main ()
15790{
15791void *x=resize_term
15792 ;
15793 return 0;
15794}
15795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015796if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015799
Matthias Kloseb159a552010-04-25 21:00:44 +000015800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015801$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015802else
Matthias Kloseb9621712010-04-24 17:59:49 +000015803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15804$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015805
15806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15810$as_echo_n "checking for resizeterm... " >&6; }
15811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015812/* end confdefs.h. */
15813#include <curses.h>
15814int
15815main ()
15816{
15817void *x=resizeterm
15818 ;
15819 return 0;
15820}
15821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015822if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015823
Matthias Kloseb9621712010-04-24 17:59:49 +000015824$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015825
Matthias Kloseb159a552010-04-25 21:00:44 +000015826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015827$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015828else
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15830$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015831
15832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015834
15835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
15836$as_echo_n "checking for immedok... " >&6; }
15837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15838/* end confdefs.h. */
15839#include <curses.h>
15840int
15841main ()
15842{
15843
15844#ifndef immedok
15845void *x=immedok
15846#endif
15847
15848 ;
15849 return 0;
15850}
15851_ACEOF
15852if ac_fn_c_try_compile "$LINENO"; then :
15853
15854$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
15855
15856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15857$as_echo "yes" >&6; }
15858else
15859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15860$as_echo "no" >&6; }
15861
15862fi
15863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15864
15865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
15866$as_echo_n "checking for syncok... " >&6; }
15867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15868/* end confdefs.h. */
15869#include <curses.h>
15870int
15871main ()
15872{
15873
15874#ifndef syncok
15875void *x=syncok
15876#endif
15877
15878 ;
15879 return 0;
15880}
15881_ACEOF
15882if ac_fn_c_try_compile "$LINENO"; then :
15883
15884$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
15885
15886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15887$as_echo "yes" >&6; }
15888else
15889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15890$as_echo "no" >&6; }
15891
15892fi
15893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15894
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020015895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
15896$as_echo_n "checking for wchgat... " >&6; }
15897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15898/* end confdefs.h. */
15899#include <curses.h>
15900int
15901main ()
15902{
15903
15904#ifndef wchgat
15905void *x=wchgat
15906#endif
15907
15908 ;
15909 return 0;
15910}
15911_ACEOF
15912if ac_fn_c_try_compile "$LINENO"; then :
15913
15914$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
15915
15916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15917$as_echo "yes" >&6; }
15918else
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15920$as_echo "no" >&6; }
15921
15922fi
15923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15924
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020015925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
15926$as_echo_n "checking for filter... " >&6; }
15927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15928/* end confdefs.h. */
15929#include <curses.h>
15930int
15931main ()
15932{
15933
15934#ifndef filter
15935void *x=filter
15936#endif
15937
15938 ;
15939 return 0;
15940}
15941_ACEOF
15942if ac_fn_c_try_compile "$LINENO"; then :
15943
15944$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
15945
15946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15947$as_echo "yes" >&6; }
15948else
15949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15950$as_echo "no" >&6; }
15951
15952fi
15953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15954
15955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
15956$as_echo_n "checking for has_key... " >&6; }
15957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15958/* end confdefs.h. */
15959#include <curses.h>
15960int
15961main ()
15962{
15963
15964#ifndef has_key
15965void *x=has_key
15966#endif
15967
15968 ;
15969 return 0;
15970}
15971_ACEOF
15972if ac_fn_c_try_compile "$LINENO"; then :
15973
15974$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
15975
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15977$as_echo "yes" >&6; }
15978else
15979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15980$as_echo "no" >&6; }
15981
15982fi
15983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15984
15985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
15986$as_echo_n "checking for typeahead... " >&6; }
15987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15988/* end confdefs.h. */
15989#include <curses.h>
15990int
15991main ()
15992{
15993
15994#ifndef typeahead
15995void *x=typeahead
15996#endif
15997
15998 ;
15999 return 0;
16000}
16001_ACEOF
16002if ac_fn_c_try_compile "$LINENO"; then :
16003
16004$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16005
16006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16007$as_echo "yes" >&6; }
16008else
16009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16010$as_echo "no" >&6; }
16011
16012fi
16013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16014
16015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16016$as_echo_n "checking for use_env... " >&6; }
16017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16018/* end confdefs.h. */
16019#include <curses.h>
16020int
16021main ()
16022{
16023
16024#ifndef use_env
16025void *x=use_env
16026#endif
16027
16028 ;
16029 return 0;
16030}
16031_ACEOF
16032if ac_fn_c_try_compile "$LINENO"; then :
16033
16034$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16035
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16037$as_echo "yes" >&6; }
16038else
16039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16040$as_echo "no" >&6; }
16041
16042fi
16043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016044# last curses configure check
16045CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16048$as_echo "$as_me: checking for device files" >&6;}
16049
16050if test "x$cross_compiling" = xyes; then
16051 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16053$as_echo_n "checking for /dev/ptmx... " >&6; }
16054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16055$as_echo "not set" >&6; }
16056 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16057 fi
16058 if test "${ac_cv_file__dev_ptc+set}" != set; then
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16060$as_echo_n "checking for /dev/ptc... " >&6; }
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16062$as_echo "not set" >&6; }
16063 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16064 fi
16065fi
16066
Matthias Kloseb9621712010-04-24 17:59:49 +000016067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16068$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016069if ${ac_cv_file__dev_ptmx+:} false; then :
16070 $as_echo_n "(cached) " >&6
16071else
16072 test "$cross_compiling" = yes &&
16073 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16074if test -r "/dev/ptmx"; then
16075 ac_cv_file__dev_ptmx=yes
16076else
16077 ac_cv_file__dev_ptmx=no
16078fi
16079fi
16080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16081$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16082if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016083
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016084fi
16085
16086if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016089
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16092$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016093if ${ac_cv_file__dev_ptc+:} false; then :
16094 $as_echo_n "(cached) " >&6
16095else
16096 test "$cross_compiling" = yes &&
16097 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16098if test -r "/dev/ptc"; then
16099 ac_cv_file__dev_ptc=yes
16100else
16101 ac_cv_file__dev_ptc=no
16102fi
16103fi
16104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16105$as_echo "$ac_cv_file__dev_ptc" >&6; }
16106if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016107
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016108fi
16109
16110if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016111
Matthias Kloseb9621712010-04-24 17:59:49 +000016112$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016113
Neal Norwitz865400f2003-03-21 01:42:58 +000016114fi
16115
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016116if test $ac_sys_system = Darwin
16117then
16118 LIBS="$LIBS -framework CoreFoundation"
16119fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016120
Matthias Kloseb9621712010-04-24 17:59:49 +000016121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16122$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016123if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016125else
Matthias Kloseb9621712010-04-24 17:59:49 +000016126 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016127 ac_cv_have_size_t_format="cross -- assuming yes"
16128
Thomas Wouters477c8d52006-05-27 19:21:47 +000016129else
Matthias Kloseb9621712010-04-24 17:59:49 +000016130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016131/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016132
Thomas Wouters477c8d52006-05-27 19:21:47 +000016133#include <stdio.h>
16134#include <stddef.h>
16135#include <string.h>
16136
Christian Heimes2c181612007-12-17 20:04:13 +000016137#ifdef HAVE_SYS_TYPES_H
16138#include <sys/types.h>
16139#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016140
16141#ifdef HAVE_SSIZE_T
16142typedef ssize_t Py_ssize_t;
16143#elif SIZEOF_VOID_P == SIZEOF_LONG
16144typedef long Py_ssize_t;
16145#else
16146typedef int Py_ssize_t;
16147#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016148
Christian Heimes2c181612007-12-17 20:04:13 +000016149int main()
16150{
16151 char buffer[256];
16152
Thomas Wouters477c8d52006-05-27 19:21:47 +000016153 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16154 return 1;
16155
Thomas Wouters89f507f2006-12-13 04:49:30 +000016156 if (strcmp(buffer, "123"))
16157 return 1;
16158
16159 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16160 return 1;
16161
16162 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016163 return 1;
16164
16165 return 0;
16166}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016167
Thomas Wouters477c8d52006-05-27 19:21:47 +000016168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016169if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016170 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016171else
Matthias Kloseb9621712010-04-24 17:59:49 +000016172 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016176fi
16177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16180$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016181if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016182
Matthias Kloseb9621712010-04-24 17:59:49 +000016183$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016184
16185fi
16186
Matthias Kloseb9621712010-04-24 17:59:49 +000016187ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016188#ifdef HAVE_SYS_TYPES_H
16189#include <sys/types.h>
16190#endif
16191#ifdef HAVE_SYS_SOCKET_H
16192#include <sys/socket.h>
16193#endif
16194
Matthias Kloseb9621712010-04-24 17:59:49 +000016195"
Victor Stinnere0be4232011-10-25 13:06:09 +020016196if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016197
Martin v. Löwis11437992002-04-12 09:54:03 +000016198else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016199
Matthias Kloseb9621712010-04-24 17:59:49 +000016200$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016201
16202fi
16203
Michael W. Hudson54241132001-12-07 15:38:26 +000016204
Matthias Kloseb9621712010-04-24 17:59:49 +000016205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16206$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016207if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016208 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016209else
Matthias Kloseb9621712010-04-24 17:59:49 +000016210 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016211 ac_cv_broken_mbstowcs=no
16212else
Matthias Kloseb9621712010-04-24 17:59:49 +000016213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016214/* end confdefs.h. */
16215
Stefan Krah19c21392012-11-22 23:47:32 +010016216#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016217#include<stdlib.h>
16218int main() {
16219 size_t len = -1;
16220 const char *str = "text";
16221 len = mbstowcs(NULL, str, 0);
16222 return (len != 4);
16223}
16224
16225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016226if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016227 ac_cv_broken_mbstowcs=no
16228else
Matthias Kloseb9621712010-04-24 17:59:49 +000016229 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016230fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16232 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016233fi
16234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016235fi
16236
Matthias Kloseb9621712010-04-24 17:59:49 +000016237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16238$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016239if test "$ac_cv_broken_mbstowcs" = yes
16240then
16241
Matthias Kloseb9621712010-04-24 17:59:49 +000016242$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016243
16244fi
16245
Antoine Pitroub52ec782009-01-25 16:34:23 +000016246# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16248$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016249
16250# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016251if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016252 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016253if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016254then
16255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016257
Matthias Kloseb9621712010-04-24 17:59:49 +000016258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16259$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016260fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016261if test "$withval" = no
16262then
16263
16264$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16265
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16267$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016268fi
16269
Antoine Pitrou042b1282010-08-13 21:15:58 +000016270else
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16272$as_echo "no value specified" >&6; }
16273fi
16274
Antoine Pitroub52ec782009-01-25 16:34:23 +000016275
Matthias Kloseb17289e2012-03-15 19:51:34 +010016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16277$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16278if ${ac_cv_computed_gotos+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280else
16281 if test "$cross_compiling" = yes; then :
16282 if test "${with_computed_gotos+set}" = set; then
16283 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16284 else
16285 ac_cv_computed_gotos=no
16286 fi
16287else
16288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16289/* end confdefs.h. */
16290
16291int main(int argc, char **argv)
16292{
16293 static void *targets[1] = { &&LABEL1 };
16294 goto LABEL2;
16295LABEL1:
16296 return 0;
16297LABEL2:
16298 goto *targets[0];
16299 return 1;
16300}
16301
16302_ACEOF
16303if ac_fn_c_try_run "$LINENO"; then :
16304 ac_cv_computed_gotos=yes
16305else
16306 ac_cv_computed_gotos=no
16307fi
16308rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16309 conftest.$ac_objext conftest.beam conftest.$ac_ext
16310fi
16311
16312fi
16313
16314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16315$as_echo "$ac_cv_computed_gotos" >&6; }
16316case "$ac_cv_computed_gotos" in yes*)
16317
16318$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16319
16320esac
16321
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016322case $ac_sys_system in
16323AIX*)
16324
16325$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16326 ;;
16327esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016328
Michael W. Hudson54241132001-12-07 15:38:26 +000016329
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016330
16331
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016332for h in `(cd $srcdir;echo Python/thread_*.h)`
16333do
16334 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16335done
16336
Michael W. Hudson54241132001-12-07 15:38:26 +000016337
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016338SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16340$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016341for dir in $SRCDIRS; do
16342 if test ! -d $dir; then
16343 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016344 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016345done
Matthias Kloseb9621712010-04-24 17:59:49 +000016346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16347$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016348
Stefan Krah1919b7e2012-03-21 18:25:23 +010016349# Availability of -O2:
16350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16351$as_echo_n "checking for -O2... " >&6; }
16352saved_cflags="$CFLAGS"
16353CFLAGS="-O2"
16354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16355/* end confdefs.h. */
16356
16357int
16358main ()
16359{
16360
16361
16362 ;
16363 return 0;
16364}
16365_ACEOF
16366if ac_fn_c_try_compile "$LINENO"; then :
16367 have_O2=yes
16368else
16369 have_O2=no
16370fi
16371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16373$as_echo "$have_O2" >&6; }
16374CFLAGS="$saved_cflags"
16375
16376# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16377# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16379$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16380saved_cflags="$CFLAGS"
16381CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16382if test "$have_O2" = no; then
16383 CFLAGS=""
16384fi
16385if test "$cross_compiling" = yes; then :
16386 have_glibc_memmove_bug=undefined
16387else
16388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16389/* end confdefs.h. */
16390
16391#include <stdio.h>
16392#include <stdlib.h>
16393#include <string.h>
16394void foo(void *p, void *q) { memmove(p, q, 19); }
16395int main() {
16396 char a[32] = "123456789000000000";
16397 foo(&a[9], a);
16398 if (strcmp(a, "123456789123456789000000000") != 0)
16399 return 1;
16400 foo(a, &a[9]);
16401 if (strcmp(a, "123456789000000000") != 0)
16402 return 1;
16403 return 0;
16404}
16405
16406_ACEOF
16407if ac_fn_c_try_run "$LINENO"; then :
16408 have_glibc_memmove_bug=no
16409else
16410 have_glibc_memmove_bug=yes
16411fi
16412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16413 conftest.$ac_objext conftest.beam conftest.$ac_ext
16414fi
16415
16416CFLAGS="$saved_cflags"
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16418$as_echo "$have_glibc_memmove_bug" >&6; }
16419if test "$have_glibc_memmove_bug" = yes; then
16420
16421$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16422
16423fi
16424
16425if test "$have_gcc_asm_for_x87" = yes; then
16426 # Some versions of gcc miscompile inline asm:
16427 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16428 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16429 case $CC in
16430 *gcc*)
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16432$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16433 saved_cflags="$CFLAGS"
16434 CFLAGS="-O2"
16435 if test "$cross_compiling" = yes; then :
16436 have_ipa_pure_const_bug=undefined
16437else
16438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16439/* end confdefs.h. */
16440
16441 __attribute__((noinline)) int
16442 foo(int *p) {
16443 int r;
16444 asm ( "movl \$6, (%1)\n\t"
16445 "xorl %0, %0\n\t"
16446 : "=r" (r) : "r" (p) : "memory"
16447 );
16448 return r;
16449 }
16450 int main() {
16451 int p = 8;
16452 if ((foo(&p) ? : p) != 6)
16453 return 1;
16454 return 0;
16455 }
16456
16457_ACEOF
16458if ac_fn_c_try_run "$LINENO"; then :
16459 have_ipa_pure_const_bug=no
16460else
16461 have_ipa_pure_const_bug=yes
16462fi
16463rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16464 conftest.$ac_objext conftest.beam conftest.$ac_ext
16465fi
16466
16467 CFLAGS="$saved_cflags"
16468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16469$as_echo "$have_ipa_pure_const_bug" >&6; }
16470 if test "$have_ipa_pure_const_bug" = yes; then
16471
16472$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16473
16474 fi
16475 ;;
16476 esac
16477fi
16478
Victor Stinner4f5366e2015-01-09 02:13:19 +010016479# Check for stdatomic.h
16480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16481$as_echo_n "checking for stdatomic.h... " >&6; }
16482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16483/* end confdefs.h. */
16484
16485
16486 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016487 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016488 int main() {
16489 int loaded_value = atomic_load(&value);
16490 return 0;
16491 }
16492
16493
16494_ACEOF
16495if ac_fn_c_try_link "$LINENO"; then :
16496 have_stdatomic_h=yes
16497else
16498 have_stdatomic_h=no
16499fi
16500rm -f core conftest.err conftest.$ac_objext \
16501 conftest$ac_exeext conftest.$ac_ext
16502
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16504$as_echo "$have_stdatomic_h" >&6; }
16505
16506if test "$have_stdatomic_h" = yes; then
16507
16508$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16509
16510fi
16511
16512# Check for GCC >= 4.7 __atomic builtins
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16514$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16516/* end confdefs.h. */
16517
16518
16519 volatile int val = 1;
16520 int main() {
16521 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16522 return 0;
16523 }
16524
16525
16526_ACEOF
16527if ac_fn_c_try_link "$LINENO"; then :
16528 have_builtin_atomic=yes
16529else
16530 have_builtin_atomic=no
16531fi
16532rm -f core conftest.err conftest.$ac_objext \
16533 conftest$ac_exeext conftest.$ac_ext
16534
16535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16536$as_echo "$have_builtin_atomic" >&6; }
16537
16538if test "$have_builtin_atomic" = yes; then
16539
16540$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16541
16542fi
16543
Ned Deily322f5ba2013-11-21 23:01:59 -080016544# ensurepip option
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16546$as_echo_n "checking for ensurepip... " >&6; }
16547
16548# Check whether --with-ensurepip was given.
16549if test "${with_ensurepip+set}" = set; then :
16550 withval=$with_ensurepip;
16551else
16552 with_ensurepip=upgrade
16553fi
16554
16555case $with_ensurepip in #(
16556 yes|upgrade) :
16557 ENSUREPIP=upgrade ;; #(
16558 install) :
16559 ENSUREPIP=install ;; #(
16560 no) :
16561 ENSUREPIP=no ;; #(
16562 *) :
16563 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16564esac
16565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16566$as_echo "$ENSUREPIP" >&6; }
16567
16568
Victor Stinner35a97c02015-03-08 02:59:09 +010016569# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16571$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574
16575
16576 #include <dirent.h>
16577
16578 int main() {
16579 struct dirent entry;
16580 return entry.d_type == DT_UNKNOWN;
16581 }
16582
16583
16584_ACEOF
16585if ac_fn_c_try_link "$LINENO"; then :
16586 have_dirent_d_type=yes
16587else
16588 have_dirent_d_type=no
16589fi
16590rm -f core conftest.err conftest.$ac_objext \
16591 conftest$ac_exeext conftest.$ac_ext
16592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16593$as_echo "$have_dirent_d_type" >&6; }
16594
16595if test "$have_dirent_d_type" = yes; then
16596
16597$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16598
16599fi
16600
Victor Stinner9eb57c52015-03-19 22:21:49 +010016601# check if the Linux getrandom() syscall is available
16602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16603$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16605/* end confdefs.h. */
16606
16607
Victor Stinner1b80b242016-04-12 22:34:58 +020016608 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016609 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016610 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016611
16612 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016613 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016614 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016615 const int flags = GRND_NONBLOCK;
16616 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016617 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016618 return 0;
16619 }
16620
16621
16622_ACEOF
16623if ac_fn_c_try_link "$LINENO"; then :
16624 have_getrandom_syscall=yes
16625else
16626 have_getrandom_syscall=no
16627fi
16628rm -f core conftest.err conftest.$ac_objext \
16629 conftest$ac_exeext conftest.$ac_ext
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16631$as_echo "$have_getrandom_syscall" >&6; }
16632
16633if test "$have_getrandom_syscall" = yes; then
16634
16635$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16636
16637fi
16638
Victor Stinner3abf44e2015-09-18 15:38:37 +020016639# check if the getrandom() function is available
16640# the test was written for the Solaris function of <sys/random.h>
16641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16642$as_echo_n "checking for the getrandom() function... " >&6; }
16643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16644/* end confdefs.h. */
16645
16646
16647 #include <sys/random.h>
16648
16649 int main() {
16650 char buffer[1];
16651 const size_t buflen = sizeof(buffer);
16652 const int flags = 0;
16653 /* ignore the result, Python checks for ENOSYS at runtime */
16654 (void)getrandom(buffer, buflen, flags);
16655 return 0;
16656 }
16657
16658
16659_ACEOF
16660if ac_fn_c_try_link "$LINENO"; then :
16661 have_getrandom=yes
16662else
16663 have_getrandom=no
16664fi
16665rm -f core conftest.err conftest.$ac_objext \
16666 conftest$ac_exeext conftest.$ac_ext
16667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16668$as_echo "$have_getrandom" >&6; }
16669
16670if test "$have_getrandom" = yes; then
16671
16672$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16673
16674fi
16675
Christian Heimesff5be6e2018-01-20 13:19:21 +010016676# Check for usable OpenSSL
16677
16678 found=false
16679
16680# Check whether --with-openssl was given.
16681if test "${with_openssl+set}" = set; then :
16682 withval=$with_openssl;
16683 case "$withval" in
16684 "" | y | ye | yes | n | no)
16685 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16686 ;;
16687 *) ssldirs="$withval"
16688 ;;
16689 esac
16690
16691else
16692
16693 # if pkg-config is installed and openssl has installed a .pc file,
16694 # then use that information and don't search ssldirs
16695 if test -n "$ac_tool_prefix"; then
16696 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16697set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16699$as_echo_n "checking for $ac_word... " >&6; }
16700if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16701 $as_echo_n "(cached) " >&6
16702else
16703 if test -n "$PKG_CONFIG"; then
16704 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16705else
16706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16707for as_dir in $PATH
16708do
16709 IFS=$as_save_IFS
16710 test -z "$as_dir" && as_dir=.
16711 for ac_exec_ext in '' $ac_executable_extensions; do
16712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16713 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16715 break 2
16716 fi
16717done
16718 done
16719IFS=$as_save_IFS
16720
16721fi
16722fi
16723PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16724if test -n "$PKG_CONFIG"; then
16725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16726$as_echo "$PKG_CONFIG" >&6; }
16727else
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16729$as_echo "no" >&6; }
16730fi
16731
16732
16733fi
16734if test -z "$ac_cv_prog_PKG_CONFIG"; then
16735 ac_ct_PKG_CONFIG=$PKG_CONFIG
16736 # Extract the first word of "pkg-config", so it can be a program name with args.
16737set dummy pkg-config; ac_word=$2
16738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16739$as_echo_n "checking for $ac_word... " >&6; }
16740if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16741 $as_echo_n "(cached) " >&6
16742else
16743 if test -n "$ac_ct_PKG_CONFIG"; then
16744 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16745else
16746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16747for as_dir in $PATH
16748do
16749 IFS=$as_save_IFS
16750 test -z "$as_dir" && as_dir=.
16751 for ac_exec_ext in '' $ac_executable_extensions; do
16752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16753 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16755 break 2
16756 fi
16757done
16758 done
16759IFS=$as_save_IFS
16760
16761fi
16762fi
16763ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16764if test -n "$ac_ct_PKG_CONFIG"; then
16765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16766$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16767else
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16769$as_echo "no" >&6; }
16770fi
16771
16772 if test "x$ac_ct_PKG_CONFIG" = x; then
16773 PKG_CONFIG=""
16774 else
16775 case $cross_compiling:$ac_tool_warned in
16776yes:)
16777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16779ac_tool_warned=yes ;;
16780esac
16781 PKG_CONFIG=$ac_ct_PKG_CONFIG
16782 fi
16783else
16784 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16785fi
16786
16787 if test x"$PKG_CONFIG" != x""; then
16788 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16789 if test $? = 0; then
16790 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16791 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16792 found=true
16793 fi
16794 fi
16795
16796 # no such luck; use some default ssldirs
16797 if ! $found; then
16798 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16799 fi
16800
16801
16802fi
16803
16804
16805
16806 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16807 # an 'openssl' subdirectory
16808
16809 if ! $found; then
16810 OPENSSL_INCLUDES=
16811 for ssldir in $ssldirs; do
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
16813$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
16814 if test -f "$ssldir/include/openssl/ssl.h"; then
16815 OPENSSL_INCLUDES="-I$ssldir/include"
16816 OPENSSL_LDFLAGS="-L$ssldir/lib"
16817 OPENSSL_LIBS="-lssl -lcrypto"
16818 found=true
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16820$as_echo "yes" >&6; }
16821 break
16822 else
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16824$as_echo "no" >&6; }
16825 fi
16826 done
16827
16828 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
16829 # it will just work!
16830 fi
16831
16832 # try the preprocessor and linker with our new flags,
16833 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
16834
16835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
16836$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
16837 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
16838 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
16839
16840 save_LIBS="$LIBS"
16841 save_LDFLAGS="$LDFLAGS"
16842 save_CPPFLAGS="$CPPFLAGS"
16843 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16844 LIBS="$OPENSSL_LIBS $LIBS"
16845 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16847/* end confdefs.h. */
16848#include <openssl/ssl.h>
16849int
16850main ()
16851{
16852SSL_new(NULL)
16853 ;
16854 return 0;
16855}
16856_ACEOF
16857if ac_fn_c_try_link "$LINENO"; then :
16858
16859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16860$as_echo "yes" >&6; }
16861 have_openssl=yes
16862
16863else
16864
16865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16866$as_echo "no" >&6; }
16867 have_openssl=no
16868
16869fi
16870rm -f core conftest.err conftest.$ac_objext \
16871 conftest$ac_exeext conftest.$ac_ext
16872 CPPFLAGS="$save_CPPFLAGS"
16873 LDFLAGS="$save_LDFLAGS"
16874 LIBS="$save_LIBS"
16875
16876
16877
16878
16879
16880
16881if test "$have_openssl" = yes; then
16882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
16883$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
16884
16885 save_LIBS="$LIBS"
16886 save_LDFLAGS="$LDFLAGS"
16887 save_CPPFLAGS="$CPPFLAGS"
16888 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
16889 LIBS="$OPENSSL_LIBS $LIBS"
16890 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
16891
16892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16893/* end confdefs.h. */
16894
16895 #include <openssl/x509_vfy.h>
16896
16897int
16898main ()
16899{
16900
16901 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
16902 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
16903 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
16904 X509_VERIFY_PARAM_set_hostflags(p, 0);
16905
16906 ;
16907 return 0;
16908}
16909
16910_ACEOF
16911if ac_fn_c_try_link "$LINENO"; then :
16912
16913 ac_cv_has_x509_verify_param_set1_host=yes
16914
16915else
16916
16917 ac_cv_has_x509_verify_param_set1_host=no
16918
16919fi
16920rm -f core conftest.err conftest.$ac_objext \
16921 conftest$ac_exeext conftest.$ac_ext
16922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
16923$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
16924 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
16925
16926$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
16927
16928 fi
16929
16930 CPPFLAGS="$save_CPPFLAGS"
16931 LDFLAGS="$save_LDFLAGS"
16932 LIBS="$save_LIBS"
16933fi
16934
Christian Heimes892d66e2018-01-29 14:10:18 +010016935# ssl module default cipher suite string
16936
16937
16938
16939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
16940$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
16941
16942# Check whether --with-ssl-default-suites was given.
16943if test "${with_ssl_default_suites+set}" = set; then :
16944 withval=$with_ssl_default_suites;
16945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
16946$as_echo "$withval" >&6; }
16947case "$withval" in
16948 python)
16949 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16950
16951 ;;
16952 openssl)
16953 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
16954
16955 ;;
16956 *)
16957 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
16958
16959 cat >>confdefs.h <<_ACEOF
16960#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
16961_ACEOF
16962
16963 ;;
16964esac
16965
16966else
16967
16968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
16969$as_echo "python" >&6; }
16970$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
16971
16972
16973fi
16974
16975
16976
Guido van Rossum627b2d71993-12-24 10:39:16 +000016977# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020016978ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000016979
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016980ac_config_files="$ac_config_files Modules/ld_so_aix"
16981
Martin v. Löwis11437992002-04-12 09:54:03 +000016982cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016983# This file is a shell script that caches the results of configure
16984# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016985# scripts and configure runs, see configure's option --config-cache.
16986# It is not useful on other systems. If it contains results you don't
16987# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016988#
Martin v. Löwis11437992002-04-12 09:54:03 +000016989# config.status only pays attention to the cache file if you give it
16990# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016991#
Skip Montanaro6dead952003-09-25 14:50:04 +000016992# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016993# loading this file, other *unset* `ac_cv_foo' will be assigned the
16994# following values.
16995
16996_ACEOF
16997
Guido van Rossumf78abae1997-01-21 22:02:36 +000016998# The following way of writing the cache mishandles newlines in values,
16999# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017000# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017001# Ultrix sh set writes to stderr and can't be redirected directly,
17002# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017003(
17004 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17005 eval ac_val=\$$ac_var
17006 case $ac_val in #(
17007 *${as_nl}*)
17008 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017009 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17010$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017011 esac
17012 case $ac_var in #(
17013 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017014 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17015 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016 esac ;;
17017 esac
17018 done
17019
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17022 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017023 # `set' does not quote correctly, so add quotes: double-quote
17024 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017025 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017026 "s/'/'\\\\''/g;
17027 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017028 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017029 *)
17030 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 esac |
17034 sort
17035) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017037 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017038 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017040 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17041 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017042 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17043 :end' >>confcache
17044if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17045 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017046 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017047 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17048$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017049 if test ! -f "$cache_file" || test -h "$cache_file"; then
17050 cat confcache >"$cache_file"
17051 else
17052 case $cache_file in #(
17053 */* | ?:*)
17054 mv -f confcache "$cache_file"$$ &&
17055 mv -f "$cache_file"$$ "$cache_file" ;; #(
17056 *)
17057 mv -f confcache "$cache_file" ;;
17058 esac
17059 fi
17060 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017061 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017062 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17063$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017064 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017065fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017066rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017067
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017068test "x$prefix" = xNONE && prefix=$ac_default_prefix
17069# Let make expand exec_prefix.
17070test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017071
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017072DEFS=-DHAVE_CONFIG_H
17073
Skip Montanaro6dead952003-09-25 14:50:04 +000017074ac_libobjs=
17075ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017076U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017077for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17078 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17082 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017083 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17084 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017085done
17086LIBOBJS=$ac_libobjs
17087
17088LTLIBOBJS=$ac_ltlibobjs
17089
17090
Martin v. Löwis11437992002-04-12 09:54:03 +000017091
Matthias Kloseb9621712010-04-24 17:59:49 +000017092
Victor Stinnere0be4232011-10-25 13:06:09 +020017093: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017094ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017095ac_clean_files_save=$ac_clean_files
17096ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017097{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17098$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17099as_write_fail=0
17100cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017101#! $SHELL
17102# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017103# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017104# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017105# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017106
Martin v. Löwis11437992002-04-12 09:54:03 +000017107debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017108ac_cs_recheck=false
17109ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017110
Matthias Kloseb9621712010-04-24 17:59:49 +000017111SHELL=\${CONFIG_SHELL-$SHELL}
17112export SHELL
17113_ASEOF
17114cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17115## -------------------- ##
17116## M4sh Initialization. ##
17117## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017119# Be more Bourne compatible
17120DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017121if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017122 emulate sh
17123 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017124 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017125 # is contrary to our usage. Disable this feature.
17126 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017127 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017128else
Matthias Kloseb9621712010-04-24 17:59:49 +000017129 case `(set -o) 2>/dev/null` in #(
17130 *posix*) :
17131 set -o posix ;; #(
17132 *) :
17133 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017135fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017136
17137
Matthias Kloseb9621712010-04-24 17:59:49 +000017138as_nl='
17139'
17140export as_nl
17141# Printing a long string crashes Solaris 7 /usr/bin/printf.
17142as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17143as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17144as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17145# Prefer a ksh shell builtin over an external printf program on Solaris,
17146# but without wasting forks for bash or zsh.
17147if test -z "$BASH_VERSION$ZSH_VERSION" \
17148 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17149 as_echo='print -r --'
17150 as_echo_n='print -rn --'
17151elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17152 as_echo='printf %s\n'
17153 as_echo_n='printf %s'
17154else
17155 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17156 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17157 as_echo_n='/usr/ucb/echo -n'
17158 else
17159 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17160 as_echo_n_body='eval
17161 arg=$1;
17162 case $arg in #(
17163 *"$as_nl"*)
17164 expr "X$arg" : "X\\(.*\\)$as_nl";
17165 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17166 esac;
17167 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17168 '
17169 export as_echo_n_body
17170 as_echo_n='sh -c $as_echo_n_body as_echo'
17171 fi
17172 export as_echo_body
17173 as_echo='sh -c $as_echo_body as_echo'
17174fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017175
17176# The user is always right.
17177if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017178 PATH_SEPARATOR=:
17179 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17180 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17181 PATH_SEPARATOR=';'
17182 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017183fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185
17186# IFS
17187# We need space, tab and new line, in precisely that order. Quoting is
17188# there to prevent editors from complaining about space-tab.
17189# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17190# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017191IFS=" "" $as_nl"
17192
17193# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017194as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017195case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017196 *[\\/]* ) as_myself=$0 ;;
17197 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017198for as_dir in $PATH
17199do
17200 IFS=$as_save_IFS
17201 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017202 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17203 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017206 ;;
17207esac
17208# We did not find ourselves, most probably we were run as `sh COMMAND'
17209# in which case we are not to be found in the path.
17210if test "x$as_myself" = x; then
17211 as_myself=$0
17212fi
17213if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017214 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17215 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216fi
17217
Matthias Kloseb9621712010-04-24 17:59:49 +000017218# Unset variables that we do not need and which cause bugs (e.g. in
17219# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17220# suppresses any "Segmentation fault" message there. '((' could
17221# trigger a bug in pdksh 5.2.14.
17222for as_var in BASH_ENV ENV MAIL MAILPATH
17223do eval test x\${$as_var+set} = xset \
17224 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225done
17226PS1='$ '
17227PS2='> '
17228PS4='+ '
17229
17230# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017231LC_ALL=C
17232export LC_ALL
17233LANGUAGE=C
17234export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017235
Matthias Kloseb9621712010-04-24 17:59:49 +000017236# CDPATH.
17237(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17238
17239
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017240# as_fn_error STATUS ERROR [LINENO LOG_FD]
17241# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017242# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17243# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017245as_fn_error ()
17246{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017247 as_status=$1; test $as_status -eq 0 && as_status=1
17248 if test "$4"; then
17249 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17250 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017251 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017252 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017253 as_fn_exit $as_status
17254} # as_fn_error
17255
17256
17257# as_fn_set_status STATUS
17258# -----------------------
17259# Set $? to STATUS, without forking.
17260as_fn_set_status ()
17261{
17262 return $1
17263} # as_fn_set_status
17264
17265# as_fn_exit STATUS
17266# -----------------
17267# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17268as_fn_exit ()
17269{
17270 set +e
17271 as_fn_set_status $1
17272 exit $1
17273} # as_fn_exit
17274
17275# as_fn_unset VAR
17276# ---------------
17277# Portably unset VAR.
17278as_fn_unset ()
17279{
17280 { eval $1=; unset $1;}
17281}
17282as_unset=as_fn_unset
17283# as_fn_append VAR VALUE
17284# ----------------------
17285# Append the text in VALUE to the end of the definition contained in VAR. Take
17286# advantage of any shell optimizations that allow amortized linear growth over
17287# repeated appends, instead of the typical quadratic growth present in naive
17288# implementations.
17289if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17290 eval 'as_fn_append ()
17291 {
17292 eval $1+=\$2
17293 }'
17294else
17295 as_fn_append ()
17296 {
17297 eval $1=\$$1\$2
17298 }
17299fi # as_fn_append
17300
17301# as_fn_arith ARG...
17302# ------------------
17303# Perform arithmetic evaluation on the ARGs, and store the result in the
17304# global $as_val. Take advantage of shells that can avoid forks. The arguments
17305# must be portable across $(()) and expr.
17306if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17307 eval 'as_fn_arith ()
17308 {
17309 as_val=$(( $* ))
17310 }'
17311else
17312 as_fn_arith ()
17313 {
17314 as_val=`expr "$@" || test $? -eq 1`
17315 }
17316fi # as_fn_arith
17317
17318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017319if expr a : '\(a\)' >/dev/null 2>&1 &&
17320 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17321 as_expr=expr
17322else
17323 as_expr=false
17324fi
17325
17326if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17327 as_basename=basename
17328else
17329 as_basename=false
17330fi
17331
Matthias Kloseb9621712010-04-24 17:59:49 +000017332if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17333 as_dirname=dirname
17334else
17335 as_dirname=false
17336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338as_me=`$as_basename -- "$0" ||
17339$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17340 X"$0" : 'X\(//\)$' \| \
17341 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017342$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343 sed '/^.*\/\([^/][^/]*\)\/*$/{
17344 s//\1/
17345 q
17346 }
17347 /^X\/\(\/\/\)$/{
17348 s//\1/
17349 q
17350 }
17351 /^X\/\(\/\).*/{
17352 s//\1/
17353 q
17354 }
17355 s/.*/./; q'`
17356
Matthias Kloseb9621712010-04-24 17:59:49 +000017357# Avoid depending upon Character Ranges.
17358as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17359as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17360as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17361as_cr_digits='0123456789'
17362as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017363
17364ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017365case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017366-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017369 xy) ECHO_C='\c';;
17370 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17371 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 esac;;
17373*)
17374 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017375esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017376
Martin v. Löwis11437992002-04-12 09:54:03 +000017377rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378if test -d conf$$.dir; then
17379 rm -f conf$$.dir/conf$$.file
17380else
17381 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017384if (echo >conf$$.file) 2>/dev/null; then
17385 if ln -s conf$$.file conf$$ 2>/dev/null; then
17386 as_ln_s='ln -s'
17387 # ... but there are two gotchas:
17388 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17389 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017390 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017392 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017393 elif ln conf$$.file conf$$ 2>/dev/null; then
17394 as_ln_s=ln
17395 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017396 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017398else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017399 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017401rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17402rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017403
Matthias Kloseb9621712010-04-24 17:59:49 +000017404
17405# as_fn_mkdir_p
17406# -------------
17407# Create "$as_dir" as a directory, including parents if necessary.
17408as_fn_mkdir_p ()
17409{
17410
17411 case $as_dir in #(
17412 -*) as_dir=./$as_dir;;
17413 esac
17414 test -d "$as_dir" || eval $as_mkdir_p || {
17415 as_dirs=
17416 while :; do
17417 case $as_dir in #(
17418 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17419 *) as_qdir=$as_dir;;
17420 esac
17421 as_dirs="'$as_qdir' $as_dirs"
17422 as_dir=`$as_dirname -- "$as_dir" ||
17423$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17424 X"$as_dir" : 'X\(//\)[^/]' \| \
17425 X"$as_dir" : 'X\(//\)$' \| \
17426 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17427$as_echo X"$as_dir" |
17428 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17429 s//\1/
17430 q
17431 }
17432 /^X\(\/\/\)[^/].*/{
17433 s//\1/
17434 q
17435 }
17436 /^X\(\/\/\)$/{
17437 s//\1/
17438 q
17439 }
17440 /^X\(\/\).*/{
17441 s//\1/
17442 q
17443 }
17444 s/.*/./; q'`
17445 test -d "$as_dir" && break
17446 done
17447 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017448 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017449
17450
17451} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017452if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017453 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017454else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017455 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017456 as_mkdir_p=false
17457fi
17458
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017459
17460# as_fn_executable_p FILE
17461# -----------------------
17462# Test if FILE is an executable regular file.
17463as_fn_executable_p ()
17464{
17465 test -f "$1" && test -x "$1"
17466} # as_fn_executable_p
17467as_test_x='test -x'
17468as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017469
17470# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017471as_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 +000017472
17473# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017474as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017475
17476
Martin v. Löwis11437992002-04-12 09:54:03 +000017477exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017478## ----------------------------------- ##
17479## Main body of $CONFIG_STATUS script. ##
17480## ----------------------------------- ##
17481_ASEOF
17482test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483
Matthias Kloseb9621712010-04-24 17:59:49 +000017484cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17485# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017486# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487# values after options handling.
17488ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017489This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017490generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017491
17492 CONFIG_FILES = $CONFIG_FILES
17493 CONFIG_HEADERS = $CONFIG_HEADERS
17494 CONFIG_LINKS = $CONFIG_LINKS
17495 CONFIG_COMMANDS = $CONFIG_COMMANDS
17496 $ $0 $@
17497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498on `(hostname || uname -n) 2>/dev/null | sed 1q`
17499"
17500
Martin v. Löwis11437992002-04-12 09:54:03 +000017501_ACEOF
17502
Matthias Kloseb9621712010-04-24 17:59:49 +000017503case $ac_config_files in *"
17504"*) set x $ac_config_files; shift; ac_config_files=$*;;
17505esac
17506
17507case $ac_config_headers in *"
17508"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17509esac
17510
17511
17512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017513# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017514config_files="$ac_config_files"
17515config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017518
Matthias Kloseb9621712010-04-24 17:59:49 +000017519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017520ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017521\`$as_me' instantiates files and other configuration actions
17522from templates according to the current configuration. Unless the files
17523and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017524
Matthias Kloseb9621712010-04-24 17:59:49 +000017525Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017526
17527 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017529 --config print configuration, then exit
17530 -q, --quiet, --silent
17531 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 -d, --debug don't remove temporary files
17533 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 --file=FILE[:TEMPLATE]
17535 instantiate the configuration file FILE
17536 --header=FILE[:TEMPLATE]
17537 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017538
17539Configuration files:
17540$config_files
17541
17542Configuration headers:
17543$config_headers
17544
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017545Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017548cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17549ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017550ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017551python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017552configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017553 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017554
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017555Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017556This config.status script is free software; the Free Software Foundation
17557gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558
17559ac_pwd='$ac_pwd'
17560srcdir='$srcdir'
17561INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017562MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017563test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017564_ACEOF
17565
Matthias Kloseb9621712010-04-24 17:59:49 +000017566cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17567# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017568ac_need_defaults=:
17569while test $# != 0
17570do
17571 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017572 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017573 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17574 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017575 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017577 --*=)
17578 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17579 ac_optarg=
17580 ac_shift=:
17581 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017583 ac_option=$1
17584 ac_optarg=$2
17585 ac_shift=shift
17586 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 esac
17588
Skip Montanaro6dead952003-09-25 14:50:04 +000017589 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017590 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017591 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17592 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017593 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017594 $as_echo "$ac_cs_version"; exit ;;
17595 --config | --confi | --conf | --con | --co | --c )
17596 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017598 debug=: ;;
17599 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017600 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017601 case $ac_optarg in
17602 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017603 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017604 esac
17605 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 ac_need_defaults=false;;
17607 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017608 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017609 case $ac_optarg in
17610 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17611 esac
17612 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017613 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017614 --he | --h)
17615 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017616 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017617Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017619 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017620 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17621 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17622 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017623
17624 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017625 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017626Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017627
Matthias Kloseb9621712010-04-24 17:59:49 +000017628 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017630
17631 esac
17632 shift
17633done
17634
Skip Montanaro6dead952003-09-25 14:50:04 +000017635ac_configure_extra_args=
17636
17637if $ac_cs_silent; then
17638 exec 6>/dev/null
17639 ac_configure_extra_args="$ac_configure_extra_args --silent"
17640fi
17641
17642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017643cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017644if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017645 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017646 shift
17647 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17648 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017650 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017651fi
17652
Martin v. Löwis11437992002-04-12 09:54:03 +000017653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655exec 5>>config.log
17656{
17657 echo
17658 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17659## Running $as_me. ##
17660_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017661 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017665cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017667
Matthias Kloseb9621712010-04-24 17:59:49 +000017668cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669
17670# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017671for ac_config_target in $ac_config_targets
17672do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 case $ac_config_target in
17674 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17675 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17676 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017677 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17678 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017680 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017681 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017682 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017685 esac
17686done
17687
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017688
Martin v. Löwis11437992002-04-12 09:54:03 +000017689# If the user did not use the arguments to specify the items to instantiate,
17690# then the envvar interface is used. Set only those that are not.
17691# We use the long form for the default assignment because of an extremely
17692# bizarre bug on SunOS 4.1.3.
17693if $ac_need_defaults; then
17694 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17695 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17696fi
17697
Skip Montanaro6dead952003-09-25 14:50:04 +000017698# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017699# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017700# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701# Hook for its removal unless debugging.
17702# Note that there is a small window in which the directory will not be cleaned:
17703# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017704$debug ||
17705{
Victor Stinnere0be4232011-10-25 13:06:09 +020017706 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 : "${ac_tmp:=$tmp}"
17709 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017712}
Martin v. Löwis11437992002-04-12 09:54:03 +000017713# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017714
Martin v. Löwis11437992002-04-12 09:54:03 +000017715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017717 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017718} ||
17719{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017720 tmp=./conf$$-$RANDOM
17721 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017722} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017723ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017724
Matthias Kloseb9621712010-04-24 17:59:49 +000017725# Set up the scripts for CONFIG_FILES section.
17726# No need to generate them if there are no CONFIG_FILES.
17727# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017729
Matthias Kloseb9621712010-04-24 17:59:49 +000017730
17731ac_cr=`echo X | tr X '\015'`
17732# On cygwin, bash can eat \r inside `` if the user requested igncr.
17733# But we know of no other shell where ac_cr would be empty at this
17734# point, so we can use a bashism as a fallback.
17735if test "x$ac_cr" = x; then
17736 eval ac_cr=\$\'\\r\'
17737fi
17738ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17739if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017740 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017741else
17742 ac_cs_awk_cr=$ac_cr
17743fi
17744
Victor Stinnere0be4232011-10-25 13:06:09 +020017745echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017746_ACEOF
17747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017748
Matthias Kloseb9621712010-04-24 17:59:49 +000017749{
17750 echo "cat >conf$$subs.awk <<_ACEOF" &&
17751 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17752 echo "_ACEOF"
17753} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017754 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17755ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017756ac_delim='%!_!# '
17757for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017760
Matthias Kloseb9621712010-04-24 17:59:49 +000017761 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17762 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017763 break
17764 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017765 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017766 else
17767 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017769done
Matthias Kloseb9621712010-04-24 17:59:49 +000017770rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771
Matthias Kloseb9621712010-04-24 17:59:49 +000017772cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017773cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017775sed -n '
17776h
17777s/^/S["/; s/!.*/"]=/
17778p
17779g
17780s/^[^!]*!//
17781:repl
17782t repl
17783s/'"$ac_delim"'$//
17784t delim
17785:nl
17786h
17787s/\(.\{148\}\)..*/\1/
17788t more1
17789s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17790p
17791n
17792b repl
17793:more1
17794s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17795p
17796g
17797s/.\{148\}//
17798t nl
17799:delim
17800h
17801s/\(.\{148\}\)..*/\1/
17802t more2
17803s/["\\]/\\&/g; s/^/"/; s/$/"/
17804p
17805b
17806:more2
17807s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17808p
17809g
17810s/.\{148\}//
17811t delim
17812' <conf$$subs.awk | sed '
17813/^[^""]/{
17814 N
17815 s/\n//
17816}
17817' >>$CONFIG_STATUS || ac_write_fail=1
17818rm -f conf$$subs.awk
17819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17820_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017821cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 for (key in S) S_is_set[key] = 1
17823 FS = ""
17824
17825}
17826{
17827 line = $ 0
17828 nfields = split(line, field, "@")
17829 substed = 0
17830 len = length(field[1])
17831 for (i = 2; i < nfields; i++) {
17832 key = field[i]
17833 keylen = length(key)
17834 if (S_is_set[key]) {
17835 value = S[key]
17836 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17837 len += length(value) + length(field[++i])
17838 substed = 1
17839 } else
17840 len += 1 + keylen
17841 }
17842
17843 print line
17844}
17845
17846_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17849if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17850 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17851else
17852 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017853fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017854 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017855_ACEOF
17856
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017857# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17858# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859# trailing colons and then remove the whole line if VPATH becomes empty
17860# (actually we leave an empty line to preserve line numbers).
17861if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017862 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17863h
17864s///
17865s/^/:/
17866s/[ ]*$/:/
17867s/:\$(srcdir):/:/g
17868s/:\${srcdir}:/:/g
17869s/:@srcdir@:/:/g
17870s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017871s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017872x
17873s/\(=[ ]*\).*/\1/
17874G
17875s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017876s/^[^=]*=[ ]*$//
17877}'
17878fi
17879
Matthias Kloseb9621712010-04-24 17:59:49 +000017880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017881fi # test -n "$CONFIG_FILES"
17882
Matthias Kloseb9621712010-04-24 17:59:49 +000017883# Set up the scripts for CONFIG_HEADERS section.
17884# No need to generate them if there are no CONFIG_HEADERS.
17885# This happens for instance with `./config.status Makefile'.
17886if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017887cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017888BEGIN {
17889_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890
Matthias Kloseb9621712010-04-24 17:59:49 +000017891# Transform confdefs.h into an awk script `defines.awk', embedded as
17892# here-document in config.status, that substitutes the proper values into
17893# config.h.in to produce config.h.
17894
17895# Create a delimiter string that does not exist in confdefs.h, to ease
17896# handling of long lines.
17897ac_delim='%!_!# '
17898for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017899 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17900 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017901 break
17902 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017903 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017904 else
17905 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17906 fi
17907done
17908
17909# For the awk script, D is an array of macro values keyed by name,
17910# likewise P contains macro parameters if any. Preserve backslash
17911# newline sequences.
17912
17913ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17914sed -n '
17915s/.\{148\}/&'"$ac_delim"'/g
17916t rset
17917:rset
17918s/^[ ]*#[ ]*define[ ][ ]*/ /
17919t def
17920d
17921:def
17922s/\\$//
17923t bsnl
17924s/["\\]/\\&/g
17925s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17926D["\1"]=" \3"/p
17927s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17928d
17929:bsnl
17930s/["\\]/\\&/g
17931s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17932D["\1"]=" \3\\\\\\n"\\/p
17933t cont
17934s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17935t cont
17936d
17937:cont
17938n
17939s/.\{148\}/&'"$ac_delim"'/g
17940t clear
17941:clear
17942s/\\$//
17943t bsnlc
17944s/["\\]/\\&/g; s/^/"/; s/$/"/p
17945d
17946:bsnlc
17947s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17948b cont
17949' <confdefs.h | sed '
17950s/'"$ac_delim"'/"\\\
17951"/g' >>$CONFIG_STATUS || ac_write_fail=1
17952
17953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17954 for (key in D) D_is_set[key] = 1
17955 FS = ""
17956}
17957/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17958 line = \$ 0
17959 split(line, arg, " ")
17960 if (arg[1] == "#") {
17961 defundef = arg[2]
17962 mac1 = arg[3]
17963 } else {
17964 defundef = substr(arg[1], 2)
17965 mac1 = arg[2]
17966 }
17967 split(mac1, mac2, "(") #)
17968 macro = mac2[1]
17969 prefix = substr(line, 1, index(line, defundef) - 1)
17970 if (D_is_set[macro]) {
17971 # Preserve the white space surrounding the "#".
17972 print prefix "define", macro P[macro] D[macro]
17973 next
17974 } else {
17975 # Replace #undef with comments. This is necessary, for example,
17976 # in the case of _POSIX_SOURCE, which is predefined and required
17977 # on some systems where configure will not decide to define it.
17978 if (defundef == "undef") {
17979 print "/*", prefix defundef, macro, "*/"
17980 next
17981 }
17982 }
17983}
17984{ print }
17985_ACAWK
17986_ACEOF
17987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017988 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017989fi # test -n "$CONFIG_HEADERS"
17990
17991
17992eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17993shift
17994for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995do
17996 case $ac_tag in
17997 :[FHLC]) ac_mode=$ac_tag; continue;;
17998 esac
17999 case $ac_mode$ac_tag in
18000 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018001 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002 :[FH]-) ac_tag=-:-;;
18003 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18004 esac
18005 ac_save_IFS=$IFS
18006 IFS=:
18007 set x $ac_tag
18008 IFS=$ac_save_IFS
18009 shift
18010 ac_file=$1
18011 shift
18012
18013 case $ac_mode in
18014 :L) ac_source=$1;;
18015 :[FH])
18016 ac_file_inputs=
18017 for ac_f
18018 do
18019 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018020 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021 *) # Look for the file first in the build tree, then in the source tree
18022 # (if the path is not absolute). The absolute path cannot be DOS-style,
18023 # because $ac_f cannot contain `:'.
18024 test -f "$ac_f" ||
18025 case $ac_f in
18026 [\\/$]*) false;;
18027 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18028 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018029 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018030 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018031 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18032 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018033 done
18034
18035 # Let's still pretend it is `configure' which instantiates (i.e., don't
18036 # use $as_me), people would be surprised to read:
18037 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018038 configure_input='Generated from '`
18039 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18040 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018041 if test x"$ac_file" != x-; then
18042 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018043 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18044$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018046 # Neutralize special characters interpreted by sed in replacement strings.
18047 case $configure_input in #(
18048 *\&* | *\|* | *\\* )
18049 ac_sed_conf_input=`$as_echo "$configure_input" |
18050 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18051 *) ac_sed_conf_input=$configure_input;;
18052 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018053
18054 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018055 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18056 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057 esac
18058 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018059 esac
18060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018062$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018063 X"$ac_file" : 'X\(//\)[^/]' \| \
18064 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018066$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18068 s//\1/
18069 q
18070 }
18071 /^X\(\/\/\)[^/].*/{
18072 s//\1/
18073 q
18074 }
18075 /^X\(\/\/\)$/{
18076 s//\1/
18077 q
18078 }
18079 /^X\(\/\).*/{
18080 s//\1/
18081 q
18082 }
18083 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018084 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018085 ac_builddir=.
18086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018087case "$ac_dir" in
18088.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18089*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018090 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018092 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018093 case $ac_top_builddir_sub in
18094 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18095 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18096 esac ;;
18097esac
18098ac_abs_top_builddir=$ac_pwd
18099ac_abs_builddir=$ac_pwd$ac_dir_suffix
18100# for backward compatibility:
18101ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018102
18103case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018105 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018106 ac_top_srcdir=$ac_top_builddir_sub
18107 ac_abs_top_srcdir=$ac_pwd ;;
18108 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018109 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 ac_top_srcdir=$srcdir
18111 ac_abs_top_srcdir=$srcdir ;;
18112 *) # Relative name.
18113 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18114 ac_top_srcdir=$ac_top_build_prefix$srcdir
18115 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018116esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018118
Martin v. Löwis11437992002-04-12 09:54:03 +000018119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018120 case $ac_mode in
18121 :F)
18122 #
18123 # CONFIG_FILE
18124 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018125
18126 case $INSTALL in
18127 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018128 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018129 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018130 ac_MKDIR_P=$MKDIR_P
18131 case $MKDIR_P in
18132 [\\/$]* | ?:[\\/]* ) ;;
18133 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18134 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018135_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136
Matthias Kloseb9621712010-04-24 17:59:49 +000018137cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018138# If the template does not know about datarootdir, expand it.
18139# FIXME: This hack should be removed a few years after 2.60.
18140ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018141ac_sed_dataroot='
18142/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018143 p
18144 q
18145}
18146/@datadir@/p
18147/@docdir@/p
18148/@infodir@/p
18149/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018150/@mandir@/p'
18151case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152*datarootdir*) ac_datarootdir_seen=yes;;
18153*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18155$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018157cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158 ac_datarootdir_hack='
18159 s&@datadir@&$datadir&g
18160 s&@docdir@&$docdir&g
18161 s&@infodir@&$infodir&g
18162 s&@localedir@&$localedir&g
18163 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018164 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018165esac
18166_ACEOF
18167
18168# Neutralize VPATH when `$srcdir' = `.'.
18169# Shell code in configure.ac might set extrasub.
18170# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18172ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018173$extrasub
18174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018175cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018176:t
18177/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018178s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018179s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018180s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018181s&@srcdir@&$ac_srcdir&;t t
18182s&@abs_srcdir@&$ac_abs_srcdir&;t t
18183s&@top_srcdir@&$ac_top_srcdir&;t t
18184s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18185s&@builddir@&$ac_builddir&;t t
18186s&@abs_builddir@&$ac_abs_builddir&;t t
18187s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18188s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018189s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018190$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018191"
Victor Stinnere0be4232011-10-25 13:06:09 +020018192eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18193 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018196 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18197 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18198 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018199 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018200which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018201$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018202which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018203
Victor Stinnere0be4232011-10-25 13:06:09 +020018204 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018205 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018206 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18207 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018208 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018209 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210 ;;
18211 :H)
18212 #
18213 # CONFIG_HEADER
18214 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 {
18217 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018218 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18219 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018220 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018221 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018222 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18223$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018224 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018225 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018226 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018227 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018228 fi
18229 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018230 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018231 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018232 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018233 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018236
18237 esac
18238
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018239
18240 case $ac_file$ac_mode in
18241 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18242
18243 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018244done # for ac_tag
18245
Guido van Rossum627b2d71993-12-24 10:39:16 +000018246
Matthias Kloseb9621712010-04-24 17:59:49 +000018247as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018248_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018249ac_clean_files=$ac_clean_files_save
18250
Matthias Kloseb9621712010-04-24 17:59:49 +000018251test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018252 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018253
Martin v. Löwis11437992002-04-12 09:54:03 +000018254
18255# configure is writing to config.log, and then calls config.status.
18256# config.status does its own redirection, appending to config.log.
18257# Unfortunately, on DOS this fails, as config.log is still kept open
18258# by configure, so config.status won't be able to write to it; its
18259# output is simply discarded. So we exec the FD to /dev/null,
18260# effectively closing config.log, so it can be properly (re)opened and
18261# appended to by config.status. When coming back to configure, we
18262# need to make the FD available again.
18263if test "$no_create" != yes; then
18264 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018265 ac_config_status_args=
18266 test "$silent" = yes &&
18267 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018269 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018270 exec 5>>config.log
18271 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18272 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018273 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018274fi
18275if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18276 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18277$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018278fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018279
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018280
Christian Heimes75ed8902013-11-20 01:11:18 +010018281echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018282if test ! -f Modules/Setup.local
18283then
18284 echo "# Edit this file for local setup changes" >Modules/Setup.local
18285fi
18286
Christian Heimes75ed8902013-11-20 01:11:18 +010018287echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018288$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018289 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018290 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018291mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018292
18293if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18294 echo "" >&6
18295 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018296 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 +000018297 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018298 echo "" >&6
18299 echo "" >&6
18300fi
18301