blob: fcfa71496e405899fe57e159c8a10006466ccd2a [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
stratakiscf10a752018-12-19 18:19:01 +0100669LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200681LLVM_AR_FOUND
682target_os
683target_vendor
684target_cpu
685target
686LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
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
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001399\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001465 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001503 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001504 --with-lto Enable Link Time Optimization in any build. Disabled
1505 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001509 enable AddressSanitizer (asan)
1510 --with-memory-sanitizer enable MemorySanitizer (msan)
1511 --with-undefined-behavior-sanitizer
1512 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001514 --with-system-expat build pyexpat module using an installed expat
1515 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001516 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001517 --with-system-libmpdec build _decimal module using an installed libmpdec
1518 library
Ned Deilyd819b932013-09-06 01:07:05 -07001519 --with-tcltk-includes='-I...'
1520 override search for Tcl and Tk include files
1521 --with-tcltk-libs='-L...'
1522 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001523 --with-dbmliborder=db1:db2:...
1524 order to check db backends for dbm. Valid value is a
1525 colon separated string with the backend names
1526 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-doc-strings disable/enable documentation strings
1528 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001529 --with(out)-c-locale-coercion
1530 disable/enable C locale coercion to a UTF-8 based
1531 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001533 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001541 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001542 --with-ssl-default-suites=[python|openssl|STRING]
1543 Override default cipher suites string, python: use
1544 Python's preferred selection (default), openssl:
1545 leave OpenSSL's defaults untouched, STRING: use a
1546 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001547
1548Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001549 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CC C compiler command
1551 CFLAGS C compiler flags
1552 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1553 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001558 PKG_CONFIG path to pkg-config utility
1559 PKG_CONFIG_PATH
1560 directories to add to pkg-config's search path
1561 PKG_CONFIG_LIBDIR
1562 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001567Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 test -d "$ac_dir" ||
1576 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 ac_builddir=.
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 case $ac_top_builddir_sub in
1587 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589 esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001595
1596case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$ac_top_builddir_sub
1600 ac_abs_top_srcdir=$ac_pwd ;;
1601 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$srcdir
1604 ac_abs_top_srcdir=$srcdir ;;
1605 *) # Relative name.
1606 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607 ac_top_srcdir=$ac_top_build_prefix$srcdir
1608 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001609esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 cd "$ac_dir" || { ac_status=$?; continue; }
1613 # Check for guested configure.
1614 if test -f "$ac_srcdir/configure.gnu"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617 elif test -f "$ac_srcdir/configure"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 fi || ac_status=$?
1623 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 done
1625fi
1626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if $ac_init_version; then
1629 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001630python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001631generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 rm -f conftest.$ac_objext
1651 if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_compile") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666 test $ac_status = 0; } && {
1667 test -z "$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 } && test -s conftest.$ac_objext; then :
1670 ac_retval=0
1671else
1672 $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675 ac_retval=1
1676fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } > conftest.i && {
1704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
1714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
Matthias Kloseb9621712010-04-24 17:59:49 +00001719# ac_fn_c_try_link LINENO
1720# -----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_link ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 rm -f conftest.$ac_objext conftest$ac_exeext
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_link") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
1740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
1744 } && test -s conftest$ac_exeext && {
1745 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001746 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1756 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1757 # interfere with the next link command; also delete a directory that is
1758 # left behind by Apple's compiler. We do this before executing the actions.
1759 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_link
1764
Matthias Kloseb9621712010-04-24 17:59:49 +00001765# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1766# -------------------------------------------------------
1767# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1768# the include files in INCLUDES and setting the cache variable VAR
1769# accordingly.
1770ac_fn_c_check_header_mongrel ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001776if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 $as_echo_n "(cached) " >&6
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782else
1783 # Is the header compilable?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1785$as_echo_n "checking $2 usability... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788$4
1789#include <$2>
1790_ACEOF
1791if ac_fn_c_try_compile "$LINENO"; then :
1792 ac_header_compiler=yes
1793else
1794 ac_header_compiler=no
1795fi
1796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1798$as_echo "$ac_header_compiler" >&6; }
1799
1800# Is the header present?
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1802$as_echo_n "checking $2 presence... " >&6; }
1803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1804/* end confdefs.h. */
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_cpp "$LINENO"; then :
1808 ac_header_preproc=yes
1809else
1810 ac_header_preproc=no
1811fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001812rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1814$as_echo "$ac_header_preproc" >&6; }
1815
1816# So? What about this header?
1817case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1818 yes:no: )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1820$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1822$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1823 ;;
1824 no:yes:* )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1826$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1828$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1830$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1832$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001835( $as_echo "## --------------------------------------- ##
1836## Report this to https://bugs.python.org/ ##
1837## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 ) | sed "s/^/$as_me: WARNING: /" >&2
1839 ;;
1840esac
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001843if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 eval "$3=\$ac_header_compiler"
1847fi
1848eval ac_res=\$$3
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850$as_echo "$ac_res" >&6; }
1851fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001853
1854} # ac_fn_c_check_header_mongrel
1855
1856# ac_fn_c_try_run LINENO
1857# ----------------------
1858# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1859# that executables *can* be run.
1860ac_fn_c_try_run ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if { { ac_try="$ac_link"
1864case "(($ac_try" in
1865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866 *) ac_try_echo=$ac_try;;
1867esac
1868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869$as_echo "$ac_try_echo"; } >&5
1870 (eval "$ac_link") 2>&5
1871 ac_status=$?
1872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1873 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1874 { { case "(($ac_try" in
1875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876 *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880 (eval "$ac_try") 2>&5
1881 ac_status=$?
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; }; }; then :
1884 ac_retval=0
1885else
1886 $as_echo "$as_me: program exited with status $ac_status" >&5
1887 $as_echo "$as_me: failed program was:" >&5
1888sed 's/^/| /' conftest.$ac_ext >&5
1889
1890 ac_retval=$ac_status
1891fi
1892 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894 as_fn_set_status $ac_retval
1895
1896} # ac_fn_c_try_run
1897
1898# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1899# -------------------------------------------------------
1900# Tests whether HEADER exists and can be compiled using the include files in
1901# INCLUDES, setting the cache variable VAR accordingly.
1902ac_fn_c_check_header_compile ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913#include <$2>
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 eval "$3=yes"
1917else
1918 eval "$3=no"
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_check_header_compile
1928
Matthias Kloseb9621712010-04-24 17:59:49 +00001929# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1930# -------------------------------------------
1931# Tests whether TYPE exists after having included INCLUDES, setting cache
1932# variable VAR accordingly.
1933ac_fn_c_check_type ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof ($2))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof (($2)))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 eval "$3=yes"
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976eval ac_res=\$$3
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1978$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981} # ac_fn_c_check_type
1982
Matthias Kloseb9621712010-04-24 17:59:49 +00001983# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1984# --------------------------------------------
1985# Tries to find the compile-time value of EXPR in a program that includes
1986# INCLUDES, setting VAR accordingly. Returns whether the value could be
1987# computed
1988ac_fn_c_compute_int ()
1989{
1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991 if test "$cross_compiling" = yes; then
1992 # Depending upon the size, compute the lo and hi bounds.
1993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$4
1996int
1997main ()
1998{
1999static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002000test_array [0] = 0;
2001return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_lo=0 ac_mid=0
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002017test_array [0] = 0;
2018return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_hi=$ac_mid; break
2026else
2027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2028 if test $ac_lo -le $ac_mid; then
2029 ac_lo= ac_hi=
2030 break
2031 fi
2032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 done
2036else
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002174if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002229 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002230
2231} # ac_fn_c_check_func
2232
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2234# ---------------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2236# accordingly.
2237ac_fn_c_check_decl ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 as_decl_name=`echo $2|sed 's/ *(.*//'`
2241 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval \${$3+:} false; then :
2245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253#ifndef $as_decl_name
2254#ifdef __cplusplus
2255 (void) $as_decl_use;
2256#else
2257 (void) $as_decl_name;
2258#endif
2259#endif
2260
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
2275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276
2277} # ac_fn_c_check_decl
2278
Matthias Kloseb9621712010-04-24 17:59:49 +00002279# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2280# ----------------------------------------------------
2281# Tries to find if the field MEMBER exists in type AGGR, after including
2282# INCLUDES, setting cache variable VAR accordingly.
2283ac_fn_c_check_member ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2287$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002288if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002289 $as_echo_n "(cached) " >&6
2290else
2291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h. */
2293$5
2294int
2295main ()
2296{
2297static $2 ac_aggr;
2298if (ac_aggr.$3)
2299return 0;
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_compile "$LINENO"; then :
2305 eval "$4=yes"
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (sizeof ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 eval "$4=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$4
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002333
2334} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
Ned Deily5489bda2018-01-31 17:44:09 -05002339It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002340generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
2342 $ $0 $@
2343
2344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2360
2361/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2362/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002365/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2366/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2367/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo "PATH: $as_dir"
2377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_configure_args0=
2399ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_must_keep_next=false
2401for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002402do
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 for ac_arg
2404 do
2405 case $ac_arg in
2406 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408 | -silent | --silent | --silen | --sile | --sil)
2409 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 esac
2413 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 case $ac_arg in
2421 *=* | --config-cache | -C | -disable-* | --disable-* \
2422 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424 | -with-* | --with-* | -without-* | --without-* | --x)
2425 case "$ac_configure_args0 " in
2426 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427 esac
2428 ;;
2429 -* ) ac_must_keep_next=true ;;
2430 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 ;;
2434 esac
2435 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002436done
Matthias Kloseb9621712010-04-24 17:59:49 +00002437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log. We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# 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 +00002445trap 'exit_status=$?
2446 # Save into config.log some information that might help in debugging.
2447 {
2448 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002449
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002450 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002487## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 echo
2490 for ac_var in $ac_subst_vars
2491 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 eval ac_val=\$$ac_var
2493 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 done | sort
2498 echo
2499
2500 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_files
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514 fi
2515
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 # We do not want a PATH search for config.site.
2575 case $CONFIG_SITE in #((
2576 -*) ac_site_file1=./$CONFIG_SITE;;
2577 */*) ac_site_file1=$CONFIG_SITE;;
2578 *) ac_site_file1=./$CONFIG_SITE;;
2579 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$prefix/share/config.site
2582 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583else
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$ac_default_prefix/share/config.site
2585 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588do
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 test "x$ac_site_file" = xNONE && continue
2590 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 . "$ac_site_file" \
2595 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2597as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002598See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600done
2601
2602if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 # Some versions of bash will fail to source /dev/null (special files
2604 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2605 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 esac
2612 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_old_set,$ac_new_set in
2628 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$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 +00002631 ac_cache_corrupted=: ;;
2632 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679
Guido van Rossum7f43da71994-08-01 12:15:30 +00002680ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
Trent Nelson4d4ec652012-10-16 08:51:24 -04002688
Christian Heimesff5be6e2018-01-20 13:19:21 +01002689
2690
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002691if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692 # If we're building out-of-tree, we need to make sure the following
2693 # resources get picked up before their $srcdir counterparts.
2694 # Objects/ -> typeslots.inc
2695 # Include/ -> Python-ast.h, graminit.h
2696 # Python/ -> importlib.h
2697 # (A side effect of this is that these resources will automatically be
2698 # regenerated when building out-of-tree, regardless of whether or not
2699 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2700 # off.)
2701 BASECPPFLAGS="-IObjects -IInclude -IPython"
2702else
2703 BASECPPFLAGS=""
2704fi
2705
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706
2707
2708
2709
Victor Stinner9ed34a82017-05-02 22:35:58 +02002710if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712# Extract the first word of "git", so it can be a program name with args.
2713set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo_n "(cached) " >&6
2718else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719 if test -n "$HAS_GIT"; then
2720 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
2727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2731 break 2
2732 fi
2733done
2734 done
2735IFS=$as_save_IFS
2736
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738fi
2739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=$ac_cv_prog_HAS_GIT
2741if test -n "$HAS_GIT"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2743$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746$as_echo "no" >&6; }
2747fi
2748
2749
2750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Xiang Zhang4c855572018-08-20 22:36:19 +08002755 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2756 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2757 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITVERSION=""
2760 GITTAG=""
2761 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762fi
2763
2764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002766
2767
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002768ac_aux_dir=
2769for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2770 if test -f "$ac_dir/install-sh"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/install-sh -c"
2773 break
2774 elif test -f "$ac_dir/install.sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install.sh -c"
2777 break
2778 elif test -f "$ac_dir/shtool"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/shtool install -c"
2781 break
2782 fi
2783done
2784if test -z "$ac_aux_dir"; then
2785 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2786fi
2787
2788# These three variables are undocumented and unsupported,
2789# and are intended to be withdrawn in a future Autoconf release.
2790# They can cause serious problems if a builder's source tree is in a directory
2791# whose full name contains unusual characters.
2792ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2793ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2794ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2795
2796
2797# Make sure we can run config.sub.
2798$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2799 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2800
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2802$as_echo_n "checking build system type... " >&6; }
2803if ${ac_cv_build+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805else
2806 ac_build_alias=$build_alias
2807test "x$ac_build_alias" = x &&
2808 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2809test "x$ac_build_alias" = x &&
2810 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2811ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2812 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2816$as_echo "$ac_cv_build" >&6; }
2817case $ac_cv_build in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2820esac
2821build=$ac_cv_build
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_build
2824shift
2825build_cpu=$1
2826build_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830build_os=$*
2831IFS=$ac_save_IFS
2832case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2836$as_echo_n "checking host system type... " >&6; }
2837if ${ac_cv_host+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 if test "x$host_alias" = x; then
2841 ac_cv_host=$ac_cv_build
2842else
2843 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2845fi
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2849$as_echo "$ac_cv_host" >&6; }
2850case $ac_cv_host in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2853esac
2854host=$ac_cv_host
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_host
2857shift
2858host_cpu=$1
2859host_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863host_os=$*
2864IFS=$ac_save_IFS
2865case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2866
2867
2868
doko@python.orga10e4a92013-01-25 18:45:12 +01002869
2870
Ned Deilyfcbc2462014-08-22 13:32:49 -07002871# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2872rm -f pybuilddir.txt
2873
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874for ac_prog in python$PACKAGE_VERSION python3 python
2875do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877set dummy $ac_prog; ac_word=$2
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo_n "(cached) " >&6
2882else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883 if test -n "$PYTHON_FOR_REGEN"; then
2884 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885else
2886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887for as_dir in $PATH
2888do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
2898 done
2899IFS=$as_save_IFS
2900
2901fi
2902fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2904if test -n "$PYTHON_FOR_REGEN"; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2906$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909$as_echo "no" >&6; }
2910fi
2911
2912
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
2918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python3 python; do
2924 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002925 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 +02002926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002935 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 +02002936 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002937elif test "$cross_compiling" = maybe; then
2938 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939else
2940 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily5489bda2018-01-31 17:44:09 -05002959VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002986# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
2991
2992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002993define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002995# Arguments passed to configure.
2996
2997CONFIG_ARGS="$ac_configure_args"
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3000$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003002if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 case $enableval in
3005 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003006 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # information
3008 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003009 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3012 if test ! -d "${enableval}"
3013 then
3014 enableval=/
3015 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
3019 case $enableval in
3020 no)
3021 UNIVERSALSDK=
3022 enable_universalsdk=
3023 ;;
3024 *)
3025 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 if test ! -d "${UNIVERSALSDK}"
3027 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003028 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034else
3035
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041if test -n "${UNIVERSALSDK}"
3042then
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3044$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045else
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deily87adb6e2013-10-18 21:09:56 -07003052ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054# For backward compatibility reasons we prefer to select '32-bit' if available,
3055# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057if test "`uname -s`" = "Darwin"
3058then
3059 if test -n "${UNIVERSALSDK}"
3060 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062 then
3063 UNIVERSAL_ARCHS="intel"
3064 fi
3065 fi
3066fi
3067
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3070$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071
3072# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 UNIVERSAL_ARCHS="$withval"
3076
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077fi
3078
Ned Deily87adb6e2013-10-18 21:09:56 -07003079if test -n "${UNIVERSALSDK}"
3080then
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3082$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3083else
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
3086fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088
3089# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091 withval=$with_framework_name;
3092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003121 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE" ; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
3146 case "${enableval}" in
3147 /System*)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 if test "${prefix}" = "NONE" ; then
3150 # See below
3151 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3152 fi
3153 ;;
3154
3155 /Library*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 ;;
3158
3159 */Library/Frameworks)
3160 MDIR="`dirname "${enableval}"`"
3161 MDIR="`dirname "${MDIR}"`"
3162 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3163
3164 if test "${prefix}" = "NONE"; then
3165 # User hasn't specified the
3166 # --prefix option, but wants to install
3167 # the framework in a non-default location,
3168 # ensure that the compatibility links get
3169 # installed relative to that prefix as well
3170 # instead of in /usr/local.
3171 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3172 fi
3173 ;;
3174
3175 *)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178 esac
3179
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003204 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213fi
3214
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222
3223
3224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Ned Deilyb8f944f2013-11-21 22:42:25 -08003227
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228
3229cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003230#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231_ACEOF
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003259 *-*-vxworks*)
3260 ac_sys_system=VxWorks
3261 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003287 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289fi
Guido van Rossum91922671997-10-09 20:24:13 +00003290
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003291
3292if test "$cross_compiling" = yes; then
3293 case "$host" in
3294 *-*-linux*)
3295 case "$host_cpu" in
3296 arm*)
3297 _host_cpu=arm
3298 ;;
3299 *)
3300 _host_cpu=$host_cpu
3301 esac
3302 ;;
3303 *-*-cygwin*)
3304 _host_cpu=
3305 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003306 *-*-vxworks*)
3307 _host_cpu=$host_cpu
3308 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003309 *)
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 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003396 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3397 # in network headers still using system V types.
3398 VxWorks/*)
3399 define_xopen_source=no
3400 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003401
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003402esac
3403
3404if test $define_xopen_source = yes
3405then
Victor Stinner14d098d2011-09-07 22:29:43 +02003406 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
Victor Stinner14d098d2011-09-07 22:29:43 +02003408$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003409
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
3411 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3412 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3413 # several APIs are not declared. Since this is also needed in some
3414 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
Matthias Kloseb9621712010-04-24 17:59:49 +00003416$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
3418
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003419
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003420$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003422fi
3423
Christian Heimes647cd872013-12-07 23:39:33 +01003424# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3425case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003426 hp*|HP*)
3427 define_stdc_a1=yes;;
3428 *)
3429 define_stdc_a1=no;;
3430esac
3431
3432if test $define_stdc_a1 = yes
3433then
Christian Heimes647cd872013-12-07 23:39:33 +01003434
3435$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3436
Christian Heimesb02bcae2013-12-08 15:21:08 +01003437fi
Christian Heimes647cd872013-12-07 23:39:33 +01003438
Jack Jansen6b08a402004-06-03 12:41:45 +00003439# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3440# it may influence the way we can build extensions, so distutils
3441# needs to check it
3442
Thomas Wouters477c8d52006-05-27 19:21:47 +00003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003445EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003446
Guido van Rossum627b2d71993-12-24 10:39:16 +00003447# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003448
3449# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3450# for debug/optimization stuff. BASECFLAGS is for flags that are required
3451# just to get things to compile and link. Users are free to override OPT
3452# when running configure or make. The build should not break if they do.
3453# BASECFLAGS should generally not be messed with, however.
3454
Guido van Rossum8b131c51995-03-09 14:10:13 +00003455# If the user switches compilers, we can't believe the cache
3456if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3457then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003458 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003459(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460fi
3461
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003462# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3463# when the compiler supports them, but we don't always want -O2, and
3464# we set -g later.
3465if test -z "$CFLAGS"; then
3466 CFLAGS=
3467fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003468
3469if test "$ac_sys_system" = "Darwin"
3470then
3471 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003472 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473 # information
3474 if test -z "${CC}"
3475 then
3476 found_gcc=
3477 found_clang=
3478 as_save_IFS=$IFS; IFS=:
3479 for as_dir in $PATH
3480 do
3481 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003482 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003483 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003484 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003485 fi
3486 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 fi
3491 fi
3492 done
3493 IFS=$as_save_IFS
3494
3495 if test -n "$found_gcc" -a -n "$found_clang"
3496 then
3497 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3498 then
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3500$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3501 CC="$found_clang"
3502 CXX="$found_clang++"
3503 fi
3504
3505
3506 elif test -z "$found_gcc" -a -n "$found_clang"
3507 then
3508 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3509$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3510 CC="$found_clang"
3511 CXX="$found_clang++"
3512
3513 elif test -z "$found_gcc" -a -z "$found_clang"
3514 then
3515 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3516 if test -n "${found_clang}"
3517 then
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3519$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3520 CC="${found_clang}"
3521 CXX="`/usr/bin/xcrun -find clang++`"
3522
3523 # else: use default behaviour
3524 fi
3525 fi
3526 fi
3527fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003528ac_ext=c
3529ac_cpp='$CPP $CPPFLAGS'
3530ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3531ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3532ac_compiler_gnu=$ac_cv_c_compiler_gnu
3533if test -n "$ac_tool_prefix"; then
3534 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3535set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3537$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003538if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003539 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003540else
3541 if test -n "$CC"; then
3542 ac_cv_prog_CC="$CC" # Let the user override the test.
3543else
Martin v. Löwis11437992002-04-12 09:54:03 +00003544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3545for as_dir in $PATH
3546do
3547 IFS=$as_save_IFS
3548 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003549 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003551 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 $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 +00003553 break 2
3554 fi
3555done
Matthias Kloseb9621712010-04-24 17:59:49 +00003556 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003557IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003558
Jack Jansendd19cf82001-12-06 22:36:17 +00003559fi
3560fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003561CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003562if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3564$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003565else
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003568fi
3569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572if test -z "$ac_cv_prog_CC"; then
3573 ac_ct_CC=$CC
3574 # Extract the first word of "gcc", so it can be a program name with args.
3575set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3577$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003578if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003580else
3581 if test -n "$ac_ct_CC"; then
3582 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3583else
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003589 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 $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 +00003593 break 2
3594 fi
3595done
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003597IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003598
3599fi
3600fi
3601ac_ct_CC=$ac_cv_prog_ac_ct_CC
3602if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3604$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003605else
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3607$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608fi
3609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 if test "x$ac_ct_CC" = x; then
3611 CC=""
3612 else
3613 case $cross_compiling:$ac_tool_warned in
3614yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003615{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3616$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617ac_tool_warned=yes ;;
3618esac
3619 CC=$ac_ct_CC
3620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003621else
3622 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003623fi
3624
Jack Jansendd19cf82001-12-06 22:36:17 +00003625if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003626 if test -n "$ac_tool_prefix"; then
3627 # 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 +00003628set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3630$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003631if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003633else
3634 if test -n "$CC"; then
3635 ac_cv_prog_CC="$CC" # Let the user override the test.
3636else
Martin v. Löwis11437992002-04-12 09:54:03 +00003637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3638for as_dir in $PATH
3639do
3640 IFS=$as_save_IFS
3641 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 $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 +00003646 break 2
3647 fi
3648done
Matthias Kloseb9621712010-04-24 17:59:49 +00003649 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003650IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003651
3652fi
3653fi
3654CC=$ac_cv_prog_CC
3655if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3657$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003658else
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665fi
3666if test -z "$CC"; then
3667 # Extract the first word of "cc", so it can be a program name with args.
3668set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3670$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003671if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003673else
3674 if test -n "$CC"; then
3675 ac_cv_prog_CC="$CC" # Let the user override the test.
3676else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003677 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3679for as_dir in $PATH
3680do
3681 IFS=$as_save_IFS
3682 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3686 ac_prog_rejected=yes
3687 continue
3688 fi
3689 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Kloseb9621712010-04-24 17:59:49 +00003694 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003697if test $ac_prog_rejected = yes; then
3698 # We found a bogon in the path, so make sure we never use it.
3699 set dummy $ac_cv_prog_CC
3700 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003701 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702 # We chose a different compiler from the bogus one.
3703 # However, it has the same basename, so the bogon will be chosen
3704 # first if we set CC to just the basename; use the full file name.
3705 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003706 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 fi
3708fi
3709fi
3710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003711CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3714$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715else
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3717$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718fi
3719
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720
Martin v. Löwis11437992002-04-12 09:54:03 +00003721fi
3722if test -z "$CC"; then
3723 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 do
3726 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
3751fi
3752fi
3753CC=$ac_cv_prog_CC
3754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763 test -n "$CC" && break
3764 done
3765fi
3766if test -z "$CC"; then
3767 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769do
3770 # Extract the first word of "$ac_prog", so it can be a program name with args.
3771set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003776else
3777 if test -n "$ac_ct_CC"; then
3778 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3779else
3780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $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 +00003789 break 2
3790 fi
3791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003794
Martin v. Löwis11437992002-04-12 09:54:03 +00003795fi
3796fi
3797ac_ct_CC=$ac_cv_prog_ac_ct_CC
3798if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3800$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$ac_ct_CC" && break
3808done
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 if test "x$ac_ct_CC" = x; then
3811 CC=""
3812 else
3813 case $cross_compiling:$ac_tool_warned in
3814yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817ac_tool_warned=yes ;;
3818esac
3819 CC=$ac_ct_CC
3820 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003821fi
3822
3823fi
3824
3825
Matthias Kloseb9621712010-04-24 17:59:49 +00003826test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003828as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003829See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003830
3831# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003832$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3833set X $ac_compile
3834ac_compiler=$2
3835for ac_option in --version -v -V -qversion; do
3836 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837case "(($ac_try" in
3838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3839 *) ac_try_echo=$ac_try;;
3840esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003841eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3842$as_echo "$ac_try_echo"; } >&5
3843 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003844 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003845 if test -s conftest.err; then
3846 sed '10a\
3847... rest of stderr output deleted ...
3848 10q' conftest.err >conftest.er1
3849 cat conftest.er1 >&5
3850 fi
3851 rm -f conftest.er1 conftest.err
3852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3853 test $ac_status = 0; }
3854done
Martin v. Löwis11437992002-04-12 09:54:03 +00003855
Matthias Kloseb9621712010-04-24 17:59:49 +00003856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003857/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003858
Martin v. Löwis11437992002-04-12 09:54:03 +00003859int
3860main ()
3861{
3862
3863 ;
3864 return 0;
3865}
3866_ACEOF
3867ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003868ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003869# Try to create an executable without -o first, disregard a.out.
3870# It will help us diagnose broken compilers, and finding out an intuition
3871# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3873$as_echo_n "checking whether the C compiler works... " >&6; }
3874ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3875
3876# The possible output files:
3877ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3878
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879ac_rmfiles=
3880for ac_file in $ac_files
3881do
3882 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3885 esac
3886done
3887rm -f $ac_rmfiles
3888
Matthias Kloseb9621712010-04-24 17:59:49 +00003889if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890case "(($ac_try" in
3891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3892 *) ac_try_echo=$ac_try;;
3893esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003894eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3895$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003897 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003898 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3899 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003900 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3901# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3902# in a Makefile. We should not override ac_cv_exeext if it was cached,
3903# so that the user can short-circuit this test for compilers unknown to
3904# Autoconf.
3905for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003906do
3907 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003908 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003909 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003910 ;;
3911 [ab].out )
3912 # We found the default executable, but exeext='' is most
3913 # certainly right.
3914 break;;
3915 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003916 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917 then :; else
3918 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3919 fi
3920 # We set ac_cv_exeext here because the later test for it is not
3921 # safe: cross compilers may not add the suffix if given an `-o'
3922 # argument, so we may need to know it at that point already.
3923 # Even if this section looks crufty: it has the advantage of
3924 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003925 break;;
3926 * )
3927 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 esac
3929done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930test "$ac_cv_exeext" = no && ac_cv_exeext=
3931
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003932else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933 ac_file=''
3934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003935if test -z "$ac_file"; then :
3936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3937$as_echo "no" >&6; }
3938$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003939sed 's/^/| /' conftest.$ac_ext >&5
3940
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003943as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003944See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003945else
3946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3947$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3950$as_echo_n "checking for C compiler default output file name... " >&6; }
3951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3952$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003953ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954
Matthias Kloseb9621712010-04-24 17:59:49 +00003955rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3958$as_echo_n "checking for suffix of executables... " >&6; }
3959if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3965$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003967 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003968 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3969 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003970 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3971# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3972# work properly (i.e., refer to `conftest.exe'), while it won't with
3973# `rm'.
3974for ac_file in conftest.exe conftest conftest.*; do
3975 test -f "$ac_file" || continue
3976 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003978 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3979 break;;
3980 * ) break;;
3981 esac
3982done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003983else
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3985$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003986as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003987See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003988fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f conftest conftest$ac_cv_exeext
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3991$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992
3993rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003994EXEEXT=$ac_cv_exeext
3995ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997/* end confdefs.h. */
3998#include <stdio.h>
3999int
4000main ()
4001{
4002FILE *f = fopen ("conftest.out", "w");
4003 return ferror (f) || fclose (f) != 0;
4004
4005 ;
4006 return 0;
4007}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004009ac_clean_files="$ac_clean_files conftest.out"
4010# Check that the compiler produces executables we can run. If not, either
4011# the compiler is broken, or we cross compile.
4012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4013$as_echo_n "checking whether we are cross compiling... " >&6; }
4014if test "$cross_compiling" != yes; then
4015 { { ac_try="$ac_link"
4016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
4020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
4022 (eval "$ac_link") 2>&5
4023 ac_status=$?
4024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }
4026 if { ac_try='./conftest$ac_cv_exeext'
4027 { { case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
4033 (eval "$ac_try") 2>&5
4034 ac_status=$?
4035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; }; then
4037 cross_compiling=no
4038 else
4039 if test "$cross_compiling" = maybe; then
4040 cross_compiling=yes
4041 else
4042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004044as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004045If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004046See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004047 fi
4048 fi
4049fi
4050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4051$as_echo "$cross_compiling" >&6; }
4052
4053rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4054ac_clean_files=$ac_clean_files_save
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4056$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004057if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004058 $as_echo_n "(cached) " >&6
4059else
4060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004061/* end confdefs.h. */
4062
4063int
4064main ()
4065{
4066
4067 ;
4068 return 0;
4069}
4070_ACEOF
4071rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004072if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004073case "(($ac_try" in
4074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4075 *) ac_try_echo=$ac_try;;
4076esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004077eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4078$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004079 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004080 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4082 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004083 for ac_file in conftest.o conftest.obj conftest.*; do
4084 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004087 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4088 break;;
4089 esac
4090done
4091else
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004093sed 's/^/| /' conftest.$ac_ext >&5
4094
Matthias Kloseb9621712010-04-24 17:59:49 +00004095{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004097as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004098See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004099fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004100rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4103$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104OBJEXT=$ac_cv_objext
4105ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4107$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004108if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004109 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004110else
Matthias Kloseb9621712010-04-24 17:59:49 +00004111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004113
Martin v. Löwis11437992002-04-12 09:54:03 +00004114int
4115main ()
4116{
4117#ifndef __GNUC__
4118 choke me
4119#endif
4120
4121 ;
4122 return 0;
4123}
4124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004125if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_compiler_gnu=yes
4127else
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004131ac_cv_c_compiler_gnu=$ac_compiler_gnu
4132
4133fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4135$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4136if test $ac_compiler_gnu = yes; then
4137 GCC=yes
4138else
4139 GCC=
4140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004141ac_test_CFLAGS=${CFLAGS+set}
4142ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4144$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004145if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004146 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004147else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004148 ac_save_c_werror_flag=$ac_c_werror_flag
4149 ac_c_werror_flag=yes
4150 ac_cv_prog_cc_g=no
4151 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004154
Martin v. Löwis11437992002-04-12 09:54:03 +00004155int
4156main ()
4157{
4158
4159 ;
4160 return 0;
4161}
4162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004163if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004164 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 CFLAGS=""
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004168/* end confdefs.h. */
4169
4170int
4171main ()
4172{
4173
4174 ;
4175 return 0;
4176}
4177_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004178if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179
Matthias Kloseb9621712010-04-24 17:59:49 +00004180else
4181 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184/* end confdefs.h. */
4185
4186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004195 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202 ac_c_werror_flag=$ac_save_c_werror_flag
4203fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4205$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004206if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004207 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004208elif test $ac_cv_prog_cc_g = yes; then
4209 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004210 CFLAGS="-g -O2"
4211 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004212 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004213 fi
4214else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 if test "$GCC" = yes; then
4216 CFLAGS="-O2"
4217 else
4218 CFLAGS=
4219 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4222$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004223if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004224 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004225else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004227ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004228cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
4230#include <stdarg.h>
4231#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004232struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004233/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4234struct buf { int x; };
4235FILE * (*rcsopen) (struct buf *, struct stat *, int);
4236static char *e (p, i)
4237 char **p;
4238 int i;
4239{
4240 return p[i];
4241}
4242static char *f (char * (*g) (char **, int), char **p, ...)
4243{
4244 char *s;
4245 va_list v;
4246 va_start (v,p);
4247 s = g (p, va_arg (v,int));
4248 va_end (v);
4249 return s;
4250}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004251
4252/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4253 function prototypes and stuff, but not '\xHH' hex character constants.
4254 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4257 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004259int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4260
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4262 inside strings and character constants. */
4263#define FOO(x) 'x'
4264int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4265
Skip Montanaro6dead952003-09-25 14:50:04 +00004266int test (int i, double x);
4267struct s1 {int (*f) (int a);};
4268struct s2 {int (*f) (double a);};
4269int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4270int argc;
4271char **argv;
4272int
4273main ()
4274{
4275return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4276 ;
4277 return 0;
4278}
4279_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004280for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4281 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004282do
4283 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004286fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004287rm -f core conftest.err conftest.$ac_objext
4288 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004289done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004291CC=$ac_save_CC
4292
4293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294# AC_CACHE_VAL
4295case "x$ac_cv_prog_cc_c89" in
4296 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4298$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4301$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004302 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4305$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004306esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004307if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004308
Matthias Kloseb9621712010-04-24 17:59:49 +00004309fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004310
Martin v. Löwis11437992002-04-12 09:54:03 +00004311ac_ext=c
4312ac_cpp='$CPP $CPPFLAGS'
4313ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4314ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4315ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004317ac_ext=c
4318ac_cpp='$CPP $CPPFLAGS'
4319ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4320ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4321ac_compiler_gnu=$ac_cv_c_compiler_gnu
4322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4323$as_echo_n "checking how to run the C preprocessor... " >&6; }
4324# On Suns, sometimes $CPP names a directory.
4325if test -n "$CPP" && test -d "$CPP"; then
4326 CPP=
4327fi
4328if test -z "$CPP"; then
4329 if ${ac_cv_prog_CPP+:} false; then :
4330 $as_echo_n "(cached) " >&6
4331else
4332 # Double quotes because CPP needs to be expanded
4333 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4334 do
4335 ac_preproc_ok=false
4336for ac_c_preproc_warn_flag in '' yes
4337do
4338 # Use a header file that comes with gcc, so configuring glibc
4339 # with a fresh cross-compiler works.
4340 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4341 # <limits.h> exists even on freestanding compilers.
4342 # On the NeXT, cc -E runs the code through the compiler's parser,
4343 # not just through cpp. "Syntax error" is here to catch this case.
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345/* end confdefs.h. */
4346#ifdef __STDC__
4347# include <limits.h>
4348#else
4349# include <assert.h>
4350#endif
4351 Syntax error
4352_ACEOF
4353if ac_fn_c_try_cpp "$LINENO"; then :
4354
4355else
4356 # Broken: fails on valid input.
4357continue
4358fi
4359rm -f conftest.err conftest.i conftest.$ac_ext
4360
4361 # OK, works on sane cases. Now check whether nonexistent headers
4362 # can be detected and how.
4363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4364/* end confdefs.h. */
4365#include <ac_nonexistent.h>
4366_ACEOF
4367if ac_fn_c_try_cpp "$LINENO"; then :
4368 # Broken: success on invalid input.
4369continue
4370else
4371 # Passes both tests.
4372ac_preproc_ok=:
4373break
4374fi
4375rm -f conftest.err conftest.i conftest.$ac_ext
4376
4377done
4378# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4379rm -f conftest.i conftest.err conftest.$ac_ext
4380if $ac_preproc_ok; then :
4381 break
4382fi
4383
4384 done
4385 ac_cv_prog_CPP=$CPP
4386
4387fi
4388 CPP=$ac_cv_prog_CPP
4389else
4390 ac_cv_prog_CPP=$CPP
4391fi
4392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4393$as_echo "$CPP" >&6; }
4394ac_preproc_ok=false
4395for ac_c_preproc_warn_flag in '' yes
4396do
4397 # Use a header file that comes with gcc, so configuring glibc
4398 # with a fresh cross-compiler works.
4399 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4400 # <limits.h> exists even on freestanding compilers.
4401 # On the NeXT, cc -E runs the code through the compiler's parser,
4402 # not just through cpp. "Syntax error" is here to catch this case.
4403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4404/* end confdefs.h. */
4405#ifdef __STDC__
4406# include <limits.h>
4407#else
4408# include <assert.h>
4409#endif
4410 Syntax error
4411_ACEOF
4412if ac_fn_c_try_cpp "$LINENO"; then :
4413
4414else
4415 # Broken: fails on valid input.
4416continue
4417fi
4418rm -f conftest.err conftest.i conftest.$ac_ext
4419
4420 # OK, works on sane cases. Now check whether nonexistent headers
4421 # can be detected and how.
4422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4423/* end confdefs.h. */
4424#include <ac_nonexistent.h>
4425_ACEOF
4426if ac_fn_c_try_cpp "$LINENO"; then :
4427 # Broken: success on invalid input.
4428continue
4429else
4430 # Passes both tests.
4431ac_preproc_ok=:
4432break
4433fi
4434rm -f conftest.err conftest.i conftest.$ac_ext
4435
4436done
4437# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4438rm -f conftest.i conftest.err conftest.$ac_ext
4439if $ac_preproc_ok; then :
4440
4441else
4442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4444as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4445See \`config.log' for more details" "$LINENO" 5; }
4446fi
4447
4448ac_ext=c
4449ac_cpp='$CPP $CPPFLAGS'
4450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4452ac_compiler_gnu=$ac_cv_c_compiler_gnu
4453
4454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4455$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4456if ${ac_cv_path_GREP+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458else
4459 if test -z "$GREP"; then
4460 ac_path_GREP_found=false
4461 # Loop through the user's path and test for each of PROGNAME-LIST
4462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4464do
4465 IFS=$as_save_IFS
4466 test -z "$as_dir" && as_dir=.
4467 for ac_prog in grep ggrep; do
4468 for ac_exec_ext in '' $ac_executable_extensions; do
4469 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4470 as_fn_executable_p "$ac_path_GREP" || continue
4471# Check for GNU ac_path_GREP and select it if it is found.
4472 # Check for GNU $ac_path_GREP
4473case `"$ac_path_GREP" --version 2>&1` in
4474*GNU*)
4475 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4476*)
4477 ac_count=0
4478 $as_echo_n 0123456789 >"conftest.in"
4479 while :
4480 do
4481 cat "conftest.in" "conftest.in" >"conftest.tmp"
4482 mv "conftest.tmp" "conftest.in"
4483 cp "conftest.in" "conftest.nl"
4484 $as_echo 'GREP' >> "conftest.nl"
4485 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4486 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4487 as_fn_arith $ac_count + 1 && ac_count=$as_val
4488 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4489 # Best one so far, save it but keep looking for a better one
4490 ac_cv_path_GREP="$ac_path_GREP"
4491 ac_path_GREP_max=$ac_count
4492 fi
4493 # 10*(2^10) chars as input seems more than enough
4494 test $ac_count -gt 10 && break
4495 done
4496 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4497esac
4498
4499 $ac_path_GREP_found && break 3
4500 done
4501 done
4502 done
4503IFS=$as_save_IFS
4504 if test -z "$ac_cv_path_GREP"; then
4505 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4506 fi
4507else
4508 ac_cv_path_GREP=$GREP
4509fi
4510
4511fi
4512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4513$as_echo "$ac_cv_path_GREP" >&6; }
4514 GREP="$ac_cv_path_GREP"
4515
4516
Łukasz Langaa785c872016-09-09 17:37:37 -07004517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4518$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4519if ${ac_cv_path_SED+:} false; then :
4520 $as_echo_n "(cached) " >&6
4521else
4522 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4523 for ac_i in 1 2 3 4 5 6 7; do
4524 ac_script="$ac_script$as_nl$ac_script"
4525 done
4526 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4527 { ac_script=; unset ac_script;}
4528 if test -z "$SED"; then
4529 ac_path_SED_found=false
4530 # Loop through the user's path and test for each of PROGNAME-LIST
4531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534 IFS=$as_save_IFS
4535 test -z "$as_dir" && as_dir=.
4536 for ac_prog in sed gsed; do
4537 for ac_exec_ext in '' $ac_executable_extensions; do
4538 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4539 as_fn_executable_p "$ac_path_SED" || continue
4540# Check for GNU ac_path_SED and select it if it is found.
4541 # Check for GNU $ac_path_SED
4542case `"$ac_path_SED" --version 2>&1` in
4543*GNU*)
4544 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4545*)
4546 ac_count=0
4547 $as_echo_n 0123456789 >"conftest.in"
4548 while :
4549 do
4550 cat "conftest.in" "conftest.in" >"conftest.tmp"
4551 mv "conftest.tmp" "conftest.in"
4552 cp "conftest.in" "conftest.nl"
4553 $as_echo '' >> "conftest.nl"
4554 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4555 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4556 as_fn_arith $ac_count + 1 && ac_count=$as_val
4557 if test $ac_count -gt ${ac_path_SED_max-0}; then
4558 # Best one so far, save it but keep looking for a better one
4559 ac_cv_path_SED="$ac_path_SED"
4560 ac_path_SED_max=$ac_count
4561 fi
4562 # 10*(2^10) chars as input seems more than enough
4563 test $ac_count -gt 10 && break
4564 done
4565 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4566esac
4567
4568 $ac_path_SED_found && break 3
4569 done
4570 done
4571 done
4572IFS=$as_save_IFS
4573 if test -z "$ac_cv_path_SED"; then
4574 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4575 fi
4576else
4577 ac_cv_path_SED=$SED
4578fi
4579
4580fi
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4582$as_echo "$ac_cv_path_SED" >&6; }
4583 SED="$ac_cv_path_SED"
4584 rm -f conftest.sed
4585
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004586
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004587
4588
Matthias Kloseb9621712010-04-24 17:59:49 +00004589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4590$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004593if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004594 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004595
4596 case $withval in
4597 no) with_cxx_main=no
4598 MAINCC='$(CC)';;
4599 yes) with_cxx_main=yes
4600 MAINCC='$(CXX)';;
4601 *) with_cxx_main=yes
4602 MAINCC=$withval
4603 if test -z "$CXX"
4604 then
4605 CXX=$withval
4606 fi;;
4607 esac
4608else
4609
4610 with_cxx_main=no
4611 MAINCC='$(CC)'
4612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004613fi
4614
Matthias Kloseb9621712010-04-24 17:59:49 +00004615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4616$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004617
4618preset_cxx="$CXX"
4619if test -z "$CXX"
4620then
4621 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004622 gcc) if test -n "$ac_tool_prefix"; then
4623 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4624set dummy ${ac_tool_prefix}g++; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_CXX+:} false; then :
4628 $as_echo_n "(cached) " >&6
4629else
4630 case $CXX in
4631 [\\/]* | ?:[\\/]*)
4632 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4633 ;;
4634 *)
4635 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in notfound
4637do
4638 IFS=$as_save_IFS
4639 test -z "$as_dir" && as_dir=.
4640 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004641 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004642 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644 break 2
4645 fi
4646done
4647 done
4648IFS=$as_save_IFS
4649
4650 ;;
4651esac
4652fi
4653CXX=$ac_cv_path_CXX
4654if test -n "$CXX"; then
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4656$as_echo "$CXX" >&6; }
4657else
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663fi
4664if test -z "$ac_cv_path_CXX"; then
4665 ac_pt_CXX=$CXX
4666 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004670if ${ac_cv_path_ac_pt_CXX+:} false; then :
4671 $as_echo_n "(cached) " >&6
4672else
4673 case $ac_pt_CXX in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in notfound
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
4683 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004685 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4687 break 2
4688 fi
4689done
4690 done
4691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4697if test -n "$ac_pt_CXX"; then
4698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4699$as_echo "$ac_pt_CXX" >&6; }
4700else
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
4703fi
4704
4705 if test "x$ac_pt_CXX" = x; then
4706 CXX="g++"
4707 else
4708 case $cross_compiling:$ac_tool_warned in
4709yes:)
4710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4712ac_tool_warned=yes ;;
4713esac
4714 CXX=$ac_pt_CXX
4715 fi
4716else
4717 CXX="$ac_cv_path_CXX"
4718fi
4719 ;;
4720 cc) if test -n "$ac_tool_prefix"; then
4721 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4722set dummy ${ac_tool_prefix}c++; ac_word=$2
4723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004725if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004726 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004727else
4728 case $CXX in
4729 [\\/]* | ?:[\\/]*)
4730 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4731 ;;
4732 *)
4733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4734for as_dir in notfound
4735do
4736 IFS=$as_save_IFS
4737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004742 break 2
4743 fi
4744done
Matthias Kloseb9621712010-04-24 17:59:49 +00004745 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004746IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748 ;;
4749esac
4750fi
4751CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004752if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4754$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004755else
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4757$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004759
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004760
4761fi
4762if test -z "$ac_cv_path_CXX"; then
4763 ac_pt_CXX=$CXX
4764 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4767$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004769 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004772 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773 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 +00004774 ;;
4775 *)
4776 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4777for as_dir in notfound
4778do
4779 IFS=$as_save_IFS
4780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004783 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785 break 2
4786 fi
4787done
Matthias Kloseb9621712010-04-24 17:59:49 +00004788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004789IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791 ;;
4792esac
4793fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004794ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4795if test -n "$ac_pt_CXX"; then
4796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4797$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004798else
Matthias Kloseb9621712010-04-24 17:59:49 +00004799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4800$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004802
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004803 if test "x$ac_pt_CXX" = x; then
4804 CXX="c++"
4805 else
4806 case $cross_compiling:$ac_tool_warned in
4807yes:)
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4809$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4810ac_tool_warned=yes ;;
4811esac
4812 CXX=$ac_pt_CXX
4813 fi
4814else
4815 CXX="$ac_cv_path_CXX"
4816fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004817 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004818 clang|*/clang) if test -n "$ac_tool_prefix"; then
4819 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4820set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if ${ac_cv_path_CXX+:} false; then :
4824 $as_echo_n "(cached) " >&6
4825else
4826 case $CXX in
4827 [\\/]* | ?:[\\/]*)
4828 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4829 ;;
4830 *)
4831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in notfound
4833do
4834 IFS=$as_save_IFS
4835 test -z "$as_dir" && as_dir=.
4836 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004838 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4840 break 2
4841 fi
4842done
4843 done
4844IFS=$as_save_IFS
4845
Ned Deilycbfb9a52012-06-23 16:02:19 -07004846 ;;
4847esac
4848fi
4849CXX=$ac_cv_path_CXX
4850if test -n "$CXX"; then
4851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4852$as_echo "$CXX" >&6; }
4853else
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004858
4859fi
4860if test -z "$ac_cv_path_CXX"; then
4861 ac_pt_CXX=$CXX
4862 # Extract the first word of "clang++", so it can be a program name with args.
4863set dummy clang++; ac_word=$2
4864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4865$as_echo_n "checking for $ac_word... " >&6; }
4866if ${ac_cv_path_ac_pt_CXX+:} false; then :
4867 $as_echo_n "(cached) " >&6
4868else
4869 case $ac_pt_CXX in
4870 [\\/]* | ?:[\\/]*)
4871 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4872 ;;
4873 *)
4874 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4875for as_dir in notfound
4876do
4877 IFS=$as_save_IFS
4878 test -z "$as_dir" && as_dir=.
4879 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004881 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4883 break 2
4884 fi
4885done
4886 done
4887IFS=$as_save_IFS
4888
4889 ;;
4890esac
4891fi
4892ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4893if test -n "$ac_pt_CXX"; then
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4895$as_echo "$ac_pt_CXX" >&6; }
4896else
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4898$as_echo "no" >&6; }
4899fi
4900
4901 if test "x$ac_pt_CXX" = x; then
4902 CXX="clang++"
4903 else
4904 case $cross_compiling:$ac_tool_warned in
4905yes:)
4906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4908ac_tool_warned=yes ;;
4909esac
4910 CXX=$ac_pt_CXX
4911 fi
4912else
4913 CXX="$ac_cv_path_CXX"
4914fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004915 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004916 icc|*/icc) if test -n "$ac_tool_prefix"; then
4917 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4918set dummy ${ac_tool_prefix}icpc; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_CXX+:} false; then :
4922 $as_echo_n "(cached) " >&6
4923else
4924 case $CXX in
4925 [\\/]* | ?:[\\/]*)
4926 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4927 ;;
4928 *)
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in notfound
4931do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_exec_ext in '' $ac_executable_extensions; do
4935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938 break 2
4939 fi
4940done
4941 done
4942IFS=$as_save_IFS
4943
4944 ;;
4945esac
4946fi
4947CXX=$ac_cv_path_CXX
4948if test -n "$CXX"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4950$as_echo "$CXX" >&6; }
4951else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957fi
4958if test -z "$ac_cv_path_CXX"; then
4959 ac_pt_CXX=$CXX
4960 # Extract the first word of "icpc", so it can be a program name with args.
4961set dummy icpc; ac_word=$2
4962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4963$as_echo_n "checking for $ac_word... " >&6; }
4964if ${ac_cv_path_ac_pt_CXX+:} false; then :
4965 $as_echo_n "(cached) " >&6
4966else
4967 case $ac_pt_CXX in
4968 [\\/]* | ?:[\\/]*)
4969 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4970 ;;
4971 *)
4972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4973for as_dir in notfound
4974do
4975 IFS=$as_save_IFS
4976 test -z "$as_dir" && as_dir=.
4977 for ac_exec_ext in '' $ac_executable_extensions; do
4978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4979 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4981 break 2
4982 fi
4983done
4984 done
4985IFS=$as_save_IFS
4986
4987 ;;
4988esac
4989fi
4990ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4991if test -n "$ac_pt_CXX"; then
4992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4993$as_echo "$ac_pt_CXX" >&6; }
4994else
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4996$as_echo "no" >&6; }
4997fi
4998
4999 if test "x$ac_pt_CXX" = x; then
5000 CXX="icpc"
5001 else
5002 case $cross_compiling:$ac_tool_warned in
5003yes:)
5004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5006ac_tool_warned=yes ;;
5007esac
5008 CXX=$ac_pt_CXX
5009 fi
5010else
5011 CXX="$ac_cv_path_CXX"
5012fi
5013 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005014 esac
5015 if test "$CXX" = "notfound"
5016 then
5017 CXX=""
5018 fi
5019fi
5020if test -z "$CXX"
5021then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005022 if test -n "$ac_tool_prefix"; then
5023 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5024 do
5025 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5026set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005029if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005030 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005031else
5032 if test -n "$CXX"; then
5033 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5034else
5035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in $PATH
5037do
5038 IFS=$as_save_IFS
5039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005042 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005044 break 2
5045 fi
5046done
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049
5050fi
5051fi
5052CXX=$ac_cv_prog_CXX
5053if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5055$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056else
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5058$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059fi
5060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005062 test -n "$CXX" && break
5063 done
5064fi
5065if test -z "$CXX"; then
5066 ac_ct_CXX=$CXX
5067 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5068do
5069 # Extract the first word of "$ac_prog", so it can be a program name with args.
5070set dummy $ac_prog; ac_word=$2
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072$as_echo_n "checking for $ac_word... " >&6; }
5073if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5074 $as_echo_n "(cached) " >&6
5075else
5076 if test -n "$ac_ct_CXX"; then
5077 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5078else
5079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082 IFS=$as_save_IFS
5083 test -z "$as_dir" && as_dir=.
5084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005086 ac_cv_prog_ac_ct_CXX="$ac_prog"
5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088 break 2
5089 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 done
5092IFS=$as_save_IFS
5093
5094fi
5095fi
5096ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5097if test -n "$ac_ct_CXX"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5099$as_echo "$ac_ct_CXX" >&6; }
5100else
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106 test -n "$ac_ct_CXX" && break
5107done
5108
5109 if test "x$ac_ct_CXX" = x; then
5110 CXX="notfound"
5111 else
5112 case $cross_compiling:$ac_tool_warned in
5113yes:)
5114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5116ac_tool_warned=yes ;;
5117esac
5118 CXX=$ac_ct_CXX
5119 fi
5120fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122 if test "$CXX" = "notfound"
5123 then
5124 CXX=""
5125 fi
5126fi
5127if test "$preset_cxx" != "$CXX"
5128then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005129 { $as_echo "$as_me:${as_lineno-$LINENO}:
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.
5133 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005134$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135
5136 By default, distutils will build C++ extension modules with \"$CXX\".
5137 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005138 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005139fi
5140
5141
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005142MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5143
5144
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5146$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5147cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005148#undef bfin
5149#undef cris
5150#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005151#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005152#undef hppa
5153#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005154#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005156#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005157#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005158#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005159#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005160 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005161#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005162# if defined(__x86_64__) && defined(__LP64__)
5163 x86_64-linux-gnu
5164# elif defined(__x86_64__) && defined(__ILP32__)
5165 x86_64-linux-gnux32
5166# elif defined(__i386__)
5167 i386-linux-gnu
5168# elif defined(__aarch64__) && defined(__AARCH64EL__)
5169# if defined(__ILP32__)
5170 aarch64_ilp32-linux-gnu
5171# else
5172 aarch64-linux-gnu
5173# endif
5174# elif defined(__aarch64__) && defined(__AARCH64EB__)
5175# if defined(__ILP32__)
5176 aarch64_be_ilp32-linux-gnu
5177# else
5178 aarch64_be-linux-gnu
5179# endif
5180# elif defined(__alpha__)
5181 alpha-linux-gnu
5182# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5183# if defined(__ARMEL__)
5184 arm-linux-gnueabihf
5185# else
5186 armeb-linux-gnueabihf
5187# endif
5188# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5189# if defined(__ARMEL__)
5190 arm-linux-gnueabi
5191# else
5192 armeb-linux-gnueabi
5193# endif
5194# elif defined(__hppa__)
5195 hppa-linux-gnu
5196# elif defined(__ia64__)
5197 ia64-linux-gnu
5198# elif defined(__m68k__) && !defined(__mcoldfire__)
5199 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005200# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5201# if _MIPS_SIM == _ABIO32
5202 mipsisa32r6el-linux-gnu
5203# elif _MIPS_SIM == _ABIN32
5204 mipsisa64r6el-linux-gnuabin32
5205# elif _MIPS_SIM == _ABI64
5206 mipsisa64r6el-linux-gnuabi64
5207# else
5208# error unknown platform triplet
5209# endif
5210# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5211# if _MIPS_SIM == _ABIO32
5212 mipsisa32r6-linux-gnu
5213# elif _MIPS_SIM == _ABIN32
5214 mipsisa64r6-linux-gnuabin32
5215# elif _MIPS_SIM == _ABI64
5216 mipsisa64r6-linux-gnuabi64
5217# else
5218# error unknown platform triplet
5219# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005262# elif defined(__riscv)
5263# if __riscv_xlen == 32
5264 riscv32-linux-gnu
5265# elif __riscv_xlen == 64
5266 riscv64-linux-gnu
5267# else
5268# error unknown platform triplet
5269# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__FreeBSD_kernel__)
5274# if defined(__LP64__)
5275 x86_64-kfreebsd-gnu
5276# elif defined(__i386__)
5277 i386-kfreebsd-gnu
5278# else
5279# error unknown platform triplet
5280# endif
5281#elif defined(__gnu_hurd__)
5282 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005283#elif defined(__APPLE__)
5284 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005285#elif defined(__VXWORKS__)
5286 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005287#else
5288# error unknown platform triplet
5289#endif
5290
5291EOF
5292
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005293if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005294 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5296$as_echo "$PLATFORM_TRIPLET" >&6; }
5297else
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5299$as_echo "none" >&6; }
5300fi
5301rm -f conftest.c conftest.out
5302
5303if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5304 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5305 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5306 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005307elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5308 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310
doko@ubuntu.com55532312016-06-14 08:55:19 +02005311if test x$MULTIARCH != x; then
5312 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5313fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314
5315
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5317$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5318save_LDFLAGS="$LDFLAGS"
5319LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005320
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5322/* end confdefs.h. */
5323
5324int
5325main ()
5326{
5327
5328 ;
5329 return 0;
5330}
5331_ACEOF
5332if ac_fn_c_try_link "$LINENO"; then :
5333 NO_AS_NEEDED="-Wl,--no-as-needed"
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5335$as_echo "yes" >&6; }
5336else
5337 NO_AS_NEEDED=""
5338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5339$as_echo "no" >&6; }
5340fi
5341rm -f core conftest.err conftest.$ac_objext \
5342 conftest$ac_exeext conftest.$ac_ext
5343LDFLAGS="$save_LDFLAGS"
5344
5345
5346
5347# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005348
Matthias Kloseb9621712010-04-24 17:59:49 +00005349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5350$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005351if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005352 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353else
5354 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5355 then ac_cv_path_EGREP="$GREP -E"
5356 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005358 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005359 # Loop through the user's path and test for each of PROGNAME-LIST
5360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5362do
5363 IFS=$as_save_IFS
5364 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005365 for ac_prog in egrep; do
5366 for ac_exec_ext in '' $ac_executable_extensions; do
5367 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005368 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005369# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370 # Check for GNU $ac_path_EGREP
5371case `"$ac_path_EGREP" --version 2>&1` in
5372*GNU*)
5373 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5374*)
5375 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005376 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005377 while :
5378 do
5379 cat "conftest.in" "conftest.in" >"conftest.tmp"
5380 mv "conftest.tmp" "conftest.in"
5381 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005382 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5384 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5387 # Best one so far, save it but keep looking for a better one
5388 ac_cv_path_EGREP="$ac_path_EGREP"
5389 ac_path_EGREP_max=$ac_count
5390 fi
5391 # 10*(2^10) chars as input seems more than enough
5392 test $ac_count -gt 10 && break
5393 done
5394 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5395esac
5396
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 $ac_path_EGREP_found && break 3
5398 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005403 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 +00005404 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405else
5406 ac_cv_path_EGREP=$EGREP
5407fi
5408
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 fi
5410fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5412$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005414
5415
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5417$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005418if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $as_echo_n "(cached) " >&6
5420else
5421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005422/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005423#include <stdlib.h>
5424#include <stdarg.h>
5425#include <string.h>
5426#include <float.h>
5427
5428int
5429main ()
5430{
5431
5432 ;
5433 return 0;
5434}
5435_ACEOF
5436if ac_fn_c_try_compile "$LINENO"; then :
5437 ac_cv_header_stdc=yes
5438else
5439 ac_cv_header_stdc=no
5440fi
5441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5442
5443if test $ac_cv_header_stdc = yes; then
5444 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5446/* end confdefs.h. */
5447#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005448
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005449_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005451 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005453else
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005456rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Matthias Kloseb9621712010-04-24 17:59:49 +00005458fi
5459
5460if test $ac_cv_header_stdc = yes; then
5461 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5463/* end confdefs.h. */
5464#include <stdlib.h>
5465
5466_ACEOF
5467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5468 $EGREP "free" >/dev/null 2>&1; then :
5469
5470else
5471 ac_cv_header_stdc=no
5472fi
5473rm -f conftest*
5474
5475fi
5476
5477if test $ac_cv_header_stdc = yes; then
5478 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5479 if test "$cross_compiling" = yes; then :
5480 :
5481else
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483/* end confdefs.h. */
5484#include <ctype.h>
5485#include <stdlib.h>
5486#if ((' ' & 0x0FF) == 0x020)
5487# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5488# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5489#else
5490# define ISLOWER(c) \
5491 (('a' <= (c) && (c) <= 'i') \
5492 || ('j' <= (c) && (c) <= 'r') \
5493 || ('s' <= (c) && (c) <= 'z'))
5494# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5495#endif
5496
5497#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5498int
5499main ()
5500{
5501 int i;
5502 for (i = 0; i < 256; i++)
5503 if (XOR (islower (i), ISLOWER (i))
5504 || toupper (i) != TOUPPER (i))
5505 return 2;
5506 return 0;
5507}
5508_ACEOF
5509if ac_fn_c_try_run "$LINENO"; then :
5510
5511else
5512 ac_cv_header_stdc=no
5513fi
5514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5515 conftest.$ac_objext conftest.beam conftest.$ac_ext
5516fi
5517
5518fi
5519fi
5520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5521$as_echo "$ac_cv_header_stdc" >&6; }
5522if test $ac_cv_header_stdc = yes; then
5523
5524$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5525
5526fi
5527
5528# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5529for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5530 inttypes.h stdint.h unistd.h
5531do :
5532 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5533ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5534"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005535if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005536 cat >>confdefs.h <<_ACEOF
5537#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5538_ACEOF
5539
5540fi
5541
5542done
5543
5544
5545
5546 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 +02005547if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005548 MINIX=yes
5549else
5550 MINIX=
5551fi
5552
5553
5554 if test "$MINIX" = yes; then
5555
5556$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5557
5558
5559$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5560
5561
5562$as_echo "#define _MINIX 1" >>confdefs.h
5563
5564 fi
5565
5566
5567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5568$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005569if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 $as_echo_n "(cached) " >&6
5571else
5572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5573/* end confdefs.h. */
5574
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005575# define __EXTENSIONS__ 1
5576 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005577int
5578main ()
5579{
5580
5581 ;
5582 return 0;
5583}
5584_ACEOF
5585if ac_fn_c_try_compile "$LINENO"; then :
5586 ac_cv_safe_to_define___extensions__=yes
5587else
5588 ac_cv_safe_to_define___extensions__=no
5589fi
5590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5591fi
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5593$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5594 test $ac_cv_safe_to_define___extensions__ = yes &&
5595 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5596
5597 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5598
5599 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5600
5601 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5602
5603 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5604
5605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005606
Xavier de Gaye95750b12016-07-09 11:05:42 +02005607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5608$as_echo_n "checking for the Android API level... " >&6; }
5609cat >> conftest.c <<EOF
5610#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005611android_api = __ANDROID_API__
5612arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005613#else
5614#error not Android
5615#endif
5616EOF
5617
5618if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005619 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5620 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5622$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005623 if test -z "$ANDROID_API_LEVEL"; then
5624 echo 'Fatal: you must define __ANDROID_API__'
5625 exit 1
5626 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005627
5628cat >>confdefs.h <<_ACEOF
5629#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5630_ACEOF
5631
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005632
5633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5634$as_echo_n "checking for the Android arm ABI... " >&6; }
5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5636$as_echo "$_arm_arch" >&6; }
5637 if test "$_arm_arch" = 7; then
5638 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5639 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5640 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005641else
5642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5643$as_echo "not Android" >&6; }
5644fi
5645rm -f conftest.c conftest.out
5646
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647# Check for unsupported systems
5648case $ac_sys_system/$ac_sys_release in
5649atheos*|Linux*/1*)
5650 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5651 echo See README for details.
5652 exit 1;;
5653esac
5654
5655
Matthias Kloseb9621712010-04-24 17:59:49 +00005656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5657$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
5659# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005660if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661 withval=$with_suffix;
5662 case $withval in
5663 no) EXEEXT=;;
5664 yes) EXEEXT=.exe;;
5665 *) EXEEXT=$withval;;
5666 esac
5667fi
5668
Matthias Kloseb9621712010-04-24 17:59:49 +00005669{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5670$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671
5672# Test whether we're running on a non-case-sensitive system, in which
5673# case we give a warning if no ext is given
5674
Matthias Kloseb9621712010-04-24 17:59:49 +00005675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5676$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677if test ! -d CaseSensitiveTestDir; then
5678mkdir CaseSensitiveTestDir
5679fi
5680
5681if test -d casesensitivetestdir
5682then
Matthias Kloseb9621712010-04-24 17:59:49 +00005683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5684$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005685 BUILDEXEEXT=.exe
5686else
Matthias Kloseb9621712010-04-24 17:59:49 +00005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5688$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689 BUILDEXEEXT=$EXEEXT
5690fi
5691rmdir CaseSensitiveTestDir
5692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005693case $ac_sys_system in
5694hp*|HP*)
5695 case $CC in
5696 cc|*/cc) CC="$CC -Ae";;
5697 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698esac
5699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700
Matthias Kloseb9621712010-04-24 17:59:49 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5702$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703if test -z "$LIBRARY"
5704then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005705 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5708$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709
5710# LDLIBRARY is the name of the library to link against (as opposed to the
5711# name of the library into which to insert object files). BLDLIBRARY is also
5712# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5713# is blank as the main program is not linked directly against LDLIBRARY.
5714# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5715# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5716# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5717# DLLLIBRARY is the shared (i.e., DLL) library.
5718#
5719# RUNSHARED is used to run shared python without installed libraries
5720#
5721# INSTSONAME is the name of the shared library that will be use to install
5722# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005723#
5724# LDVERSION is the shared library version number, normally the Python version
5725# with the ABI build flags appended.
5726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727
5728
5729
5730
5731
5732
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734LDLIBRARY="$LIBRARY"
5735BLDLIBRARY='$(LDLIBRARY)'
5736INSTSONAME='$(LDLIBRARY)'
5737DLLLIBRARY=''
5738LDLIBRARYDIR=''
5739RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005740LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741
5742# LINKCC is the command that links the python executable -- default is $(CC).
5743# If CXX is set, and if it is needed to link a main function that was
5744# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5745# python might then depend on the C++ runtime
5746# This is altered for AIX in order to build the export list before
5747# linking.
5748
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5750$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751if test -z "$LINKCC"
5752then
5753 LINKCC='$(PURIFY) $(MAINCC)'
5754 case $ac_sys_system in
5755 AIX*)
5756 exp_extra="\"\""
5757 if test $ac_sys_release -ge 5 -o \
5758 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5759 exp_extra="."
5760 fi
5761 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005762 QNX*)
5763 # qcc must be used because the other compilers do not
5764 # support -N.
5765 LINKCC=qcc;;
5766 esac
5767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5769$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770
5771# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5772# make sure we default having it set to "no": this is used by
5773# distutils.unixccompiler to know if it should add --enable-new-dtags
5774# to linker command lines, and failing to detect GNU ld simply results
5775# in the same bahaviour as before.
5776
Matthias Kloseb9621712010-04-24 17:59:49 +00005777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5778$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005779ac_prog=ld
5780if test "$GCC" = yes; then
5781 ac_prog=`$CC -print-prog-name=ld`
5782fi
5783case `"$ac_prog" -V 2>&1 < /dev/null` in
5784 *GNU*)
5785 GNULD=yes;;
5786 *)
5787 GNULD=no;;
5788esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5790$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5793$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005795if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796 enableval=$enable_shared;
5797fi
5798
5799
5800if test -z "$enable_shared"
5801then
5802 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005803 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804 enable_shared="yes";;
5805 *)
5806 enable_shared="no";;
5807 esac
5808fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5810$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5813$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005815if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005816 enableval=$enable_profiling;
5817fi
5818
5819if test "x$enable_profiling" = xyes; then
5820 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005821 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823/* end confdefs.h. */
5824int main() { return 0; }
5825_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005826if ac_fn_c_try_link "$LINENO"; then :
5827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005830fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831rm -f core conftest.err conftest.$ac_objext \
5832 conftest$ac_exeext conftest.$ac_ext
5833 CC="$ac_save_cc"
5834else
5835 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005836fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5838$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840if test "x$enable_profiling" = xyes; then
5841 BASECFLAGS="-pg $BASECFLAGS"
5842 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843fi
5844
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5846$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
5848# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5849# library that we build, but we do not want to link against it (we
5850# will find it with a -framework option). For this reason there is an
5851# extra variable BLDLIBRARY against which Python and the extension
5852# modules are linked, BLDLIBRARY. This is normally the same as
5853# LDLIBRARY, but empty for MacOSX framework builds.
5854if test "$enable_framework"
5855then
5856 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005857 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858 BLDLIBRARY=''
5859else
5860 BLDLIBRARY='$(LDLIBRARY)'
5861fi
5862
5863# Other platforms follow
5864if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005865 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
Matthias Kloseb9621712010-04-24 17:59:49 +00005867$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868
5869 case $ac_sys_system in
5870 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005871 LDLIBRARY='libpython$(LDVERSION).dll.a'
5872 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873 ;;
5874 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005875 LDLIBRARY='libpython$(LDVERSION).so'
5876 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005877 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005879 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005880 then
5881 PY3LIBRARY=libpython3.so
5882 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005884 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005885 LDLIBRARY='libpython$(LDVERSION).so'
5886 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005887 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005889 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005890 then
5891 PY3LIBRARY=libpython3.so
5892 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 ;;
5894 hp*|HP*)
5895 case `uname -m` in
5896 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005897 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
5899 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005907 LDLIBRARY='libpython$(LDVERSION).dylib'
5908 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005911 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005913 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005914 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915
5916 esac
5917else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005918 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005919 case $ac_sys_system in
5920 CYGWIN*)
5921 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005922 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 esac
5925fi
5926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005927if test "$cross_compiling" = yes; then
5928 RUNSHARED=
5929fi
5930
Matthias Kloseb9621712010-04-24 17:59:49 +00005931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5932$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005935if test -n "$ac_tool_prefix"; then
5936 for ac_prog in ar aal
5937 do
5938 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5939set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5941$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005942if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005943 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944else
5945 if test -n "$AR"; then
5946 ac_cv_prog_AR="$AR" # Let the user override the test.
5947else
5948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5949for as_dir in $PATH
5950do
5951 IFS=$as_save_IFS
5952 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005955 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957 break 2
5958 fi
5959done
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961IFS=$as_save_IFS
5962
5963fi
5964fi
5965AR=$ac_cv_prog_AR
5966if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5968$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969else
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5971$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972fi
5973
5974
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005975 test -n "$AR" && break
5976 done
5977fi
5978if test -z "$AR"; then
5979 ac_ct_AR=$AR
5980 for ac_prog in ar aal
5981do
5982 # Extract the first word of "$ac_prog", so it can be a program name with args.
5983set dummy $ac_prog; ac_word=$2
5984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985$as_echo_n "checking for $ac_word... " >&6; }
5986if ${ac_cv_prog_ac_ct_AR+:} false; then :
5987 $as_echo_n "(cached) " >&6
5988else
5989 if test -n "$ac_ct_AR"; then
5990 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5991else
5992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH
5994do
5995 IFS=$as_save_IFS
5996 test -z "$as_dir" && as_dir=.
5997 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005999 ac_cv_prog_ac_ct_AR="$ac_prog"
6000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6001 break 2
6002 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006003done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004 done
6005IFS=$as_save_IFS
6006
6007fi
6008fi
6009ac_ct_AR=$ac_cv_prog_ac_ct_AR
6010if test -n "$ac_ct_AR"; then
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6012$as_echo "$ac_ct_AR" >&6; }
6013else
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6015$as_echo "no" >&6; }
6016fi
6017
6018
6019 test -n "$ac_ct_AR" && break
6020done
6021
6022 if test "x$ac_ct_AR" = x; then
6023 AR="ar"
6024 else
6025 case $cross_compiling:$ac_tool_warned in
6026yes:)
6027{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6028$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6029ac_tool_warned=yes ;;
6030esac
6031 AR=$ac_ct_AR
6032 fi
6033fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006034
6035
6036# tweak ARFLAGS only if the user didn't set it on the command line
6037
6038if test -z "$ARFLAGS"
6039then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006040 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006041fi
6042
doko@ubuntu.com58844492012-06-30 18:25:32 +02006043if test -n "$ac_tool_prefix"; then
6044 for ac_prog in readelf
6045 do
6046 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6047set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6049$as_echo_n "checking for $ac_word... " >&6; }
6050if ${ac_cv_prog_READELF+:} false; then :
6051 $as_echo_n "(cached) " >&6
6052else
6053 if test -n "$READELF"; then
6054 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6055else
6056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH
6058do
6059 IFS=$as_save_IFS
6060 test -z "$as_dir" && as_dir=.
6061 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006062 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006063 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6064 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6065 break 2
6066 fi
6067done
6068 done
6069IFS=$as_save_IFS
6070
6071fi
6072fi
6073READELF=$ac_cv_prog_READELF
6074if test -n "$READELF"; then
6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6076$as_echo "$READELF" >&6; }
6077else
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6079$as_echo "no" >&6; }
6080fi
6081
6082
6083 test -n "$READELF" && break
6084 done
6085fi
6086if test -z "$READELF"; then
6087 ac_ct_READELF=$READELF
6088 for ac_prog in readelf
6089do
6090 # Extract the first word of "$ac_prog", so it can be a program name with args.
6091set dummy $ac_prog; ac_word=$2
6092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6093$as_echo_n "checking for $ac_word... " >&6; }
6094if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6095 $as_echo_n "(cached) " >&6
6096else
6097 if test -n "$ac_ct_READELF"; then
6098 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6099else
6100as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103 IFS=$as_save_IFS
6104 test -z "$as_dir" && as_dir=.
6105 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006106 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006107 ac_cv_prog_ac_ct_READELF="$ac_prog"
6108 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109 break 2
6110 fi
6111done
6112 done
6113IFS=$as_save_IFS
6114
6115fi
6116fi
6117ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6118if test -n "$ac_ct_READELF"; then
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6120$as_echo "$ac_ct_READELF" >&6; }
6121else
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127 test -n "$ac_ct_READELF" && break
6128done
6129
6130 if test "x$ac_ct_READELF" = x; then
6131 READELF=":"
6132 else
6133 case $cross_compiling:$ac_tool_warned in
6134yes:)
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6137ac_tool_warned=yes ;;
6138esac
6139 READELF=$ac_ct_READELF
6140 fi
6141fi
6142
6143if test "$cross_compiling" = yes; then
6144 case "$READELF" in
6145 readelf|:)
6146 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6147 ;;
6148 esac
6149fi
6150
6151
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006154hp*|HP*)
6155 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156 if test -z "$INSTALL"
6157 then
6158 INSTALL="${srcdir}/install-sh -c"
6159 fi
6160esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161# Find a good install program. We prefer a C program (faster),
6162# so one script is as good as another. But avoid the broken or
6163# incompatible versions:
6164# SysV /etc/install, /usr/sbin/install
6165# SunOS /usr/etc/install
6166# IRIX /sbin/install
6167# AIX /bin/install
6168# AmigaOS /C/install, which installs bootblocks on floppy discs
6169# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6170# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6171# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6172# OS/2's system install, which has a completely different semantic
6173# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006174# Reject install programs that cannot install multiple files.
6175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6176$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006178if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180else
6181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184 IFS=$as_save_IFS
6185 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 # Account for people who put trailing slashes in PATH elements.
6187case $as_dir/ in #((
6188 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 /usr/ucb/* ) ;;
6192 *)
6193 # OSF1 and SCO ODT 3.0 have their own names for install.
6194 # Don't use installbsd from OSF since it installs stuff as root
6195 # by default.
6196 for ac_prog in ginstall scoinst install; do
6197 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006198 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199 if test $ac_prog = install &&
6200 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6201 # AIX install. It has an incompatible calling convention.
6202 :
6203 elif test $ac_prog = install &&
6204 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6205 # program-specific install script used by HP pwplus--don't use.
6206 :
6207 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006208 rm -rf conftest.one conftest.two conftest.dir
6209 echo one > conftest.one
6210 echo two > conftest.two
6211 mkdir conftest.dir
6212 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6213 test -s conftest.one && test -s conftest.two &&
6214 test -s conftest.dir/conftest.one &&
6215 test -s conftest.dir/conftest.two
6216 then
6217 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6218 break 3
6219 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006220 fi
6221 fi
6222 done
6223 done
6224 ;;
6225esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006226
6227 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228IFS=$as_save_IFS
6229
Matthias Kloseb9621712010-04-24 17:59:49 +00006230rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231
6232fi
6233 if test "${ac_cv_path_install+set}" = set; then
6234 INSTALL=$ac_cv_path_install
6235 else
6236 # As a last resort, use the slow shell script. Don't cache a
6237 # value for INSTALL within a source directory, because that will
6238 # break other packages using the cache if that directory is
6239 # removed, or if the value is a relative name.
6240 INSTALL=$ac_install_sh
6241 fi
6242fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6244$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006245
6246# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6247# It thinks the first close brace ends the variable substitution.
6248test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6249
6250test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6251
6252test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6253
Matthias Klose93a0ef12012-03-15 18:08:34 +01006254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6255$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6256if test -z "$MKDIR_P"; then
6257 if ${ac_cv_path_mkdir+:} false; then :
6258 $as_echo_n "(cached) " >&6
6259else
6260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6261for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6262do
6263 IFS=$as_save_IFS
6264 test -z "$as_dir" && as_dir=.
6265 for ac_prog in mkdir gmkdir; do
6266 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006267 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006268 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6269 'mkdir (GNU coreutils) '* | \
6270 'mkdir (coreutils) '* | \
6271 'mkdir (fileutils) '4.1*)
6272 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6273 break 3;;
6274 esac
6275 done
6276 done
6277 done
6278IFS=$as_save_IFS
6279
6280fi
6281
6282 test -d ./--version && rmdir ./--version
6283 if test "${ac_cv_path_mkdir+set}" = set; then
6284 MKDIR_P="$ac_cv_path_mkdir -p"
6285 else
6286 # As a last resort, use the slow shell script. Don't cache a
6287 # value for MKDIR_P within a source directory, because that will
6288 # break other packages using the cache if that directory is
6289 # removed, or if the value is a relative name.
6290 MKDIR_P="$ac_install_sh -d"
6291 fi
6292fi
6293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6294$as_echo "$MKDIR_P" >&6; }
6295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296
6297# Not every filesystem supports hard links
6298
6299if test -z "$LN" ; then
6300 case $ac_sys_system in
6301 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006302 *) LN=ln;;
6303 esac
6304fi
6305
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006306# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006307
6308ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6312$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313
6314# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006315if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316 withval=$with_pydebug;
6317if test "$withval" != no
6318then
6319
Matthias Kloseb9621712010-04-24 17:59:49 +00006320$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321
Matthias Kloseb9621712010-04-24 17:59:49 +00006322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6323$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006325 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006326else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328fi
6329else
Matthias Kloseb9621712010-04-24 17:59:49 +00006330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6331$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
6333
6334
T. Woutersddbfa2c2017-05-23 01:30:49 +02006335# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6336# the ABI. This allows enabling assertions without changing the ABI.
6337assertions='false'
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6339$as_echo_n "checking for --with-assertions... " >&6; }
6340
6341# Check whether --with-assertions was given.
6342if test "${with_assertions+set}" = set; then :
6343 withval=$with_assertions;
6344if test "$withval" != no
6345then
6346 assertions='true'
6347fi
6348fi
6349
6350if test "$assertions" = 'true'; then
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6352$as_echo "yes" >&6; }
6353elif test "$Py_DEBUG" = 'true'; then
6354 assertions='true'
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6356$as_echo "implied by --with-pydebug" >&6; }
6357else
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6359$as_echo "no" >&6; }
6360fi
6361
Brett Cannon63d98bc2016-09-06 17:12:40 -07006362# Enable optimization flags
6363
6364
6365Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6367$as_echo_n "checking for --enable-optimizations... " >&6; }
6368# Check whether --enable-optimizations was given.
6369if test "${enable_optimizations+set}" = set; then :
6370 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006371if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006372then
6373 Py_OPT='true'
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6375$as_echo "yes" >&6; };
6376else
6377 Py_OPT='false'
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6379$as_echo "no" >&6; };
6380fi
6381else
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }
6384fi
6385
6386if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006387 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6388 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006389 # 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 +00006390 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006391 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006392 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006393 DEF_MAKE_RULE="build_all"
6394else
6395 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006396 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006397 DEF_MAKE_RULE="all"
6398fi
6399
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006400# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6401# normal names in the default $PATH (ie: Ubuntu). They exist under the
6402# non-suffixed name in their versioned llvm directory.
6403
6404llvm_bin_dir=''
6405llvm_path="${PATH}"
6406if test "${CC}" = "clang"
6407then
6408 clang_bin=`which clang`
6409 # Some systems install clang elsewhere as a symlink to the real path
6410 # which is where the related llvm tools are located.
6411 if test -L "${clang_bin}"
6412 then
6413 clang_dir=`dirname "${clang_bin}"`
6414 clang_bin=`readlink "${clang_bin}"`
6415 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6416 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6417 fi
6418fi
6419
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006420# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6422$as_echo_n "checking for --with-lto... " >&6; }
6423
6424# Check whether --with-lto was given.
6425if test "${with_lto+set}" = set; then :
6426 withval=$with_lto;
6427if test "$withval" != no
6428then
6429 Py_LTO='true'
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6431$as_echo "yes" >&6; };
6432else
6433 Py_LTO='false'
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6435$as_echo "no" >&6; };
6436fi
6437else
6438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6439$as_echo "no" >&6; }
6440fi
6441
6442if test "$Py_LTO" = 'true' ; then
6443 case $CC in
6444 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006445
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006447$as_echo_n "checking target system type... " >&6; }
6448if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006449 $as_echo_n "(cached) " >&6
6450else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006451 if test "x$target_alias" = x; then
6452 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006453else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006454 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6455 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6456fi
6457
6458fi
6459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6460$as_echo "$ac_cv_target" >&6; }
6461case $ac_cv_target in
6462*-*-*) ;;
6463*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6464esac
6465target=$ac_cv_target
6466ac_save_IFS=$IFS; IFS='-'
6467set x $ac_cv_target
6468shift
6469target_cpu=$1
6470target_vendor=$2
6471shift; shift
6472# Remember, the first character of IFS is used to create $*,
6473# except with old shells:
6474target_os=$*
6475IFS=$ac_save_IFS
6476case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6477
6478
6479# The aliases save the names the user supplied, while $host etc.
6480# will get canonicalized.
6481test -n "$target_alias" &&
6482 test "$program_prefix$program_suffix$program_transform_name" = \
6483 NONENONEs,x,x, &&
6484 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006485# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6486set dummy $target_alias-llvm-ar; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_path_LLVM_AR+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 case $LLVM_AR in
6493 [\\/]* | ?:[\\/]*)
6494 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6495 ;;
6496 *)
6497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6498for as_dir in ${llvm_path}
6499do
6500 IFS=$as_save_IFS
6501 test -z "$as_dir" && as_dir=.
6502 for ac_exec_ext in '' $ac_executable_extensions; do
6503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6504 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6506 break 2
6507 fi
6508done
6509 done
6510IFS=$as_save_IFS
6511
6512 ;;
6513esac
6514fi
6515LLVM_AR=$ac_cv_path_LLVM_AR
6516if test -n "$LLVM_AR"; then
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6518$as_echo "$LLVM_AR" >&6; }
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522fi
6523
6524
6525if test -z "$ac_cv_path_LLVM_AR"; then
6526 if test "$build" = "$target"; then
6527 ac_pt_LLVM_AR=$LLVM_AR
6528 # Extract the first word of "llvm-ar", so it can be a program name with args.
6529set dummy llvm-ar; ac_word=$2
6530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6531$as_echo_n "checking for $ac_word... " >&6; }
6532if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6533 $as_echo_n "(cached) " >&6
6534else
6535 case $ac_pt_LLVM_AR in
6536 [\\/]* | ?:[\\/]*)
6537 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6538 ;;
6539 *)
6540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541for as_dir in ${llvm_path}
6542do
6543 IFS=$as_save_IFS
6544 test -z "$as_dir" && as_dir=.
6545 for ac_exec_ext in '' $ac_executable_extensions; do
6546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6549 break 2
6550 fi
6551done
6552 done
6553IFS=$as_save_IFS
6554
6555 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6556 ;;
6557esac
6558fi
6559ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6560if test -n "$ac_pt_LLVM_AR"; then
6561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6562$as_echo "$ac_pt_LLVM_AR" >&6; }
6563else
6564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565$as_echo "no" >&6; }
6566fi
6567
6568 LLVM_AR=$ac_pt_LLVM_AR
6569 else
6570 LLVM_AR="''"
6571 fi
6572else
6573 LLVM_AR="$ac_cv_path_LLVM_AR"
6574fi
6575
6576
6577 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6578 then
6579 LLVM_AR_FOUND="found"
6580 else
6581 LLVM_AR_FOUND="not-found"
6582 fi
6583 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6584 then
6585 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6586 if test -n "${found_llvm_ar}"
6587 then
6588 LLVM_AR='/usr/bin/xcrun llvm-ar'
6589 LLVM_AR_FOUND=found
6590 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6591$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6592 fi
6593 fi
6594 if test $LLVM_AR_FOUND = not-found
6595 then
6596 LLVM_PROFR_ERR=yes
6597 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6598 else
6599 LLVM_AR_ERR=no
6600 fi
6601 AR="${LLVM_AR}"
6602 case $ac_sys_system in
6603 Darwin*)
6604 # Any changes made here should be reflected in the GCC+Darwin case below
6605 LTOFLAGS="-flto -Wl,-export_dynamic"
6606 ;;
6607 *)
6608 LTOFLAGS="-flto"
6609 ;;
6610 esac
6611 ;;
6612 *gcc*)
6613 case $ac_sys_system in
6614 Darwin*)
6615 LTOFLAGS="-flto -Wl,-export_dynamic"
6616 ;;
6617 *)
6618 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6619 ;;
6620 esac
6621 ;;
6622 esac
6623
6624 if test "$ac_cv_prog_cc_g" = "yes"
6625 then
6626 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6627 # to get debug symbols.
6628 LTOFLAGS="$LTOFLAGS -g"
6629 fi
6630
stratakisf92c7aa2018-12-04 15:54:01 +01006631 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006632 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006633fi
6634
6635# Enable PGO flags.
6636
6637
6638
6639
6640
6641
Gregory P. Smith799520c2016-09-07 16:10:00 -07006642# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6643set dummy $target_alias-llvm-profdata; ac_word=$2
6644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6645$as_echo_n "checking for $ac_word... " >&6; }
6646if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6647 $as_echo_n "(cached) " >&6
6648else
6649 case $LLVM_PROFDATA in
6650 [\\/]* | ?:[\\/]*)
6651 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6652 ;;
6653 *)
6654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6655for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006656do
6657 IFS=$as_save_IFS
6658 test -z "$as_dir" && as_dir=.
6659 for ac_exec_ext in '' $ac_executable_extensions; do
6660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006661 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6663 break 2
6664 fi
6665done
6666 done
6667IFS=$as_save_IFS
6668
Gregory P. Smith799520c2016-09-07 16:10:00 -07006669 ;;
6670esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006671fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006672LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6673if test -n "$LLVM_PROFDATA"; then
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6675$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006676else
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6678$as_echo "no" >&6; }
6679fi
6680
6681
Gregory P. Smith799520c2016-09-07 16:10:00 -07006682if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6683 if test "$build" = "$target"; then
6684 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6685 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6686set dummy llvm-profdata; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6690 $as_echo_n "(cached) " >&6
6691else
6692 case $ac_pt_LLVM_PROFDATA in
6693 [\\/]* | ?:[\\/]*)
6694 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6695 ;;
6696 *)
6697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in ${llvm_path}
6699do
6700 IFS=$as_save_IFS
6701 test -z "$as_dir" && as_dir=.
6702 for ac_exec_ext in '' $ac_executable_extensions; do
6703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706 break 2
6707 fi
6708done
6709 done
6710IFS=$as_save_IFS
6711
6712 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6713 ;;
6714esac
6715fi
6716ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6717if test -n "$ac_pt_LLVM_PROFDATA"; then
6718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6719$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6720else
6721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6722$as_echo "no" >&6; }
6723fi
6724
6725 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6726 else
6727 LLVM_PROFDATA="''"
6728 fi
6729else
6730 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6731fi
6732
6733
6734if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6735then
6736 LLVM_PROF_FOUND="found"
6737else
6738 LLVM_PROF_FOUND="not-found"
6739fi
6740if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6741then
6742 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6743 if test -n "${found_llvm_profdata}"
6744 then
6745 # llvm-profdata isn't directly in $PATH in some cases.
6746 # https://apple.stackexchange.com/questions/197053/
6747 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6748 LLVM_PROF_FOUND=found
6749 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6750$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6751 fi
6752fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006753LLVM_PROF_ERR=no
6754case $CC in
6755 *clang*)
6756 # Any changes made here should be reflected in the GCC+Darwin case below
6757 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6758 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006759 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006760 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6761 if test $LLVM_PROF_FOUND = not-found
6762 then
6763 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006764 if test "${REQUIRE_PGO}" = "yes"
6765 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006766 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 -07006767 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006768 fi
6769 ;;
6770 *gcc*)
6771 case $ac_sys_system in
6772 Darwin*)
6773 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6774 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006775 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006776 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006777 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778 then
6779 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006780 if test "${REQUIRE_PGO}" = "yes"
6781 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006782 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 -07006783 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006784 fi
6785 ;;
6786 *)
6787 PGO_PROF_GEN_FLAG="-fprofile-generate"
6788 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6789 LLVM_PROF_MERGER="true"
6790 LLVM_PROF_FILE=""
6791 ;;
6792 esac
6793 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006794 *icc*)
6795 PGO_PROF_GEN_FLAG="-prof-gen"
6796 PGO_PROF_USE_FLAG="-prof-use"
6797 LLVM_PROF_MERGER="true"
6798 LLVM_PROF_FILE=""
6799 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006800esac
6801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6803# merged with this chunk of code?
6804
6805# Optimizer/debugger flags
6806# ------------------------
6807# (The following bit of code is complicated enough - please keep things
6808# indented properly. Just pretend you're editing Python code. ;-)
6809
6810# There are two parallel sets of case statements below, one that checks to
6811# see if OPT was set and one that does BASECFLAGS setting based upon
6812# compiler and platform. BASECFLAGS tweaks need to be made even if the
6813# user set OPT.
6814
6815# tweak OPT based on compiler and platform, only if the user didn't set
6816# it on the command line
6817
Victor Stinner9ed34a82017-05-02 22:35:58 +02006818
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006819if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820then
6821 case $GCC in
6822 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6824 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6825 WRAP="-fwrapv"
6826 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006827
Stefan Krahaf04ff22011-12-08 22:20:31 +01006828 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006829 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006830 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006831 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006832 *)
6833 if $CC --version 2>&1 | grep -q clang
6834 then
6835 cc_is_clang=1
6836 else
6837 cc_is_clang=
6838 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006839 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006840
Victor Stinner35f3d242017-04-21 12:35:24 +02006841 if test -n "${cc_is_clang}"
6842 then
6843 # Clang also needs -fwrapv
6844 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006845 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6846 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006847 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006848 fi
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850 case $ac_cv_prog_cc_g in
6851 yes)
6852 if test "$Py_DEBUG" = 'true' ; then
6853 # Optimization messes up debuggers, so turn it off for
6854 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006855 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006856 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006857 else
Victor Stinner28205b22017-04-21 11:24:34 +02006858 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006859 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860 else
Victor Stinner28205b22017-04-21 11:24:34 +02006861 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 fi
6863 ;;
6864 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006865 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 ;;
6867 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006868
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 case $ac_sys_system in
6870 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6871 ;;
6872 esac
6873 ;;
6874
6875 *)
6876 OPT="-O"
6877 ;;
6878 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006879fi
6880
6881
6882
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006883
stratakiscf10a752018-12-19 18:19:01 +01006884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885# The -arch flags for universal builds on OSX
6886UNIVERSAL_ARCH_FLAGS=
6887
6888
6889# tweak BASECFLAGS based on compiler and platform
6890case $GCC in
6891yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006892 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006893
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6895$as_echo_n "checking for -Wextra... " >&6; }
6896 ac_save_cc="$CC"
6897 CC="$CC -Wextra -Werror"
6898 if ${ac_cv_extra_warnings+:} false; then :
6899 $as_echo_n "(cached) " >&6
6900else
6901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6902/* end confdefs.h. */
6903
6904
6905int
6906main ()
6907{
6908
6909 ;
6910 return 0;
6911}
6912
6913_ACEOF
6914if ac_fn_c_try_compile "$LINENO"; then :
6915
6916 ac_cv_extra_warnings=yes
6917
6918else
6919
6920 ac_cv_extra_warnings=no
6921
6922fi
6923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6924fi
6925
6926 CC="$ac_save_cc"
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6928$as_echo "$ac_cv_extra_warnings" >&6; }
6929
6930 if test $ac_cv_extra_warnings = yes
6931 then
6932 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6933 fi
6934
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006935 # Python doesn't violate C99 aliasing rules, but older versions of
6936 # GCC produce warnings for legal Python code. Enable
6937 # -fno-strict-aliasing on versions of GCC that support but produce
6938 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6940$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006941 ac_save_cc="$CC"
6942 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006943 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006944 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006945 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006946else
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006948/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006949
Matthias Kloseb159a552010-04-25 21:00:44 +00006950
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006951int
6952main ()
6953{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006954
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006955 ;
6956 return 0;
6957}
Matthias Kloseb159a552010-04-25 21:00:44 +00006958
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006960if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006961
6962 CC="$ac_save_cc -fstrict-aliasing"
6963 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006965/* end confdefs.h. */
6966
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006967 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006968int
6969main ()
6970{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006971double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972 ;
6973 return 0;
6974}
Matthias Kloseb159a552010-04-25 21:00:44 +00006975
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006977if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006978
6979 ac_cv_no_strict_aliasing=no
6980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981else
Matthias Kloseb159a552010-04-25 21:00:44 +00006982
6983 ac_cv_no_strict_aliasing=yes
6984
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988else
Matthias Kloseb159a552010-04-25 21:00:44 +00006989
6990 ac_cv_no_strict_aliasing=no
6991
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006994fi
6995
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006996 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6999$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007001 then
7002 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7003 fi
7004
Zachary Ware5af85642015-12-21 12:09:17 -06007005 # ICC doesn't recognize the option, but only emits a warning
7006 ## XXX does it emit an unused result warning and can it be disabled?
7007 case "$CC" in
7008 *icc*)
7009 ac_cv_disable_unused_result_warning=no
7010 ;;
7011 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7013$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7014 ac_save_cc="$CC"
7015 CC="$CC -Wunused-result -Werror"
7016 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007017 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007018 $as_echo_n "(cached) " >&6
7019else
7020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7021/* end confdefs.h. */
7022
7023
7024int
7025main ()
7026{
7027
7028 ;
7029 return 0;
7030}
7031
7032_ACEOF
7033if ac_fn_c_try_compile "$LINENO"; then :
7034
7035 ac_cv_disable_unused_result_warning=yes
7036
7037else
7038
7039 ac_cv_disable_unused_result_warning=no
7040
7041fi
7042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7043fi
7044
7045 CFLAGS="$save_CFLAGS"
7046 CC="$ac_save_cc"
7047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7048$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007049 ;;
7050 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007051
7052 if test $ac_cv_disable_unused_result_warning = yes
7053 then
7054 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007055 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7056 fi
7057
7058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7059$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7060 ac_save_cc="$CC"
7061 CC="$CC -Wunused-parameter -Werror"
7062 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7063 $as_echo_n "(cached) " >&6
7064else
7065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7066/* end confdefs.h. */
7067
7068
7069int
7070main ()
7071{
7072
7073 ;
7074 return 0;
7075}
7076
7077_ACEOF
7078if ac_fn_c_try_compile "$LINENO"; then :
7079
7080 ac_cv_disable_unused_parameter_warning=yes
7081
7082else
7083
7084 ac_cv_disable_unused_parameter_warning=no
7085
7086fi
7087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7088fi
7089
7090 CC="$ac_save_cc"
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7092$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7093
7094 if test $ac_cv_disable_unused_parameter_warning = yes
7095 then
7096 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7097 fi
7098
7099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7100$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7101 ac_save_cc="$CC"
7102 CC="$CC -Wmissing-field-initializers -Werror"
7103 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7104 $as_echo_n "(cached) " >&6
7105else
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108
7109
7110int
7111main ()
7112{
7113
7114 ;
7115 return 0;
7116}
7117
7118_ACEOF
7119if ac_fn_c_try_compile "$LINENO"; then :
7120
7121 ac_cv_disable_missing_field_initializers=yes
7122
7123else
7124
7125 ac_cv_disable_missing_field_initializers=no
7126
7127fi
7128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129fi
7130
7131 CC="$ac_save_cc"
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7133$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7134
7135 if test $ac_cv_disable_missing_field_initializers = yes
7136 then
7137 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007138 fi
7139
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7141$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7142 ac_save_cc="$CC"
7143 CC="$CC -Wsign-compare"
7144 save_CFLAGS="$CFLAGS"
7145 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7146 $as_echo_n "(cached) " >&6
7147else
7148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7149/* end confdefs.h. */
7150
7151
7152int
7153main ()
7154{
7155
7156 ;
7157 return 0;
7158}
7159
7160_ACEOF
7161if ac_fn_c_try_compile "$LINENO"; then :
7162
7163 ac_cv_enable_sign_compare_warning=yes
7164
7165else
7166
7167 ac_cv_enable_sign_compare_warning=no
7168
7169fi
7170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7171fi
7172
7173 CFLAGS="$save_CFLAGS"
7174 CC="$ac_save_cc"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7176$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7177
7178 if test $ac_cv_enable_sign_compare_warning = yes
7179 then
7180 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7181 fi
7182
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7184$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7185 ac_save_cc="$CC"
7186 CC="$CC -Wunreachable-code"
7187 save_CFLAGS="$CFLAGS"
7188 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7189 $as_echo_n "(cached) " >&6
7190else
7191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7192/* end confdefs.h. */
7193
7194
7195int
7196main ()
7197{
7198
7199 ;
7200 return 0;
7201}
7202
7203_ACEOF
7204if ac_fn_c_try_compile "$LINENO"; then :
7205
7206 ac_cv_enable_unreachable_code_warning=yes
7207
7208else
7209
7210 ac_cv_enable_unreachable_code_warning=no
7211
7212fi
7213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214fi
7215
7216 CFLAGS="$save_CFLAGS"
7217 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007218
7219 # Don't enable unreachable code warning in debug mode, since it usually
7220 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007221 # Issue #24324: Unfortunately, the unreachable code warning does not work
7222 # correctly on gcc and has been silently removed from the compiler.
7223 # It is supported on clang but on OS X systems gcc may be an alias
7224 # for clang. Try to determine if the compiler is not really gcc and,
7225 # if so, only then enable the warning.
7226 if test $ac_cv_enable_unreachable_code_warning = yes && \
7227 test "$Py_DEBUG" != "true" && \
7228 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007229 then
7230 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007231 else
7232 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007233 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7235$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007236
INADA Naokie3364842018-06-05 20:40:53 +09007237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7238$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7239 ac_save_cc="$CC"
7240 CC="$CC -Werror -Wstrict-prototypes"
7241 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7242 $as_echo_n "(cached) " >&6
7243else
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247
7248int
7249main ()
7250{
7251
7252 ;
7253 return 0;
7254}
7255
7256_ACEOF
7257if ac_fn_c_try_compile "$LINENO"; then :
7258
7259 ac_cv_enable_strict_prototypes_warning=yes
7260
7261else
7262
7263 ac_cv_enable_strict_prototypes_warning=no
7264
7265fi
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7267fi
7268
7269 CC="$ac_save_cc"
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7271$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7272
7273 if test $ac_cv_enable_strict_prototypes_warning = yes
7274 then
7275 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7276 fi
7277
Victor Stinner193ee0a2017-02-06 14:24:00 +01007278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7279$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7280 ac_save_cc="$CC"
7281 CC="$CC -Werror=implicit-function-declaration"
7282 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7283 $as_echo_n "(cached) " >&6
7284else
7285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7286/* end confdefs.h. */
7287
7288
7289int
7290main ()
7291{
7292
7293 ;
7294 return 0;
7295}
7296
7297_ACEOF
7298if ac_fn_c_try_compile "$LINENO"; then :
7299
7300 ac_cv_enable_implicit_function_declaration_error=yes
7301
7302else
7303
7304 ac_cv_enable_implicit_function_declaration_error=no
7305
7306fi
7307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7308fi
7309
7310 CC="$ac_save_cc"
7311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7312$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7313
7314 if test $ac_cv_enable_implicit_function_declaration_error = yes
7315 then
7316 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7317 fi
7318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7320 # support. Without this, treatment of subnormals doesn't follow
7321 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007322 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007323 alpha*)
7324 BASECFLAGS="$BASECFLAGS -mieee"
7325 ;;
7326 esac
7327
7328 case $ac_sys_system in
7329 SCO_SV*)
7330 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7331 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007332
Ned Deily87adb6e2013-10-18 21:09:56 -07007333 Darwin*)
7334 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7335 # used to be here, but non-Apple gcc doesn't accept them.
7336 if test "${CC}" = gcc
7337 then
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007339$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007340 case "${UNIVERSALSDK}" in
7341 */MacOSX10.4u.sdk)
7342 # Build using 10.4 SDK, force usage of gcc when the
7343 # compiler is gcc, otherwise the user will get very
7344 # confusing error messages when building on OSX 10.6
7345 CC=gcc-4.0
7346 CPP=cpp-4.0
7347 ;;
7348 esac
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007350$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007351 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007352
Ned Deily87adb6e2013-10-18 21:09:56 -07007353 if test "${enable_universalsdk}"
7354 then
7355 case "$UNIVERSAL_ARCHS" in
7356 32-bit)
7357 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7358 LIPO_32BIT_FLAGS=""
7359 ARCH_RUN_32BIT=""
7360 ;;
7361 64-bit)
7362 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7363 LIPO_32BIT_FLAGS=""
7364 ARCH_RUN_32BIT="true"
7365 ;;
7366 all)
7367 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7368 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7369 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7370 ;;
7371 intel)
7372 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7373 LIPO_32BIT_FLAGS="-extract i386"
7374 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7375 ;;
7376 intel-32)
7377 UNIVERSAL_ARCH_FLAGS="-arch i386"
7378 LIPO_32BIT_FLAGS=""
7379 ARCH_RUN_32BIT=""
7380 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007381 intel-64)
7382 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7383 LIPO_32BIT_FLAGS=""
7384 ARCH_RUN_32BIT="true"
7385 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007386 3-way)
7387 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7388 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7389 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7390 ;;
7391 *)
7392 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7393 ;;
7394 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395
Ned Deily87adb6e2013-10-18 21:09:56 -07007396 if test "${UNIVERSALSDK}" != "/"
7397 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007398 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7399 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007401 else
7402 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7403 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007404 fi
7405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007406
Ned Deily87adb6e2013-10-18 21:09:56 -07007407 # Calculate an appropriate deployment target for this build:
7408 # The deployment target value is used explicitly to enable certain
7409 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007410 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007411 # component of the string returned by distutils.get_platform().
7412 #
7413 # Use the value from:
7414 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7415 # 2. the operating system version of the build machine if >= 10.6
7416 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7417 # below to pick either 10.3, 10.4, or 10.5 as the target.
7418 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007419
Ned Deily87adb6e2013-10-18 21:09:56 -07007420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7421$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007422 cur_target_major=`sw_vers -productVersion | \
7423 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7424 cur_target_minor=`sw_vers -productVersion | \
7425 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7426 cur_target="${cur_target_major}.${cur_target_minor}"
7427 if test ${cur_target_major} -eq 10 && \
7428 test ${cur_target_minor} -ge 3 && \
7429 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007430 then
Ned Deily36820b62014-06-25 13:44:22 -07007431 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 cur_target=10.3
7433 if test ${enable_universalsdk}
7434 then
7435 case "$UNIVERSAL_ARCHS" in
7436 all|3-way|intel|64-bit)
7437 # These configurations were first supported in 10.5
7438 cur_target='10.5'
7439 ;;
7440 esac
7441 else
7442 if test `/usr/bin/arch` = "i386"
7443 then
7444 # 10.4 was the first release to support Intel archs
7445 cur_target="10.4"
7446 fi
7447 fi
7448 fi
7449 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007450
Ned Deily87adb6e2013-10-18 21:09:56 -07007451 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7452 # environment with a value that is the same as what we'll use
7453 # in the Makefile to ensure that we'll get the same compiler
7454 # environment during configure and build time.
7455 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7456 export MACOSX_DEPLOYMENT_TARGET
7457 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7459$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007460
Ned Deily87adb6e2013-10-18 21:09:56 -07007461 # end of Darwin* tests
7462 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463 esac
7464 ;;
7465
7466*)
7467 case $ac_sys_system in
7468 OpenUNIX*|UnixWare*)
7469 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7470 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471 SCO_SV*)
7472 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7473 ;;
7474 esac
7475 ;;
7476esac
7477
Zachary Ware5af85642015-12-21 12:09:17 -06007478# ICC needs -fp-model strict or floats behave badly
7479case "$CC" in
7480*icc*)
7481 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7482 ;;
7483esac
7484
T. Woutersddbfa2c2017-05-23 01:30:49 +02007485if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486 :
7487else
7488 OPT="-DNDEBUG $OPT"
7489fi
7490
7491if test "$ac_arch_flags"
7492then
7493 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7494fi
7495
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007496# On some compilers, pthreads are available without further options
7497# (e.g. MacOS X). On some of these systems, the compiler will not
7498# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7499# So we have to see first whether pthreads are available without
7500# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7502$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007503if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505else
Matthias Kloseb9621712010-04-24 17:59:49 +00007506 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007507 ac_cv_pthread_is_default=no
7508else
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510/* end confdefs.h. */
7511
Stefan Krah7dba5942012-11-22 22:49:11 +01007512#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513#include <pthread.h>
7514
7515void* routine(void* p){return NULL;}
7516
7517int main(){
7518 pthread_t p;
7519 if(pthread_create(&p,NULL,routine,NULL)!=0)
7520 return 1;
7521 (void)pthread_detach(p);
7522 return 0;
7523}
7524
7525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007526if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007527
7528 ac_cv_pthread_is_default=yes
7529 ac_cv_kthread=no
7530 ac_cv_pthread=no
7531
7532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007535rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7536 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537fi
7538
7539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540fi
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7543$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544
7545
7546if test $ac_cv_pthread_is_default = yes
7547then
7548 ac_cv_kpthread=no
7549else
7550# -Kpthread, if available, provides the right #defines
7551# and linker options to make pthread_create available
7552# Some compilers won't report that they do not support -Kpthread,
7553# so we need to run a program to see whether it really made the
7554# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7556$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007557if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007559else
7560 ac_save_cc="$CC"
7561CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007562if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563 ac_cv_kpthread=no
7564else
Matthias Kloseb9621712010-04-24 17:59:49 +00007565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566/* end confdefs.h. */
7567
Stefan Krah7dba5942012-11-22 22:49:11 +01007568#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007569#include <pthread.h>
7570
7571void* routine(void* p){return NULL;}
7572
7573int main(){
7574 pthread_t p;
7575 if(pthread_create(&p,NULL,routine,NULL)!=0)
7576 return 1;
7577 (void)pthread_detach(p);
7578 return 0;
7579}
7580
7581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007582if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007583 ac_cv_kpthread=yes
7584else
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589fi
7590
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591CC="$ac_save_cc"
7592fi
7593
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7595$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596fi
7597
7598if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7599then
7600# -Kthread, if available, provides the right #defines
7601# and linker options to make pthread_create available
7602# Some compilers won't report that they do not support -Kthread,
7603# so we need to run a program to see whether it really made the
7604# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7606$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007607if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007608 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007609else
7610 ac_save_cc="$CC"
7611CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007612if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613 ac_cv_kthread=no
7614else
Matthias Kloseb9621712010-04-24 17:59:49 +00007615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616/* end confdefs.h. */
7617
Stefan Krah7dba5942012-11-22 22:49:11 +01007618#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007619#include <pthread.h>
7620
7621void* routine(void* p){return NULL;}
7622
7623int main(){
7624 pthread_t p;
7625 if(pthread_create(&p,NULL,routine,NULL)!=0)
7626 return 1;
7627 (void)pthread_detach(p);
7628 return 0;
7629}
7630
7631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007632if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007633 ac_cv_kthread=yes
7634else
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007637rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7638 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007639fi
7640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641CC="$ac_save_cc"
7642fi
7643
Matthias Kloseb9621712010-04-24 17:59:49 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7645$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646fi
7647
7648if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7649then
7650# -pthread, if available, provides the right #defines
7651# and linker options to make pthread_create available
7652# Some compilers won't report that they do not support -pthread,
7653# so we need to run a program to see whether it really made the
7654# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7656$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007657if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007659else
7660 ac_save_cc="$CC"
7661CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007662if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663 ac_cv_pthread=no
7664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666/* end confdefs.h. */
7667
Stefan Krah7dba5942012-11-22 22:49:11 +01007668#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007669#include <pthread.h>
7670
7671void* routine(void* p){return NULL;}
7672
7673int main(){
7674 pthread_t p;
7675 if(pthread_create(&p,NULL,routine,NULL)!=0)
7676 return 1;
7677 (void)pthread_detach(p);
7678 return 0;
7679}
7680
7681_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007682if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007683 ac_cv_pthread=yes
7684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007687rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7688 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007689fi
7690
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691CC="$ac_save_cc"
7692fi
7693
Matthias Kloseb9621712010-04-24 17:59:49 +00007694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7695$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696fi
7697
7698# If we have set a CC compiler flag for thread support then
7699# check if it works for CXX, too.
7700ac_cv_cxx_thread=no
7701if test ! -z "$CXX"
7702then
Matthias Kloseb9621712010-04-24 17:59:49 +00007703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7704$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705ac_save_cxx="$CXX"
7706
7707if test "$ac_cv_kpthread" = "yes"
7708then
7709 CXX="$CXX -Kpthread"
7710 ac_cv_cxx_thread=yes
7711elif test "$ac_cv_kthread" = "yes"
7712then
7713 CXX="$CXX -Kthread"
7714 ac_cv_cxx_thread=yes
7715elif test "$ac_cv_pthread" = "yes"
7716then
7717 CXX="$CXX -pthread"
7718 ac_cv_cxx_thread=yes
7719fi
7720
7721if test $ac_cv_cxx_thread = yes
7722then
7723 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7724 $CXX -c conftest.$ac_ext 2>&5
7725 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7726 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7727 then
7728 ac_cv_cxx_thread=yes
7729 else
7730 ac_cv_cxx_thread=no
7731 fi
7732 rm -fr conftest*
7733fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7735$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736fi
7737CXX="$ac_save_cxx"
7738
7739
7740# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7742$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007743if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007744 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747/* end confdefs.h. */
7748#include <stdlib.h>
7749#include <stdarg.h>
7750#include <string.h>
7751#include <float.h>
7752
7753int
7754main ()
7755{
7756
7757 ;
7758 return 0;
7759}
7760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007761if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007762 ac_cv_header_stdc=yes
7763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7767
7768if test $ac_cv_header_stdc = yes; then
7769 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007771/* end confdefs.h. */
7772#include <string.h>
7773
7774_ACEOF
7775if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 $EGREP "memchr" >/dev/null 2>&1; then :
7777
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778else
7779 ac_cv_header_stdc=no
7780fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007781rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782
7783fi
7784
7785if test $ac_cv_header_stdc = yes; then
7786 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007788/* end confdefs.h. */
7789#include <stdlib.h>
7790
7791_ACEOF
7792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007793 $EGREP "free" >/dev/null 2>&1; then :
7794
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795else
7796 ac_cv_header_stdc=no
7797fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007798rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007799
7800fi
7801
7802if test $ac_cv_header_stdc = yes; then
7803 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007804 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805 :
7806else
Matthias Kloseb9621712010-04-24 17:59:49 +00007807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007808/* end confdefs.h. */
7809#include <ctype.h>
7810#include <stdlib.h>
7811#if ((' ' & 0x0FF) == 0x020)
7812# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7813# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7814#else
7815# define ISLOWER(c) \
7816 (('a' <= (c) && (c) <= 'i') \
7817 || ('j' <= (c) && (c) <= 'r') \
7818 || ('s' <= (c) && (c) <= 'z'))
7819# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7820#endif
7821
7822#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7823int
7824main ()
7825{
7826 int i;
7827 for (i = 0; i < 256; i++)
7828 if (XOR (islower (i), ISLOWER (i))
7829 || toupper (i) != TOUPPER (i))
7830 return 2;
7831 return 0;
7832}
7833_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007834if ac_fn_c_try_run "$LINENO"; then :
7835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007836else
Matthias Kloseb9621712010-04-24 17:59:49 +00007837 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7840 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841fi
7842
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007843fi
7844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7846$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007847if test $ac_cv_header_stdc = yes; then
7848
Matthias Kloseb9621712010-04-24 17:59:49 +00007849$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850
7851fi
7852
stratakise768c862018-01-23 16:11:24 +01007853for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007854fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007855ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007856sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007857utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007858poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007859sys/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 +01007860sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007861sys/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 +01007862sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007863sys/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 -07007864libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007865linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007866sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007867do :
7868 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7869ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007873_ACEOF
7874
7875fi
7876
Guido van Rossum627b2d71993-12-24 10:39:16 +00007877done
7878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007879ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007880for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007881 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7883$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007888/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007889#include <sys/types.h>
7890#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007891
Martin v. Löwis11437992002-04-12 09:54:03 +00007892int
7893main ()
7894{
7895if ((DIR *) 0)
7896return 0;
7897 ;
7898 return 0;
7899}
7900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007901if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007902 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007903else
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007908eval ac_res=\$$as_ac_Header
7909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7910$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007911if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007912 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007913#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007914_ACEOF
7915
7916ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007917fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007919done
7920# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7921if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7923$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007924if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007925 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007926else
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007929/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931/* Override any GCC internal prototype to avoid an error.
7932 Use char because int might match the return type of a GCC
7933 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007934#ifdef __cplusplus
7935extern "C"
7936#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007937char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007941return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007942 ;
7943 return 0;
7944}
7945_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007946for ac_lib in '' dir; do
7947 if test -z "$ac_lib"; then
7948 ac_res="none required"
7949 else
7950 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007951 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007952 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007954 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007955fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007956rm -f core conftest.err conftest.$ac_objext \
7957 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007958 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007959 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007961done
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964else
7965 ac_cv_search_opendir=no
7966fi
7967rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007968LIBS=$ac_func_search_save_LIBS
7969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7971$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007972ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007973if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007974 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007975
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007977
Michael W. Hudson54241132001-12-07 15:38:26 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7980$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007981if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007983else
7984 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988/* Override any GCC internal prototype to avoid an error.
7989 Use char because int might match the return type of a GCC
7990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007991#ifdef __cplusplus
7992extern "C"
7993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007994char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007995int
7996main ()
7997{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 ;
8000 return 0;
8001}
8002_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008003for ac_lib in '' x; do
8004 if test -z "$ac_lib"; then
8005 ac_res="none required"
8006 else
8007 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008008 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008013rm -f core conftest.err conftest.$ac_objext \
8014 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008015 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018done
Victor Stinnere0be4232011-10-25 13:06:09 +02008019if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021else
8022 ac_cv_search_opendir=no
8023fi
8024rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008025LIBS=$ac_func_search_save_LIBS
8026fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8028$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008030if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008031 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033fi
8034
8035fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008036
Matthias Kloseb9621712010-04-24 17:59:49 +00008037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8038$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008039if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008040 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008041else
Matthias Kloseb9621712010-04-24 17:59:49 +00008042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008043/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008044#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008045int
8046main ()
8047{
8048return makedev(0, 0);
8049 ;
8050 return 0;
8051}
8052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008054 ac_cv_header_sys_types_h_makedev=yes
8055else
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058rm -f core conftest.err conftest.$ac_objext \
8059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008060
8061fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8063$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008064
8065if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008066ac_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 +02008067if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008068
Matthias Kloseb9621712010-04-24 17:59:49 +00008069$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070
8071fi
8072
8073
8074
8075 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 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 +02008077if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008078
Matthias Kloseb9621712010-04-24 17:59:49 +00008079$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008080
8081fi
8082
8083
8084 fi
8085fi
8086
Michael W. Hudson54241132001-12-07 15:38:26 +00008087
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008088# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8089# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8090SAVE_CFLAGS=$CFLAGS
8091CFLAGS="-std=c99 $CFLAGS"
8092for ac_header in bluetooth/bluetooth.h
8093do :
8094 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8095if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8096 cat >>confdefs.h <<_ACEOF
8097#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8098_ACEOF
8099
8100fi
8101
8102done
8103
8104CFLAGS=$SAVE_CFLAGS
8105
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008106# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8107for ac_header in net/if.h
8108do :
8109 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8110#ifdef STDC_HEADERS
8111# include <stdlib.h>
8112# include <stddef.h>
8113#else
8114# ifdef HAVE_STDLIB_H
8115# include <stdlib.h>
8116# endif
8117#endif
8118#ifdef HAVE_SYS_SOCKET_H
8119# include <sys/socket.h>
8120#endif
8121
8122"
Victor Stinnere0be4232011-10-25 13:06:09 +02008123if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008124 cat >>confdefs.h <<_ACEOF
8125#define HAVE_NET_IF_H 1
8126_ACEOF
8127
8128fi
8129
8130done
8131
8132
Martin v. Löwis11017b12006-01-14 18:12:57 +00008133# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008134for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008135do :
8136 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 +00008137#ifdef HAVE_ASM_TYPES_H
8138#include <asm/types.h>
8139#endif
8140#ifdef HAVE_SYS_SOCKET_H
8141#include <sys/socket.h>
8142#endif
8143
Matthias Kloseb9621712010-04-24 17:59:49 +00008144"
Victor Stinnere0be4232011-10-25 13:06:09 +02008145if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008146 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008147#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008148_ACEOF
8149
8150fi
8151
8152done
8153
8154
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008155# On Linux, qrtr.h requires asm/types.h
8156for ac_header in linux/qrtr.h
8157do :
8158 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8159#ifdef HAVE_ASM_TYPES_H
8160#include <asm/types.h>
8161#endif
8162#ifdef HAVE_SYS_SOCKET_H
8163#include <sys/socket.h>
8164#endif
8165
8166"
8167if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8168 cat >>confdefs.h <<_ACEOF
8169#define HAVE_LINUX_QRTR_H 1
8170_ACEOF
8171
8172fi
8173
8174done
8175
8176
caaveryeffc12f2017-09-06 18:18:10 -04008177for ac_header in linux/vm_sockets.h
8178do :
8179 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8180#ifdef HAVE_SYS_SOCKET_H
8181#include <sys/socket.h>
8182#endif
8183
8184"
8185if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8186 cat >>confdefs.h <<_ACEOF
8187#define HAVE_LINUX_VM_SOCKETS_H 1
8188_ACEOF
8189
8190fi
8191
8192done
8193
8194
Charles-François Natali47413c12011-10-06 19:47:44 +02008195# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008196for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008197do :
8198 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8199ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8200#ifdef HAVE_SYS_SOCKET_H
8201#include <sys/socket.h>
8202#endif
8203
8204"
8205if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8206 cat >>confdefs.h <<_ACEOF
8207#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8208_ACEOF
8209
8210fi
8211
8212done
8213
8214
Guido van Rossum627b2d71993-12-24 10:39:16 +00008215# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008216was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8218$as_echo_n "checking for clock_t in time.h... " >&6; }
8219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008220/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008221#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008222
8223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008224if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008226 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008227else
Martin v. Löwis11437992002-04-12 09:54:03 +00008228
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008231
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008232
Guido van Rossum627b2d71993-12-24 10:39:16 +00008233fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008234rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008235
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8237$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008238
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8240$as_echo_n "checking for makedev... " >&6; }
8241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008242/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008243
Jesus Cea740f53a2010-04-28 11:35:30 +00008244#if defined(MAJOR_IN_MKDEV)
8245#include <sys/mkdev.h>
8246#elif defined(MAJOR_IN_SYSMACROS)
8247#include <sys/sysmacros.h>
8248#else
8249#include <sys/types.h>
8250#endif
8251
Neal Norwitz11690112002-07-30 01:08:28 +00008252int
8253main ()
8254{
Jesus Cea740f53a2010-04-28 11:35:30 +00008255
8256 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008257 ;
8258 return 0;
8259}
Matthias Kloseb159a552010-04-25 21:00:44 +00008260
Neal Norwitz11690112002-07-30 01:08:28 +00008261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008262if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008263 ac_cv_has_makedev=yes
8264else
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008267rm -f core conftest.err conftest.$ac_objext \
8268 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8270$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008271if test "$ac_cv_has_makedev" = "yes"; then
8272
Matthias Kloseb9621712010-04-24 17:59:49 +00008273$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008274
8275fi
8276
Christian Heimes985ecdc2013-11-20 11:46:18 +01008277# byte swapping
8278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8279$as_echo_n "checking for le64toh... " >&6; }
8280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8281/* end confdefs.h. */
8282
8283#ifdef HAVE_ENDIAN_H
8284#include <endian.h>
8285#elif defined(HAVE_SYS_ENDIAN_H)
8286#include <sys/endian.h>
8287#endif
8288
8289int
8290main ()
8291{
8292
8293 le64toh(1)
8294 ;
8295 return 0;
8296}
8297
8298_ACEOF
8299if ac_fn_c_try_link "$LINENO"; then :
8300 ac_cv_has_le64toh=yes
8301else
8302 ac_cv_has_le64toh=no
8303fi
8304rm -f core conftest.err conftest.$ac_objext \
8305 conftest$ac_exeext conftest.$ac_ext
8306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8307$as_echo "$ac_cv_has_le64toh" >&6; }
8308if test "$ac_cv_has_le64toh" = "yes"; then
8309
8310$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8311
8312fi
8313
Martin v. Löwis399a6892002-10-04 10:22:02 +00008314use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008315# Don't use largefile support for GNU/Hurd
8316case $ac_sys_system in GNU*)
8317 use_lfs=no
8318esac
8319
Martin v. Löwis399a6892002-10-04 10:22:02 +00008320if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008321# Two defines needed to enable largefile support on various platforms
8322# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008323case $ac_sys_system/$ac_sys_release in
8324AIX*)
8325
8326$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8327
8328 ;;
8329esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008330
Matthias Kloseb9621712010-04-24 17:59:49 +00008331$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008332
8333
Matthias Kloseb9621712010-04-24 17:59:49 +00008334$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008335
Martin v. Löwis399a6892002-10-04 10:22:02 +00008336fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008337
Guido van Rossum84e7b241996-08-19 21:59:00 +00008338# Add some code to confdefs.h so that the test for off_t works on SCO
8339cat >> confdefs.h <<\EOF
8340#if defined(SCO_DS)
8341#undef _OFF_T
8342#endif
8343EOF
8344
Guido van Rossumef2255b2000-03-10 22:30:29 +00008345# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008346ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008347if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008348
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008349else
Martin v. Löwis11437992002-04-12 09:54:03 +00008350
8351cat >>confdefs.h <<_ACEOF
8352#define mode_t int
8353_ACEOF
8354
8355fi
8356
Matthias Kloseb9621712010-04-24 17:59:49 +00008357ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008358if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008360else
Martin v. Löwis11437992002-04-12 09:54:03 +00008361
8362cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008364_ACEOF
8365
8366fi
8367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008369if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008371else
Martin v. Löwis11437992002-04-12 09:54:03 +00008372
8373cat >>confdefs.h <<_ACEOF
8374#define pid_t int
8375_ACEOF
8376
8377fi
8378
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008379
Martin v. Löwis11437992002-04-12 09:54:03 +00008380cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008381#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008382_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008385if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008387else
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
8389cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
8392
8393fi
8394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8396$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008398 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008399else
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008401/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008402#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
8404_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008406 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008407 ac_cv_type_uid_t=yes
8408else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008409 ac_cv_type_uid_t=no
8410fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008411rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008412
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8415$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008416if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008417
Matthias Kloseb9621712010-04-24 17:59:49 +00008418$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
8420
Matthias Kloseb9621712010-04-24 17:59:49 +00008421$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008422
8423fi
8424
Mark Dickinson983bc162012-12-02 12:11:38 +00008425
Matthias Kloseb9621712010-04-24 17:59:49 +00008426ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008427if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008430
8431fi
8432
Stefan Krah1919b7e2012-03-21 18:25:23 +01008433ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8434if test "x$ac_cv_type___uint128_t" = xyes; then :
8435
8436$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8437
8438fi
8439
Jack Jansendd19cf82001-12-06 22:36:17 +00008440
Michael W. Hudson54241132001-12-07 15:38:26 +00008441# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008442# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008443# The cast to long int works around a bug in the HP C Compiler
8444# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8445# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8446# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8448$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008449if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008451else
Matthias Kloseb9621712010-04-24 17:59:49 +00008452 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 +00008453
Martin v. Löwis11437992002-04-12 09:54:03 +00008454else
Matthias Kloseb9621712010-04-24 17:59:49 +00008455 if test "$ac_cv_type_int" = yes; then
8456 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8457$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008458as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008459See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 else
8461 ac_cv_sizeof_int=0
8462 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464
Martin v. Löwis11437992002-04-12 09:54:03 +00008465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8467$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008468
8469
8470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008472#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008473_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008474
8475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476# The cast to long int works around a bug in the HP C Compiler
8477# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8478# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8479# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8481$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008482if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008484else
Matthias Kloseb9621712010-04-24 17:59:49 +00008485 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 +00008486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487else
Matthias Kloseb9621712010-04-24 17:59:49 +00008488 if test "$ac_cv_type_long" = yes; then
8489 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8490$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008491as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008492See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008493 else
8494 ac_cv_sizeof_long=0
8495 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8500$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008501
8502
8503
Martin v. Löwis11437992002-04-12 09:54:03 +00008504cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008505#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008506_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008507
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509# The cast to long int works around a bug in the HP C Compiler
8510# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8511# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8512# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8514$as_echo_n "checking size of long long... " >&6; }
8515if ${ac_cv_sizeof_long_long+:} false; then :
8516 $as_echo_n "(cached) " >&6
8517else
8518 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8519
8520else
8521 if test "$ac_cv_type_long_long" = yes; then
8522 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8523$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8524as_fn_error 77 "cannot compute sizeof (long long)
8525See \`config.log' for more details" "$LINENO" 5; }
8526 else
8527 ac_cv_sizeof_long_long=0
8528 fi
8529fi
8530
8531fi
8532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8533$as_echo "$ac_cv_sizeof_long_long" >&6; }
8534
8535
8536
8537cat >>confdefs.h <<_ACEOF
8538#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8539_ACEOF
8540
8541
8542# The cast to long int works around a bug in the HP C Compiler
8543# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8544# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8545# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8547$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008548if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008550else
Matthias Kloseb9621712010-04-24 17:59:49 +00008551 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 +00008552
Martin v. Löwis11437992002-04-12 09:54:03 +00008553else
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 if test "$ac_cv_type_void_p" = yes; then
8555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008557as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008558See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559 else
8560 ac_cv_sizeof_void_p=0
8561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8566$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567
8568
8569
Martin v. Löwis11437992002-04-12 09:54:03 +00008570cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008571#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008572_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008573
8574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575# The cast to long int works around a bug in the HP C Compiler
8576# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8577# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8578# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8580$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008581if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008583else
Matthias Kloseb9621712010-04-24 17:59:49 +00008584 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 +00008585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586else
Matthias Kloseb9621712010-04-24 17:59:49 +00008587 if test "$ac_cv_type_short" = yes; then
8588 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8589$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008590as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008591See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008592 else
8593 ac_cv_sizeof_short=0
8594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8599$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600
8601
8602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008604#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008605_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008606
8607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8613$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008614if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Matthias Kloseb9621712010-04-24 17:59:49 +00008617 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 +00008618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_float" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008625 else
8626 ac_cv_sizeof_float=0
8627 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8632$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008633
8634
8635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008637#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008639
8640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641# The cast to long int works around a bug in the HP C Compiler
8642# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8643# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8644# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8646$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008647if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008648 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008649else
Matthias Kloseb9621712010-04-24 17:59:49 +00008650 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 +00008651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652else
Matthias Kloseb9621712010-04-24 17:59:49 +00008653 if test "$ac_cv_type_double" = yes; then
8654 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008656as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008657See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 else
8659 ac_cv_sizeof_double=0
8660 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8665$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666
8667
8668
Martin v. Löwis11437992002-04-12 09:54:03 +00008669cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008670#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008671_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008672
8673
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674# The cast to long int works around a bug in the HP C Compiler
8675# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8676# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8677# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8679$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008680if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008681 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008682else
Matthias Kloseb9621712010-04-24 17:59:49 +00008683 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 +00008684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685else
Matthias Kloseb9621712010-04-24 17:59:49 +00008686 if test "$ac_cv_type_fpos_t" = yes; then
8687 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8688$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008689as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008690See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008691 else
8692 ac_cv_sizeof_fpos_t=0
8693 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8698$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008699
8700
8701
Martin v. Löwis11437992002-04-12 09:54:03 +00008702cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008703#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008704_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008705
Michael W. Hudson54241132001-12-07 15:38:26 +00008706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707# The cast to long int works around a bug in the HP C Compiler
8708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8712$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008715else
Matthias Kloseb9621712010-04-24 17:59:49 +00008716 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 +00008717
Martin v. Löwis18e16552006-02-15 17:27:45 +00008718else
Matthias Kloseb9621712010-04-24 17:59:49 +00008719 if test "$ac_cv_type_size_t" = yes; then
8720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8721$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008722as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008723See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 else
8725 ac_cv_sizeof_size_t=0
8726 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728
Martin v. Löwis18e16552006-02-15 17:27:45 +00008729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8731$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008732
8733
8734
Martin v. Löwis18e16552006-02-15 17:27:45 +00008735cat >>confdefs.h <<_ACEOF
8736#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8737_ACEOF
8738
8739
Christian Heimes400adb02008-02-01 08:12:03 +00008740# The cast to long int works around a bug in the HP C Compiler
8741# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8742# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8743# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8745$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008746if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008747 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 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 +00008750
Christian Heimes400adb02008-02-01 08:12:03 +00008751else
Matthias Kloseb9621712010-04-24 17:59:49 +00008752 if test "$ac_cv_type_pid_t" = yes; then
8753 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8754$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008755as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008756See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008757 else
8758 ac_cv_sizeof_pid_t=0
8759 fi
8760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761
Christian Heimes400adb02008-02-01 08:12:03 +00008762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8764$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008765
8766
8767
8768cat >>confdefs.h <<_ACEOF
8769#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8770_ACEOF
8771
8772
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008773# The cast to long int works around a bug in the HP C Compiler
8774# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8775# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8776# This bug is HP SR number 8606223364.
8777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8778$as_echo_n "checking size of uintptr_t... " >&6; }
8779if ${ac_cv_sizeof_uintptr_t+:} false; then :
8780 $as_echo_n "(cached) " >&6
8781else
8782 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8783
8784else
8785 if test "$ac_cv_type_uintptr_t" = yes; then
8786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8788as_fn_error 77 "cannot compute sizeof (uintptr_t)
8789See \`config.log' for more details" "$LINENO" 5; }
8790 else
8791 ac_cv_sizeof_uintptr_t=0
8792 fi
8793fi
8794
8795fi
8796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8797$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8798
8799
8800
8801cat >>confdefs.h <<_ACEOF
8802#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8803_ACEOF
8804
8805
Michael W. Hudson54241132001-12-07 15:38:26 +00008806
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008807
Eitan Adler3055c942018-05-15 22:58:09 -07008808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8809$as_echo_n "checking for long double... " >&6; }
8810if ${ac_cv_type_long_double+:} false; then :
8811 $as_echo_n "(cached) " >&6
8812else
8813 if test "$GCC" = yes; then
8814 ac_cv_type_long_double=yes
8815 else
8816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817/* end confdefs.h. */
8818/* The Stardent Vistra knows sizeof (long double), but does
8819 not support it. */
8820 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008821int
8822main ()
8823{
Eitan Adler3055c942018-05-15 22:58:09 -07008824static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8825 sizeof (double) <= sizeof (long double))];
8826test_array [0] = 0;
8827return test_array [0];
8828
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008829 ;
8830 return 0;
8831}
8832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008833if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008834 ac_cv_type_long_double=yes
8835else
8836 ac_cv_type_long_double=no
8837fi
8838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8839 fi
8840fi
8841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8842$as_echo "$ac_cv_type_long_double" >&6; }
8843 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008844
Matthias Kloseb9621712010-04-24 17:59:49 +00008845$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008846
Eitan Adler3055c942018-05-15 22:58:09 -07008847 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008848
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008849# The cast to long int works around a bug in the HP C Compiler
8850# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8851# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8852# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8854$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008855if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008856 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008857else
Matthias Kloseb9621712010-04-24 17:59:49 +00008858 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 +00008859
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008860else
Matthias Kloseb9621712010-04-24 17:59:49 +00008861 if test "$ac_cv_type_long_double" = yes; then
8862 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8863$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008864as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008865See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008866 else
8867 ac_cv_sizeof_long_double=0
8868 fi
8869fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008870
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8873$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874
8875
8876
8877cat >>confdefs.h <<_ACEOF
8878#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8879_ACEOF
8880
8881
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008883# The cast to long int works around a bug in the HP C Compiler
8884# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8885# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8886# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8888$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008890 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 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 +00008893
Thomas Woutersb2137042007-02-01 18:02:27 +00008894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 if test "$ac_cv_type__Bool" = yes; then
8896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008898as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008899See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 else
8901 ac_cv_sizeof__Bool=0
8902 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904
Thomas Woutersb2137042007-02-01 18:02:27 +00008905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8907$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008908
8909
8910
Thomas Woutersb2137042007-02-01 18:02:27 +00008911cat >>confdefs.h <<_ACEOF
8912#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8913_ACEOF
8914
8915
Thomas Woutersb2137042007-02-01 18:02:27 +00008916
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008917# The cast to long int works around a bug in the HP C Compiler
8918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8920# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8922$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008923if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008925else
Matthias Kloseb9621712010-04-24 17:59:49 +00008926 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008927#ifdef HAVE_SYS_TYPES_H
8928#include <sys/types.h>
8929#endif
8930
Matthias Kloseb9621712010-04-24 17:59:49 +00008931"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933else
Matthias Kloseb9621712010-04-24 17:59:49 +00008934 if test "$ac_cv_type_off_t" = yes; then
8935 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8936$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008937as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008938See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939 else
8940 ac_cv_sizeof_off_t=0
8941 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008942fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008943
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008944fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8946$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948
8949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008951#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008952_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008953
Michael W. Hudson54241132001-12-07 15:38:26 +00008954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955
Matthias Kloseb9621712010-04-24 17:59:49 +00008956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8957$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008958if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008959 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008960
Matthias Kloseb9621712010-04-24 17:59:49 +00008961$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008962
Matthias Kloseb9621712010-04-24 17:59:49 +00008963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8964$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8967$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008968fi
8969
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970# The cast to long int works around a bug in the HP C Compiler
8971# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8972# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8973# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8975$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008976if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008977 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980#ifdef HAVE_SYS_TYPES_H
8981#include <sys/types.h>
8982#endif
8983#ifdef HAVE_TIME_H
8984#include <time.h>
8985#endif
8986
Matthias Kloseb9621712010-04-24 17:59:49 +00008987"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008989else
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 if test "$ac_cv_type_time_t" = yes; then
8991 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008993as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008994See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008995 else
8996 ac_cv_sizeof_time_t=0
8997 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008998fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008999
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9002$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009003
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009004
9005
Martin v. Löwis11437992002-04-12 09:54:03 +00009006cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009007#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009008_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009009
Michael W. Hudson54241132001-12-07 15:38:26 +00009010
9011
Trent Mick635f6fb2000-08-23 21:33:05 +00009012# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009013ac_save_cc="$CC"
9014if test "$ac_cv_kpthread" = "yes"
9015then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009016elif test "$ac_cv_kthread" = "yes"
9017then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009018elif test "$ac_cv_pthread" = "yes"
9019then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009020fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9023$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009024have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009026/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009027
9028 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009029int
9030main ()
9031{
Guido van Rossum12580492000-09-24 16:47:19 +00009032pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009033 ;
9034 return 0;
9035}
Matthias Kloseb159a552010-04-25 21:00:44 +00009036
Martin v. Löwis11437992002-04-12 09:54:03 +00009037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009038if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009039 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9043$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009044if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009045 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9048# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9050$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009051if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009052 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009055#ifdef HAVE_PTHREAD_H
9056#include <pthread.h>
9057#endif
9058
Matthias Kloseb9621712010-04-24 17:59:49 +00009059"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009061else
Matthias Kloseb9621712010-04-24 17:59:49 +00009062 if test "$ac_cv_type_pthread_t" = yes; then
9063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009065as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009066See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067 else
9068 ac_cv_sizeof_pthread_t=0
9069 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009070fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009071
Trent Mick635f6fb2000-08-23 21:33:05 +00009072fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9074$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009075
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076
9077
Martin v. Löwis11437992002-04-12 09:54:03 +00009078cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009079#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009080_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009081
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082
Trent Mick635f6fb2000-08-23 21:33:05 +00009083fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009084
9085# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9086# This checking will be unnecessary after removing deprecated TLS API.
9087# The cast to long int works around a bug in the HP C Compiler
9088# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9089# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9090# This bug is HP SR number 8606223364.
9091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9092$as_echo_n "checking size of pthread_key_t... " >&6; }
9093if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9094 $as_echo_n "(cached) " >&6
9095else
9096 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9097"; then :
9098
9099else
9100 if test "$ac_cv_type_pthread_key_t" = yes; then
9101 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9103as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9104See \`config.log' for more details" "$LINENO" 5; }
9105 else
9106 ac_cv_sizeof_pthread_key_t=0
9107 fi
9108fi
9109
9110fi
9111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9112$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9113
9114
9115
9116cat >>confdefs.h <<_ACEOF
9117#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9118_ACEOF
9119
9120
9121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9122$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9123if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9125/* end confdefs.h. */
9126#include <pthread.h>
9127int
9128main ()
9129{
9130pthread_key_t k; k * 1;
9131 ;
9132 return 0;
9133}
9134_ACEOF
9135if ac_fn_c_try_compile "$LINENO"; then :
9136 ac_pthread_key_t_is_arithmetic_type=yes
9137else
9138 ac_pthread_key_t_is_arithmetic_type=no
9139
9140fi
9141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9143$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9144 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9145
9146$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9147
9148 fi
9149else
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151$as_echo "no" >&6; }
9152fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009153CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009154
Michael W. Hudson54241132001-12-07 15:38:26 +00009155
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009156case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009157 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009158 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9159 ;;
9160 Darwin/*)
9161 OTHER_LIBTOOL_OPT=""
9162 ;;
9163esac
9164
9165
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009166
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009167case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009168 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009169 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9170 if test "${enable_universalsdk}"; then
9171 :
9172 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009173 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009174 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009175 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009176 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009177 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009178 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009179 if test ${gcc_version} '<' 4.0
9180 then
9181 LIBTOOL_CRUFT="-lcc_dynamic"
9182 else
9183 LIBTOOL_CRUFT=""
9184 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009185 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009186 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009187else
Matthias Kloseb9621712010-04-24 17:59:49 +00009188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009189/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009190
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009191 #include <unistd.h>
9192 int main(int argc, char*argv[])
9193 {
9194 if (sizeof(long) == 4) {
9195 return 0;
9196 } else {
9197 return 1;
9198 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009199 }
9200
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009201_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009202if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009203 ac_osx_32bit=yes
9204else
Matthias Kloseb9621712010-04-24 17:59:49 +00009205 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9208 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009209fi
9210
9211
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009212 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009213 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214 i386)
9215 MACOSX_DEFAULT_ARCH="i386"
9216 ;;
9217 ppc)
9218 MACOSX_DEFAULT_ARCH="ppc"
9219 ;;
9220 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009221 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009222 ;;
9223 esac
9224 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009225 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226 i386)
9227 MACOSX_DEFAULT_ARCH="x86_64"
9228 ;;
9229 ppc)
9230 MACOSX_DEFAULT_ARCH="ppc64"
9231 ;;
9232 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009233 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234 ;;
9235 esac
9236
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009237 fi
9238
9239 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009240 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009241 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009242esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9244$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009245if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009246then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009247 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009248 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009249 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009250
Matthias Kloseb9621712010-04-24 17:59:49 +00009251$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009252
Matthias Kloseb9621712010-04-24 17:59:49 +00009253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9254$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009255 if test $enable_shared = "yes"
9256 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009257 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 +00009258 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009259else
Matthias Kloseb9621712010-04-24 17:59:49 +00009260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9261$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009262fi
9263
Matthias Kloseb9621712010-04-24 17:59:49 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9265$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009266case $ac_sys_system/$ac_sys_release in
9267 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009268
Matthias Kloseb9621712010-04-24 17:59:49 +00009269$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9272$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009273 ;;
9274 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009277 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009278esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009279
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009281
Michael W. Hudson54241132001-12-07 15:38:26 +00009282
9283
9284
9285
Benjamin Peterson99f03762010-04-11 22:15:28 +00009286
Thomas Wouters477c8d52006-05-27 19:21:47 +00009287
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009288# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9289# -- usually .so, .sl on HP-UX, .dll on Cygwin
9290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9291$as_echo_n "checking the extension of shared libraries... " >&6; }
9292if test -z "$SHLIB_SUFFIX"; then
9293 case $ac_sys_system in
9294 hp*|HP*)
9295 case `uname -m` in
9296 ia64) SHLIB_SUFFIX=.so;;
9297 *) SHLIB_SUFFIX=.sl;;
9298 esac
9299 ;;
9300 CYGWIN*) SHLIB_SUFFIX=.dll;;
9301 *) SHLIB_SUFFIX=.so;;
9302 esac
9303fi
9304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9305$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009306
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009308# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009309# (Shared libraries in this instance are shared modules to be loaded into
9310# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9312$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009313if test -z "$LDSHARED"
9314then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009315 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009316 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009317 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009318 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009319 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009321 if test "$GCC" = "yes" ; then
9322 LDSHARED='$(CC) -shared'
9323 LDCXXSHARED='$(CXX) -shared'
9324 else
9325 LDSHARED='$(CC) -G'
9326 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009327 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009328 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009329 if test "$GCC" = "yes" ; then
9330 LDSHARED='$(CC) -shared'
9331 LDCXXSHARED='$(CXX) -shared'
9332 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009333 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009334 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009335 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009336 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009337 LDSHARED='$(CC) -bundle'
9338 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009339 if test "$enable_framework" ; then
9340 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009341 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9342 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009343 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009344 else
9345 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009346 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009347 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009348 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009349 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009350 LDSHARED='$(CC) -bundle'
9351 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009352 if test "$enable_framework" ; then
9353 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009354 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9355 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009356 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009357 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009358 # No framework, use the Python app as bundle-loader
9359 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009360 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009361 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009362 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009363 Darwin/*)
9364 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9365 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009366
Ned Deily36820b62014-06-25 13:44:22 -07009367 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9368 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9369 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9370 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9371 if test ${dep_target_major} -eq 10 && \
9372 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009373 then
Ned Deily36820b62014-06-25 13:44:22 -07009374 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009375 LDSHARED='$(CC) -bundle'
9376 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009377 if test "$enable_framework" ; then
9378 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009379 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9380 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009381 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009382 else
9383 # No framework, use the Python app as bundle-loader
9384 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9385 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009386 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009387 fi
Ned Deily36820b62014-06-25 13:44:22 -07009388 else
9389 # building for OS X 10.3 and later
9390 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9391 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9392 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009393 fi
9394 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009395 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009396 LDSHARED='$(CC) -shared'
9397 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009398 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009399 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009400 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009401 LDSHARED='$(CC) -shared'
9402 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009403 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009404 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009405 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009406 OpenBSD*)
9407 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9408 then
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 else
9412 case `uname -r` in
9413 [01].* | 2.[0-7] | 2.[0-7].*)
9414 LDSHARED="ld -Bshareable ${LDFLAGS}"
9415 ;;
9416 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009417 LDSHARED='$(CC) -shared $(CCSHARED)'
9418 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009419 ;;
9420 esac
9421 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009422 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009423 LDSHARED='$(CC) -shared'
9424 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009425 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009426 if test "$GCC" = "yes" ; then
9427 LDSHARED='$(CC) -shared'
9428 LDCXXSHARED='$(CXX) -shared'
9429 else
9430 LDSHARED='$(CC) -G'
9431 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009432 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009433 SCO_SV*)
9434 LDSHARED='$(CC) -Wl,-G,-Bexport'
9435 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9436 CYGWIN*)
9437 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9438 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009439 *) LDSHARED="ld";;
9440 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9443$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009444LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009445BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009446# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009447# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9449$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009450if test -z "$CCSHARED"
9451then
Guido van Rossum07397971997-04-29 21:49:50 +00009452 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009453 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009454 then CCSHARED="-fPIC";
9455 elif test `uname -p` = sparc;
9456 then CCSHARED="-xcode=pic32";
9457 else CCSHARED="-Kpic";
9458 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009459 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009460 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009461 else CCSHARED="+z";
9462 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009463 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009464 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009465 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009466 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009467 if test "$GCC" = "yes"
9468 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009469 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009470 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009471 SCO_SV*)
9472 if test "$GCC" = "yes"
9473 then CCSHARED="-fPIC"
9474 else CCSHARED="-Kpic -belf"
9475 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009476 VxWorks*)
9477 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009478 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9481$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009482# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009483# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9485$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486if test -z "$LINKFORSHARED"
9487then
Guido van Rossum07397971997-04-29 21:49:50 +00009488 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009489 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009490 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009491 LINKFORSHARED="-Wl,-E -Wl,+s";;
9492# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009493 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009494 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009495 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009497 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009498
9499 # Issue #18075: the default maximum stack size (8MBytes) is too
9500 # small for the default recursion limit. Increase the stack size
9501 # to ensure that tests don't crash
9502 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9503
Jack Jansene578a632001-08-15 01:27:14 +00009504 if test "$enable_framework"
9505 then
Jack Jansenda49e192005-01-07 13:08:22 +00009506 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009507 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009508 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009509 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009510 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009511 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009512 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009513 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9514 then
9515 LINKFORSHARED="-Wl,--export-dynamic"
9516 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009517 SunOS/5*) case $CC in
9518 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009519 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009520 then
9521 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009522 fi;;
9523 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009524 CYGWIN*)
9525 if test $enable_shared = "no"
9526 then
9527 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9528 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009529 QNX*)
9530 # -Wl,-E causes the symbols to be added to the dynamic
9531 # symbol table so that they can be found when a module
9532 # is loaded. -N 2048K causes the stack size to be set
9533 # to 2048 kilobytes so that the stack doesn't overflow
9534 # when running test_compile.py.
9535 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009536 VxWorks*)
9537 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009538 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009539fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9541$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009542
Michael W. Hudson54241132001-12-07 15:38:26 +00009543
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009544
Matthias Kloseb9621712010-04-24 17:59:49 +00009545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9546$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009547if test ! "$LIBRARY" = "$LDLIBRARY"
9548then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009549 case $ac_sys_system in
9550 CYGWIN*)
9551 # Cygwin needs CCSHARED when building extension DLLs
9552 # but not when building the interpreter DLL.
9553 CFLAGSFORSHARED='';;
9554 *)
9555 CFLAGSFORSHARED='$(CCSHARED)'
9556 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9559$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009560
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009561# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9562# library (with --enable-shared).
9563# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009564# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9565# if it is not required, since it creates a dependency of the shared library
9566# to LIBS. This, in turn, means that applications linking the shared libpython
9567# don't need to link LIBS explicitly. The default should be only changed
9568# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009569
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9571$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009572case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009573 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009574 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009575esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9577$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009578
9579
Guido van Rossum627b2d71993-12-24 10:39:16 +00009580# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9582$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009583if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009584 $as_echo_n "(cached) " >&6
9585else
9586 ac_check_lib_save_LIBS=$LIBS
9587LIBS="-lsendfile $LIBS"
9588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9589/* end confdefs.h. */
9590
9591/* Override any GCC internal prototype to avoid an error.
9592 Use char because int might match the return type of a GCC
9593 builtin and then its argument prototype would still apply. */
9594#ifdef __cplusplus
9595extern "C"
9596#endif
9597char sendfile ();
9598int
9599main ()
9600{
9601return sendfile ();
9602 ;
9603 return 0;
9604}
9605_ACEOF
9606if ac_fn_c_try_link "$LINENO"; then :
9607 ac_cv_lib_sendfile_sendfile=yes
9608else
9609 ac_cv_lib_sendfile_sendfile=no
9610fi
9611rm -f core conftest.err conftest.$ac_objext \
9612 conftest$ac_exeext conftest.$ac_ext
9613LIBS=$ac_check_lib_save_LIBS
9614fi
9615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9616$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009617if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009618 cat >>confdefs.h <<_ACEOF
9619#define HAVE_LIBSENDFILE 1
9620_ACEOF
9621
9622 LIBS="-lsendfile $LIBS"
9623
9624fi
9625
Matthias Kloseb9621712010-04-24 17:59:49 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9627$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009629 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009630else
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009632LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009636/* Override any GCC internal prototype to avoid an error.
9637 Use char because int might match the return type of a GCC
9638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009639#ifdef __cplusplus
9640extern "C"
9641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009642char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009643int
9644main ()
9645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ;
9648 return 0;
9649}
9650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009651if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009653else
Matthias Kloseb9621712010-04-24 17:59:49 +00009654 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009658LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9661$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009662if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 cat >>confdefs.h <<_ACEOF
9664#define HAVE_LIBDL 1
9665_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009666
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009667 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009669fi
9670 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9672$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009677LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009684#ifdef __cplusplus
9685extern "C"
9686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009687char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ;
9693 return 0;
9694}
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9706$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 cat >>confdefs.h <<_ACEOF
9709#define HAVE_LIBDLD 1
9710_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009711
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009712 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009713
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714fi
9715 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009716
Michael Felt0d3ccb42017-12-30 22:39:20 +01009717# checks for uuid.h location
9718for ac_header in uuid/uuid.h uuid.h
9719do :
9720 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9721ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9722if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9723 cat >>confdefs.h <<_ACEOF
9724#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9725_ACEOF
9726
9727fi
9728
9729done
9730
9731
Berker Peksag9a10ff42017-11-08 23:09:16 +03009732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9733$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9735/* end confdefs.h. */
9736#include <uuid/uuid.h>
9737int
9738main ()
9739{
9740
9741#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009742void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009743#endif
9744
9745 ;
9746 return 0;
9747}
9748_ACEOF
9749if ac_fn_c_try_compile "$LINENO"; then :
9750
9751$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9752
9753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9754$as_echo "yes" >&6; }
9755else
9756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9757$as_echo "no" >&6; }
9758
9759fi
9760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9761
Michael Felt0d3ccb42017-12-30 22:39:20 +01009762# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009763# FreeBSD and OpenBSD provides support as well
9764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9765$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9767/* end confdefs.h. */
9768#include <uuid.h>
9769int
9770main ()
9771{
9772
9773#ifndef uuid_create
9774void *x = uuid_create
9775#endif
9776
9777 ;
9778 return 0;
9779}
9780_ACEOF
9781if ac_fn_c_try_compile "$LINENO"; then :
9782
9783$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9784
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9786$as_echo "yes" >&6; }
9787else
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790
9791fi
9792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9793
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009794# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9795# stream in big-endian byte-order
9796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9797$as_echo_n "checking for uuid_enc_be... " >&6; }
9798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9799/* end confdefs.h. */
9800#include <uuid.h>
9801int
9802main ()
9803{
9804
9805#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009806void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009807#endif
9808
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813if ac_fn_c_try_compile "$LINENO"; then :
9814
9815$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9816
9817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9818$as_echo "yes" >&6; }
9819else
9820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
9822
9823fi
9824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9825
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009826# 'Real Time' functions on Solaris
9827# posix4 on Solaris 2.6
9828# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009830$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009833else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009834 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838/* Override any GCC internal prototype to avoid an error.
9839 Use char because int might match the return type of a GCC
9840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009841#ifdef __cplusplus
9842extern "C"
9843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009844char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ;
9850 return 0;
9851}
9852_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853for ac_lib in '' pthread rt posix4; do
9854 if test -z "$ac_lib"; then
9855 ac_res="none required"
9856 else
9857 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009860 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009863rm -f core conftest.err conftest.$ac_objext \
9864 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009865 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868done
Victor Stinnere0be4232011-10-25 13:06:09 +02009869if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871else
9872 ac_cv_search_sem_init=no
9873fi
9874rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875LIBS=$ac_func_search_save_LIBS
9876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9878$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009879ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009880if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009882
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009883fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009884
Martin v. Löwis519adae2003-09-20 10:47:47 +00009885
Martin v. Löwis19d17342003-06-14 21:03:05 +00009886# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9888$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009889if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009890 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009891else
9892 ac_check_lib_save_LIBS=$LIBS
9893LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009894cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009895/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009896
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897/* Override any GCC internal prototype to avoid an error.
9898 Use char because int might match the return type of a GCC
9899 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009900#ifdef __cplusplus
9901extern "C"
9902#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009903char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009904int
9905main ()
9906{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009908 ;
9909 return 0;
9910}
9911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009912if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009913 ac_cv_lib_intl_textdomain=yes
9914else
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009917rm -f core conftest.err conftest.$ac_objext \
9918 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919LIBS=$ac_check_lib_save_LIBS
9920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9922$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009923if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009924
Matthias Kloseb9621712010-04-24 17:59:49 +00009925$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009926
Brett Cannonc6d936e2009-06-07 20:09:53 +00009927 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009928fi
9929
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009930
9931# checks for system dependent C++ extensions support
9932case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009933 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9934$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009936/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009937
Georg Brandl59e87bd2011-02-15 19:48:59 +00009938 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009939int
9940main ()
9941{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009942loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009943 ;
9944 return 0;
9945}
Matthias Kloseb159a552010-04-25 21:00:44 +00009946
Martin v. Löwis11437992002-04-12 09:54:03 +00009947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009948if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009949
Matthias Kloseb159a552010-04-25 21:00:44 +00009950
Matthias Kloseb9621712010-04-24 17:59:49 +00009951$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009952
Matthias Kloseb159a552010-04-25 21:00:44 +00009953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009956else
Matthias Kloseb159a552010-04-25 21:00:44 +00009957
9958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009959$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009960
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962rm -f core conftest.err conftest.$ac_objext \
9963 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009964 *) ;;
9965esac
9966
Christian Heimes985ecdc2013-11-20 11:46:18 +01009967# check for systems that require aligned memory access
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9969$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009970if ${ac_cv_aligned_required+:} false; then :
9971 $as_echo_n "(cached) " >&6
9972else
9973 if test "$cross_compiling" = yes; then :
9974 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009975else
9976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9977/* end confdefs.h. */
9978
9979int main()
9980{
9981 char s[16];
9982 int i, *p1, *p2;
9983 for (i=0; i < 16; i++)
9984 s[i] = i;
9985 p1 = (int*)(s+1);
9986 p2 = (int*)(s+2);
9987 if (*p1 == *p2)
9988 return 1;
9989 return 0;
9990}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009991_ACEOF
9992if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009993 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009994else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009995 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009996fi
9997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9998 conftest.$ac_objext conftest.beam conftest.$ac_ext
9999fi
10000
10001
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010002fi
10003
10004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10005$as_echo "$ac_cv_aligned_required" >&6; }
10006if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010007
10008$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10009
10010fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010011
10012# str, bytes and memoryview hash algorithm
10013
10014
10015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10016$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10017
10018# Check whether --with-hash_algorithm was given.
10019if test "${with_hash_algorithm+set}" = set; then :
10020 withval=$with_hash_algorithm;
10021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10022$as_echo "$withval" >&6; }
10023case "$withval" in
10024 siphash24)
10025 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10026
10027 ;;
10028 fnv)
10029 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10030
10031 ;;
10032 *)
10033 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10034 ;;
10035esac
10036
10037else
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10039$as_echo "default" >&6; }
10040fi
10041
10042
Charles-François Natalid30b0222014-05-08 23:08:51 +010010043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10044$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10045
10046# Check whether --with-address_sanitizer was given.
10047if test "${with_address_sanitizer+set}" = set; then :
10048 withval=$with_address_sanitizer;
10049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10050$as_echo "$withval" >&6; }
10051BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10052LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010053# ASan works by controlling memory allocation, our own malloc interferes.
10054with_pymalloc="no"
10055
10056else
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10058$as_echo "no" >&6; }
10059fi
10060
10061
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10063$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10064
10065# Check whether --with-memory_sanitizer was given.
10066if test "${with_memory_sanitizer+set}" = set; then :
10067 withval=$with_memory_sanitizer;
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10069$as_echo "$withval" >&6; }
10070BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10071LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10072# MSan works by controlling memory allocation, our own malloc interferes.
10073with_pymalloc="no"
10074
10075else
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077$as_echo "no" >&6; }
10078fi
10079
10080
10081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10082$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10083
10084# Check whether --with-undefined_behavior_sanitizer was given.
10085if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10086 withval=$with_undefined_behavior_sanitizer;
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10088$as_echo "$withval" >&6; }
10089BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10090LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010091
10092else
10093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10094$as_echo "no" >&6; }
10095fi
10096
10097
Guido van Rossum70c7f481998-03-26 18:44:10 +000010098# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10100$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010101if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010102 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010103else
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010105LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010108
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109/* Override any GCC internal prototype to avoid an error.
10110 Use char because int might match the return type of a GCC
10111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010112#ifdef __cplusplus
10113extern "C"
10114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010115char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010116int
10117main ()
10118{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010119return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ;
10121 return 0;
10122}
10123_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010126else
Matthias Kloseb9621712010-04-24 17:59:49 +000010127 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010128fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010129rm -f core conftest.err conftest.$ac_objext \
10130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010131LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010132fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10134$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010135if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010136 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010137fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010138 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10140$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010141if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010142 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010143else
Martin v. Löwis11437992002-04-12 09:54:03 +000010144 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010145LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010149/* Override any GCC internal prototype to avoid an error.
10150 Use char because int might match the return type of a GCC
10151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152#ifdef __cplusplus
10153extern "C"
10154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010155char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010156int
10157main ()
10158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010159return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ;
10161 return 0;
10162}
10163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010166else
Matthias Kloseb9621712010-04-24 17:59:49 +000010167 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010168fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010169rm -f core conftest.err conftest.$ac_objext \
10170 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010171LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10174$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010175if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010176 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010177fi
10178 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010179
Matthias Kloseb9621712010-04-24 17:59:49 +000010180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10181$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010183# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10187$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010188LIBS="$withval $LIBS"
10189
10190else
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193fi
10194
Guido van Rossum7f43da71994-08-01 12:15:30 +000010195
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010196
10197
10198
10199
10200
10201
10202
10203if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10204 if test -n "$ac_tool_prefix"; then
10205 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10206set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10208$as_echo_n "checking for $ac_word... " >&6; }
10209if ${ac_cv_path_PKG_CONFIG+:} false; then :
10210 $as_echo_n "(cached) " >&6
10211else
10212 case $PKG_CONFIG in
10213 [\\/]* | ?:[\\/]*)
10214 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10215 ;;
10216 *)
10217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10218for as_dir in $PATH
10219do
10220 IFS=$as_save_IFS
10221 test -z "$as_dir" && as_dir=.
10222 for ac_exec_ext in '' $ac_executable_extensions; do
10223 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10224 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10225 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10226 break 2
10227 fi
10228done
10229 done
10230IFS=$as_save_IFS
10231
10232 ;;
10233esac
10234fi
10235PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10236if test -n "$PKG_CONFIG"; then
10237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10238$as_echo "$PKG_CONFIG" >&6; }
10239else
10240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10241$as_echo "no" >&6; }
10242fi
10243
10244
10245fi
10246if test -z "$ac_cv_path_PKG_CONFIG"; then
10247 ac_pt_PKG_CONFIG=$PKG_CONFIG
10248 # Extract the first word of "pkg-config", so it can be a program name with args.
10249set dummy pkg-config; ac_word=$2
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10251$as_echo_n "checking for $ac_word... " >&6; }
10252if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10253 $as_echo_n "(cached) " >&6
10254else
10255 case $ac_pt_PKG_CONFIG in
10256 [\\/]* | ?:[\\/]*)
10257 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10258 ;;
10259 *)
10260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10261for as_dir in $PATH
10262do
10263 IFS=$as_save_IFS
10264 test -z "$as_dir" && as_dir=.
10265 for ac_exec_ext in '' $ac_executable_extensions; do
10266 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10267 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10269 break 2
10270 fi
10271done
10272 done
10273IFS=$as_save_IFS
10274
10275 ;;
10276esac
10277fi
10278ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10279if test -n "$ac_pt_PKG_CONFIG"; then
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10281$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10282else
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
10285fi
10286
10287 if test "x$ac_pt_PKG_CONFIG" = x; then
10288 PKG_CONFIG=""
10289 else
10290 case $cross_compiling:$ac_tool_warned in
10291yes:)
10292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10294ac_tool_warned=yes ;;
10295esac
10296 PKG_CONFIG=$ac_pt_PKG_CONFIG
10297 fi
10298else
10299 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10300fi
10301
10302fi
10303if test -n "$PKG_CONFIG"; then
10304 _pkg_min_version=0.9.0
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10306$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10307 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10309$as_echo "yes" >&6; }
10310 else
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10312$as_echo "no" >&6; }
10313 PKG_CONFIG=""
10314 fi
10315fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010316
10317# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10319$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010320
10321# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010322if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010323 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010324else
10325 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010326fi
10327
10328
Matthias Kloseb9621712010-04-24 17:59:49 +000010329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10330$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010331
10332# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10334$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010335
10336# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010337if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010338 withval=$with_system_ffi;
10339fi
10340
10341
Zachary Waref40d4dd2016-09-17 01:25:24 -050010342if test "$ac_sys_system" = "Darwin"
10343then
10344 case "$with_system_ffi" in
10345 "")
10346 with_system_ffi="no"
10347 ;;
10348 yes|no)
10349 ;;
10350 *)
10351 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10352 ;;
10353 esac
10354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10355$as_echo "$with_system_ffi" >&6; }
10356else
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10358$as_echo "yes" >&6; }
10359 if test "$with_system_ffi" != ""
10360 then
10361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10362$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10363 fi
10364 with_system_ffi="yes"
10365fi
Zachary Ware935043d2016-09-09 17:01:21 -070010366
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010367if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010368 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10369else
10370 LIBFFI_INCLUDEDIR=""
10371fi
10372
10373
Stefan Krah60187b52012-03-23 19:06:27 +010010374# Check for use of the system libmpdec library
10375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10376$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10377
10378# Check whether --with-system_libmpdec was given.
10379if test "${with_system_libmpdec+set}" = set; then :
10380 withval=$with_system_libmpdec;
10381else
10382 with_system_libmpdec="no"
10383fi
10384
10385
10386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10387$as_echo "$with_system_libmpdec" >&6; }
10388
Benjamin Peterson076ed002010-10-31 17:11:02 +000010389# Check for support for loadable sqlite extensions
10390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10391$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10392# Check whether --enable-loadable-sqlite-extensions was given.
10393if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10394 enableval=$enable_loadable_sqlite_extensions;
10395else
10396 enable_loadable_sqlite_extensions="no"
10397fi
10398
10399
10400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10401$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10402
Ned Deilyd819b932013-09-06 01:07:05 -070010403# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10404
10405
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10407$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10408
10409# Check whether --with-tcltk-includes was given.
10410if test "${with_tcltk_includes+set}" = set; then :
10411 withval=$with_tcltk_includes;
10412else
10413 with_tcltk_includes="default"
10414fi
10415
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10417$as_echo "$with_tcltk_includes" >&6; }
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10419$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10420
10421# Check whether --with-tcltk-libs was given.
10422if test "${with_tcltk_libs+set}" = set; then :
10423 withval=$with_tcltk_libs;
10424else
10425 with_tcltk_libs="default"
10426fi
10427
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10429$as_echo "$with_tcltk_libs" >&6; }
10430if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10431then
10432 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10433 then
10434 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10435 fi
10436 TCLTK_INCLUDES=""
10437 TCLTK_LIBS=""
10438else
10439 TCLTK_INCLUDES="$with_tcltk_includes"
10440 TCLTK_LIBS="$with_tcltk_libs"
10441fi
10442
Matthias Klose55708cc2009-04-30 08:06:49 +000010443# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10445$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010446
10447# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010448if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010449 withval=$with_dbmliborder;
10450if test x$with_dbmliborder = xyes
10451then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010452as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010453else
10454 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10455 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10456 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010457 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010458 fi
10459 done
10460fi
10461fi
10462
Matthias Kloseb9621712010-04-24 17:59:49 +000010463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10464$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010465
Martin v. Löwis11437992002-04-12 09:54:03 +000010466# Templates for things AC_DEFINEd more than once.
10467# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010468
10469
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010470if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010471then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010472 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010474
10475 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010476elif test "$ac_cv_kpthread" = "yes"
10477then
10478 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010479 if test "$ac_cv_cxx_thread" = "yes"; then
10480 CXX="$CXX -Kpthread"
10481 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010482 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010483elif test "$ac_cv_kthread" = "yes"
10484then
10485 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010486 if test "$ac_cv_cxx_thread" = "yes"; then
10487 CXX="$CXX -Kthread"
10488 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010489 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010490elif test "$ac_cv_pthread" = "yes"
10491then
10492 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010493 if test "$ac_cv_cxx_thread" = "yes"; then
10494 CXX="$CXX -pthread"
10495 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010497else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010498 if test ! -z "$withval" -a -d "$withval"
10499 then LDFLAGS="$LDFLAGS -L$withval"
10500 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010501
10502 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010503 # define _POSIX_THREADS in unistd.h. Some apparently don't
10504 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10506$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010508/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010509
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010510#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010511#ifdef _POSIX_THREADS
10512yes
10513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010514
10515_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010516if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010518 unistd_defines_pthreads=yes
10519else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010520 unistd_defines_pthreads=no
10521fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010522rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10525$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010526
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010528
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010529 # Just looking for pthread_create in libpthread is not enough:
10530 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10531 # So we really have to include pthread.h, and then link.
10532 _libs=$LIBS
10533 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10535$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010537/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010538
10539#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010540#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010541
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010542void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010543int
10544main ()
10545{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010546
10547pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 ;
10549 return 0;
10550}
10551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010552if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10555$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010556 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010557
Guido van Rossum02a1c402000-02-25 19:26:31 +000010558else
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010560 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010562if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010563
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010564 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010565
Guido van Rossumad678af1998-10-02 14:42:15 +000010566else
Guido van Rossumad678af1998-10-02 14:42:15 +000010567
Matthias Kloseb9621712010-04-24 17:59:49 +000010568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10569$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010570if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010572else
Martin v. Löwis11437992002-04-12 09:54:03 +000010573 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010574LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010576/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578/* Override any GCC internal prototype to avoid an error.
10579 Use char because int might match the return type of a GCC
10580 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010581#ifdef __cplusplus
10582extern "C"
10583#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010584char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010585int
10586main ()
10587{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ;
10590 return 0;
10591}
10592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010593if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010595else
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010598rm -f core conftest.err conftest.$ac_objext \
10599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010600LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010601fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10603$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010604if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010605
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010606 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010607 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010608
Greg Steinadf63d62000-07-05 10:38:09 +000010609else
Greg Steinadf63d62000-07-05 10:38:09 +000010610
Matthias Kloseb9621712010-04-24 17:59:49 +000010611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10612$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010613if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010615else
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010617LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621/* Override any GCC internal prototype to avoid an error.
10622 Use char because int might match the return type of a GCC
10623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010624#ifdef __cplusplus
10625extern "C"
10626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010627char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010628int
10629main ()
10630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ;
10633 return 0;
10634}
10635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010638else
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010641rm -f core conftest.err conftest.$ac_objext \
10642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010643LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10646$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010647if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010650 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010651
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010652else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10655$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010656if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010657 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010658else
Martin v. Löwis11437992002-04-12 09:54:03 +000010659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010660LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010664/* Override any GCC internal prototype to avoid an error.
10665 Use char because int might match the return type of a GCC
10666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010667#ifdef __cplusplus
10668extern "C"
10669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010670char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010671int
10672main ()
10673{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010681else
Matthias Kloseb9621712010-04-24 17:59:49 +000010682 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010683fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010684rm -f core conftest.err conftest.$ac_objext \
10685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010686LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10689$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010690if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010691
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010692 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010693 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010694
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010695else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010696
Matthias Kloseb9621712010-04-24 17:59:49 +000010697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10698$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010699if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010700 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010701else
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010703LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707/* Override any GCC internal prototype to avoid an error.
10708 Use char because int might match the return type of a GCC
10709 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010710#ifdef __cplusplus
10711extern "C"
10712#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010713char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010714int
10715main ()
10716{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010724else
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010726fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010727rm -f core conftest.err conftest.$ac_objext \
10728 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010729LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10732$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010733if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010734
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010735 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010736 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010737
Guido van Rossumb93a8621998-05-07 13:27:32 +000010738else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010739
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010740 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10741
Guido van Rossum2d38f911996-06-26 19:47:01 +000010742fi
10743
Guido van Rossum627b2d71993-12-24 10:39:16 +000010744
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010745fi
10746
Guido van Rossum0be3e491997-05-22 20:33:33 +000010747fi
10748
Guido van Rossum49545951997-12-02 19:28:29 +000010749fi
10750
Guido van Rossumb93a8621998-05-07 13:27:32 +000010751fi
10752
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010754rm -f core conftest.err conftest.$ac_objext \
10755 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10758$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010759if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010761else
Martin v. Löwis11437992002-04-12 09:54:03 +000010762 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010763LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767/* Override any GCC internal prototype to avoid an error.
10768 Use char because int might match the return type of a GCC
10769 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010770#ifdef __cplusplus
10771extern "C"
10772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010773char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010774int
10775main ()
10776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010777return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ;
10779 return 0;
10780}
10781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010784else
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010786fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010787rm -f core conftest.err conftest.$ac_objext \
10788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010789LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10792$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010793if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010794
Martin v. Löwis130fb172001-07-19 11:00:41 +000010795 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010796
Guido van Rossum627b2d71993-12-24 10:39:16 +000010797fi
10798
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010799
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010800fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010801
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010802if test "$posix_threads" = "yes"; then
10803 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010804
Matthias Kloseb9621712010-04-24 17:59:49 +000010805$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010806
10807 fi
10808
10809 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10810 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010811 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010812$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010814 ;;
10815 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010816$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010817
10818 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010819 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010820$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010821
10822 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823 esac
10824
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10826$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010827 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010831 ac_cv_pthread_system_supported=no
10832else
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010835
10836 #include <stdio.h>
10837 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010838 void *foo(void *parm) {
10839 return NULL;
10840 }
10841 main() {
10842 pthread_attr_t attr;
10843 pthread_t id;
10844 if (pthread_attr_init(&attr)) exit(-1);
10845 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10846 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10847 exit(0);
10848 }
10849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010850if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010851 ac_cv_pthread_system_supported=yes
10852else
Matthias Kloseb9621712010-04-24 17:59:49 +000010853 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010854fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010857fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010859
Guido van Rossum627b2d71993-12-24 10:39:16 +000010860fi
10861
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10863$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864 if test "$ac_cv_pthread_system_supported" = "yes"; then
10865
Matthias Kloseb9621712010-04-24 17:59:49 +000010866$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010867
10868 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 for ac_func in pthread_sigmask
10870do :
10871 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010872if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010874#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010876 case $ac_sys_system in
10877 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878
Matthias Kloseb9621712010-04-24 17:59:49 +000010879$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010880
10881 ;;
10882 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010883fi
10884done
10885
pdoxe14679c2017-10-05 00:01:56 -070010886 for ac_func in pthread_getcpuclockid
10887do :
10888 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10889if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10890 cat >>confdefs.h <<_ACEOF
10891#define HAVE_PTHREAD_GETCPUCLOCKID 1
10892_ACEOF
10893
10894fi
10895done
10896
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010897fi
10898
10899
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010901
Matthias Kloseb9621712010-04-24 17:59:49 +000010902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10903$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010905if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010906 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010907 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10909$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910 ipv6=no
10911 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10913$as_echo "yes" >&6; }
10914 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010915
10916 ipv6=yes
10917 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919else
Martin v. Löwis11437992002-04-12 09:54:03 +000010920
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010922/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923 /* AF_INET6 available check */
10924#include <sys/types.h>
10925#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010926int
10927main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010929int domain = AF_INET6;
10930 ;
10931 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932}
Martin v. Löwis11437992002-04-12 09:54:03 +000010933_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010934if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010935
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10937$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010938 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940else
Matthias Kloseb159a552010-04-25 21:00:44 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10943$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010949if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10951$as_echo_n "checking if RFC2553 API is available... " >&6; }
10952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010953/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010954
10955 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010956#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010957int
10958main ()
10959{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010960struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010961 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010962 ;
10963 return 0;
10964}
Matthias Kloseb159a552010-04-25 21:00:44 +000010965
Martin v. Löwis11437992002-04-12 09:54:03 +000010966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010968
10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010970$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010971 ipv6=yes
10972
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010973else
Matthias Kloseb159a552010-04-25 21:00:44 +000010974
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010976$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010977 ipv6=no
10978
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010981fi
10982
10983if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010984 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010985
10986fi
10987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988fi
10989
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010990
10991ipv6type=unknown
10992ipv6lib=none
10993ipv6trylibc=no
10994
10995if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10997$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010998 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10999 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000 case $i in
11001 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011003/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011004
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005#include <netinet/in.h>
11006#ifdef IPV6_INRIA_VERSION
11007yes
11008#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011009_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011012 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011013fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011014rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011015
11016 ;;
11017 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include <netinet/in.h>
11022#ifdef __KAME__
11023yes
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011028 ipv6type=$i;
11029 ipv6lib=inet6
11030 ipv6libdir=/usr/local/v6/lib
11031 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011032fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011033rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034
11035 ;;
11036 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011038/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011039
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040#include <features.h>
11041#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11042yes
11043#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011044_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011046 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047 ipv6type=$i;
11048 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011050rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011051
11052 ;;
11053 linux-inet6)
11054 if test -d /usr/inet6; then
11055 ipv6type=$i
11056 ipv6lib=inet6
11057 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011058 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059 fi
11060 ;;
11061 solaris)
11062 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011063 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011064 ipv6type=$i
11065 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066 fi
11067 fi
11068 ;;
11069 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073#include <sys/param.h>
11074#ifdef _TOSHIBA_INET6
11075yes
11076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011079 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080 ipv6type=$i;
11081 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011082 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011083fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011084rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085
11086 ;;
11087 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011089/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011090
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091#include </usr/local/v6/include/sys/v6config.h>
11092#ifdef __V6D__
11093yes
11094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011095_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011097 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011098 ipv6type=$i;
11099 ipv6lib=v6;
11100 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011101 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011103rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104
11105 ;;
11106 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011108/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011109
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110#include <sys/param.h>
11111#ifdef _ZETA_MINAMI_INET6
11112yes
11113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011114_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011116 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117 ipv6type=$i;
11118 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011119 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011121rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122
11123 ;;
11124 esac
11125 if test "$ipv6type" != "unknown"; then
11126 break
11127 fi
11128 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11130$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131fi
11132
11133if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11134 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11135 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11136 echo "using lib$ipv6lib"
11137 else
11138 if test $ipv6trylibc = "yes"; then
11139 echo "using libc"
11140 else
11141 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11142 echo "You need to fetch lib$ipv6lib.a from appropriate"
11143 echo 'ipv6 kit and compile beforehand.'
11144 exit 1
11145 fi
11146 fi
11147fi
11148
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11150$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11152/* end confdefs.h. */
11153 /* CAN_RAW_FD_FRAMES available check */
11154#include <linux/can/raw.h>
11155int
11156main ()
11157{
11158int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163if ac_fn_c_try_compile "$LINENO"; then :
11164
11165
11166$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11169$as_echo "yes" >&6; }
11170
11171else
11172
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11174$as_echo "no" >&6; }
11175
11176fi
11177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11178
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011179# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11181$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011182
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011184if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011185 withval=$with_doc_strings;
11186fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011187
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011188
11189if test -z "$with_doc_strings"
11190then with_doc_strings="yes"
11191fi
11192if test "$with_doc_strings" != "no"
11193then
11194
Matthias Kloseb9621712010-04-24 17:59:49 +000011195$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011196
11197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11199$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011200
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011201# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11203$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011206if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207 withval=$with_pymalloc;
11208fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011209
Neil Schemenauera35c6882001-02-27 04:45:05 +000011210
Neil Schemenauer16c22972002-03-22 15:34:49 +000011211if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011212then
11213 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011214fi
11215if test "$with_pymalloc" != "no"
11216then
Martin v. Löwis11437992002-04-12 09:54:03 +000011217
Matthias Kloseb9621712010-04-24 17:59:49 +000011218$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011219
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011220 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11223$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011224
Nick Coghlan6ea41862017-06-11 13:16:15 +100011225# Check for --with-c-locale-coercion
11226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11227$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11228
11229# Check whether --with-c-locale-coercion was given.
11230if test "${with_c_locale_coercion+set}" = set; then :
11231 withval=$with_c_locale_coercion;
11232fi
11233
11234
11235if test -z "$with_c_locale_coercion"
11236then
11237 with_c_locale_coercion="yes"
11238fi
11239if test "$with_c_locale_coercion" != "no"
11240then
11241
11242$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11243
11244fi
11245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11246$as_echo "$with_c_locale_coercion" >&6; }
11247
Benjamin Peterson05159c42009-12-03 03:01:27 +000011248# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11250$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011251
11252# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011253if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011254 withval=$with_valgrind;
11255else
11256 with_valgrind=no
11257fi
11258
Matthias Kloseb9621712010-04-24 17:59:49 +000011259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11260$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011261if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011262 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 +020011263if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011264
Matthias Kloseb9621712010-04-24 17:59:49 +000011265$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011266
11267else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011268 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011269
11270fi
11271
11272
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011273 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011274fi
11275
Łukasz Langaa785c872016-09-09 17:37:37 -070011276# Check for DTrace support
11277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11278$as_echo_n "checking for --with-dtrace... " >&6; }
11279
11280# Check whether --with-dtrace was given.
11281if test "${with_dtrace+set}" = set; then :
11282 withval=$with_dtrace;
11283else
11284 with_dtrace=no
11285fi
11286
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11288$as_echo "$with_dtrace" >&6; }
11289
11290
11291
11292
11293
11294DTRACE=
11295DFLAGS=
11296DTRACE_HEADERS=
11297DTRACE_OBJS=
11298
11299if test "$with_dtrace" = "yes"
11300then
11301 # Extract the first word of "dtrace", so it can be a program name with args.
11302set dummy dtrace; ac_word=$2
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11304$as_echo_n "checking for $ac_word... " >&6; }
11305if ${ac_cv_path_DTRACE+:} false; then :
11306 $as_echo_n "(cached) " >&6
11307else
11308 case $DTRACE in
11309 [\\/]* | ?:[\\/]*)
11310 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11311 ;;
11312 *)
11313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11314for as_dir in $PATH
11315do
11316 IFS=$as_save_IFS
11317 test -z "$as_dir" && as_dir=.
11318 for ac_exec_ext in '' $ac_executable_extensions; do
11319 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11320 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11321 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11322 break 2
11323 fi
11324done
11325 done
11326IFS=$as_save_IFS
11327
11328 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11329 ;;
11330esac
11331fi
11332DTRACE=$ac_cv_path_DTRACE
11333if test -n "$DTRACE"; then
11334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11335$as_echo "$DTRACE" >&6; }
11336else
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338$as_echo "no" >&6; }
11339fi
11340
11341
11342 if test "$DTRACE" = "not found"; then
11343 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11344 fi
11345
11346$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11347
11348 DTRACE_HEADERS="Include/pydtrace_probes.h"
11349
11350 # On OS X, DTrace providers do not need to be explicitly compiled and
11351 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11352 # generation flag '-G'. We check for presence of this flag, rather than
11353 # hardcoding support by OS, in the interest of robustness.
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11355$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11356if ${ac_cv_dtrace_link+:} false; then :
11357 $as_echo_n "(cached) " >&6
11358else
11359 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011360 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011361 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11362 ac_cv_dtrace_link=yes
11363
11364fi
11365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11366$as_echo "$ac_cv_dtrace_link" >&6; }
11367 if test "$ac_cv_dtrace_link" = "yes"; then
11368 DTRACE_OBJS="Python/pydtrace.o"
11369 fi
11370fi
11371
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011372# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011373
Guido van Rossum98935bf2001-09-05 19:13:16 +000011374DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011375
Guido van Rossume97ee181999-12-20 21:27:22 +000011376# the dlopen() function means we might want to use dynload_shlib.o. some
11377# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011378for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011379do :
11380 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011381if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011383#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011384_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011385
Guido van Rossume97ee181999-12-20 21:27:22 +000011386fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011387done
Guido van Rossume97ee181999-12-20 21:27:22 +000011388
Michael W. Hudson54241132001-12-07 15:38:26 +000011389
Guido van Rossume97ee181999-12-20 21:27:22 +000011390# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11391# loading of modules.
11392
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11394$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011395if test -z "$DYNLOADFILE"
11396then
11397 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011398 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11399 if test "$ac_cv_func_dlopen" = yes
11400 then DYNLOADFILE="dynload_shlib.o"
11401 else DYNLOADFILE="dynload_aix.o"
11402 fi
11403 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011404 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011405 *)
11406 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11407 # out any dynamic loading
11408 if test "$ac_cv_func_dlopen" = yes
11409 then DYNLOADFILE="dynload_shlib.o"
11410 else DYNLOADFILE="dynload_stub.o"
11411 fi
11412 ;;
11413 esac
11414fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11416$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011417if test "$DYNLOADFILE" != "dynload_stub.o"
11418then
Martin v. Löwis11437992002-04-12 09:54:03 +000011419
Matthias Kloseb9621712010-04-24 17:59:49 +000011420$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011421
11422fi
11423
Neil Schemenauer4e425612001-06-19 15:44:15 +000011424# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11425
Michael W. Hudson54241132001-12-07 15:38:26 +000011426
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11428$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011429if test -z "$MACHDEP_OBJS"
11430then
Jack Jansene578a632001-08-15 01:27:14 +000011431 MACHDEP_OBJS=$extra_machdep_objs
11432else
11433 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011434fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011435if test -z "$MACHDEP_OBJS"; then
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11437$as_echo "none" >&6; }
11438else
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11440$as_echo "$MACHDEP_OBJS" >&6; }
11441fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011442
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011444for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011445 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011446 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011447 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011448 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011449 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011450 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011451 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011452 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011453 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011454 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011455 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011456 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11457 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011458 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011459 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011460 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011461 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11462 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011463 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011464 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011465 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011466 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011467 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011468do :
11469 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11470ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011471if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011472 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011473#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011474_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011475
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011476fi
11477done
11478
Michael W. Hudson54241132001-12-07 15:38:26 +000011479
Benjamin Peterson40caa052018-09-12 15:52:40 -070011480# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11481# links. Some libc implementations have a stub lchmod implementation that always
11482# returns an error.
11483if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011484 for ac_func in lchmod
11485do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011486 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11487if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011488 cat >>confdefs.h <<_ACEOF
11489#define HAVE_LCHMOD 1
11490_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011491
11492fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011493done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011494
11495fi
11496
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011497ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11498 #include <dirent.h>
11499"
11500if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11501
11502$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11503
11504fi
11505
11506
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011507# For some functions, having a definition is not sufficient, since
11508# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11510$as_echo_n "checking for chroot... " >&6; }
11511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011512/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011513#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011514int
11515main ()
11516{
11517void *x=chroot
11518 ;
11519 return 0;
11520}
11521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011523
Matthias Kloseb9621712010-04-24 17:59:49 +000011524$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011525
Matthias Kloseb159a552010-04-25 21:00:44 +000011526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011528else
Matthias Kloseb9621712010-04-24 17:59:49 +000011529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11530$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011531
11532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11535$as_echo_n "checking for link... " >&6; }
11536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011538#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011539int
11540main ()
11541{
11542void *x=link
11543 ;
11544 return 0;
11545}
11546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011547if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548
Matthias Kloseb9621712010-04-24 17:59:49 +000011549$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011550
Matthias Kloseb159a552010-04-25 21:00:44 +000011551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011553else
Matthias Kloseb9621712010-04-24 17:59:49 +000011554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11555$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011556
11557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11560$as_echo_n "checking for symlink... " >&6; }
11561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011563#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011564int
11565main ()
11566{
11567void *x=symlink
11568 ;
11569 return 0;
11570}
11571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011572if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573
Matthias Kloseb9621712010-04-24 17:59:49 +000011574$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575
Matthias Kloseb159a552010-04-25 21:00:44 +000011576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011577$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011578else
Matthias Kloseb9621712010-04-24 17:59:49 +000011579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11580$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011581
11582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11585$as_echo_n "checking for fchdir... " >&6; }
11586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011587/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011588#include <unistd.h>
11589int
11590main ()
11591{
11592void *x=fchdir
11593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011597if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011598
Matthias Kloseb9621712010-04-24 17:59:49 +000011599$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011600
Matthias Kloseb159a552010-04-25 21:00:44 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011602$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011603else
Matthias Kloseb9621712010-04-24 17:59:49 +000011604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11605$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011606
11607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11610$as_echo_n "checking for fsync... " >&6; }
11611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011612/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011613#include <unistd.h>
11614int
11615main ()
11616{
11617void *x=fsync
11618 ;
11619 return 0;
11620}
11621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011622if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011623
Matthias Kloseb9621712010-04-24 17:59:49 +000011624$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011625
Matthias Kloseb159a552010-04-25 21:00:44 +000011626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011627$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011628else
Matthias Kloseb9621712010-04-24 17:59:49 +000011629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11630$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011631
11632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11635$as_echo_n "checking for fdatasync... " >&6; }
11636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011637/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011638#include <unistd.h>
11639int
11640main ()
11641{
11642void *x=fdatasync
11643 ;
11644 return 0;
11645}
11646_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011647if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650
Matthias Kloseb159a552010-04-25 21:00:44 +000011651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011652$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011653else
Matthias Kloseb9621712010-04-24 17:59:49 +000011654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011656
11657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11660$as_echo_n "checking for epoll... " >&6; }
11661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011662/* end confdefs.h. */
11663#include <sys/epoll.h>
11664int
11665main ()
11666{
11667void *x=epoll_create
11668 ;
11669 return 0;
11670}
11671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011673
Matthias Kloseb9621712010-04-24 17:59:49 +000011674$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011675
Matthias Kloseb159a552010-04-25 21:00:44 +000011676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011677$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011678else
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11680$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011681
11682fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11685$as_echo_n "checking for epoll_create1... " >&6; }
11686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11687/* end confdefs.h. */
11688#include <sys/epoll.h>
11689int
11690main ()
11691{
11692void *x=epoll_create1
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697if ac_fn_c_try_compile "$LINENO"; then :
11698
11699$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11700
11701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11702$as_echo "yes" >&6; }
11703else
11704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11705$as_echo "no" >&6; }
11706
11707fi
11708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11710$as_echo_n "checking for kqueue... " >&6; }
11711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011712/* end confdefs.h. */
11713
11714#include <sys/types.h>
11715#include <sys/event.h>
11716
11717int
11718main ()
11719{
11720int x=kqueue()
11721 ;
11722 return 0;
11723}
11724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011725if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011726
Matthias Kloseb9621712010-04-24 17:59:49 +000011727$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728
Matthias Kloseb159a552010-04-25 21:00:44 +000011729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011730$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011731else
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11733$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011734
11735fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11738$as_echo_n "checking for prlimit... " >&6; }
11739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740/* end confdefs.h. */
11741
11742#include <sys/time.h>
11743#include <sys/resource.h>
11744
11745int
11746main ()
11747{
11748void *x=prlimit
11749 ;
11750 return 0;
11751}
11752_ACEOF
11753if ac_fn_c_try_compile "$LINENO"; then :
11754
11755$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11756
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11758$as_echo "yes" >&6; }
11759else
11760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11761$as_echo "no" >&6; }
11762
11763fi
11764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11765
Martin v. Löwisd5843682002-11-21 20:41:28 +000011766# On some systems (eg. FreeBSD 5), we would find a definition of the
11767# functions ctermid_r, setgroups in the library, but no prototype
11768# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11769# address to avoid compiler warnings and potential miscompilations
11770# because of the missing prototypes.
11771
Matthias Kloseb9621712010-04-24 17:59:49 +000011772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11773$as_echo_n "checking for ctermid_r... " >&6; }
11774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011775/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011776
Martin v. Löwisd5843682002-11-21 20:41:28 +000011777#include <stdio.h>
11778
Martin v. Löwisd5843682002-11-21 20:41:28 +000011779int
11780main ()
11781{
11782void* p = ctermid_r
11783 ;
11784 return 0;
11785}
11786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011788
Matthias Kloseb9621712010-04-24 17:59:49 +000011789$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011790
Matthias Kloseb159a552010-04-25 21:00:44 +000011791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011792$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011793else
Matthias Kloseb9621712010-04-24 17:59:49 +000011794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11795$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011796
11797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11799
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11801$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011802if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011803 $as_echo_n "(cached) " >&6
11804else
11805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011806/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011807#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011808int
11809main ()
11810{
11811void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011812
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011813 ;
11814 return 0;
11815}
11816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011817if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011818 ac_cv_flock_decl=yes
11819else
11820 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011821
11822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011824
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011825fi
11826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11827$as_echo "$ac_cv_flock_decl" >&6; }
11828if test "x${ac_cv_flock_decl}" = xyes; then
11829 for ac_func in flock
11830do :
11831 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011832if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011833 cat >>confdefs.h <<_ACEOF
11834#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011835_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011836
Antoine Pitroua3000072010-09-07 14:52:42 +000011837else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011839$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011840if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011841 $as_echo_n "(cached) " >&6
11842else
11843 ac_check_lib_save_LIBS=$LIBS
11844LIBS="-lbsd $LIBS"
11845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11846/* end confdefs.h. */
11847
11848/* Override any GCC internal prototype to avoid an error.
11849 Use char because int might match the return type of a GCC
11850 builtin and then its argument prototype would still apply. */
11851#ifdef __cplusplus
11852extern "C"
11853#endif
11854char flock ();
11855int
11856main ()
11857{
11858return flock ();
11859 ;
11860 return 0;
11861}
11862_ACEOF
11863if ac_fn_c_try_link "$LINENO"; then :
11864 ac_cv_lib_bsd_flock=yes
11865else
11866 ac_cv_lib_bsd_flock=no
11867fi
11868rm -f core conftest.err conftest.$ac_objext \
11869 conftest$ac_exeext conftest.$ac_ext
11870LIBS=$ac_check_lib_save_LIBS
11871fi
11872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11873$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011875 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011876
11877
11878$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11879
11880
11881fi
11882
11883
11884fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011885done
11886
Antoine Pitroua3000072010-09-07 14:52:42 +000011887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11890$as_echo_n "checking for getpagesize... " >&6; }
11891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011893
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011894#include <unistd.h>
11895
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011896int
11897main ()
11898{
11899void* p = getpagesize
11900 ;
11901 return 0;
11902}
11903_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011904if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011905
Matthias Kloseb9621712010-04-24 17:59:49 +000011906$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011907
Matthias Kloseb159a552010-04-25 21:00:44 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011909$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011910else
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11912$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011913
11914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011916
Victor Stinner984890f2011-11-24 13:53:38 +010011917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11918$as_echo_n "checking for broken unsetenv... " >&6; }
11919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11920/* end confdefs.h. */
11921
11922#include <stdlib.h>
11923
11924int
11925main ()
11926{
11927int res = unsetenv("DUMMY")
11928 ;
11929 return 0;
11930}
11931_ACEOF
11932if ac_fn_c_try_compile "$LINENO"; then :
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934$as_echo "no" >&6; }
11935else
11936
11937$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11938
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11940$as_echo "yes" >&6; }
11941
11942fi
11943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11944
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011945for ac_prog in true
11946do
11947 # Extract the first word of "$ac_prog", so it can be a program name with args.
11948set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011951if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011953else
11954 if test -n "$TRUE"; then
11955 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11956else
11957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11958for as_dir in $PATH
11959do
11960 IFS=$as_save_IFS
11961 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011964 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 $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 +000011966 break 2
11967 fi
11968done
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011971
11972fi
11973fi
11974TRUE=$ac_cv_prog_TRUE
11975if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11977$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011978else
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11980$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011981fi
11982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011983
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011984 test -n "$TRUE" && break
11985done
11986test -n "$TRUE" || TRUE="/bin/true"
11987
11988
Matthias Kloseb9621712010-04-24 17:59:49 +000011989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11990$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011991if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011993else
11994 ac_check_lib_save_LIBS=$LIBS
11995LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011997/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999/* Override any GCC internal prototype to avoid an error.
12000 Use char because int might match the return type of a GCC
12001 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012002#ifdef __cplusplus
12003extern "C"
12004#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012005char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012006int
12007main ()
12008{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012009return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012010 ;
12011 return 0;
12012}
12013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012015 ac_cv_lib_c_inet_aton=yes
12016else
Matthias Kloseb9621712010-04-24 17:59:49 +000012017 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012018fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012019rm -f core conftest.err conftest.$ac_objext \
12020 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012021LIBS=$ac_check_lib_save_LIBS
12022fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12024$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012025if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012026 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012027else
Matthias Kloseb9621712010-04-24 17:59:49 +000012028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12029$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012030if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012031 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012032else
12033 ac_check_lib_save_LIBS=$LIBS
12034LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012036/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038/* Override any GCC internal prototype to avoid an error.
12039 Use char because int might match the return type of a GCC
12040 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012041#ifdef __cplusplus
12042extern "C"
12043#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012045int
12046main ()
12047{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012048return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049 ;
12050 return 0;
12051}
12052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054 ac_cv_lib_resolv_inet_aton=yes
12055else
Matthias Kloseb9621712010-04-24 17:59:49 +000012056 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012058rm -f core conftest.err conftest.$ac_objext \
12059 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060LIBS=$ac_check_lib_save_LIBS
12061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12063$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012064if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065 cat >>confdefs.h <<_ACEOF
12066#define HAVE_LIBRESOLV 1
12067_ACEOF
12068
12069 LIBS="-lresolv $LIBS"
12070
12071fi
12072
12073
12074fi
12075
12076
Christian Heimesd0764e22007-12-04 15:00:33 +000012077# On Tru64, chflags seems to be present, but calling it will
12078# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12080$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012081if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012082 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012083else
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012085 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012086else
Matthias Kloseb9621712010-04-24 17:59:49 +000012087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012088/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012089
Christian Heimesd0764e22007-12-04 15:00:33 +000012090#include <sys/stat.h>
12091#include <unistd.h>
12092int main(int argc, char*argv[])
12093{
12094 if(chflags(argv[0], 0) != 0)
12095 return 1;
12096 return 0;
12097}
Ned Deily3eb67d52011-06-28 00:00:28 -070012098
Christian Heimesd0764e22007-12-04 15:00:33 +000012099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012101 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012105rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12106 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012107fi
12108
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012110fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12112$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012113if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012114 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012115if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012116 ac_cv_have_chflags="yes"
12117else
12118 ac_cv_have_chflags="no"
12119fi
12120
12121fi
12122if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012123
Matthias Kloseb9621712010-04-24 17:59:49 +000012124$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012125
12126fi
12127
Matthias Kloseb9621712010-04-24 17:59:49 +000012128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12129$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012130if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012134 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012135else
Matthias Kloseb9621712010-04-24 17:59:49 +000012136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012137/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012138
Christian Heimesd0764e22007-12-04 15:00:33 +000012139#include <sys/stat.h>
12140#include <unistd.h>
12141int main(int argc, char*argv[])
12142{
12143 if(lchflags(argv[0], 0) != 0)
12144 return 1;
12145 return 0;
12146}
Ned Deily3eb67d52011-06-28 00:00:28 -070012147
Christian Heimesd0764e22007-12-04 15:00:33 +000012148_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012149if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012150 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12155 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012156fi
12157
12158
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12161$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012162if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012163 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012164if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012165 ac_cv_have_lchflags="yes"
12166else
12167 ac_cv_have_lchflags="no"
12168fi
12169
12170fi
12171if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012174
12175fi
12176
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012177case $ac_sys_system/$ac_sys_release in
12178Darwin/*)
12179 _CUR_CFLAGS="${CFLAGS}"
12180 _CUR_LDFLAGS="${LDFLAGS}"
12181 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12182 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12183 ;;
12184esac
12185
Matthias Kloseb9621712010-04-24 17:59:49 +000012186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12187$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012188if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012189 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012190else
12191 ac_check_lib_save_LIBS=$LIBS
12192LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012194/* end confdefs.h. */
12195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196/* Override any GCC internal prototype to avoid an error.
12197 Use char because int might match the return type of a GCC
12198 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012199#ifdef __cplusplus
12200extern "C"
12201#endif
12202char inflateCopy ();
12203int
12204main ()
12205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012206return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012207 ;
12208 return 0;
12209}
12210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012211if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012212 ac_cv_lib_z_inflateCopy=yes
12213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012216rm -f core conftest.err conftest.$ac_objext \
12217 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012218LIBS=$ac_check_lib_save_LIBS
12219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12221$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012222if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012223
Matthias Kloseb9621712010-04-24 17:59:49 +000012224$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012225
12226fi
12227
12228
12229case $ac_sys_system/$ac_sys_release in
12230Darwin/*)
12231 CFLAGS="${_CUR_CFLAGS}"
12232 LDFLAGS="${_CUR_LDFLAGS}"
12233 ;;
12234esac
12235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12237$as_echo_n "checking for hstrerror... " >&6; }
12238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012239/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012240
Martin v. Löwise9416172003-05-03 10:12:45 +000012241#include <netdb.h>
12242
Martin v. Löwise9416172003-05-03 10:12:45 +000012243int
12244main ()
12245{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012246void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012247 ;
12248 return 0;
12249}
12250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012251if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012252
Matthias Kloseb9621712010-04-24 17:59:49 +000012253$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012254
Matthias Kloseb159a552010-04-25 21:00:44 +000012255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012256$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12259$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012260
12261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012262rm -f core conftest.err conftest.$ac_objext \
12263 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12266$as_echo_n "checking for inet_aton... " >&6; }
12267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012269
Martin v. Löwis86d66262006-02-17 08:40:11 +000012270#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012271#include <sys/socket.h>
12272#include <netinet/in.h>
12273#include <arpa/inet.h>
12274
Martin v. Löwise9416172003-05-03 10:12:45 +000012275int
12276main ()
12277{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012278void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012279 ;
12280 return 0;
12281}
12282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012283if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012286
Matthias Kloseb159a552010-04-25 21:00:44 +000012287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012288$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012289else
Matthias Kloseb9621712010-04-24 17:59:49 +000012290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12291$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012292
12293fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012294rm -f core conftest.err conftest.$ac_objext \
12295 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12298$as_echo_n "checking for inet_pton... " >&6; }
12299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012300/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012301
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012302#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012303#include <sys/socket.h>
12304#include <netinet/in.h>
12305#include <arpa/inet.h>
12306
Martin v. Löwise9416172003-05-03 10:12:45 +000012307int
12308main ()
12309{
12310void* p = inet_pton
12311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012318
Matthias Kloseb159a552010-04-25 21:00:44 +000012319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012320$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012321else
Matthias Kloseb9621712010-04-24 17:59:49 +000012322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012324
12325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012327
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012328# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12330$as_echo_n "checking for setgroups... " >&6; }
12331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012333
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012334#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012335#ifdef HAVE_GRP_H
12336#include <grp.h>
12337#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012338
Martin v. Löwisd5843682002-11-21 20:41:28 +000012339int
12340main ()
12341{
12342void* p = setgroups
12343 ;
12344 return 0;
12345}
12346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012348
Matthias Kloseb9621712010-04-24 17:59:49 +000012349$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012350
Matthias Kloseb159a552010-04-25 21:00:44 +000012351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012352$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012353else
Matthias Kloseb9621712010-04-24 17:59:49 +000012354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12355$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012356
12357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012360# check for openpty and forkpty
12361
12362for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012363do :
12364 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012365if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012368_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012370else
Matthias Kloseb9621712010-04-24 17:59:49 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12372$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012373if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012375else
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012377LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381/* Override any GCC internal prototype to avoid an error.
12382 Use char because int might match the return type of a GCC
12383 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012384#ifdef __cplusplus
12385extern "C"
12386#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012387char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012388int
12389main ()
12390{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012391return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012401rm -f core conftest.err conftest.$ac_objext \
12402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012403LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12406$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012409 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012410else
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12412$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012413if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012414 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012415else
12416 ac_check_lib_save_LIBS=$LIBS
12417LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012419/* end confdefs.h. */
12420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421/* Override any GCC internal prototype to avoid an error.
12422 Use char because int might match the return type of a GCC
12423 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012424#ifdef __cplusplus
12425extern "C"
12426#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012427char openpty ();
12428int
12429main ()
12430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012431return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012432 ;
12433 return 0;
12434}
12435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012436if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012437 ac_cv_lib_bsd_openpty=yes
12438else
Matthias Kloseb9621712010-04-24 17:59:49 +000012439 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012440fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012441rm -f core conftest.err conftest.$ac_objext \
12442 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012443LIBS=$ac_check_lib_save_LIBS
12444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12446$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012447if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012449 LIBS="$LIBS -lbsd"
12450fi
12451
12452
12453fi
12454
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455
12456fi
12457done
12458
12459for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012460do :
12461 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012462if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012463 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012464#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012466
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467else
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12469$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012470if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012471 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012472else
Martin v. Löwis11437992002-04-12 09:54:03 +000012473 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012474LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012475cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478/* Override any GCC internal prototype to avoid an error.
12479 Use char because int might match the return type of a GCC
12480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012481#ifdef __cplusplus
12482extern "C"
12483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012484char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012485int
12486main ()
12487{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012488return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ;
12490 return 0;
12491}
12492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012493if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012494 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495else
Matthias Kloseb9621712010-04-24 17:59:49 +000012496 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012498rm -f core conftest.err conftest.$ac_objext \
12499 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012500LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12503$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012506 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12509$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012510if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012511 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012512else
12513 ac_check_lib_save_LIBS=$LIBS
12514LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012516/* end confdefs.h. */
12517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012518/* Override any GCC internal prototype to avoid an error.
12519 Use char because int might match the return type of a GCC
12520 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012521#ifdef __cplusplus
12522extern "C"
12523#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012524char forkpty ();
12525int
12526main ()
12527{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012528return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012529 ;
12530 return 0;
12531}
12532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012533if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012534 ac_cv_lib_bsd_forkpty=yes
12535else
Matthias Kloseb9621712010-04-24 17:59:49 +000012536 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012537fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012538rm -f core conftest.err conftest.$ac_objext \
12539 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012540LIBS=$ac_check_lib_save_LIBS
12541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12543$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012544if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012546 LIBS="$LIBS -lbsd"
12547fi
12548
12549
12550fi
12551
Fred Drake8cef4cf2000-06-28 16:40:38 +000012552
12553fi
12554done
12555
Jack Jansendd19cf82001-12-06 22:36:17 +000012556
Michael W. Hudson54241132001-12-07 15:38:26 +000012557# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012558for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012559do :
12560 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12561ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012562if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012565_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012566
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012567fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012568done
12569
Michael W. Hudson54241132001-12-07 15:38:26 +000012570
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012571ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012572if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012573 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012574
Martin v. Löwis1142de32002-03-29 16:28:31 +000012575else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012577 *" dup2.$ac_objext "* ) ;;
12578 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012580esac
12581
Martin v. Löwis1142de32002-03-29 16:28:31 +000012582fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012584ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012585if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012586 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12587
12588else
12589 case " $LIBOBJS " in
12590 *" strdup.$ac_objext "* ) ;;
12591 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12592 ;;
12593esac
12594
12595fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012596
12597
12598for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012599do :
12600 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012601if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012603#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012606/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012608int
12609main ()
12610{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012612 ;
12613 return 0;
12614}
12615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012617
Matthias Kloseb9621712010-04-24 17:59:49 +000012618$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012619
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012622
Guido van Rossum627b2d71993-12-24 10:39:16 +000012623fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012624done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012625
Jack Jansen150753c2003-03-29 22:07:47 +000012626for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012627do :
12628 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012629if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012630 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012634/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012635#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012636int
12637main ()
12638{
12639setpgrp(0,0);
12640 ;
12641 return 0;
12642}
12643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012644if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012645
Matthias Kloseb9621712010-04-24 17:59:49 +000012646$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012647
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012650
12651fi
12652done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012653
Thomas Wouters3a584202000-08-05 23:28:51 +000012654for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012655do :
12656 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012657if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012659#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012662/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012663#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012664int
12665main ()
12666{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012667gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 ;
12669 return 0;
12670}
12671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012672if ac_fn_c_try_compile "$LINENO"; then :
12673
Guido van Rossum627b2d71993-12-24 10:39:16 +000012674else
Skip Montanaro6dead952003-09-25 14:50:04 +000012675
Matthias Kloseb9621712010-04-24 17:59:49 +000012676$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012677
Martin v. Löwis11437992002-04-12 09:54:03 +000012678
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012683done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684
Michael W. Hudson54241132001-12-07 15:38:26 +000012685
Gregory P. Smith387512c2018-12-30 15:42:32 -080012686# We search for both crypt and crypt_r as one or the other may be defined
12687# This gets us our -lcrypt in LIBS when required on the target platform.
12688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12689$as_echo_n "checking for library containing crypt... " >&6; }
12690if ${ac_cv_search_crypt+:} false; then :
12691 $as_echo_n "(cached) " >&6
12692else
12693 ac_func_search_save_LIBS=$LIBS
12694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12695/* end confdefs.h. */
12696
12697/* Override any GCC internal prototype to avoid an error.
12698 Use char because int might match the return type of a GCC
12699 builtin and then its argument prototype would still apply. */
12700#ifdef __cplusplus
12701extern "C"
12702#endif
12703char crypt ();
12704int
12705main ()
12706{
12707return crypt ();
12708 ;
12709 return 0;
12710}
12711_ACEOF
12712for ac_lib in '' crypt; do
12713 if test -z "$ac_lib"; then
12714 ac_res="none required"
12715 else
12716 ac_res=-l$ac_lib
12717 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12718 fi
12719 if ac_fn_c_try_link "$LINENO"; then :
12720 ac_cv_search_crypt=$ac_res
12721fi
12722rm -f core conftest.err conftest.$ac_objext \
12723 conftest$ac_exeext
12724 if ${ac_cv_search_crypt+:} false; then :
12725 break
12726fi
12727done
12728if ${ac_cv_search_crypt+:} false; then :
12729
12730else
12731 ac_cv_search_crypt=no
12732fi
12733rm conftest.$ac_ext
12734LIBS=$ac_func_search_save_LIBS
12735fi
12736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12737$as_echo "$ac_cv_search_crypt" >&6; }
12738ac_res=$ac_cv_search_crypt
12739if test "$ac_res" != no; then :
12740 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12741
12742fi
12743
12744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12745$as_echo_n "checking for library containing crypt_r... " >&6; }
12746if ${ac_cv_search_crypt_r+:} false; then :
12747 $as_echo_n "(cached) " >&6
12748else
12749 ac_func_search_save_LIBS=$LIBS
12750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751/* end confdefs.h. */
12752
12753/* Override any GCC internal prototype to avoid an error.
12754 Use char because int might match the return type of a GCC
12755 builtin and then its argument prototype would still apply. */
12756#ifdef __cplusplus
12757extern "C"
12758#endif
12759char crypt_r ();
12760int
12761main ()
12762{
12763return crypt_r ();
12764 ;
12765 return 0;
12766}
12767_ACEOF
12768for ac_lib in '' crypt; do
12769 if test -z "$ac_lib"; then
12770 ac_res="none required"
12771 else
12772 ac_res=-l$ac_lib
12773 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12774 fi
12775 if ac_fn_c_try_link "$LINENO"; then :
12776 ac_cv_search_crypt_r=$ac_res
12777fi
12778rm -f core conftest.err conftest.$ac_objext \
12779 conftest$ac_exeext
12780 if ${ac_cv_search_crypt_r+:} false; then :
12781 break
12782fi
12783done
12784if ${ac_cv_search_crypt_r+:} false; then :
12785
12786else
12787 ac_cv_search_crypt_r=no
12788fi
12789rm conftest.$ac_ext
12790LIBS=$ac_func_search_save_LIBS
12791fi
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12793$as_echo "$ac_cv_search_crypt_r" >&6; }
12794ac_res=$ac_cv_search_crypt_r
12795if test "$ac_res" != no; then :
12796 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12797
12798fi
12799
12800
12801ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12802if test "x$ac_cv_func_crypt_r" = xyes; then :
12803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12804/* end confdefs.h. */
12805
12806#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12807#include <crypt.h>
12808
12809int
12810main ()
12811{
12812
12813struct crypt_data d;
12814char *r = crypt_r("", "", &d);
12815
12816 ;
12817 return 0;
12818}
12819_ACEOF
12820if ac_fn_c_try_compile "$LINENO"; then :
12821
12822$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12823
12824fi
12825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12826
12827fi
12828
12829
Victor Stinnere0be4232011-10-25 13:06:09 +020012830for ac_func in clock_gettime
12831do :
12832 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12833if test "x$ac_cv_func_clock_gettime" = xyes; then :
12834 cat >>confdefs.h <<_ACEOF
12835#define HAVE_CLOCK_GETTIME 1
12836_ACEOF
12837
12838else
12839
12840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12841$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12842if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12843 $as_echo_n "(cached) " >&6
12844else
12845 ac_check_lib_save_LIBS=$LIBS
12846LIBS="-lrt $LIBS"
12847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848/* end confdefs.h. */
12849
12850/* Override any GCC internal prototype to avoid an error.
12851 Use char because int might match the return type of a GCC
12852 builtin and then its argument prototype would still apply. */
12853#ifdef __cplusplus
12854extern "C"
12855#endif
12856char clock_gettime ();
12857int
12858main ()
12859{
12860return clock_gettime ();
12861 ;
12862 return 0;
12863}
12864_ACEOF
12865if ac_fn_c_try_link "$LINENO"; then :
12866 ac_cv_lib_rt_clock_gettime=yes
12867else
12868 ac_cv_lib_rt_clock_gettime=no
12869fi
12870rm -f core conftest.err conftest.$ac_objext \
12871 conftest$ac_exeext conftest.$ac_ext
12872LIBS=$ac_check_lib_save_LIBS
12873fi
12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12875$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12876if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12877
Victor Stinner7efb8332014-08-29 15:41:08 +020012878 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012879 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12880
12881
12882$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12883
12884
12885fi
12886
12887
12888fi
12889done
12890
12891
12892for ac_func in clock_getres
12893do :
12894 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12895if test "x$ac_cv_func_clock_getres" = xyes; then :
12896 cat >>confdefs.h <<_ACEOF
12897#define HAVE_CLOCK_GETRES 1
12898_ACEOF
12899
12900else
12901
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12903$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12904if ${ac_cv_lib_rt_clock_getres+:} false; then :
12905 $as_echo_n "(cached) " >&6
12906else
12907 ac_check_lib_save_LIBS=$LIBS
12908LIBS="-lrt $LIBS"
12909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12910/* end confdefs.h. */
12911
12912/* Override any GCC internal prototype to avoid an error.
12913 Use char because int might match the return type of a GCC
12914 builtin and then its argument prototype would still apply. */
12915#ifdef __cplusplus
12916extern "C"
12917#endif
12918char clock_getres ();
12919int
12920main ()
12921{
12922return clock_getres ();
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927if ac_fn_c_try_link "$LINENO"; then :
12928 ac_cv_lib_rt_clock_getres=yes
12929else
12930 ac_cv_lib_rt_clock_getres=no
12931fi
12932rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
12934LIBS=$ac_check_lib_save_LIBS
12935fi
12936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12937$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12938if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12939
12940 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12941
12942
12943fi
12944
12945
12946fi
12947done
12948
12949
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012950for ac_func in clock_settime
12951do :
12952 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12953if test "x$ac_cv_func_clock_settime" = xyes; then :
12954 cat >>confdefs.h <<_ACEOF
12955#define HAVE_CLOCK_SETTIME 1
12956_ACEOF
12957
12958else
12959
12960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12961$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12962if ${ac_cv_lib_rt_clock_settime+:} false; then :
12963 $as_echo_n "(cached) " >&6
12964else
12965 ac_check_lib_save_LIBS=$LIBS
12966LIBS="-lrt $LIBS"
12967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12968/* end confdefs.h. */
12969
12970/* Override any GCC internal prototype to avoid an error.
12971 Use char because int might match the return type of a GCC
12972 builtin and then its argument prototype would still apply. */
12973#ifdef __cplusplus
12974extern "C"
12975#endif
12976char clock_settime ();
12977int
12978main ()
12979{
12980return clock_settime ();
12981 ;
12982 return 0;
12983}
12984_ACEOF
12985if ac_fn_c_try_link "$LINENO"; then :
12986 ac_cv_lib_rt_clock_settime=yes
12987else
12988 ac_cv_lib_rt_clock_settime=no
12989fi
12990rm -f core conftest.err conftest.$ac_objext \
12991 conftest$ac_exeext conftest.$ac_ext
12992LIBS=$ac_check_lib_save_LIBS
12993fi
12994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12995$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12996if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12997
12998 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12999
13000
13001fi
13002
13003
13004fi
13005done
13006
13007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13009$as_echo_n "checking for major... " >&6; }
13010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013011/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013012
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013013#if defined(MAJOR_IN_MKDEV)
13014#include <sys/mkdev.h>
13015#elif defined(MAJOR_IN_SYSMACROS)
13016#include <sys/sysmacros.h>
13017#else
13018#include <sys/types.h>
13019#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013020
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013021int
13022main ()
13023{
13024
13025 makedev(major(0),minor(0));
13026
13027 ;
13028 return 0;
13029}
13030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013032
13033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013035
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13037$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013038
13039else
Skip Montanaro6dead952003-09-25 14:50:04 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13042$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013043
13044fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013045rm -f core conftest.err conftest.$ac_objext \
13046 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013047
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013048# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013049# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13051$as_echo_n "checking for getaddrinfo... " >&6; }
13052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013053/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013054
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013055#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013056#include <sys/socket.h>
13057#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013058#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013059
Martin v. Löwis11437992002-04-12 09:54:03 +000013060int
13061main ()
13062{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013063getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 ;
13065 return 0;
13066}
13067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013068if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013069 have_getaddrinfo=yes
13070else
Matthias Kloseb9621712010-04-24 17:59:49 +000013071 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013073rm -f core conftest.err conftest.$ac_objext \
13074 conftest$ac_exeext conftest.$ac_ext
13075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13076$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077if test $have_getaddrinfo = yes
13078then
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13080$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013081 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013083else
Matthias Kloseb9621712010-04-24 17:59:49 +000013084 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013085
13086if test "${enable_ipv6+set}" = set; then
13087 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13088else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013090fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013091else
Matthias Kloseb9621712010-04-24 17:59:49 +000013092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013093/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013094
Stefan Krah19c21392012-11-22 23:47:32 +010013095#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013096#include <sys/types.h>
13097#include <netdb.h>
13098#include <string.h>
13099#include <sys/socket.h>
13100#include <netinet/in.h>
13101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013102int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103{
13104 int passive, gaierr, inet4 = 0, inet6 = 0;
13105 struct addrinfo hints, *ai, *aitop;
13106 char straddr[INET6_ADDRSTRLEN], strport[16];
13107
13108 for (passive = 0; passive <= 1; passive++) {
13109 memset(&hints, 0, sizeof(hints));
13110 hints.ai_family = AF_UNSPEC;
13111 hints.ai_flags = passive ? AI_PASSIVE : 0;
13112 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013113 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13115 (void)gai_strerror(gaierr);
13116 goto bad;
13117 }
13118 for (ai = aitop; ai; ai = ai->ai_next) {
13119 if (ai->ai_addr == NULL ||
13120 ai->ai_addrlen == 0 ||
13121 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13122 straddr, sizeof(straddr), strport, sizeof(strport),
13123 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13124 goto bad;
13125 }
13126 switch (ai->ai_family) {
13127 case AF_INET:
13128 if (strcmp(strport, "54321") != 0) {
13129 goto bad;
13130 }
13131 if (passive) {
13132 if (strcmp(straddr, "0.0.0.0") != 0) {
13133 goto bad;
13134 }
13135 } else {
13136 if (strcmp(straddr, "127.0.0.1") != 0) {
13137 goto bad;
13138 }
13139 }
13140 inet4++;
13141 break;
13142 case AF_INET6:
13143 if (strcmp(strport, "54321") != 0) {
13144 goto bad;
13145 }
13146 if (passive) {
13147 if (strcmp(straddr, "::") != 0) {
13148 goto bad;
13149 }
13150 } else {
13151 if (strcmp(straddr, "::1") != 0) {
13152 goto bad;
13153 }
13154 }
13155 inet6++;
13156 break;
13157 case AF_UNSPEC:
13158 goto bad;
13159 break;
13160 default:
13161 /* another family support? */
13162 break;
13163 }
13164 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013165 freeaddrinfo(aitop);
13166 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013167 }
13168
13169 if (!(inet4 == 0 || inet4 == 2))
13170 goto bad;
13171 if (!(inet6 == 0 || inet6 == 2))
13172 goto bad;
13173
13174 if (aitop)
13175 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013176 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013177
13178 bad:
13179 if (aitop)
13180 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013181 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013182}
13183
Martin v. Löwis11437992002-04-12 09:54:03 +000013184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013186 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187else
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13191 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013194fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013195
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13199$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13200
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013201if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202then
13203 if test $ipv6 = yes
13204 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205 echo 'Fatal: You must get working getaddrinfo() function.'
13206 echo ' or you can specify "--disable-ipv6"'.
13207 exit 1
13208 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013209else
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Matthias Kloseb9621712010-04-24 17:59:49 +000013211$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013212
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013213fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013214
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013215for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013216do :
13217 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013218if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013220#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013221_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013222
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013223fi
13224done
13225
Michael W. Hudson54241132001-12-07 15:38:26 +000013226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013227# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13229$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013230if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013231 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013232else
Matthias Kloseb9621712010-04-24 17:59:49 +000013233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013234/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013235#include <sys/types.h>
13236#include <sys/time.h>
13237#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239int
13240main ()
13241{
13242if ((struct tm *) 0)
13243return 0;
13244 ;
13245 return 0;
13246}
13247_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013248if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013249 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13256$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013257if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013260
13261fi
13262
Matthias Kloseb9621712010-04-24 17:59:49 +000013263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13264$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013265if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013266 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267else
Matthias Kloseb9621712010-04-24 17:59:49 +000013268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013269/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270#include <sys/types.h>
13271#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273int
13274main ()
13275{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013276struct tm tm;
13277 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013279 ;
13280 return 0;
13281}
13282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013283if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013284 ac_cv_struct_tm=time.h
13285else
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13291$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013292if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013293
Matthias Kloseb9621712010-04-24 17:59:49 +000013294$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013295
13296fi
13297
Matthias Kloseb9621712010-04-24 17:59:49 +000013298ac_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 +000013299#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
Matthias Kloseb9621712010-04-24 17:59:49 +000013301"
Victor Stinnere0be4232011-10-25 13:06:09 +020013302if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013303
13304cat >>confdefs.h <<_ACEOF
13305#define HAVE_STRUCT_TM_TM_ZONE 1
13306_ACEOF
13307
13308
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013310
Martin v. Löwis11437992002-04-12 09:54:03 +000013311if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314
13315else
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13317"
Victor Stinnere0be4232011-10-25 13:06:09 +020013318if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013319 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322fi
13323
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013324cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013325#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326_ACEOF
13327
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13329$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013334/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013335#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336#if !HAVE_DECL_TZNAME
13337extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340int
13341main ()
13342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013343return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ;
13345 return 0;
13346}
13347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013348if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349 ac_cv_var_tzname=yes
13350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013353rm -f core conftest.err conftest.$ac_objext \
13354 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13357$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013358 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
Matthias Kloseb9621712010-04-24 17:59:49 +000013360$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013361
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013362 fi
13363fi
13364
Matthias Kloseb9621712010-04-24 17:59:49 +000013365ac_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 +020013366if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013367
13368cat >>confdefs.h <<_ACEOF
13369#define HAVE_STRUCT_STAT_ST_RDEV 1
13370_ACEOF
13371
13372
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013373fi
13374
Matthias Kloseb9621712010-04-24 17:59:49 +000013375ac_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 +020013376if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378cat >>confdefs.h <<_ACEOF
13379#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13380_ACEOF
13381
13382
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385ac_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 +020013386if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013387
13388cat >>confdefs.h <<_ACEOF
13389#define HAVE_STRUCT_STAT_ST_FLAGS 1
13390_ACEOF
13391
13392
13393fi
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395ac_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 +020013396if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013397
13398cat >>confdefs.h <<_ACEOF
13399#define HAVE_STRUCT_STAT_ST_GEN 1
13400_ACEOF
13401
13402
13403fi
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405ac_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 +020013406if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013407
13408cat >>confdefs.h <<_ACEOF
13409#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13410_ACEOF
13411
13412
13413fi
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415ac_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 +020013416if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013417
Martin v. Löwis11437992002-04-12 09:54:03 +000013418cat >>confdefs.h <<_ACEOF
13419#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13420_ACEOF
13421
13422
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013423fi
13424
Stefan Krah267b6392016-04-26 01:09:18 +020013425ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13426 #include <sys/types.h>
13427 #include <pwd.h>
13428
13429"
13430if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13431
13432cat >>confdefs.h <<_ACEOF
13433#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13434_ACEOF
13435
13436
13437fi
13438ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13439 #include <sys/types.h>
13440 #include <pwd.h>
13441
13442"
13443if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13444
13445cat >>confdefs.h <<_ACEOF
13446#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13447_ACEOF
13448
13449
13450fi
13451
Zachary Ware6a6967e2016-10-01 00:47:27 -050013452# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13453ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13454"
13455if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13456
13457cat >>confdefs.h <<_ACEOF
13458#define HAVE_SIGINFO_T_SI_BAND 1
13459_ACEOF
13460
13461
13462fi
13463
Michael W. Hudson54241132001-12-07 15:38:26 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13466$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013467if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013469else
Matthias Kloseb159a552010-04-25 21:00:44 +000013470
Matthias Kloseb9621712010-04-24 17:59:49 +000013471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013472/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013473#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013474int
13475main ()
13476{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013478 ;
13479 return 0;
13480}
13481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013482if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013483 ac_cv_header_time_altzone=yes
13484else
Matthias Kloseb9621712010-04-24 17:59:49 +000013485 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013489fi
13490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13492$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013493if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013494
Matthias Kloseb9621712010-04-24 17:59:49 +000013495$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013496
13497fi
13498
Guido van Rossumda88dad1995-01-26 00:46:29 +000013499was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13501$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013503/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013504
13505#include <sys/types.h>
13506#include <sys/select.h>
13507#include <sys/time.h>
13508
Martin v. Löwis11437992002-04-12 09:54:03 +000013509int
13510main ()
13511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512;
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ;
13514 return 0;
13515}
13516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013518
13519
Matthias Kloseb9621712010-04-24 17:59:49 +000013520$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013521
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013522 was_it_defined=yes
13523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13527$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013528
Matthias Kloseb9621712010-04-24 17:59:49 +000013529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13530$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013531if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013532 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013533else
Matthias Kloseb9621712010-04-24 17:59:49 +000013534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013536#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013537int
13538main ()
13539{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013541 ;
13542 return 0;
13543}
13544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013545if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013546 ac_cv_struct_addrinfo=yes
13547else
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013549fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551fi
13552
Matthias Kloseb9621712010-04-24 17:59:49 +000013553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13554$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013555if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013556
Matthias Kloseb9621712010-04-24 17:59:49 +000013557$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013558
13559fi
13560
Matthias Kloseb9621712010-04-24 17:59:49 +000013561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13562$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013563if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013565else
Matthias Kloseb9621712010-04-24 17:59:49 +000013566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013568
13569# include <sys/types.h>
13570# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013571int
13572main ()
13573{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013574struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013580 ac_cv_struct_sockaddr_storage=yes
13581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585fi
13586
Matthias Kloseb9621712010-04-24 17:59:49 +000013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13588$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013589if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Matthias Kloseb9621712010-04-24 17:59:49 +000013591$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013592
13593fi
13594
Christian Heimesdffa3942016-09-05 23:54:41 +020013595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13596$as_echo_n "checking for sockaddr_alg... " >&6; }
13597if ${ac_cv_struct_sockaddr_alg+:} false; then :
13598 $as_echo_n "(cached) " >&6
13599else
13600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601/* end confdefs.h. */
13602
13603# include <sys/types.h>
13604# include <sys/socket.h>
13605# include <linux/if_alg.h>
13606int
13607main ()
13608{
13609struct sockaddr_alg s
13610 ;
13611 return 0;
13612}
13613_ACEOF
13614if ac_fn_c_try_compile "$LINENO"; then :
13615 ac_cv_struct_sockaddr_alg=yes
13616else
13617 ac_cv_struct_sockaddr_alg=no
13618fi
13619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13620fi
13621
13622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13623$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13624if test $ac_cv_struct_sockaddr_alg = yes; then
13625
13626$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13627
13628fi
13629
Guido van Rossum627b2d71993-12-24 10:39:16 +000013630# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013631
Matthias Kloseb9621712010-04-24 17:59:49 +000013632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13633$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013634if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013636else
Matthias Kloseb9621712010-04-24 17:59:49 +000013637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013639$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013640int
13641main ()
13642{
13643static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013644test_array [0] = 0;
13645return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
13647 ;
13648 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013649}
Martin v. Löwis11437992002-04-12 09:54:03 +000013650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013651if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013652 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013653else
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13659$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013660if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013661 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013662
13663fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013664
Matthias Kloseb9621712010-04-24 17:59:49 +000013665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13666$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013667if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013671/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672
Martin v. Löwis11437992002-04-12 09:54:03 +000013673int
13674main ()
13675{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013676
Martin v. Löwis11437992002-04-12 09:54:03 +000013677#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013678 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013679 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013680 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013681 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013682 char const *const *pcpcc;
13683 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013684 /* NEC SVR4.0.2 mips cc rejects this. */
13685 struct point {int x, y;};
13686 static struct point const zero = {0,0};
13687 /* AIX XL C 1.02.0.0 rejects this.
13688 It does not let you subtract one const X* pointer from another in
13689 an arm of an if-expression whose if-part is not a constant
13690 expression */
13691 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013693 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694 ++pcpcc;
13695 ppc = (char**) pcpcc;
13696 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013697 { /* SCO 3.2v4 cc rejects this sort of thing. */
13698 char tx;
13699 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013701
Martin v. Löwis11437992002-04-12 09:54:03 +000013702 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013703 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 }
13705 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13706 int x[] = {25, 17};
13707 const int *foo = &x[0];
13708 ++foo;
13709 }
13710 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13711 typedef const int *iptr;
13712 iptr p = 0;
13713 ++p;
13714 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013715 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013717 struct s { int j; const int *ap[3]; } bx;
13718 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013719 }
13720 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13721 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013724 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013725#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013726
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 ;
13728 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013729}
Martin v. Löwis11437992002-04-12 09:54:03 +000013730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013731if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013732 ac_cv_c_const=yes
13733else
Matthias Kloseb9621712010-04-24 17:59:49 +000013734 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13739$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013740if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013743
13744fi
13745
Michael W. Hudson54241132001-12-07 15:38:26 +000013746
Guido van Rossumda88dad1995-01-26 00:46:29 +000013747works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13749$as_echo_n "checking for working signed char... " >&6; }
13750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013751/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013752
Martin v. Löwis11437992002-04-12 09:54:03 +000013753int
13754main ()
13755{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013756signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013757 ;
13758 return 0;
13759}
13760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013761if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013762 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013763else
Skip Montanaro6dead952003-09-25 14:50:04 +000013764
Matthias Kloseb9621712010-04-24 17:59:49 +000013765$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013766
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013767
Guido van Rossum7f43da71994-08-01 12:15:30 +000013768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13771$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013772
Guido van Rossumda88dad1995-01-26 00:46:29 +000013773have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13775$as_echo_n "checking for prototypes... " >&6; }
13776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013777/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013778int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013779int
13780main ()
13781{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013782return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013783 ;
13784 return 0;
13785}
13786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013790
Matthias Kloseb159a552010-04-25 21:00:44 +000013791 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13795$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013796
Guido van Rossumda88dad1995-01-26 00:46:29 +000013797works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13799$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013801/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013802
13803#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013804int foo(int x, ...) {
13805 va_list va;
13806 va_start(va, x);
13807 va_arg(va, int);
13808 va_arg(va, char *);
13809 va_arg(va, double);
13810 return 0;
13811}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812
Martin v. Löwis11437992002-04-12 09:54:03 +000013813int
13814main ()
13815{
Guido van Rossum90eea071996-08-30 20:58:57 +000013816return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ;
13818 return 0;
13819}
13820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013821if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
13823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013825
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013826 works=yes
13827
Guido van Rossum627b2d71993-12-24 10:39:16 +000013828fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13831$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013832
Martin v. Löwisd6320502004-08-12 13:45:08 +000013833# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13835$as_echo_n "checking for socketpair... " >&6; }
13836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013837/* end confdefs.h. */
13838
13839#include <sys/types.h>
13840#include <sys/socket.h>
13841
13842int
13843main ()
13844{
13845void *x=socketpair
13846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013851
Matthias Kloseb9621712010-04-24 17:59:49 +000013852$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013853
Matthias Kloseb159a552010-04-25 21:00:44 +000013854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013855$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013856else
Matthias Kloseb9621712010-04-24 17:59:49 +000013857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13858$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013859
13860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013862
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013863# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13865$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013867/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013868#include <sys/types.h>
13869#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013870int
13871main ()
13872{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013873struct sockaddr x;
13874x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 ;
13876 return 0;
13877}
13878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013879if ac_fn_c_try_compile "$LINENO"; then :
13880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13881$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013882
Matthias Kloseb9621712010-04-24 17:59:49 +000013883$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884
13885else
Matthias Kloseb9621712010-04-24 17:59:49 +000013886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13887$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013888
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013889fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013891
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013892# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013893
13894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013896if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013897
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013899
Matthias Kloseb9621712010-04-24 17:59:49 +000013900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13901$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013902 OLD_CFLAGS=$CFLAGS
13903 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013905/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013906
13907# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013908
Martin v. Löwis11437992002-04-12 09:54:03 +000013909int
13910main ()
13911{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013912
13913 char *name;
13914 struct hostent *he, *res;
13915 char buffer[2048];
13916 int buflen = 2048;
13917 int h_errnop;
13918
13919 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
13921 ;
13922 return 0;
13923}
13924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013925if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013931
Matthias Kloseb9621712010-04-24 17:59:49 +000013932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13933$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013934
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013935else
Skip Montanaro6dead952003-09-25 14:50:04 +000013936
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13938$as_echo "no" >&6; }
13939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13940$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013942/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013944# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013945
Martin v. Löwis11437992002-04-12 09:54:03 +000013946int
13947main ()
13948{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013949
13950 char *name;
13951 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013952 char buffer[2048];
13953 int buflen = 2048;
13954 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013955
Matthias Kloseb159a552010-04-25 21:00:44 +000013956 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
13958 ;
13959 return 0;
13960}
13961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966
Matthias Kloseb159a552010-04-25 21:00:44 +000013967$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13970$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013971
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013972else
Skip Montanaro6dead952003-09-25 14:50:04 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13975$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13977$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13979/* end confdefs.h. */
13980
13981# include <netdb.h>
13982
13983int
13984main ()
13985{
13986
13987 char *name;
13988 struct hostent *he;
13989 struct hostent_data data;
13990
13991 (void) gethostbyname_r(name, he, &data);
13992
13993 ;
13994 return 0;
13995}
13996_ACEOF
13997if ac_fn_c_try_compile "$LINENO"; then :
13998
13999 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14000
14001
14002$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14003
14004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14005$as_echo "yes" >&6; }
14006
14007else
14008
14009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14010$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014017
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014020 CFLAGS=$OLD_CFLAGS
14021
14022else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014023
Matthias Kloseb9621712010-04-24 17:59:49 +000014024 for ac_func in gethostbyname
14025do :
14026 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014027if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014028 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014029#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014030_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014033done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034
Michael W. Hudson54241132001-12-07 15:38:26 +000014035
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036fi
14037
Michael W. Hudson54241132001-12-07 15:38:26 +000014038
14039
14040
14041
14042
14043
Guido van Rossum627b2d71993-12-24 10:39:16 +000014044# checks for system services
14045# (none yet)
14046
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014047# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014048ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014049if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014050
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14053$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014054if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014056else
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014058LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062/* Override any GCC internal prototype to avoid an error.
14063 Use char because int might match the return type of a GCC
14064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014065#ifdef __cplusplus
14066extern "C"
14067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014068char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014069int
14070main ()
14071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014072return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ;
14074 return 0;
14075}
14076_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014077if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014079else
Matthias Kloseb9621712010-04-24 17:59:49 +000014080 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014082rm -f core conftest.err conftest.$ac_objext \
14083 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014084LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14087$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014088if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 cat >>confdefs.h <<_ACEOF
14090#define HAVE_LIBIEEE 1
14091_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014093 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014094
Guido van Rossum627b2d71993-12-24 10:39:16 +000014095fi
14096
Michael W. Hudson54241132001-12-07 15:38:26 +000014097
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014098fi
14099
Michael W. Hudson54241132001-12-07 15:38:26 +000014100
Guido van Rossum7f43da71994-08-01 12:15:30 +000014101# check for --with-libm=...
14102
Guido van Rossum563e7081996-09-10 18:20:48 +000014103case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014104Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014105*) LIBM=-lm
14106esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14108$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014111if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014112 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014113if test "$withval" = no
14114then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14116$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014117elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014118then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14120$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014121else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014122fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014123else
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14125$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014126fi
14127
Guido van Rossum7f43da71994-08-01 12:15:30 +000014128
14129# check for --with-libc=...
14130
Matthias Kloseb9621712010-04-24 17:59:49 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14132$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014134# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014135if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014137if test "$withval" = no
14138then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14140$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014141elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014142then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14144$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014145else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014146fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014147else
Matthias Kloseb9621712010-04-24 17:59:49 +000014148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14149$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150fi
14151
Guido van Rossum7f43da71994-08-01 12:15:30 +000014152
Stefan Krah1919b7e2012-03-21 18:25:23 +010014153# **************************************
14154# * Check for gcc x64 inline assembler *
14155# **************************************
14156
14157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14158$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14160/* end confdefs.h. */
14161
14162int
14163main ()
14164{
14165
14166 __asm__ __volatile__ ("movq %rcx, %rax");
14167
14168 ;
14169 return 0;
14170}
14171_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014172if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014173 have_gcc_asm_for_x64=yes
14174else
14175 have_gcc_asm_for_x64=no
14176fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014177rm -f core conftest.err conftest.$ac_objext \
14178 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14180$as_echo "$have_gcc_asm_for_x64" >&6; }
14181if test "$have_gcc_asm_for_x64" = yes
14182then
14183
14184$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14185
14186fi
14187
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014188# **************************************************
14189# * Check for various properties of floating point *
14190# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014191
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14193$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14194if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014195 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014196else
14197
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014198
14199ax_cv_c_float_words_bigendian=unknown
14200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014201/* end confdefs.h. */
14202
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014203
14204double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14205
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014206
14207_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014208if ac_fn_c_try_compile "$LINENO"; then :
14209
14210
14211if grep noonsees conftest.$ac_objext >/dev/null ; then
14212 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014213fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014214if grep seesnoon conftest.$ac_objext >/dev/null ; then
14215 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14216 ax_cv_c_float_words_bigendian=no
14217 else
14218 ax_cv_c_float_words_bigendian=unknown
14219 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014220fi
14221
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014222
14223fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014225fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14227$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014228
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014229case $ax_cv_c_float_words_bigendian in
14230 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014231
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014232$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14233 ;;
14234 no)
14235 ;;
14236 *)
14237 as_fn_error $? "
14238
14239Unknown float word ordering. You need to manually preset
14240ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14241
14242 " "$LINENO" 5 ;;
14243esac
14244
14245
14246if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247then
14248
Matthias Kloseb9621712010-04-24 17:59:49 +000014249$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014250
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014251elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014252then
14253
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014254$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14255
14256else
14257 # Some ARM platforms use a mixed-endian representation for doubles.
14258 # While Python doesn't currently have full support for these platforms
14259 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14260 # conversions work.
14261 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14262 # or little, then it must be this?
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014265
14266fi
14267
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014268# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014269# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014270# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014271# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014272# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014273# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014274
14275# This inline assembler syntax may also work for suncc and icc,
14276# so we try it on all platforms.
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14279$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281/* end confdefs.h. */
14282
14283int
14284main ()
14285{
14286
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014287 unsigned short cw;
14288 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14289 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014290
14291 ;
14292 return 0;
14293}
14294_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014295if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296 have_gcc_asm_for_x87=yes
14297else
Matthias Kloseb9621712010-04-24 17:59:49 +000014298 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014299fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014300rm -f core conftest.err conftest.$ac_objext \
14301 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14303$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014304if test "$have_gcc_asm_for_x87" = yes
14305then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306
Matthias Kloseb9621712010-04-24 17:59:49 +000014307$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014310
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14312$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14314/* end confdefs.h. */
14315
14316int
14317main ()
14318{
14319
14320 unsigned int fpcr;
14321 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14322 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14323
14324 ;
14325 return 0;
14326}
14327_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014328if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014329 have_gcc_asm_for_mc68881=yes
14330else
14331 have_gcc_asm_for_mc68881=no
14332fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014333rm -f core conftest.err conftest.$ac_objext \
14334 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14336$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14337if test "$have_gcc_asm_for_mc68881" = yes
14338then
14339
14340$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14341
14342fi
14343
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014344# Detect whether system arithmetic is subject to x87-style double
14345# rounding issues. The result of this test has little meaning on non
14346# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14347# mode is round-to-nearest and double rounding issues are present, and
14348# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14350$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014351# $BASECFLAGS may affect the result
14352ac_save_cc="$CC"
14353CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014354if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014355 ac_cv_x87_double_rounding=no
14356else
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014358/* end confdefs.h. */
14359
14360#include <stdlib.h>
14361#include <math.h>
14362int main() {
14363 volatile double x, y, z;
14364 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14365 x = 0.99999999999999989; /* 1-2**-53 */
14366 y = 1./x;
14367 if (y != 1.)
14368 exit(0);
14369 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14370 x = 1e16;
14371 y = 2.99999;
14372 z = x + y;
14373 if (z != 1e16+4.)
14374 exit(0);
14375 /* both tests show evidence of double rounding */
14376 exit(1);
14377}
14378
14379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014380if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014381 ac_cv_x87_double_rounding=no
14382else
Matthias Kloseb9621712010-04-24 17:59:49 +000014383 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14386 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014387fi
14388
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014389CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14391$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014392if test "$ac_cv_x87_double_rounding" = yes
14393then
14394
Matthias Kloseb9621712010-04-24 17:59:49 +000014395$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014396
14397fi
14398
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014399# ************************************
14400# * Check for mathematical functions *
14401# ************************************
14402
14403LIBS_SAVE=$LIBS
14404LIBS="$LIBS $LIBM"
14405
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014406for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14407do :
14408 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14409ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014410if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014411 cat >>confdefs.h <<_ACEOF
14412#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14413_ACEOF
14414
14415fi
14416done
14417
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014418for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014419do :
14420 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14421ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014422if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014423 cat >>confdefs.h <<_ACEOF
14424#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14425_ACEOF
14426
14427fi
14428done
14429
14430ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14431"
Victor Stinnere0be4232011-10-25 13:06:09 +020014432if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014433 ac_have_decl=1
14434else
14435 ac_have_decl=0
14436fi
14437
14438cat >>confdefs.h <<_ACEOF
14439#define HAVE_DECL_ISINF $ac_have_decl
14440_ACEOF
14441ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14442"
Victor Stinnere0be4232011-10-25 13:06:09 +020014443if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014444 ac_have_decl=1
14445else
14446 ac_have_decl=0
14447fi
14448
14449cat >>confdefs.h <<_ACEOF
14450#define HAVE_DECL_ISNAN $ac_have_decl
14451_ACEOF
14452ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14453"
Victor Stinnere0be4232011-10-25 13:06:09 +020014454if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014455 ac_have_decl=1
14456else
14457 ac_have_decl=0
14458fi
14459
14460cat >>confdefs.h <<_ACEOF
14461#define HAVE_DECL_ISFINITE $ac_have_decl
14462_ACEOF
14463
14464
Mark Dickinsona614f042009-11-28 12:48:43 +000014465# For multiprocessing module, check that sem_open
14466# actually works. For FreeBSD versions <= 7.2,
14467# the kernel module that provides POSIX semaphores
14468# isn't loaded by default, so an attempt to call
14469# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14471$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014472if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014473 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014474else
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014476 ac_cv_posix_semaphores_enabled=yes
14477else
Matthias Kloseb9621712010-04-24 17:59:49 +000014478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014479/* end confdefs.h. */
14480
14481#include <unistd.h>
14482#include <fcntl.h>
14483#include <stdio.h>
14484#include <semaphore.h>
14485#include <sys/stat.h>
14486
14487int main(void) {
14488 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14489 if (a == SEM_FAILED) {
14490 perror("sem_open");
14491 return 1;
14492 }
14493 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014494 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014495 return 0;
14496}
14497
14498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014499if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014500 ac_cv_posix_semaphores_enabled=yes
14501else
Matthias Kloseb9621712010-04-24 17:59:49 +000014502 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014503fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014504rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14505 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014506fi
14507
14508
Mark Dickinsona614f042009-11-28 12:48:43 +000014509fi
14510
Matthias Kloseb9621712010-04-24 17:59:49 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14512$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014513if test $ac_cv_posix_semaphores_enabled = no
14514then
14515
Matthias Kloseb9621712010-04-24 17:59:49 +000014516$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014517
14518fi
14519
Mark Dickinson10683072009-04-18 21:18:19 +000014520# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14522$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014523if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014524 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014525else
Matthias Kloseb9621712010-04-24 17:59:49 +000014526 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014527 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014528else
Matthias Kloseb9621712010-04-24 17:59:49 +000014529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014530/* end confdefs.h. */
14531
14532#include <unistd.h>
14533#include <fcntl.h>
14534#include <stdio.h>
14535#include <semaphore.h>
14536#include <sys/stat.h>
14537
14538int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014539 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014540 int count;
14541 int res;
14542 if(a==SEM_FAILED){
14543 perror("sem_open");
14544 return 1;
14545
14546 }
14547 res = sem_getvalue(a, &count);
14548 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014549 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014550 return res==-1 ? 1 : 0;
14551}
14552
Mark Dickinson10683072009-04-18 21:18:19 +000014553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014554if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014555 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014556else
Matthias Kloseb9621712010-04-24 17:59:49 +000014557 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014558fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014561fi
14562
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014563
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014564fi
14565
Matthias Kloseb9621712010-04-24 17:59:49 +000014566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14567$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014568if test $ac_cv_broken_sem_getvalue = yes
14569then
14570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014572
14573fi
14574
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014575ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14576"
14577if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14578 ac_have_decl=1
14579else
14580 ac_have_decl=0
14581fi
14582
14583cat >>confdefs.h <<_ACEOF
14584#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14585_ACEOF
14586ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14587"
14588if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14589 ac_have_decl=1
14590else
14591 ac_have_decl=0
14592fi
14593
14594cat >>confdefs.h <<_ACEOF
14595#define HAVE_DECL_RTLD_NOW $ac_have_decl
14596_ACEOF
14597ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14598"
14599if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14600 ac_have_decl=1
14601else
14602 ac_have_decl=0
14603fi
14604
14605cat >>confdefs.h <<_ACEOF
14606#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14607_ACEOF
14608ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14609"
14610if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14611 ac_have_decl=1
14612else
14613 ac_have_decl=0
14614fi
14615
14616cat >>confdefs.h <<_ACEOF
14617#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14618_ACEOF
14619ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14620"
14621if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14622 ac_have_decl=1
14623else
14624 ac_have_decl=0
14625fi
14626
14627cat >>confdefs.h <<_ACEOF
14628#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14629_ACEOF
14630ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14631"
14632if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14633 ac_have_decl=1
14634else
14635 ac_have_decl=0
14636fi
14637
14638cat >>confdefs.h <<_ACEOF
14639#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14640_ACEOF
14641ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14642"
14643if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14644 ac_have_decl=1
14645else
14646 ac_have_decl=0
14647fi
14648
14649cat >>confdefs.h <<_ACEOF
14650#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14651_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014652ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14653"
14654if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14655 ac_have_decl=1
14656else
14657 ac_have_decl=0
14658fi
14659
14660cat >>confdefs.h <<_ACEOF
14661#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14662_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014663
14664
Mark Dickinsonbd792642009-03-18 20:06:12 +000014665# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14667$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014668# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014669if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014670 enableval=$enable_big_digits; case $enable_big_digits in
14671yes)
14672 enable_big_digits=30 ;;
14673no)
14674 enable_big_digits=15 ;;
1467515|30)
14676 ;;
14677*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014678 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 +000014679esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14681$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014682
14683cat >>confdefs.h <<_ACEOF
14684#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14685_ACEOF
14686
14687
14688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14690$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014691fi
14692
14693
Guido van Rossumef2255b2000-03-10 22:30:29 +000014694# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014695ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014696if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014697
14698
Matthias Kloseb9621712010-04-24 17:59:49 +000014699$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014700
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014701 wchar_h="yes"
14702
Guido van Rossumef2255b2000-03-10 22:30:29 +000014703else
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014705
14706fi
14707
Michael W. Hudson54241132001-12-07 15:38:26 +000014708
Martin v. Löwis11437992002-04-12 09:54:03 +000014709
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014710# determine wchar_t size
14711if test "$wchar_h" = yes
14712then
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14715# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14716# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14718$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014719if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14723"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725else
Matthias Kloseb9621712010-04-24 17:59:49 +000014726 if test "$ac_cv_type_wchar_t" = yes; then
14727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014729as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014730See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014731 else
14732 ac_cv_sizeof_wchar_t=0
14733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14738$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014739
14740
14741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014743#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014744_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014745
Michael W. Hudson54241132001-12-07 15:38:26 +000014746
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014747fi
14748
Matthias Kloseb9621712010-04-24 17:59:49 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14750$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014751have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014753/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014754
14755#include <tcl.h>
14756#if TCL_UTF_MAX != 6
14757# error "NOT UCS4_TCL"
14758#endif
14759int
14760main ()
14761{
14762
14763 ;
14764 return 0;
14765}
14766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014768
14769
Matthias Kloseb9621712010-04-24 17:59:49 +000014770$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014771
14772 have_ucs4_tcl=yes
14773
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14777$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014778
Skip Montanaro6dead952003-09-25 14:50:04 +000014779# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014780if test "$wchar_h" = yes
14781then
14782 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14784$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014785 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014787else
14788
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014790 ac_cv_wchar_t_signed=yes
14791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014794
14795 #include <wchar.h>
14796 int main()
14797 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014798 /* Success: exit code 0 */
14799 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014800 }
14801
14802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014803if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014804 ac_cv_wchar_t_signed=yes
14805else
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014808rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14809 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014810fi
14811
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014812fi
14813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14815$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816fi
14817
Michael Osipov3738fad2018-08-24 18:17:19 +020014818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14819$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014820# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014821if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014822 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014823then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014826
Michael Osipov3738fad2018-08-24 18:17:19 +020014827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14828$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014829else
Michael Osipov3738fad2018-08-24 18:17:19 +020014830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14831$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014832fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833
14834# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14836$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014837if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014838 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014839else
Matthias Kloseb9621712010-04-24 17:59:49 +000014840 ac_cv_c_bigendian=unknown
14841 # See if we're dealing with a universal compiler.
14842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14843/* end confdefs.h. */
14844#ifndef __APPLE_CC__
14845 not a universal capable compiler
14846 #endif
14847 typedef int dummy;
14848
Skip Montanaro6dead952003-09-25 14:50:04 +000014849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014850if ac_fn_c_try_compile "$LINENO"; then :
14851
14852 # Check for potential -arch flags. It is not universal unless
14853 # there are at least two -arch flags with different values.
14854 ac_arch=
14855 ac_prev=
14856 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14857 if test -n "$ac_prev"; then
14858 case $ac_word in
14859 i?86 | x86_64 | ppc | ppc64)
14860 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14861 ac_arch=$ac_word
14862 else
14863 ac_cv_c_bigendian=universal
14864 break
14865 fi
14866 ;;
14867 esac
14868 ac_prev=
14869 elif test "x$ac_word" = "x-arch"; then
14870 ac_prev=arch
14871 fi
14872 done
14873fi
14874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14875 if test $ac_cv_c_bigendian = unknown; then
14876 # See if sys/param.h defines the BYTE_ORDER macro.
14877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014878/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014879#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014880 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014881
Martin v. Löwis11437992002-04-12 09:54:03 +000014882int
14883main ()
14884{
Matthias Kloseb9621712010-04-24 17:59:49 +000014885#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14886 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14887 && LITTLE_ENDIAN)
14888 bogus endian macros
14889 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
14891 ;
14892 return 0;
14893}
14894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014895if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014896 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014899#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014901
Martin v. Löwis11437992002-04-12 09:54:03 +000014902int
14903main ()
14904{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014905#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014906 not big endian
14907 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014908
14909 ;
14910 return 0;
14911}
14912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014913if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014914 ac_cv_c_bigendian=yes
14915else
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014919fi
14920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14921 fi
14922 if test $ac_cv_c_bigendian = unknown; then
14923 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014925/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014926#include <limits.h>
14927
Martin v. Löwis11437992002-04-12 09:54:03 +000014928int
14929main ()
14930{
Matthias Kloseb9621712010-04-24 17:59:49 +000014931#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14932 bogus endian macros
14933 #endif
14934
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 ;
14936 return 0;
14937}
14938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014939if ac_fn_c_try_compile "$LINENO"; then :
14940 # It does; now see whether it defined to _BIG_ENDIAN or not.
14941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14942/* end confdefs.h. */
14943#include <limits.h>
14944
14945int
14946main ()
14947{
14948#ifndef _BIG_ENDIAN
14949 not big endian
14950 #endif
14951
14952 ;
14953 return 0;
14954}
14955_ACEOF
14956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014957 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014958else
Matthias Kloseb9621712010-04-24 17:59:49 +000014959 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14962fi
14963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14964 fi
14965 if test $ac_cv_c_bigendian = unknown; then
14966 # Compile a test program.
14967 if test "$cross_compiling" = yes; then :
14968 # Try to guess by grepping values from an object file.
14969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14970/* end confdefs.h. */
14971short int ascii_mm[] =
14972 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14973 short int ascii_ii[] =
14974 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14975 int use_ascii (int i) {
14976 return ascii_mm[i] + ascii_ii[i];
14977 }
14978 short int ebcdic_ii[] =
14979 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14980 short int ebcdic_mm[] =
14981 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14982 int use_ebcdic (int i) {
14983 return ebcdic_mm[i] + ebcdic_ii[i];
14984 }
14985 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014986
Matthias Kloseb9621712010-04-24 17:59:49 +000014987int
14988main ()
14989{
14990return use_ascii (foo) == use_ebcdic (foo);
14991 ;
14992 return 0;
14993}
14994_ACEOF
14995if ac_fn_c_try_compile "$LINENO"; then :
14996 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14997 ac_cv_c_bigendian=yes
14998 fi
14999 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15000 if test "$ac_cv_c_bigendian" = unknown; then
15001 ac_cv_c_bigendian=no
15002 else
15003 # finding both strings is unlikely to happen, but who knows?
15004 ac_cv_c_bigendian=unknown
15005 fi
15006 fi
15007fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015009else
Matthias Kloseb9621712010-04-24 17:59:49 +000015010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015012$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015013int
15014main ()
15015{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015016
Matthias Kloseb9621712010-04-24 17:59:49 +000015017 /* Are we little or big endian? From Harbison&Steele. */
15018 union
15019 {
15020 long int l;
15021 char c[sizeof (long int)];
15022 } u;
15023 u.l = 1;
15024 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025
15026 ;
15027 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028}
Martin v. Löwis11437992002-04-12 09:54:03 +000015029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015030if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015031 ac_cv_c_bigendian=no
15032else
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15036 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15042$as_echo "$ac_cv_c_bigendian" >&6; }
15043 case $ac_cv_c_bigendian in #(
15044 yes)
15045 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15046;; #(
15047 no)
15048 ;; #(
15049 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015052
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ;; #(
15054 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015055 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015056 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015057 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015058
Michael W. Hudson54241132001-12-07 15:38:26 +000015059
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015060# ABI version string for Python extension modules. This appears between the
15061# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15062# from the following attributes which affect the ABI of this Python build (in
15063# this order):
15064#
15065# * The Python implementation (always 'cpython-' for us)
15066# * The major and minor version numbers
15067# * --with-pydebug (adds a 'd')
15068# * --with-pymalloc (adds a 'm')
15069# * --with-wide-unicode (adds a 'u')
15070#
15071# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015072# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15073# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015074
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15076$as_echo_n "checking ABIFLAGS... " >&6; }
15077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15078$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15080$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015081SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15083$as_echo "$SOABI" >&6; }
15084
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015085
15086case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015087 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015088 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15089 *)
15090 EXT_SUFFIX=${SHLIB_SUFFIX};;
15091esac
15092
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15094$as_echo_n "checking LDVERSION... " >&6; }
15095LDVERSION='$(VERSION)$(ABIFLAGS)'
15096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15097$as_echo "$LDVERSION" >&6; }
15098
doko@python.org87421192013-01-26 11:39:31 +010015099
doko@ubuntu.com55532312016-06-14 08:55:19 +020015100if test x$PLATFORM_TRIPLET = x; then
15101 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15102else
15103 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15104fi
doko@python.org87421192013-01-26 11:39:31 +010015105
15106
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015107# Check whether right shifting a negative integer extends the sign bit
15108# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15110$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015111if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015113else
Martin v. Löwis11437992002-04-12 09:54:03 +000015114
Matthias Kloseb9621712010-04-24 17:59:49 +000015115if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015116 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015117else
Matthias Kloseb9621712010-04-24 17:59:49 +000015118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015119/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015120
15121int main()
15122{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015123 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015124}
15125
Martin v. Löwis11437992002-04-12 09:54:03 +000015126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015128 ac_cv_rshift_extends_sign=yes
15129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15133 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015134fi
15135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136fi
15137
Matthias Kloseb9621712010-04-24 17:59:49 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15139$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015140if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015141then
Martin v. Löwis11437992002-04-12 09:54:03 +000015142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015144
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015145fi
15146
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015147# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15149$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015150if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015152else
Martin v. Löwis11437992002-04-12 09:54:03 +000015153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015155/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015156#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015157int
15158main ()
15159{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015160
15161 FILE *f = fopen("/dev/null", "r");
15162 flockfile(f);
15163 getc_unlocked(f);
15164 funlockfile(f);
15165
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;
15167 return 0;
15168}
15169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015170if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015171 ac_cv_have_getc_unlocked=yes
15172else
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 ac_cv_have_getc_unlocked=no
15174fi
15175rm -f core conftest.err conftest.$ac_objext \
15176 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15180$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015181if test "$ac_cv_have_getc_unlocked" = yes
15182then
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015185
15186fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015187
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015188# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015189# save the value of LIBS so we don't actually link Python with readline
15190LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015191
Gregory P. Smith18820942008-09-07 06:24:49 +000015192# On some systems we need to link readline to a termcap compatible
15193# library. NOTE: Keep the precedence of listed libraries synchronised
15194# with setup.py.
15195py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15197$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015198for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015199 if test -z "$py_libtermcap"; then
15200 READLINE_LIBS="-lreadline"
15201 else
15202 READLINE_LIBS="-lreadline -l$py_libtermcap"
15203 fi
15204 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015206/* end confdefs.h. */
15207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015208/* Override any GCC internal prototype to avoid an error.
15209 Use char because int might match the return type of a GCC
15210 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015211#ifdef __cplusplus
15212extern "C"
15213#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015214char readline ();
15215int
15216main ()
15217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015218return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015219 ;
15220 return 0;
15221}
15222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015223if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015224 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015225fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015226rm -f core conftest.err conftest.$ac_objext \
15227 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015228 if test $py_cv_lib_readline = yes; then
15229 break
15230 fi
15231done
15232# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15233#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015234if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15236$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015237else
Matthias Kloseb9621712010-04-24 17:59:49 +000015238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15239$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015240
Matthias Kloseb9621712010-04-24 17:59:49 +000015241$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015242
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015243fi
15244
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015245# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015248#include <readline/readline.h>
15249_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015250if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015251 have_readline=yes
15252else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015253 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015254
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015255fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015256rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015257if test $have_readline = yes
15258then
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015260/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015261#include <readline/readline.h>
15262
15263_ACEOF
15264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015266
Matthias Kloseb9621712010-04-24 17:59:49 +000015267$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015268
15269fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015270rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015273/* end confdefs.h. */
15274#include <readline/readline.h>
15275
15276_ACEOF
15277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015278 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015281
15282fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015283rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015284
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015285fi
15286
Martin v. Löwis0daad592001-09-30 21:09:59 +000015287# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15289$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015290if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015292else
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015294LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298/* Override any GCC internal prototype to avoid an error.
15299 Use char because int might match the return type of a GCC
15300 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015301#ifdef __cplusplus
15302extern "C"
15303#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015304char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015305int
15306main ()
15307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015308return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 ;
15310 return 0;
15311}
15312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015315else
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015318rm -f core conftest.err conftest.$ac_objext \
15319 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015320LIBS=$ac_check_lib_save_LIBS
15321fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15323$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015324if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015325
Matthias Kloseb9621712010-04-24 17:59:49 +000015326$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015327
Martin v. Löwis0daad592001-09-30 21:09:59 +000015328fi
15329
Michael W. Hudson54241132001-12-07 15:38:26 +000015330
Thomas Wouters89d996e2007-09-08 17:39:28 +000015331# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15333$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015334if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015336else
15337 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015338LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015340/* end confdefs.h. */
15341
15342/* Override any GCC internal prototype to avoid an error.
15343 Use char because int might match the return type of a GCC
15344 builtin and then its argument prototype would still apply. */
15345#ifdef __cplusplus
15346extern "C"
15347#endif
15348char rl_completion_display_matches_hook ();
15349int
15350main ()
15351{
15352return rl_completion_display_matches_hook ();
15353 ;
15354 return 0;
15355}
15356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015357if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015358 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15359else
Matthias Kloseb9621712010-04-24 17:59:49 +000015360 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015362rm -f core conftest.err conftest.$ac_objext \
15363 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015364LIBS=$ac_check_lib_save_LIBS
15365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15367$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015368if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015371
15372fi
15373
15374
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015375# also in 4.0, but not in editline
15376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15377$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15378if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15379 $as_echo_n "(cached) " >&6
15380else
15381 ac_check_lib_save_LIBS=$LIBS
15382LIBS="-lreadline $READLINE_LIBS $LIBS"
15383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15384/* end confdefs.h. */
15385
15386/* Override any GCC internal prototype to avoid an error.
15387 Use char because int might match the return type of a GCC
15388 builtin and then its argument prototype would still apply. */
15389#ifdef __cplusplus
15390extern "C"
15391#endif
15392char rl_resize_terminal ();
15393int
15394main ()
15395{
15396return rl_resize_terminal ();
15397 ;
15398 return 0;
15399}
15400_ACEOF
15401if ac_fn_c_try_link "$LINENO"; then :
15402 ac_cv_lib_readline_rl_resize_terminal=yes
15403else
15404 ac_cv_lib_readline_rl_resize_terminal=no
15405fi
15406rm -f core conftest.err conftest.$ac_objext \
15407 conftest$ac_exeext conftest.$ac_ext
15408LIBS=$ac_check_lib_save_LIBS
15409fi
15410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15411$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15412if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15413
15414$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15415
15416fi
15417
15418
Martin v. Löwis0daad592001-09-30 21:09:59 +000015419# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15421$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015422if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015424else
Martin v. Löwis11437992002-04-12 09:54:03 +000015425 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015426LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015430/* Override any GCC internal prototype to avoid an error.
15431 Use char because int might match the return type of a GCC
15432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015433#ifdef __cplusplus
15434extern "C"
15435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015436char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015437int
15438main ()
15439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ;
15442 return 0;
15443}
15444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015446 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015447else
Matthias Kloseb9621712010-04-24 17:59:49 +000015448 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015450rm -f core conftest.err conftest.$ac_objext \
15451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015452LIBS=$ac_check_lib_save_LIBS
15453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15455$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015456if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015459
Guido van Rossum353ae582001-07-10 16:45:32 +000015460fi
15461
Jack Jansendd19cf82001-12-06 22:36:17 +000015462
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015463# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015465/* end confdefs.h. */
15466#include <readline/readline.h>
15467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015468if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015469 have_readline=yes
15470else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015471 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015472
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015473fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015474rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015475if test $have_readline = yes
15476then
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015478/* end confdefs.h. */
15479#include <readline/readline.h>
15480
15481_ACEOF
15482if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015484
Matthias Kloseb9621712010-04-24 17:59:49 +000015485$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015486
15487fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015488rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015489
15490fi
15491
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15493$as_echo_n "checking for append_history in -lreadline... " >&6; }
15494if ${ac_cv_lib_readline_append_history+:} false; then :
15495 $as_echo_n "(cached) " >&6
15496else
15497 ac_check_lib_save_LIBS=$LIBS
15498LIBS="-lreadline $READLINE_LIBS $LIBS"
15499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h. */
15501
15502/* Override any GCC internal prototype to avoid an error.
15503 Use char because int might match the return type of a GCC
15504 builtin and then its argument prototype would still apply. */
15505#ifdef __cplusplus
15506extern "C"
15507#endif
15508char append_history ();
15509int
15510main ()
15511{
15512return append_history ();
15513 ;
15514 return 0;
15515}
15516_ACEOF
15517if ac_fn_c_try_link "$LINENO"; then :
15518 ac_cv_lib_readline_append_history=yes
15519else
15520 ac_cv_lib_readline_append_history=no
15521fi
15522rm -f core conftest.err conftest.$ac_objext \
15523 conftest$ac_exeext conftest.$ac_ext
15524LIBS=$ac_check_lib_save_LIBS
15525fi
15526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15527$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15528if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15529
15530$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15531
15532fi
15533
15534
Martin v. Löwis82bca632006-02-10 20:49:30 +000015535# End of readline checks: restore LIBS
15536LIBS=$LIBS_no_readline
15537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15539$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015540if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015542else
Martin v. Löwis11437992002-04-12 09:54:03 +000015543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015545 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015546else
Matthias Kloseb9621712010-04-24 17:59:49 +000015547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015548/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015549
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015550#include <stdlib.h>
15551#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015552int main()
15553{
15554 int val1 = nice(1);
15555 if (val1 != -1 && val1 == nice(2))
15556 exit(0);
15557 exit(1);
15558}
15559
Martin v. Löwis11437992002-04-12 09:54:03 +000015560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015561if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015562 ac_cv_broken_nice=yes
15563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015565fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015566rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15567 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015568fi
15569
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015570fi
15571
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15573$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015574if test "$ac_cv_broken_nice" = yes
15575then
Martin v. Löwis11437992002-04-12 09:54:03 +000015576
Matthias Kloseb9621712010-04-24 17:59:49 +000015577$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578
15579fi
15580
Matthias Kloseb9621712010-04-24 17:59:49 +000015581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15582$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015583if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015585else
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015587 ac_cv_broken_poll=no
15588else
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015590/* end confdefs.h. */
15591
15592#include <poll.h>
15593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015594int main()
15595{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015596 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015597 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015598
15599 close (42);
15600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015601 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015602 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015603 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015604 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015605 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015606 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015607 return 1;
15608}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015609
15610_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015611if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015612 ac_cv_broken_poll=yes
15613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015620fi
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15623$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015624if test "$ac_cv_broken_poll" = yes
15625then
15626
Matthias Kloseb9621712010-04-24 17:59:49 +000015627$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015628
15629fi
15630
Martin v. Löwis1d459062005-03-14 21:23:33 +000015631# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15633$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015634if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015635 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015636else
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015639 ac_cv_working_tzset=no
15640else
Matthias Kloseb9621712010-04-24 17:59:49 +000015641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015642/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015643
15644#include <stdlib.h>
15645#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015646#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015647
15648#if HAVE_TZNAME
15649extern char *tzname[];
15650#endif
15651
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015652int main()
15653{
Brett Cannon18367812003-09-19 00:59:16 +000015654 /* Note that we need to ensure that not only does tzset(3)
15655 do 'something' with localtime, but it works as documented
15656 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015657 This includes making sure that tzname is set properly if
15658 tm->tm_zone does not exist since it is the alternative way
15659 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015660
15661 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015662 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015663 */
15664
Martin v. Löwis1d459062005-03-14 21:23:33 +000015665 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015666 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15667
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015668 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015669 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015670 if (localtime(&groundhogday)->tm_hour != 0)
15671 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015672#if HAVE_TZNAME
15673 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15674 if (strcmp(tzname[0], "UTC") ||
15675 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15676 exit(1);
15677#endif
Brett Cannon18367812003-09-19 00:59:16 +000015678
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015679 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015680 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015681 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015682 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015683#if HAVE_TZNAME
15684 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15685 exit(1);
15686#endif
Brett Cannon18367812003-09-19 00:59:16 +000015687
15688 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15689 tzset();
15690 if (localtime(&groundhogday)->tm_hour != 11)
15691 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015692#if HAVE_TZNAME
15693 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15694 exit(1);
15695#endif
15696
15697#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015698 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15699 exit(1);
15700 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15701 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015702#endif
Brett Cannon18367812003-09-19 00:59:16 +000015703
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015704 exit(0);
15705}
15706
15707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015708if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015709 ac_cv_working_tzset=yes
15710else
Matthias Kloseb9621712010-04-24 17:59:49 +000015711 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015712fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15714 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015715fi
15716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015717fi
15718
Matthias Kloseb9621712010-04-24 17:59:49 +000015719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15720$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721if test "$ac_cv_working_tzset" = yes
15722then
15723
Matthias Kloseb9621712010-04-24 17:59:49 +000015724$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725
15726fi
15727
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015728# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15730$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015731if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015733else
Matthias Kloseb9621712010-04-24 17:59:49 +000015734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015735/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015736#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015737int
15738main ()
15739{
15740
15741struct stat st;
15742st.st_mtim.tv_nsec = 1;
15743
15744 ;
15745 return 0;
15746}
15747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015748if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015749 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015750else
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15754fi
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15757$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015758if test "$ac_cv_stat_tv_nsec" = yes
15759then
15760
Matthias Kloseb9621712010-04-24 17:59:49 +000015761$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015762
15763fi
15764
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015765# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15767$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015768if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015769 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015770else
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015772/* end confdefs.h. */
15773#include <sys/stat.h>
15774int
15775main ()
15776{
15777
15778struct stat st;
15779st.st_mtimespec.tv_nsec = 1;
15780
15781 ;
15782 return 0;
15783}
15784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015785if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015786 ac_cv_stat_tv_nsec2=yes
15787else
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015789fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15791fi
15792
Matthias Kloseb9621712010-04-24 17:59:49 +000015793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15794$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015795if test "$ac_cv_stat_tv_nsec2" = yes
15796then
15797
Matthias Kloseb9621712010-04-24 17:59:49 +000015798$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015799
15800fi
15801
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015802# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015803ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015804if test "$cross_compiling" = no; then
15805 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15806fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015807
15808for ac_header in curses.h ncurses.h
15809do :
15810 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15811ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15812if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15813 cat >>confdefs.h <<_ACEOF
15814#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15815_ACEOF
15816
15817fi
15818
15819done
15820
15821
15822# On Solaris, term.h requires curses.h
15823for ac_header in term.h
15824do :
15825 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15826#ifdef HAVE_CURSES_H
15827#include <curses.h>
15828#endif
15829
15830"
15831if test "x$ac_cv_header_term_h" = xyes; then :
15832 cat >>confdefs.h <<_ACEOF
15833#define HAVE_TERM_H 1
15834_ACEOF
15835
15836fi
15837
15838done
15839
15840
Jack Jansen666b1e72001-10-31 12:11:48 +000015841# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15843$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015844if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015846else
Matthias Kloseb9621712010-04-24 17:59:49 +000015847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015848/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015849#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015850int
15851main ()
15852{
Jack Jansen666b1e72001-10-31 12:11:48 +000015853
15854 int rtn;
15855 rtn = mvwdelch(0,0,0);
15856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857 ;
15858 return 0;
15859}
15860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015861if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015862 ac_cv_mvwdelch_is_expression=yes
15863else
Matthias Kloseb9621712010-04-24 17:59:49 +000015864 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15867fi
15868
Matthias Kloseb9621712010-04-24 17:59:49 +000015869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15870$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015871
15872if test "$ac_cv_mvwdelch_is_expression" = yes
15873then
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Matthias Kloseb9621712010-04-24 17:59:49 +000015875$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015876
15877fi
15878
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015879# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15880# structs since version 5.7. If the macro is defined as zero before including
15881# [n]curses.h, ncurses will expose fields of the structs regardless of the
15882# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15884$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015885if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015887else
Matthias Kloseb9621712010-04-24 17:59:49 +000015888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015889/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015890
15891 #define NCURSES_OPAQUE 0
15892 #include <curses.h>
15893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894int
15895main ()
15896{
Jack Jansen666b1e72001-10-31 12:11:48 +000015897
15898 WINDOW *w;
15899 w->_flags = 0;
15900
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 ;
15902 return 0;
15903}
15904_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015905if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015906 ac_cv_window_has_flags=yes
15907else
Matthias Kloseb9621712010-04-24 17:59:49 +000015908 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15911fi
15912
Matthias Kloseb9621712010-04-24 17:59:49 +000015913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15914$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015915
Jack Jansen666b1e72001-10-31 12:11:48 +000015916
15917if test "$ac_cv_window_has_flags" = yes
15918then
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
Matthias Kloseb9621712010-04-24 17:59:49 +000015920$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015921
15922fi
15923
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15925$as_echo_n "checking for is_pad... " >&6; }
15926cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15927/* end confdefs.h. */
15928#include <curses.h>
15929int
15930main ()
15931{
15932
15933#ifndef is_pad
15934void *x=is_pad
15935#endif
15936
15937 ;
15938 return 0;
15939}
15940_ACEOF
15941if ac_fn_c_try_compile "$LINENO"; then :
15942
15943$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15944
15945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15946$as_echo "yes" >&6; }
15947else
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15949$as_echo "no" >&6; }
15950
15951fi
15952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15955$as_echo_n "checking for is_term_resized... " >&6; }
15956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015957/* end confdefs.h. */
15958#include <curses.h>
15959int
15960main ()
15961{
15962void *x=is_term_resized
15963 ;
15964 return 0;
15965}
15966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015968
Matthias Kloseb9621712010-04-24 17:59:49 +000015969$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015970
Matthias Kloseb159a552010-04-25 21:00:44 +000015971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015972$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015973else
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15975$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015976
15977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15979
Matthias Kloseb9621712010-04-24 17:59:49 +000015980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15981$as_echo_n "checking for resize_term... " >&6; }
15982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015983/* end confdefs.h. */
15984#include <curses.h>
15985int
15986main ()
15987{
15988void *x=resize_term
15989 ;
15990 return 0;
15991}
15992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015993if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015996
Matthias Kloseb159a552010-04-25 21:00:44 +000015997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015998$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015999else
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16001$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016002
16003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005
Matthias Kloseb9621712010-04-24 17:59:49 +000016006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16007$as_echo_n "checking for resizeterm... " >&6; }
16008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016009/* end confdefs.h. */
16010#include <curses.h>
16011int
16012main ()
16013{
16014void *x=resizeterm
16015 ;
16016 return 0;
16017}
16018_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016019if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016022
Matthias Kloseb159a552010-04-25 21:00:44 +000016023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016024$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016025else
Matthias Kloseb9621712010-04-24 17:59:49 +000016026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16027$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016028
16029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016031
16032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16033$as_echo_n "checking for immedok... " >&6; }
16034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16035/* end confdefs.h. */
16036#include <curses.h>
16037int
16038main ()
16039{
16040
16041#ifndef immedok
16042void *x=immedok
16043#endif
16044
16045 ;
16046 return 0;
16047}
16048_ACEOF
16049if ac_fn_c_try_compile "$LINENO"; then :
16050
16051$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16052
16053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16054$as_echo "yes" >&6; }
16055else
16056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16057$as_echo "no" >&6; }
16058
16059fi
16060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16061
16062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16063$as_echo_n "checking for syncok... " >&6; }
16064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065/* end confdefs.h. */
16066#include <curses.h>
16067int
16068main ()
16069{
16070
16071#ifndef syncok
16072void *x=syncok
16073#endif
16074
16075 ;
16076 return 0;
16077}
16078_ACEOF
16079if ac_fn_c_try_compile "$LINENO"; then :
16080
16081$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16082
16083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16084$as_echo "yes" >&6; }
16085else
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16087$as_echo "no" >&6; }
16088
16089fi
16090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16091
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16093$as_echo_n "checking for wchgat... " >&6; }
16094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16095/* end confdefs.h. */
16096#include <curses.h>
16097int
16098main ()
16099{
16100
16101#ifndef wchgat
16102void *x=wchgat
16103#endif
16104
16105 ;
16106 return 0;
16107}
16108_ACEOF
16109if ac_fn_c_try_compile "$LINENO"; then :
16110
16111$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16112
16113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16114$as_echo "yes" >&6; }
16115else
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16117$as_echo "no" >&6; }
16118
16119fi
16120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16121
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16123$as_echo_n "checking for filter... " >&6; }
16124cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125/* end confdefs.h. */
16126#include <curses.h>
16127int
16128main ()
16129{
16130
16131#ifndef filter
16132void *x=filter
16133#endif
16134
16135 ;
16136 return 0;
16137}
16138_ACEOF
16139if ac_fn_c_try_compile "$LINENO"; then :
16140
16141$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16142
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16144$as_echo "yes" >&6; }
16145else
16146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16147$as_echo "no" >&6; }
16148
16149fi
16150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16151
16152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16153$as_echo_n "checking for has_key... " >&6; }
16154cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155/* end confdefs.h. */
16156#include <curses.h>
16157int
16158main ()
16159{
16160
16161#ifndef has_key
16162void *x=has_key
16163#endif
16164
16165 ;
16166 return 0;
16167}
16168_ACEOF
16169if ac_fn_c_try_compile "$LINENO"; then :
16170
16171$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16172
16173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16174$as_echo "yes" >&6; }
16175else
16176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16177$as_echo "no" >&6; }
16178
16179fi
16180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16181
16182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16183$as_echo_n "checking for typeahead... " >&6; }
16184cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16185/* end confdefs.h. */
16186#include <curses.h>
16187int
16188main ()
16189{
16190
16191#ifndef typeahead
16192void *x=typeahead
16193#endif
16194
16195 ;
16196 return 0;
16197}
16198_ACEOF
16199if ac_fn_c_try_compile "$LINENO"; then :
16200
16201$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16202
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16204$as_echo "yes" >&6; }
16205else
16206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16207$as_echo "no" >&6; }
16208
16209fi
16210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16211
16212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16213$as_echo_n "checking for use_env... " >&6; }
16214cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16215/* end confdefs.h. */
16216#include <curses.h>
16217int
16218main ()
16219{
16220
16221#ifndef use_env
16222void *x=use_env
16223#endif
16224
16225 ;
16226 return 0;
16227}
16228_ACEOF
16229if ac_fn_c_try_compile "$LINENO"; then :
16230
16231$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16232
16233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16234$as_echo "yes" >&6; }
16235else
16236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16237$as_echo "no" >&6; }
16238
16239fi
16240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016241# last curses configure check
16242CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16245$as_echo "$as_me: checking for device files" >&6;}
16246
16247if test "x$cross_compiling" = xyes; then
16248 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16250$as_echo_n "checking for /dev/ptmx... " >&6; }
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16252$as_echo "not set" >&6; }
16253 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16254 fi
16255 if test "${ac_cv_file__dev_ptc+set}" != set; then
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16257$as_echo_n "checking for /dev/ptc... " >&6; }
16258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16259$as_echo "not set" >&6; }
16260 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16261 fi
16262fi
16263
Matthias Kloseb9621712010-04-24 17:59:49 +000016264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16265$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016266if ${ac_cv_file__dev_ptmx+:} false; then :
16267 $as_echo_n "(cached) " >&6
16268else
16269 test "$cross_compiling" = yes &&
16270 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16271if test -r "/dev/ptmx"; then
16272 ac_cv_file__dev_ptmx=yes
16273else
16274 ac_cv_file__dev_ptmx=no
16275fi
16276fi
16277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16278$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16279if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016280
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016281fi
16282
16283if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016284
Matthias Kloseb9621712010-04-24 17:59:49 +000016285$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016286
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16289$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016290if ${ac_cv_file__dev_ptc+:} false; then :
16291 $as_echo_n "(cached) " >&6
16292else
16293 test "$cross_compiling" = yes &&
16294 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16295if test -r "/dev/ptc"; then
16296 ac_cv_file__dev_ptc=yes
16297else
16298 ac_cv_file__dev_ptc=no
16299fi
16300fi
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16302$as_echo "$ac_cv_file__dev_ptc" >&6; }
16303if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016304
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016305fi
16306
16307if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016310
Neal Norwitz865400f2003-03-21 01:42:58 +000016311fi
16312
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016313if test $ac_sys_system = Darwin
16314then
16315 LIBS="$LIBS -framework CoreFoundation"
16316fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016317
Matthias Kloseb9621712010-04-24 17:59:49 +000016318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16319$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016320if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016321 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016322else
Matthias Kloseb9621712010-04-24 17:59:49 +000016323 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016324 ac_cv_have_size_t_format="cross -- assuming yes"
16325
Thomas Wouters477c8d52006-05-27 19:21:47 +000016326else
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016328/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016329
Thomas Wouters477c8d52006-05-27 19:21:47 +000016330#include <stdio.h>
16331#include <stddef.h>
16332#include <string.h>
16333
Christian Heimes2c181612007-12-17 20:04:13 +000016334#ifdef HAVE_SYS_TYPES_H
16335#include <sys/types.h>
16336#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016337
16338#ifdef HAVE_SSIZE_T
16339typedef ssize_t Py_ssize_t;
16340#elif SIZEOF_VOID_P == SIZEOF_LONG
16341typedef long Py_ssize_t;
16342#else
16343typedef int Py_ssize_t;
16344#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016345
Christian Heimes2c181612007-12-17 20:04:13 +000016346int main()
16347{
16348 char buffer[256];
16349
Thomas Wouters477c8d52006-05-27 19:21:47 +000016350 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16351 return 1;
16352
Thomas Wouters89f507f2006-12-13 04:49:30 +000016353 if (strcmp(buffer, "123"))
16354 return 1;
16355
16356 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16357 return 1;
16358
16359 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016360 return 1;
16361
16362 return 0;
16363}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016364
Thomas Wouters477c8d52006-05-27 19:21:47 +000016365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016366if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016367 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016368else
Matthias Kloseb9621712010-04-24 17:59:49 +000016369 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016371rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16372 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016373fi
16374
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16377$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016378if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379
Matthias Kloseb9621712010-04-24 17:59:49 +000016380$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016381
16382fi
16383
Matthias Kloseb9621712010-04-24 17:59:49 +000016384ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016385#ifdef HAVE_SYS_TYPES_H
16386#include <sys/types.h>
16387#endif
16388#ifdef HAVE_SYS_SOCKET_H
16389#include <sys/socket.h>
16390#endif
16391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392"
Victor Stinnere0be4232011-10-25 13:06:09 +020016393if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016394
Martin v. Löwis11437992002-04-12 09:54:03 +000016395else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016396
Matthias Kloseb9621712010-04-24 17:59:49 +000016397$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016398
16399fi
16400
Michael W. Hudson54241132001-12-07 15:38:26 +000016401
Matthias Kloseb9621712010-04-24 17:59:49 +000016402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16403$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016404if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016405 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016406else
Matthias Kloseb9621712010-04-24 17:59:49 +000016407 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016408 ac_cv_broken_mbstowcs=no
16409else
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016411/* end confdefs.h. */
16412
Stefan Krah19c21392012-11-22 23:47:32 +010016413#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016414#include<stdlib.h>
16415int main() {
16416 size_t len = -1;
16417 const char *str = "text";
16418 len = mbstowcs(NULL, str, 0);
16419 return (len != 4);
16420}
16421
16422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016423if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016424 ac_cv_broken_mbstowcs=no
16425else
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16429 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016430fi
16431
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016432fi
16433
Matthias Kloseb9621712010-04-24 17:59:49 +000016434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16435$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016436if test "$ac_cv_broken_mbstowcs" = yes
16437then
16438
Matthias Kloseb9621712010-04-24 17:59:49 +000016439$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016440
16441fi
16442
Antoine Pitroub52ec782009-01-25 16:34:23 +000016443# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16445$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016446
16447# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016448if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016449 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016450if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016451then
16452
Matthias Kloseb9621712010-04-24 17:59:49 +000016453$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16456$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016457fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016458if test "$withval" = no
16459then
16460
16461$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16462
Matthias Kloseb9621712010-04-24 17:59:49 +000016463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016465fi
16466
Antoine Pitrou042b1282010-08-13 21:15:58 +000016467else
16468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16469$as_echo "no value specified" >&6; }
16470fi
16471
Antoine Pitroub52ec782009-01-25 16:34:23 +000016472
Matthias Kloseb17289e2012-03-15 19:51:34 +010016473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16474$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16475if ${ac_cv_computed_gotos+:} false; then :
16476 $as_echo_n "(cached) " >&6
16477else
16478 if test "$cross_compiling" = yes; then :
16479 if test "${with_computed_gotos+set}" = set; then
16480 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16481 else
16482 ac_cv_computed_gotos=no
16483 fi
16484else
16485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16486/* end confdefs.h. */
16487
16488int main(int argc, char **argv)
16489{
16490 static void *targets[1] = { &&LABEL1 };
16491 goto LABEL2;
16492LABEL1:
16493 return 0;
16494LABEL2:
16495 goto *targets[0];
16496 return 1;
16497}
16498
16499_ACEOF
16500if ac_fn_c_try_run "$LINENO"; then :
16501 ac_cv_computed_gotos=yes
16502else
16503 ac_cv_computed_gotos=no
16504fi
16505rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16506 conftest.$ac_objext conftest.beam conftest.$ac_ext
16507fi
16508
16509fi
16510
16511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16512$as_echo "$ac_cv_computed_gotos" >&6; }
16513case "$ac_cv_computed_gotos" in yes*)
16514
16515$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16516
16517esac
16518
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016519case $ac_sys_system in
16520AIX*)
16521
16522$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16523 ;;
16524esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016525
Michael W. Hudson54241132001-12-07 15:38:26 +000016526
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016527
16528
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016529for h in `(cd $srcdir;echo Python/thread_*.h)`
16530do
16531 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16532done
16533
Michael W. Hudson54241132001-12-07 15:38:26 +000016534
Victor Stinner21a74a92019-04-11 22:28:12 +020016535SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16537$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016538for dir in $SRCDIRS; do
16539 if test ! -d $dir; then
16540 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016541 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016542done
Matthias Kloseb9621712010-04-24 17:59:49 +000016543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16544$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016545
Stefan Krah1919b7e2012-03-21 18:25:23 +010016546# Availability of -O2:
16547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16548$as_echo_n "checking for -O2... " >&6; }
16549saved_cflags="$CFLAGS"
16550CFLAGS="-O2"
16551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16552/* end confdefs.h. */
16553
16554int
16555main ()
16556{
16557
16558
16559 ;
16560 return 0;
16561}
16562_ACEOF
16563if ac_fn_c_try_compile "$LINENO"; then :
16564 have_O2=yes
16565else
16566 have_O2=no
16567fi
16568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16570$as_echo "$have_O2" >&6; }
16571CFLAGS="$saved_cflags"
16572
16573# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16574# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16576$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16577saved_cflags="$CFLAGS"
16578CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16579if test "$have_O2" = no; then
16580 CFLAGS=""
16581fi
16582if test "$cross_compiling" = yes; then :
16583 have_glibc_memmove_bug=undefined
16584else
16585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16586/* end confdefs.h. */
16587
16588#include <stdio.h>
16589#include <stdlib.h>
16590#include <string.h>
16591void foo(void *p, void *q) { memmove(p, q, 19); }
16592int main() {
16593 char a[32] = "123456789000000000";
16594 foo(&a[9], a);
16595 if (strcmp(a, "123456789123456789000000000") != 0)
16596 return 1;
16597 foo(a, &a[9]);
16598 if (strcmp(a, "123456789000000000") != 0)
16599 return 1;
16600 return 0;
16601}
16602
16603_ACEOF
16604if ac_fn_c_try_run "$LINENO"; then :
16605 have_glibc_memmove_bug=no
16606else
16607 have_glibc_memmove_bug=yes
16608fi
16609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16610 conftest.$ac_objext conftest.beam conftest.$ac_ext
16611fi
16612
16613CFLAGS="$saved_cflags"
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16615$as_echo "$have_glibc_memmove_bug" >&6; }
16616if test "$have_glibc_memmove_bug" = yes; then
16617
16618$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16619
16620fi
16621
16622if test "$have_gcc_asm_for_x87" = yes; then
16623 # Some versions of gcc miscompile inline asm:
16624 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16625 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16626 case $CC in
16627 *gcc*)
16628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16629$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16630 saved_cflags="$CFLAGS"
16631 CFLAGS="-O2"
16632 if test "$cross_compiling" = yes; then :
16633 have_ipa_pure_const_bug=undefined
16634else
16635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16636/* end confdefs.h. */
16637
16638 __attribute__((noinline)) int
16639 foo(int *p) {
16640 int r;
16641 asm ( "movl \$6, (%1)\n\t"
16642 "xorl %0, %0\n\t"
16643 : "=r" (r) : "r" (p) : "memory"
16644 );
16645 return r;
16646 }
16647 int main() {
16648 int p = 8;
16649 if ((foo(&p) ? : p) != 6)
16650 return 1;
16651 return 0;
16652 }
16653
16654_ACEOF
16655if ac_fn_c_try_run "$LINENO"; then :
16656 have_ipa_pure_const_bug=no
16657else
16658 have_ipa_pure_const_bug=yes
16659fi
16660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16661 conftest.$ac_objext conftest.beam conftest.$ac_ext
16662fi
16663
16664 CFLAGS="$saved_cflags"
16665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16666$as_echo "$have_ipa_pure_const_bug" >&6; }
16667 if test "$have_ipa_pure_const_bug" = yes; then
16668
16669$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16670
16671 fi
16672 ;;
16673 esac
16674fi
16675
Victor Stinner4f5366e2015-01-09 02:13:19 +010016676# Check for stdatomic.h
16677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16678$as_echo_n "checking for stdatomic.h... " >&6; }
16679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16680/* end confdefs.h. */
16681
16682
16683 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016684 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016685 int main() {
16686 int loaded_value = atomic_load(&value);
16687 return 0;
16688 }
16689
16690
16691_ACEOF
16692if ac_fn_c_try_link "$LINENO"; then :
16693 have_stdatomic_h=yes
16694else
16695 have_stdatomic_h=no
16696fi
16697rm -f core conftest.err conftest.$ac_objext \
16698 conftest$ac_exeext conftest.$ac_ext
16699
16700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16701$as_echo "$have_stdatomic_h" >&6; }
16702
16703if test "$have_stdatomic_h" = yes; then
16704
16705$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16706
16707fi
16708
16709# Check for GCC >= 4.7 __atomic builtins
16710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16711$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16713/* end confdefs.h. */
16714
16715
16716 volatile int val = 1;
16717 int main() {
16718 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16719 return 0;
16720 }
16721
16722
16723_ACEOF
16724if ac_fn_c_try_link "$LINENO"; then :
16725 have_builtin_atomic=yes
16726else
16727 have_builtin_atomic=no
16728fi
16729rm -f core conftest.err conftest.$ac_objext \
16730 conftest$ac_exeext conftest.$ac_ext
16731
16732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16733$as_echo "$have_builtin_atomic" >&6; }
16734
16735if test "$have_builtin_atomic" = yes; then
16736
16737$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16738
16739fi
16740
Ned Deily322f5ba2013-11-21 23:01:59 -080016741# ensurepip option
16742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16743$as_echo_n "checking for ensurepip... " >&6; }
16744
16745# Check whether --with-ensurepip was given.
16746if test "${with_ensurepip+set}" = set; then :
16747 withval=$with_ensurepip;
16748else
16749 with_ensurepip=upgrade
16750fi
16751
16752case $with_ensurepip in #(
16753 yes|upgrade) :
16754 ENSUREPIP=upgrade ;; #(
16755 install) :
16756 ENSUREPIP=install ;; #(
16757 no) :
16758 ENSUREPIP=no ;; #(
16759 *) :
16760 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16761esac
16762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16763$as_echo "$ENSUREPIP" >&6; }
16764
16765
Victor Stinner35a97c02015-03-08 02:59:09 +010016766# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16768$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16770/* end confdefs.h. */
16771
16772
16773 #include <dirent.h>
16774
16775 int main() {
16776 struct dirent entry;
16777 return entry.d_type == DT_UNKNOWN;
16778 }
16779
16780
16781_ACEOF
16782if ac_fn_c_try_link "$LINENO"; then :
16783 have_dirent_d_type=yes
16784else
16785 have_dirent_d_type=no
16786fi
16787rm -f core conftest.err conftest.$ac_objext \
16788 conftest$ac_exeext conftest.$ac_ext
16789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16790$as_echo "$have_dirent_d_type" >&6; }
16791
16792if test "$have_dirent_d_type" = yes; then
16793
16794$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16795
16796fi
16797
Victor Stinner9eb57c52015-03-19 22:21:49 +010016798# check if the Linux getrandom() syscall is available
16799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16800$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802/* end confdefs.h. */
16803
16804
Victor Stinner1b80b242016-04-12 22:34:58 +020016805 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016806 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016807 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016808
16809 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016810 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016811 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016812 const int flags = GRND_NONBLOCK;
16813 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016814 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016815 return 0;
16816 }
16817
16818
16819_ACEOF
16820if ac_fn_c_try_link "$LINENO"; then :
16821 have_getrandom_syscall=yes
16822else
16823 have_getrandom_syscall=no
16824fi
16825rm -f core conftest.err conftest.$ac_objext \
16826 conftest$ac_exeext conftest.$ac_ext
16827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16828$as_echo "$have_getrandom_syscall" >&6; }
16829
16830if test "$have_getrandom_syscall" = yes; then
16831
16832$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16833
16834fi
16835
Victor Stinner3abf44e2015-09-18 15:38:37 +020016836# check if the getrandom() function is available
16837# the test was written for the Solaris function of <sys/random.h>
16838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16839$as_echo_n "checking for the getrandom() function... " >&6; }
16840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16841/* end confdefs.h. */
16842
16843
16844 #include <sys/random.h>
16845
16846 int main() {
16847 char buffer[1];
16848 const size_t buflen = sizeof(buffer);
16849 const int flags = 0;
16850 /* ignore the result, Python checks for ENOSYS at runtime */
16851 (void)getrandom(buffer, buflen, flags);
16852 return 0;
16853 }
16854
16855
16856_ACEOF
16857if ac_fn_c_try_link "$LINENO"; then :
16858 have_getrandom=yes
16859else
16860 have_getrandom=no
16861fi
16862rm -f core conftest.err conftest.$ac_objext \
16863 conftest$ac_exeext conftest.$ac_ext
16864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16865$as_echo "$have_getrandom" >&6; }
16866
16867if test "$have_getrandom" = yes; then
16868
16869$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16870
16871fi
16872
Neil Schemenauer5741c452019-02-08 10:48:46 -080016873# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16874# shm_* may only be available if linking against librt
16875save_LIBS="$LIBS"
16876save_includes_default="$ac_includes_default"
16877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16878$as_echo_n "checking for library containing shm_open... " >&6; }
16879if ${ac_cv_search_shm_open+:} false; then :
16880 $as_echo_n "(cached) " >&6
16881else
16882 ac_func_search_save_LIBS=$LIBS
16883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16884/* end confdefs.h. */
16885
16886/* Override any GCC internal prototype to avoid an error.
16887 Use char because int might match the return type of a GCC
16888 builtin and then its argument prototype would still apply. */
16889#ifdef __cplusplus
16890extern "C"
16891#endif
16892char shm_open ();
16893int
16894main ()
16895{
16896return shm_open ();
16897 ;
16898 return 0;
16899}
16900_ACEOF
16901for ac_lib in '' rt; do
16902 if test -z "$ac_lib"; then
16903 ac_res="none required"
16904 else
16905 ac_res=-l$ac_lib
16906 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16907 fi
16908 if ac_fn_c_try_link "$LINENO"; then :
16909 ac_cv_search_shm_open=$ac_res
16910fi
16911rm -f core conftest.err conftest.$ac_objext \
16912 conftest$ac_exeext
16913 if ${ac_cv_search_shm_open+:} false; then :
16914 break
16915fi
16916done
16917if ${ac_cv_search_shm_open+:} false; then :
16918
16919else
16920 ac_cv_search_shm_open=no
16921fi
16922rm conftest.$ac_ext
16923LIBS=$ac_func_search_save_LIBS
16924fi
16925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16926$as_echo "$ac_cv_search_shm_open" >&6; }
16927ac_res=$ac_cv_search_shm_open
16928if test "$ac_res" != no; then :
16929 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16930
16931fi
16932
16933if test "$ac_cv_search_shm_open" = "-lrt"; then
16934
16935$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16936
16937fi
16938for ac_header in sys/mman.h
16939do :
16940 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16941if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16942 cat >>confdefs.h <<_ACEOF
16943#define HAVE_SYS_MMAN_H 1
16944_ACEOF
16945
16946fi
16947
16948done
16949
16950# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16951ac_includes_default="\
16952${ac_includes_default}
16953#ifndef __cplusplus
16954# ifdef HAVE_SYS_MMAN_H
16955# include <sys/mman.h>
16956# endif
16957#endif
16958"
16959for ac_func in shm_open shm_unlink
16960do :
16961 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16962ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16963if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16964 cat >>confdefs.h <<_ACEOF
16965#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16966_ACEOF
16967
16968fi
16969done
16970
16971# we don't want to link with librt always, restore LIBS
16972LIBS="$save_LIBS"
16973ac_includes_default="$save_includes_default"
16974
Christian Heimesff5be6e2018-01-20 13:19:21 +010016975# Check for usable OpenSSL
16976
16977 found=false
16978
16979# Check whether --with-openssl was given.
16980if test "${with_openssl+set}" = set; then :
16981 withval=$with_openssl;
16982 case "$withval" in
16983 "" | y | ye | yes | n | no)
16984 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16985 ;;
16986 *) ssldirs="$withval"
16987 ;;
16988 esac
16989
16990else
16991
16992 # if pkg-config is installed and openssl has installed a .pc file,
16993 # then use that information and don't search ssldirs
16994 if test -n "$ac_tool_prefix"; then
16995 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16996set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16998$as_echo_n "checking for $ac_word... " >&6; }
16999if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17000 $as_echo_n "(cached) " >&6
17001else
17002 if test -n "$PKG_CONFIG"; then
17003 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17004else
17005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17006for as_dir in $PATH
17007do
17008 IFS=$as_save_IFS
17009 test -z "$as_dir" && as_dir=.
17010 for ac_exec_ext in '' $ac_executable_extensions; do
17011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17012 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17014 break 2
17015 fi
17016done
17017 done
17018IFS=$as_save_IFS
17019
17020fi
17021fi
17022PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17023if test -n "$PKG_CONFIG"; then
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17025$as_echo "$PKG_CONFIG" >&6; }
17026else
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17028$as_echo "no" >&6; }
17029fi
17030
17031
17032fi
17033if test -z "$ac_cv_prog_PKG_CONFIG"; then
17034 ac_ct_PKG_CONFIG=$PKG_CONFIG
17035 # Extract the first word of "pkg-config", so it can be a program name with args.
17036set dummy pkg-config; ac_word=$2
17037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17038$as_echo_n "checking for $ac_word... " >&6; }
17039if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17040 $as_echo_n "(cached) " >&6
17041else
17042 if test -n "$ac_ct_PKG_CONFIG"; then
17043 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17044else
17045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17046for as_dir in $PATH
17047do
17048 IFS=$as_save_IFS
17049 test -z "$as_dir" && as_dir=.
17050 for ac_exec_ext in '' $ac_executable_extensions; do
17051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17052 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17054 break 2
17055 fi
17056done
17057 done
17058IFS=$as_save_IFS
17059
17060fi
17061fi
17062ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17063if test -n "$ac_ct_PKG_CONFIG"; then
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17065$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17066else
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17068$as_echo "no" >&6; }
17069fi
17070
17071 if test "x$ac_ct_PKG_CONFIG" = x; then
17072 PKG_CONFIG=""
17073 else
17074 case $cross_compiling:$ac_tool_warned in
17075yes:)
17076{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17077$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17078ac_tool_warned=yes ;;
17079esac
17080 PKG_CONFIG=$ac_ct_PKG_CONFIG
17081 fi
17082else
17083 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17084fi
17085
17086 if test x"$PKG_CONFIG" != x""; then
17087 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17088 if test $? = 0; then
17089 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17090 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17091 found=true
17092 fi
17093 fi
17094
17095 # no such luck; use some default ssldirs
17096 if ! $found; then
17097 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17098 fi
17099
17100
17101fi
17102
17103
17104
17105 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17106 # an 'openssl' subdirectory
17107
17108 if ! $found; then
17109 OPENSSL_INCLUDES=
17110 for ssldir in $ssldirs; do
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17112$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17113 if test -f "$ssldir/include/openssl/ssl.h"; then
17114 OPENSSL_INCLUDES="-I$ssldir/include"
17115 OPENSSL_LDFLAGS="-L$ssldir/lib"
17116 OPENSSL_LIBS="-lssl -lcrypto"
17117 found=true
17118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17119$as_echo "yes" >&6; }
17120 break
17121 else
17122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17123$as_echo "no" >&6; }
17124 fi
17125 done
17126
17127 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17128 # it will just work!
17129 fi
17130
17131 # try the preprocessor and linker with our new flags,
17132 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17133
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17135$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17136 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17137 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17138
17139 save_LIBS="$LIBS"
17140 save_LDFLAGS="$LDFLAGS"
17141 save_CPPFLAGS="$CPPFLAGS"
17142 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17143 LIBS="$OPENSSL_LIBS $LIBS"
17144 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17146/* end confdefs.h. */
17147#include <openssl/ssl.h>
17148int
17149main ()
17150{
17151SSL_new(NULL)
17152 ;
17153 return 0;
17154}
17155_ACEOF
17156if ac_fn_c_try_link "$LINENO"; then :
17157
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17159$as_echo "yes" >&6; }
17160 have_openssl=yes
17161
17162else
17163
17164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17165$as_echo "no" >&6; }
17166 have_openssl=no
17167
17168fi
17169rm -f core conftest.err conftest.$ac_objext \
17170 conftest$ac_exeext conftest.$ac_ext
17171 CPPFLAGS="$save_CPPFLAGS"
17172 LDFLAGS="$save_LDFLAGS"
17173 LIBS="$save_LIBS"
17174
17175
17176
17177
17178
17179
17180if test "$have_openssl" = yes; then
17181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17182$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17183
17184 save_LIBS="$LIBS"
17185 save_LDFLAGS="$LDFLAGS"
17186 save_CPPFLAGS="$CPPFLAGS"
17187 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17188 LIBS="$OPENSSL_LIBS $LIBS"
17189 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17190
17191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17192/* end confdefs.h. */
17193
17194 #include <openssl/x509_vfy.h>
17195
17196int
17197main ()
17198{
17199
17200 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17201 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17202 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17203 X509_VERIFY_PARAM_set_hostflags(p, 0);
17204
17205 ;
17206 return 0;
17207}
17208
17209_ACEOF
17210if ac_fn_c_try_link "$LINENO"; then :
17211
17212 ac_cv_has_x509_verify_param_set1_host=yes
17213
17214else
17215
17216 ac_cv_has_x509_verify_param_set1_host=no
17217
17218fi
17219rm -f core conftest.err conftest.$ac_objext \
17220 conftest$ac_exeext conftest.$ac_ext
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17222$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17223 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17224
17225$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17226
17227 fi
17228
17229 CPPFLAGS="$save_CPPFLAGS"
17230 LDFLAGS="$save_LDFLAGS"
17231 LIBS="$save_LIBS"
17232fi
17233
Christian Heimes892d66e2018-01-29 14:10:18 +010017234# ssl module default cipher suite string
17235
17236
17237
17238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17239$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17240
17241# Check whether --with-ssl-default-suites was given.
17242if test "${with_ssl_default_suites+set}" = set; then :
17243 withval=$with_ssl_default_suites;
17244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17245$as_echo "$withval" >&6; }
17246case "$withval" in
17247 python)
17248 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17249
17250 ;;
17251 openssl)
17252 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17253
17254 ;;
17255 *)
17256 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17257
17258 cat >>confdefs.h <<_ACEOF
17259#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17260_ACEOF
17261
17262 ;;
17263esac
17264
17265else
17266
17267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17268$as_echo "python" >&6; }
17269$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17270
17271
17272fi
17273
17274
17275
Guido van Rossum627b2d71993-12-24 10:39:16 +000017276# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017277ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017278
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017279ac_config_files="$ac_config_files Modules/ld_so_aix"
17280
Martin v. Löwis11437992002-04-12 09:54:03 +000017281cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017282# This file is a shell script that caches the results of configure
17283# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017284# scripts and configure runs, see configure's option --config-cache.
17285# It is not useful on other systems. If it contains results you don't
17286# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017287#
Martin v. Löwis11437992002-04-12 09:54:03 +000017288# config.status only pays attention to the cache file if you give it
17289# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017290#
Skip Montanaro6dead952003-09-25 14:50:04 +000017291# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017292# loading this file, other *unset* `ac_cv_foo' will be assigned the
17293# following values.
17294
17295_ACEOF
17296
Guido van Rossumf78abae1997-01-21 22:02:36 +000017297# The following way of writing the cache mishandles newlines in values,
17298# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017299# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017300# Ultrix sh set writes to stderr and can't be redirected directly,
17301# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017302(
17303 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17304 eval ac_val=\$$ac_var
17305 case $ac_val in #(
17306 *${as_nl}*)
17307 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017308 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17309$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017310 esac
17311 case $ac_var in #(
17312 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017313 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17314 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315 esac ;;
17316 esac
17317 done
17318
Martin v. Löwis11437992002-04-12 09:54:03 +000017319 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017320 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17321 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017322 # `set' does not quote correctly, so add quotes: double-quote
17323 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017325 "s/'/'\\\\''/g;
17326 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017328 *)
17329 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017330 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332 esac |
17333 sort
17334) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017335 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017337 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017338 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017339 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17340 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017341 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17342 :end' >>confcache
17343if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17344 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017345 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17347$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017348 if test ! -f "$cache_file" || test -h "$cache_file"; then
17349 cat confcache >"$cache_file"
17350 else
17351 case $cache_file in #(
17352 */* | ?:*)
17353 mv -f confcache "$cache_file"$$ &&
17354 mv -f "$cache_file"$$ "$cache_file" ;; #(
17355 *)
17356 mv -f confcache "$cache_file" ;;
17357 esac
17358 fi
17359 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017360 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017361 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17362$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017364fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017365rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017366
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017367test "x$prefix" = xNONE && prefix=$ac_default_prefix
17368# Let make expand exec_prefix.
17369test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017370
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017371DEFS=-DHAVE_CONFIG_H
17372
Skip Montanaro6dead952003-09-25 14:50:04 +000017373ac_libobjs=
17374ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017375U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017376for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17377 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017379 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17381 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017382 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17383 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017384done
17385LIBOBJS=$ac_libobjs
17386
17387LTLIBOBJS=$ac_ltlibobjs
17388
17389
Martin v. Löwis11437992002-04-12 09:54:03 +000017390
Matthias Kloseb9621712010-04-24 17:59:49 +000017391
Victor Stinnere0be4232011-10-25 13:06:09 +020017392: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017393ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017394ac_clean_files_save=$ac_clean_files
17395ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017396{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17397$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17398as_write_fail=0
17399cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017400#! $SHELL
17401# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017402# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017403# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017404# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017405
Martin v. Löwis11437992002-04-12 09:54:03 +000017406debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017407ac_cs_recheck=false
17408ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017409
Matthias Kloseb9621712010-04-24 17:59:49 +000017410SHELL=\${CONFIG_SHELL-$SHELL}
17411export SHELL
17412_ASEOF
17413cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17414## -------------------- ##
17415## M4sh Initialization. ##
17416## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418# Be more Bourne compatible
17419DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017420if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 emulate sh
17422 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017424 # is contrary to our usage. Disable this feature.
17425 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017427else
Matthias Kloseb9621712010-04-24 17:59:49 +000017428 case `(set -o) 2>/dev/null` in #(
17429 *posix*) :
17430 set -o posix ;; #(
17431 *) :
17432 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017433esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017434fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017435
17436
Matthias Kloseb9621712010-04-24 17:59:49 +000017437as_nl='
17438'
17439export as_nl
17440# Printing a long string crashes Solaris 7 /usr/bin/printf.
17441as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17442as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17443as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17444# Prefer a ksh shell builtin over an external printf program on Solaris,
17445# but without wasting forks for bash or zsh.
17446if test -z "$BASH_VERSION$ZSH_VERSION" \
17447 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17448 as_echo='print -r --'
17449 as_echo_n='print -rn --'
17450elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17451 as_echo='printf %s\n'
17452 as_echo_n='printf %s'
17453else
17454 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17455 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17456 as_echo_n='/usr/ucb/echo -n'
17457 else
17458 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17459 as_echo_n_body='eval
17460 arg=$1;
17461 case $arg in #(
17462 *"$as_nl"*)
17463 expr "X$arg" : "X\\(.*\\)$as_nl";
17464 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17465 esac;
17466 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17467 '
17468 export as_echo_n_body
17469 as_echo_n='sh -c $as_echo_n_body as_echo'
17470 fi
17471 export as_echo_body
17472 as_echo='sh -c $as_echo_body as_echo'
17473fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
17475# The user is always right.
17476if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017477 PATH_SEPARATOR=:
17478 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17479 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17480 PATH_SEPARATOR=';'
17481 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484
17485# IFS
17486# We need space, tab and new line, in precisely that order. Quoting is
17487# there to prevent editors from complaining about space-tab.
17488# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17489# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490IFS=" "" $as_nl"
17491
17492# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017493as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017494case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017495 *[\\/]* ) as_myself=$0 ;;
17496 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017497for as_dir in $PATH
17498do
17499 IFS=$as_save_IFS
17500 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017501 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17502 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017505 ;;
17506esac
17507# We did not find ourselves, most probably we were run as `sh COMMAND'
17508# in which case we are not to be found in the path.
17509if test "x$as_myself" = x; then
17510 as_myself=$0
17511fi
17512if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017513 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17514 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515fi
17516
Matthias Kloseb9621712010-04-24 17:59:49 +000017517# Unset variables that we do not need and which cause bugs (e.g. in
17518# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17519# suppresses any "Segmentation fault" message there. '((' could
17520# trigger a bug in pdksh 5.2.14.
17521for as_var in BASH_ENV ENV MAIL MAILPATH
17522do eval test x\${$as_var+set} = xset \
17523 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524done
17525PS1='$ '
17526PS2='> '
17527PS4='+ '
17528
17529# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017530LC_ALL=C
17531export LC_ALL
17532LANGUAGE=C
17533export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534
Matthias Kloseb9621712010-04-24 17:59:49 +000017535# CDPATH.
17536(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17537
17538
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017539# as_fn_error STATUS ERROR [LINENO LOG_FD]
17540# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017541# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17542# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017543# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017544as_fn_error ()
17545{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017546 as_status=$1; test $as_status -eq 0 && as_status=1
17547 if test "$4"; then
17548 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17549 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017550 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017551 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017552 as_fn_exit $as_status
17553} # as_fn_error
17554
17555
17556# as_fn_set_status STATUS
17557# -----------------------
17558# Set $? to STATUS, without forking.
17559as_fn_set_status ()
17560{
17561 return $1
17562} # as_fn_set_status
17563
17564# as_fn_exit STATUS
17565# -----------------
17566# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17567as_fn_exit ()
17568{
17569 set +e
17570 as_fn_set_status $1
17571 exit $1
17572} # as_fn_exit
17573
17574# as_fn_unset VAR
17575# ---------------
17576# Portably unset VAR.
17577as_fn_unset ()
17578{
17579 { eval $1=; unset $1;}
17580}
17581as_unset=as_fn_unset
17582# as_fn_append VAR VALUE
17583# ----------------------
17584# Append the text in VALUE to the end of the definition contained in VAR. Take
17585# advantage of any shell optimizations that allow amortized linear growth over
17586# repeated appends, instead of the typical quadratic growth present in naive
17587# implementations.
17588if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17589 eval 'as_fn_append ()
17590 {
17591 eval $1+=\$2
17592 }'
17593else
17594 as_fn_append ()
17595 {
17596 eval $1=\$$1\$2
17597 }
17598fi # as_fn_append
17599
17600# as_fn_arith ARG...
17601# ------------------
17602# Perform arithmetic evaluation on the ARGs, and store the result in the
17603# global $as_val. Take advantage of shells that can avoid forks. The arguments
17604# must be portable across $(()) and expr.
17605if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17606 eval 'as_fn_arith ()
17607 {
17608 as_val=$(( $* ))
17609 }'
17610else
17611 as_fn_arith ()
17612 {
17613 as_val=`expr "$@" || test $? -eq 1`
17614 }
17615fi # as_fn_arith
17616
17617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017618if expr a : '\(a\)' >/dev/null 2>&1 &&
17619 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17620 as_expr=expr
17621else
17622 as_expr=false
17623fi
17624
17625if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17626 as_basename=basename
17627else
17628 as_basename=false
17629fi
17630
Matthias Kloseb9621712010-04-24 17:59:49 +000017631if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17632 as_dirname=dirname
17633else
17634 as_dirname=false
17635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017637as_me=`$as_basename -- "$0" ||
17638$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17639 X"$0" : 'X\(//\)$' \| \
17640 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017641$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642 sed '/^.*\/\([^/][^/]*\)\/*$/{
17643 s//\1/
17644 q
17645 }
17646 /^X\/\(\/\/\)$/{
17647 s//\1/
17648 q
17649 }
17650 /^X\/\(\/\).*/{
17651 s//\1/
17652 q
17653 }
17654 s/.*/./; q'`
17655
Matthias Kloseb9621712010-04-24 17:59:49 +000017656# Avoid depending upon Character Ranges.
17657as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17658as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17659as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17660as_cr_digits='0123456789'
17661as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662
17663ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017664case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017665-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017666 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017668 xy) ECHO_C='\c';;
17669 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17670 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017671 esac;;
17672*)
17673 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017674esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017675
Martin v. Löwis11437992002-04-12 09:54:03 +000017676rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677if test -d conf$$.dir; then
17678 rm -f conf$$.dir/conf$$.file
17679else
17680 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017681 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017683if (echo >conf$$.file) 2>/dev/null; then
17684 if ln -s conf$$.file conf$$ 2>/dev/null; then
17685 as_ln_s='ln -s'
17686 # ... but there are two gotchas:
17687 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17688 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017689 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017690 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017691 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017692 elif ln conf$$.file conf$$ 2>/dev/null; then
17693 as_ln_s=ln
17694 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017695 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017697else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017698 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017700rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17701rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017702
Matthias Kloseb9621712010-04-24 17:59:49 +000017703
17704# as_fn_mkdir_p
17705# -------------
17706# Create "$as_dir" as a directory, including parents if necessary.
17707as_fn_mkdir_p ()
17708{
17709
17710 case $as_dir in #(
17711 -*) as_dir=./$as_dir;;
17712 esac
17713 test -d "$as_dir" || eval $as_mkdir_p || {
17714 as_dirs=
17715 while :; do
17716 case $as_dir in #(
17717 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17718 *) as_qdir=$as_dir;;
17719 esac
17720 as_dirs="'$as_qdir' $as_dirs"
17721 as_dir=`$as_dirname -- "$as_dir" ||
17722$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17723 X"$as_dir" : 'X\(//\)[^/]' \| \
17724 X"$as_dir" : 'X\(//\)$' \| \
17725 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17726$as_echo X"$as_dir" |
17727 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17728 s//\1/
17729 q
17730 }
17731 /^X\(\/\/\)[^/].*/{
17732 s//\1/
17733 q
17734 }
17735 /^X\(\/\/\)$/{
17736 s//\1/
17737 q
17738 }
17739 /^X\(\/\).*/{
17740 s//\1/
17741 q
17742 }
17743 s/.*/./; q'`
17744 test -d "$as_dir" && break
17745 done
17746 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017747 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017748
17749
17750} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017751if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017753else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017754 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017755 as_mkdir_p=false
17756fi
17757
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017758
17759# as_fn_executable_p FILE
17760# -----------------------
17761# Test if FILE is an executable regular file.
17762as_fn_executable_p ()
17763{
17764 test -f "$1" && test -x "$1"
17765} # as_fn_executable_p
17766as_test_x='test -x'
17767as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017768
17769# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770as_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 +000017771
17772# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017773as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017774
17775
Martin v. Löwis11437992002-04-12 09:54:03 +000017776exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017777## ----------------------------------- ##
17778## Main body of $CONFIG_STATUS script. ##
17779## ----------------------------------- ##
17780_ASEOF
17781test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017782
Matthias Kloseb9621712010-04-24 17:59:49 +000017783cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17784# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017785# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786# values after options handling.
17787ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017788This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017789generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
17791 CONFIG_FILES = $CONFIG_FILES
17792 CONFIG_HEADERS = $CONFIG_HEADERS
17793 CONFIG_LINKS = $CONFIG_LINKS
17794 CONFIG_COMMANDS = $CONFIG_COMMANDS
17795 $ $0 $@
17796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017797on `(hostname || uname -n) 2>/dev/null | sed 1q`
17798"
17799
Martin v. Löwis11437992002-04-12 09:54:03 +000017800_ACEOF
17801
Matthias Kloseb9621712010-04-24 17:59:49 +000017802case $ac_config_files in *"
17803"*) set x $ac_config_files; shift; ac_config_files=$*;;
17804esac
17805
17806case $ac_config_headers in *"
17807"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17808esac
17809
17810
17811cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017812# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017813config_files="$ac_config_files"
17814config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017816_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017817
Matthias Kloseb9621712010-04-24 17:59:49 +000017818cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017819ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017820\`$as_me' instantiates files and other configuration actions
17821from templates according to the current configuration. Unless the files
17822and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Matthias Kloseb9621712010-04-24 17:59:49 +000017824Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017825
17826 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017828 --config print configuration, then exit
17829 -q, --quiet, --silent
17830 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017831 -d, --debug don't remove temporary files
17832 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017833 --file=FILE[:TEMPLATE]
17834 instantiate the configuration file FILE
17835 --header=FILE[:TEMPLATE]
17836 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017837
17838Configuration files:
17839$config_files
17840
17841Configuration headers:
17842$config_headers
17843
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017844Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017845
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017847cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17848ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017849ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017850python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017851configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017852 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017853
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017854Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017855This config.status script is free software; the Free Software Foundation
17856gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857
17858ac_pwd='$ac_pwd'
17859srcdir='$srcdir'
17860INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017861MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017862test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017863_ACEOF
17864
Matthias Kloseb9621712010-04-24 17:59:49 +000017865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17866# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017867ac_need_defaults=:
17868while test $# != 0
17869do
17870 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017871 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17873 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017874 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017875 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017876 --*=)
17877 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17878 ac_optarg=
17879 ac_shift=:
17880 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017882 ac_option=$1
17883 ac_optarg=$2
17884 ac_shift=shift
17885 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017886 esac
17887
Skip Montanaro6dead952003-09-25 14:50:04 +000017888 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017889 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017890 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17891 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017892 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 $as_echo "$ac_cs_version"; exit ;;
17894 --config | --confi | --conf | --con | --co | --c )
17895 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017897 debug=: ;;
17898 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017899 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 case $ac_optarg in
17901 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017902 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017903 esac
17904 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 ac_need_defaults=false;;
17906 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017907 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017908 case $ac_optarg in
17909 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17910 esac
17911 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913 --he | --h)
17914 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017915 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017916Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017918 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017919 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17920 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17921 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017924 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017925Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017926
Matthias Kloseb9621712010-04-24 17:59:49 +000017927 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017928 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017929
17930 esac
17931 shift
17932done
17933
Skip Montanaro6dead952003-09-25 14:50:04 +000017934ac_configure_extra_args=
17935
17936if $ac_cs_silent; then
17937 exec 6>/dev/null
17938 ac_configure_extra_args="$ac_configure_extra_args --silent"
17939fi
17940
17941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017942cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017943if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017944 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017945 shift
17946 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17947 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017948 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017949 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017950fi
17951
Martin v. Löwis11437992002-04-12 09:54:03 +000017952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017953cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954exec 5>>config.log
17955{
17956 echo
17957 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17958## Running $as_me. ##
17959_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017960 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017961} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017966
Matthias Kloseb9621712010-04-24 17:59:49 +000017967cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017968
17969# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017970for ac_config_target in $ac_config_targets
17971do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017972 case $ac_config_target in
17973 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17974 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17975 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017976 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17977 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017979 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017980 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017981 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017982
Victor Stinnere0be4232011-10-25 13:06:09 +020017983 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017984 esac
17985done
17986
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017987
Martin v. Löwis11437992002-04-12 09:54:03 +000017988# If the user did not use the arguments to specify the items to instantiate,
17989# then the envvar interface is used. Set only those that are not.
17990# We use the long form for the default assignment because of an extremely
17991# bizarre bug on SunOS 4.1.3.
17992if $ac_need_defaults; then
17993 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17994 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17995fi
17996
Skip Montanaro6dead952003-09-25 14:50:04 +000017997# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017999# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000# Hook for its removal unless debugging.
18001# Note that there is a small window in which the directory will not be cleaned:
18002# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018003$debug ||
18004{
Victor Stinnere0be4232011-10-25 13:06:09 +020018005 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018007 : "${ac_tmp:=$tmp}"
18008 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018010 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018011}
Martin v. Löwis11437992002-04-12 09:54:03 +000018012# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018013
Martin v. Löwis11437992002-04-12 09:54:03 +000018014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018015 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018016 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018017} ||
18018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 tmp=./conf$$-$RANDOM
18020 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018021} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018022ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018023
Matthias Kloseb9621712010-04-24 17:59:49 +000018024# Set up the scripts for CONFIG_FILES section.
18025# No need to generate them if there are no CONFIG_FILES.
18026# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018028
Matthias Kloseb9621712010-04-24 17:59:49 +000018029
18030ac_cr=`echo X | tr X '\015'`
18031# On cygwin, bash can eat \r inside `` if the user requested igncr.
18032# But we know of no other shell where ac_cr would be empty at this
18033# point, so we can use a bashism as a fallback.
18034if test "x$ac_cr" = x; then
18035 eval ac_cr=\$\'\\r\'
18036fi
18037ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18038if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018039 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018040else
18041 ac_cs_awk_cr=$ac_cr
18042fi
18043
Victor Stinnere0be4232011-10-25 13:06:09 +020018044echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018045_ACEOF
18046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018047
Matthias Kloseb9621712010-04-24 17:59:49 +000018048{
18049 echo "cat >conf$$subs.awk <<_ACEOF" &&
18050 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18051 echo "_ACEOF"
18052} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018053 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18054ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055ac_delim='%!_!# '
18056for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018057 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018058 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059
Matthias Kloseb9621712010-04-24 17:59:49 +000018060 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18061 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018062 break
18063 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018064 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065 else
18066 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018067 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018068done
Matthias Kloseb9621712010-04-24 17:59:49 +000018069rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018070
Matthias Kloseb9621712010-04-24 17:59:49 +000018071cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018072cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018074sed -n '
18075h
18076s/^/S["/; s/!.*/"]=/
18077p
18078g
18079s/^[^!]*!//
18080:repl
18081t repl
18082s/'"$ac_delim"'$//
18083t delim
18084:nl
18085h
18086s/\(.\{148\}\)..*/\1/
18087t more1
18088s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18089p
18090n
18091b repl
18092:more1
18093s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18094p
18095g
18096s/.\{148\}//
18097t nl
18098:delim
18099h
18100s/\(.\{148\}\)..*/\1/
18101t more2
18102s/["\\]/\\&/g; s/^/"/; s/$/"/
18103p
18104b
18105:more2
18106s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18107p
18108g
18109s/.\{148\}//
18110t delim
18111' <conf$$subs.awk | sed '
18112/^[^""]/{
18113 N
18114 s/\n//
18115}
18116' >>$CONFIG_STATUS || ac_write_fail=1
18117rm -f conf$$subs.awk
18118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18119_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018120cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018121 for (key in S) S_is_set[key] = 1
18122 FS = ""
18123
18124}
18125{
18126 line = $ 0
18127 nfields = split(line, field, "@")
18128 substed = 0
18129 len = length(field[1])
18130 for (i = 2; i < nfields; i++) {
18131 key = field[i]
18132 keylen = length(key)
18133 if (S_is_set[key]) {
18134 value = S[key]
18135 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18136 len += length(value) + length(field[++i])
18137 substed = 1
18138 } else
18139 len += 1 + keylen
18140 }
18141
18142 print line
18143}
18144
18145_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018147cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18148if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18149 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18150else
18151 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018152fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018153 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018154_ACEOF
18155
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018156# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18157# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158# trailing colons and then remove the whole line if VPATH becomes empty
18159# (actually we leave an empty line to preserve line numbers).
18160if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018161 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18162h
18163s///
18164s/^/:/
18165s/[ ]*$/:/
18166s/:\$(srcdir):/:/g
18167s/:\${srcdir}:/:/g
18168s/:@srcdir@:/:/g
18169s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018171x
18172s/\(=[ ]*\).*/\1/
18173G
18174s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018175s/^[^=]*=[ ]*$//
18176}'
18177fi
18178
Matthias Kloseb9621712010-04-24 17:59:49 +000018179cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018180fi # test -n "$CONFIG_FILES"
18181
Matthias Kloseb9621712010-04-24 17:59:49 +000018182# Set up the scripts for CONFIG_HEADERS section.
18183# No need to generate them if there are no CONFIG_HEADERS.
18184# This happens for instance with `./config.status Makefile'.
18185if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018186cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018187BEGIN {
18188_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018189
Matthias Kloseb9621712010-04-24 17:59:49 +000018190# Transform confdefs.h into an awk script `defines.awk', embedded as
18191# here-document in config.status, that substitutes the proper values into
18192# config.h.in to produce config.h.
18193
18194# Create a delimiter string that does not exist in confdefs.h, to ease
18195# handling of long lines.
18196ac_delim='%!_!# '
18197for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018198 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18199 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018200 break
18201 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018202 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018203 else
18204 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18205 fi
18206done
18207
18208# For the awk script, D is an array of macro values keyed by name,
18209# likewise P contains macro parameters if any. Preserve backslash
18210# newline sequences.
18211
18212ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18213sed -n '
18214s/.\{148\}/&'"$ac_delim"'/g
18215t rset
18216:rset
18217s/^[ ]*#[ ]*define[ ][ ]*/ /
18218t def
18219d
18220:def
18221s/\\$//
18222t bsnl
18223s/["\\]/\\&/g
18224s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18225D["\1"]=" \3"/p
18226s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18227d
18228:bsnl
18229s/["\\]/\\&/g
18230s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18231D["\1"]=" \3\\\\\\n"\\/p
18232t cont
18233s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18234t cont
18235d
18236:cont
18237n
18238s/.\{148\}/&'"$ac_delim"'/g
18239t clear
18240:clear
18241s/\\$//
18242t bsnlc
18243s/["\\]/\\&/g; s/^/"/; s/$/"/p
18244d
18245:bsnlc
18246s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18247b cont
18248' <confdefs.h | sed '
18249s/'"$ac_delim"'/"\\\
18250"/g' >>$CONFIG_STATUS || ac_write_fail=1
18251
18252cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18253 for (key in D) D_is_set[key] = 1
18254 FS = ""
18255}
18256/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18257 line = \$ 0
18258 split(line, arg, " ")
18259 if (arg[1] == "#") {
18260 defundef = arg[2]
18261 mac1 = arg[3]
18262 } else {
18263 defundef = substr(arg[1], 2)
18264 mac1 = arg[2]
18265 }
18266 split(mac1, mac2, "(") #)
18267 macro = mac2[1]
18268 prefix = substr(line, 1, index(line, defundef) - 1)
18269 if (D_is_set[macro]) {
18270 # Preserve the white space surrounding the "#".
18271 print prefix "define", macro P[macro] D[macro]
18272 next
18273 } else {
18274 # Replace #undef with comments. This is necessary, for example,
18275 # in the case of _POSIX_SOURCE, which is predefined and required
18276 # on some systems where configure will not decide to define it.
18277 if (defundef == "undef") {
18278 print "/*", prefix defundef, macro, "*/"
18279 next
18280 }
18281 }
18282}
18283{ print }
18284_ACAWK
18285_ACEOF
18286cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018287 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018288fi # test -n "$CONFIG_HEADERS"
18289
18290
18291eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18292shift
18293for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294do
18295 case $ac_tag in
18296 :[FHLC]) ac_mode=$ac_tag; continue;;
18297 esac
18298 case $ac_mode$ac_tag in
18299 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018300 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018301 :[FH]-) ac_tag=-:-;;
18302 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18303 esac
18304 ac_save_IFS=$IFS
18305 IFS=:
18306 set x $ac_tag
18307 IFS=$ac_save_IFS
18308 shift
18309 ac_file=$1
18310 shift
18311
18312 case $ac_mode in
18313 :L) ac_source=$1;;
18314 :[FH])
18315 ac_file_inputs=
18316 for ac_f
18317 do
18318 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018319 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018320 *) # Look for the file first in the build tree, then in the source tree
18321 # (if the path is not absolute). The absolute path cannot be DOS-style,
18322 # because $ac_f cannot contain `:'.
18323 test -f "$ac_f" ||
18324 case $ac_f in
18325 [\\/$]*) false;;
18326 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18327 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018328 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018329 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018330 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18331 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332 done
18333
18334 # Let's still pretend it is `configure' which instantiates (i.e., don't
18335 # use $as_me), people would be surprised to read:
18336 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018337 configure_input='Generated from '`
18338 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18339 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340 if test x"$ac_file" != x-; then
18341 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018342 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18343$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018345 # Neutralize special characters interpreted by sed in replacement strings.
18346 case $configure_input in #(
18347 *\&* | *\|* | *\\* )
18348 ac_sed_conf_input=`$as_echo "$configure_input" |
18349 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18350 *) ac_sed_conf_input=$configure_input;;
18351 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352
18353 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018354 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18355 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018356 esac
18357 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018358 esac
18359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018361$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018362 X"$ac_file" : 'X\(//\)[^/]' \| \
18363 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018365$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18367 s//\1/
18368 q
18369 }
18370 /^X\(\/\/\)[^/].*/{
18371 s//\1/
18372 q
18373 }
18374 /^X\(\/\/\)$/{
18375 s//\1/
18376 q
18377 }
18378 /^X\(\/\).*/{
18379 s//\1/
18380 q
18381 }
18382 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018383 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 ac_builddir=.
18385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386case "$ac_dir" in
18387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18388*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018389 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018391 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018392 case $ac_top_builddir_sub in
18393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18395 esac ;;
18396esac
18397ac_abs_top_builddir=$ac_pwd
18398ac_abs_builddir=$ac_pwd$ac_dir_suffix
18399# for backward compatibility:
18400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018401
18402case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018404 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 ac_top_srcdir=$ac_top_builddir_sub
18406 ac_abs_top_srcdir=$ac_pwd ;;
18407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 ac_top_srcdir=$srcdir
18410 ac_abs_top_srcdir=$srcdir ;;
18411 *) # Relative name.
18412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18413 ac_top_srcdir=$ac_top_build_prefix$srcdir
18414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018415esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018417
Martin v. Löwis11437992002-04-12 09:54:03 +000018418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018419 case $ac_mode in
18420 :F)
18421 #
18422 # CONFIG_FILE
18423 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018424
18425 case $INSTALL in
18426 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018429 ac_MKDIR_P=$MKDIR_P
18430 case $MKDIR_P in
18431 [\\/$]* | ?:[\\/]* ) ;;
18432 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18433 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018434_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435
Matthias Kloseb9621712010-04-24 17:59:49 +000018436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437# If the template does not know about datarootdir, expand it.
18438# FIXME: This hack should be removed a few years after 2.60.
18439ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018440ac_sed_dataroot='
18441/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018442 p
18443 q
18444}
18445/@datadir@/p
18446/@docdir@/p
18447/@infodir@/p
18448/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018449/@mandir@/p'
18450case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451*datarootdir*) ac_datarootdir_seen=yes;;
18452*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018453 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18454$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018457 ac_datarootdir_hack='
18458 s&@datadir@&$datadir&g
18459 s&@docdir@&$docdir&g
18460 s&@infodir@&$infodir&g
18461 s&@localedir@&$localedir&g
18462 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018463 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464esac
18465_ACEOF
18466
18467# Neutralize VPATH when `$srcdir' = `.'.
18468# Shell code in configure.ac might set extrasub.
18469# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018470cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18471ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018472$extrasub
18473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018474cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018475:t
18476/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018477s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018478s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018479s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480s&@srcdir@&$ac_srcdir&;t t
18481s&@abs_srcdir@&$ac_abs_srcdir&;t t
18482s&@top_srcdir@&$ac_top_srcdir&;t t
18483s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18484s&@builddir@&$ac_builddir&;t t
18485s&@abs_builddir@&$ac_abs_builddir&;t t
18486s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18487s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018488s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018489$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018490"
Victor Stinnere0be4232011-10-25 13:06:09 +020018491eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18492 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018495 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18496 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18497 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018499which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018500$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018501which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018502
Victor Stinnere0be4232011-10-25 13:06:09 +020018503 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018504 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018505 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18506 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018507 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018508 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509 ;;
18510 :H)
18511 #
18512 # CONFIG_HEADER
18513 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018514 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018515 {
18516 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018517 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18518 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018519 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018520 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018521 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18522$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018524 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018525 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018526 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 fi
18528 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018529 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018530 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018531 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018534
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018535
18536 esac
18537
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018538
18539 case $ac_file$ac_mode in
18540 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18541
18542 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543done # for ac_tag
18544
Guido van Rossum627b2d71993-12-24 10:39:16 +000018545
Matthias Kloseb9621712010-04-24 17:59:49 +000018546as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018547_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018548ac_clean_files=$ac_clean_files_save
18549
Matthias Kloseb9621712010-04-24 17:59:49 +000018550test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018551 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018552
Martin v. Löwis11437992002-04-12 09:54:03 +000018553
18554# configure is writing to config.log, and then calls config.status.
18555# config.status does its own redirection, appending to config.log.
18556# Unfortunately, on DOS this fails, as config.log is still kept open
18557# by configure, so config.status won't be able to write to it; its
18558# output is simply discarded. So we exec the FD to /dev/null,
18559# effectively closing config.log, so it can be properly (re)opened and
18560# appended to by config.status. When coming back to configure, we
18561# need to make the FD available again.
18562if test "$no_create" != yes; then
18563 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018564 ac_config_status_args=
18565 test "$silent" = yes &&
18566 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018567 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018568 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 exec 5>>config.log
18570 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18571 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018572 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018573fi
18574if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18576$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018577fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018578
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018579
Christian Heimes75ed8902013-11-20 01:11:18 +010018580echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018581if test ! -f Modules/Setup.local
18582then
18583 echo "# Edit this file for local setup changes" >Modules/Setup.local
18584fi
18585
Christian Heimes75ed8902013-11-20 01:11:18 +010018586echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018587$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018588 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018589 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018590mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018591
18592if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18593 echo "" >&6
18594 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018595 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 +000018596 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018597 echo "" >&6
18598 echo "" >&6
18599fi
18600