blob: ebd9f904b09afb6c803159a598ee579f73ced156 [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
William Grzybowski23e65b22018-09-07 09:06:15 -0300786runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000787localstatedir
788sharedstatedir
789sysconfdir
790datadir
791datarootdir
792libexecdir
793sbindir
794bindir
795program_transform_name
796prefix
797exec_prefix
798PACKAGE_URL
799PACKAGE_BUGREPORT
800PACKAGE_STRING
801PACKAGE_VERSION
802PACKAGE_TARNAME
803PACKAGE_NAME
804PATH_SEPARATOR
805SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000806ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000807ac_user_opts='
808enable_option_checking
809enable_universalsdk
810with_universal_archs
811with_framework_name
812enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_cxx_main
814with_suffix
815enable_shared
816enable_profiling
817with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
William Grzybowski23e65b22018-09-07 09:06:15 -0300898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
William Grzybowski23e65b22018-09-07 09:06:15 -03001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
William Grzybowski23e65b22018-09-07 09:06:15 -03001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001410\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
William Grzybowski23e65b22018-09-07 09:06:15 -03001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001477 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001491 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1492 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001505 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1506 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001507 --with-framework-name=FRAMEWORK
1508 specify an alternate name of the framework built
1509 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001510 --with-cxx-main=<compiler>
1511 compile main() and link python executable with C++
1512 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-suffix=.exe set executable suffix
1514 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001515 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001516 --with-lto Enable Link Time Optimization in any build. Disabled
1517 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001521 enable AddressSanitizer (asan)
1522 --with-memory-sanitizer enable MemorySanitizer (msan)
1523 --with-undefined-behavior-sanitizer
1524 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001526 --with-system-expat build pyexpat module using an installed expat
1527 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001528 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001529 --with-system-libmpdec build _decimal module using an installed libmpdec
1530 library
Ned Deilyd819b932013-09-06 01:07:05 -07001531 --with-tcltk-includes='-I...'
1532 override search for Tcl and Tk include files
1533 --with-tcltk-libs='-L...'
1534 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001535 --with-dbmliborder=db1:db2:...
1536 order to check db backends for dbm. Valid value is a
1537 colon separated string with the backend names
1538 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001539 --with(out)-doc-strings disable/enable documentation strings
1540 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001541 --with(out)-c-locale-coercion
1542 disable/enable C locale coercion to a UTF-8 based
1543 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001544 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001545 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001546 --with-libm=STRING math library
1547 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001548 --with(out)-computed-gotos
1549 Use computed gotos in evaluation loop (enabled by
1550 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001551 --with(out)-ensurepip=[=upgrade]
1552 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001553 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001554 --with-ssl-default-suites=[python|openssl|STRING]
1555 Override default cipher suites string, python: use
1556 Python's preferred selection (default), openssl:
1557 leave OpenSSL's defaults untouched, STRING: use a
1558 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001561 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CC C compiler command
1563 CFLAGS C compiler flags
1564 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1565 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001570 PKG_CONFIG path to pkg-config utility
1571 PKG_CONFIG_PATH
1572 directories to add to pkg-config's search path
1573 PKG_CONFIG_LIBDIR
1574 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001575
1576Use these variables to override the choices made by `configure' or to help
1577it to find libraries and programs with nonstandard names/locations.
1578
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001579Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001582fi
1583
1584if test "$ac_init_help" = "recursive"; then
1585 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 test -d "$ac_dir" ||
1588 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1589 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001590 ac_builddir=.
1591
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592case "$ac_dir" in
1593.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1594*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001595 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001597 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 case $ac_top_builddir_sub in
1599 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1600 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1601 esac ;;
1602esac
1603ac_abs_top_builddir=$ac_pwd
1604ac_abs_builddir=$ac_pwd$ac_dir_suffix
1605# for backward compatibility:
1606ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001607
1608case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 ac_top_srcdir=$ac_top_builddir_sub
1612 ac_abs_top_srcdir=$ac_pwd ;;
1613 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615 ac_top_srcdir=$srcdir
1616 ac_abs_top_srcdir=$srcdir ;;
1617 *) # Relative name.
1618 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1619 ac_top_srcdir=$ac_top_build_prefix$srcdir
1620 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001621esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 cd "$ac_dir" || { ac_status=$?; continue; }
1625 # Check for guested configure.
1626 if test -f "$ac_srcdir/configure.gnu"; then
1627 echo &&
1628 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1629 elif test -f "$ac_srcdir/configure"; then
1630 echo &&
1631 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001633 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001634 fi || ac_status=$?
1635 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001636 done
1637fi
1638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001639test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001640if $ac_init_version; then
1641 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001642python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001643generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001644
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001645Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001646This configure script is free software; the Free Software Foundation
1647gives unlimited permission to copy, distribute and modify it.
1648_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001649 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001651
1652## ------------------------ ##
1653## Autoconf initialization. ##
1654## ------------------------ ##
1655
1656# ac_fn_c_try_compile LINENO
1657# --------------------------
1658# Try to compile conftest.$ac_ext, and return whether this succeeded.
1659ac_fn_c_try_compile ()
1660{
1661 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1662 rm -f conftest.$ac_objext
1663 if { { ac_try="$ac_compile"
1664case "(($ac_try" in
1665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666 *) ac_try_echo=$ac_try;;
1667esac
1668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669$as_echo "$ac_try_echo"; } >&5
1670 (eval "$ac_compile") 2>conftest.err
1671 ac_status=$?
1672 if test -s conftest.err; then
1673 grep -v '^ *+' conftest.err >conftest.er1
1674 cat conftest.er1 >&5
1675 mv -f conftest.er1 conftest.err
1676 fi
1677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678 test $ac_status = 0; } && {
1679 test -z "$ac_c_werror_flag" ||
1680 test ! -s conftest.err
1681 } && test -s conftest.$ac_objext; then :
1682 ac_retval=0
1683else
1684 $as_echo "$as_me: failed program was:" >&5
1685sed 's/^/| /' conftest.$ac_ext >&5
1686
1687 ac_retval=1
1688fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001689 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001690 as_fn_set_status $ac_retval
1691
1692} # ac_fn_c_try_compile
1693
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001694# ac_fn_c_try_cpp LINENO
1695# ----------------------
1696# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1697ac_fn_c_try_cpp ()
1698{
1699 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1700 if { { ac_try="$ac_cpp conftest.$ac_ext"
1701case "(($ac_try" in
1702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1703 *) ac_try_echo=$ac_try;;
1704esac
1705eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1706$as_echo "$ac_try_echo"; } >&5
1707 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1708 ac_status=$?
1709 if test -s conftest.err; then
1710 grep -v '^ *+' conftest.err >conftest.er1
1711 cat conftest.er1 >&5
1712 mv -f conftest.er1 conftest.err
1713 fi
1714 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1715 test $ac_status = 0; } > conftest.i && {
1716 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1717 test ! -s conftest.err
1718 }; then :
1719 ac_retval=0
1720else
1721 $as_echo "$as_me: failed program was:" >&5
1722sed 's/^/| /' conftest.$ac_ext >&5
1723
1724 ac_retval=1
1725fi
1726 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1727 as_fn_set_status $ac_retval
1728
1729} # ac_fn_c_try_cpp
1730
Matthias Kloseb9621712010-04-24 17:59:49 +00001731# ac_fn_c_try_link LINENO
1732# -----------------------
1733# Try to link conftest.$ac_ext, and return whether this succeeded.
1734ac_fn_c_try_link ()
1735{
1736 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1737 rm -f conftest.$ac_objext conftest$ac_exeext
1738 if { { ac_try="$ac_link"
1739case "(($ac_try" in
1740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1741 *) ac_try_echo=$ac_try;;
1742esac
1743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1744$as_echo "$ac_try_echo"; } >&5
1745 (eval "$ac_link") 2>conftest.err
1746 ac_status=$?
1747 if test -s conftest.err; then
1748 grep -v '^ *+' conftest.err >conftest.er1
1749 cat conftest.er1 >&5
1750 mv -f conftest.er1 conftest.err
1751 fi
1752 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1753 test $ac_status = 0; } && {
1754 test -z "$ac_c_werror_flag" ||
1755 test ! -s conftest.err
1756 } && test -s conftest$ac_exeext && {
1757 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001758 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 }; then :
1760 ac_retval=0
1761else
1762 $as_echo "$as_me: failed program was:" >&5
1763sed 's/^/| /' conftest.$ac_ext >&5
1764
1765 ac_retval=1
1766fi
1767 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1768 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1769 # interfere with the next link command; also delete a directory that is
1770 # left behind by Apple's compiler. We do this before executing the actions.
1771 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 as_fn_set_status $ac_retval
1774
1775} # ac_fn_c_try_link
1776
Matthias Kloseb9621712010-04-24 17:59:49 +00001777# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1778# -------------------------------------------------------
1779# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1780# the include files in INCLUDES and setting the cache variable VAR
1781# accordingly.
1782ac_fn_c_check_header_mongrel ()
1783{
1784 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001785 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001788if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 $as_echo_n "(cached) " >&6
1790fi
1791eval ac_res=\$$3
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793$as_echo "$ac_res" >&6; }
1794else
1795 # Is the header compilable?
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1797$as_echo_n "checking $2 usability... " >&6; }
1798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1799/* end confdefs.h. */
1800$4
1801#include <$2>
1802_ACEOF
1803if ac_fn_c_try_compile "$LINENO"; then :
1804 ac_header_compiler=yes
1805else
1806 ac_header_compiler=no
1807fi
1808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1810$as_echo "$ac_header_compiler" >&6; }
1811
1812# Is the header present?
1813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1814$as_echo_n "checking $2 presence... " >&6; }
1815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1816/* end confdefs.h. */
1817#include <$2>
1818_ACEOF
1819if ac_fn_c_try_cpp "$LINENO"; then :
1820 ac_header_preproc=yes
1821else
1822 ac_header_preproc=no
1823fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001824rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1826$as_echo "$ac_header_preproc" >&6; }
1827
1828# So? What about this header?
1829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1830 yes:no: )
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1832$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1835 ;;
1836 no:yes:* )
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1838$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1839 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1840$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1842$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1844$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1846$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001847( $as_echo "## --------------------------------------- ##
1848## Report this to https://bugs.python.org/ ##
1849## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001850 ) | sed "s/^/$as_me: WARNING: /" >&2
1851 ;;
1852esac
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1854$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001855if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001856 $as_echo_n "(cached) " >&6
1857else
1858 eval "$3=\$ac_header_compiler"
1859fi
1860eval ac_res=\$$3
1861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1862$as_echo "$ac_res" >&6; }
1863fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001865
1866} # ac_fn_c_check_header_mongrel
1867
1868# ac_fn_c_try_run LINENO
1869# ----------------------
1870# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1871# that executables *can* be run.
1872ac_fn_c_try_run ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_link"
1876case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_link") 2>&5
1883 ac_status=$?
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1886 { { case "(($ac_try" in
1887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888 *) ac_try_echo=$ac_try;;
1889esac
1890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891$as_echo "$ac_try_echo"; } >&5
1892 (eval "$ac_try") 2>&5
1893 ac_status=$?
1894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1895 test $ac_status = 0; }; }; then :
1896 ac_retval=0
1897else
1898 $as_echo "$as_me: program exited with status $ac_status" >&5
1899 $as_echo "$as_me: failed program was:" >&5
1900sed 's/^/| /' conftest.$ac_ext >&5
1901
1902 ac_retval=$ac_status
1903fi
1904 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001906 as_fn_set_status $ac_retval
1907
1908} # ac_fn_c_try_run
1909
1910# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1911# -------------------------------------------------------
1912# Tests whether HEADER exists and can be compiled using the include files in
1913# INCLUDES, setting the cache variable VAR accordingly.
1914ac_fn_c_check_header_compile ()
1915{
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001920 $as_echo_n "(cached) " >&6
1921else
1922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1923/* end confdefs.h. */
1924$4
1925#include <$2>
1926_ACEOF
1927if ac_fn_c_try_compile "$LINENO"; then :
1928 eval "$3=yes"
1929else
1930 eval "$3=no"
1931fi
1932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1933fi
1934eval ac_res=\$$3
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1936$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001938
1939} # ac_fn_c_check_header_compile
1940
Matthias Kloseb9621712010-04-24 17:59:49 +00001941# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1942# -------------------------------------------
1943# Tests whether TYPE exists after having included INCLUDES, setting cache
1944# variable VAR accordingly.
1945ac_fn_c_check_type ()
1946{
1947 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1949$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001950if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001951 $as_echo_n "(cached) " >&6
1952else
1953 eval "$3=no"
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof ($2))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1968/* end confdefs.h. */
1969$4
1970int
1971main ()
1972{
1973if (sizeof (($2)))
1974 return 0;
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980
1981else
1982 eval "$3=yes"
1983fi
1984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1985fi
1986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1987fi
1988eval ac_res=\$$3
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1990$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993} # ac_fn_c_check_type
1994
Matthias Kloseb9621712010-04-24 17:59:49 +00001995# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1996# --------------------------------------------
1997# Tries to find the compile-time value of EXPR in a program that includes
1998# INCLUDES, setting VAR accordingly. Returns whether the value could be
1999# computed
2000ac_fn_c_compute_int ()
2001{
2002 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2003 if test "$cross_compiling" = yes; then
2004 # Depending upon the size, compute the lo and hi bounds.
2005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$4
2008int
2009main ()
2010{
2011static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002012test_array [0] = 0;
2013return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002014
2015 ;
2016 return 0;
2017}
2018_ACEOF
2019if ac_fn_c_try_compile "$LINENO"; then :
2020 ac_lo=0 ac_mid=0
2021 while :; do
2022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023/* end confdefs.h. */
2024$4
2025int
2026main ()
2027{
2028static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002029test_array [0] = 0;
2030return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002031
2032 ;
2033 return 0;
2034}
2035_ACEOF
2036if ac_fn_c_try_compile "$LINENO"; then :
2037 ac_hi=$ac_mid; break
2038else
2039 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2040 if test $ac_lo -le $ac_mid; then
2041 ac_lo= ac_hi=
2042 break
2043 fi
2044 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2045fi
2046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2047 done
2048else
2049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050/* end confdefs.h. */
2051$4
2052int
2053main ()
2054{
2055static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_hi=-1 ac_mid=-1
2065 while :; do
2066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=$ac_mid; break
2082else
2083 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2084 if test $ac_mid -le $ac_hi; then
2085 ac_lo= ac_hi=
2086 break
2087 fi
2088 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091 done
2092else
2093 ac_lo= ac_hi=
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098# Binary search between lo and hi bounds.
2099while test "x$ac_lo" != "x$ac_hi"; do
2100 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2102/* end confdefs.h. */
2103$4
2104int
2105main ()
2106{
2107static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002108test_array [0] = 0;
2109return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002110
2111 ;
2112 return 0;
2113}
2114_ACEOF
2115if ac_fn_c_try_compile "$LINENO"; then :
2116 ac_hi=$ac_mid
2117else
2118 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121done
2122case $ac_lo in #((
2123?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2124'') ac_retval=1 ;;
2125esac
2126 else
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130static long int longval () { return $2; }
2131static unsigned long int ulongval () { return $2; }
2132#include <stdio.h>
2133#include <stdlib.h>
2134int
2135main ()
2136{
2137
2138 FILE *f = fopen ("conftest.val", "w");
2139 if (! f)
2140 return 1;
2141 if (($2) < 0)
2142 {
2143 long int i = longval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%ld", i);
2147 }
2148 else
2149 {
2150 unsigned long int i = ulongval ();
2151 if (i != ($2))
2152 return 1;
2153 fprintf (f, "%lu", i);
2154 }
2155 /* Do not output a trailing newline, as this causes \r\n confusion
2156 on some platforms. */
2157 return ferror (f) || fclose (f) != 0;
2158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_run "$LINENO"; then :
2164 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2165else
2166 ac_retval=1
2167fi
2168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2169 conftest.$ac_objext conftest.beam conftest.$ac_ext
2170rm -f conftest.val
2171
2172 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002173 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 as_fn_set_status $ac_retval
2175
2176} # ac_fn_c_compute_int
2177
2178# ac_fn_c_check_func LINENO FUNC VAR
2179# ----------------------------------
2180# Tests whether FUNC exists, setting the cache variable VAR accordingly
2181ac_fn_c_check_func ()
2182{
2183 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2185$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002186if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002187 $as_echo_n "(cached) " >&6
2188else
2189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2190/* end confdefs.h. */
2191/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2193#define $2 innocuous_$2
2194
2195/* System header to define __stub macros and hopefully few prototypes,
2196 which can conflict with char $2 (); below.
2197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2198 <limits.h> exists even on freestanding compilers. */
2199
2200#ifdef __STDC__
2201# include <limits.h>
2202#else
2203# include <assert.h>
2204#endif
2205
2206#undef $2
2207
2208/* Override any GCC internal prototype to avoid an error.
2209 Use char because int might match the return type of a GCC
2210 builtin and then its argument prototype would still apply. */
2211#ifdef __cplusplus
2212extern "C"
2213#endif
2214char $2 ();
2215/* The GNU C library defines this for functions which it implements
2216 to always fail with ENOSYS. Some functions are actually named
2217 something starting with __ and the normal name is an alias. */
2218#if defined __stub_$2 || defined __stub___$2
2219choke me
2220#endif
2221
2222int
2223main ()
2224{
2225return $2 ();
2226 ;
2227 return 0;
2228}
2229_ACEOF
2230if ac_fn_c_try_link "$LINENO"; then :
2231 eval "$3=yes"
2232else
2233 eval "$3=no"
2234fi
2235rm -f core conftest.err conftest.$ac_objext \
2236 conftest$ac_exeext conftest.$ac_ext
2237fi
2238eval ac_res=\$$3
2239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2240$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002241 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002242
2243} # ac_fn_c_check_func
2244
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002245# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2246# ---------------------------------------------
2247# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2248# accordingly.
2249ac_fn_c_check_decl ()
2250{
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 as_decl_name=`echo $2|sed 's/ *(.*//'`
2253 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2255$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2256if eval \${$3+:} false; then :
2257 $as_echo_n "(cached) " >&6
2258else
2259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2260/* end confdefs.h. */
2261$4
2262int
2263main ()
2264{
2265#ifndef $as_decl_name
2266#ifdef __cplusplus
2267 (void) $as_decl_use;
2268#else
2269 (void) $as_decl_name;
2270#endif
2271#endif
2272
2273 ;
2274 return 0;
2275}
2276_ACEOF
2277if ac_fn_c_try_compile "$LINENO"; then :
2278 eval "$3=yes"
2279else
2280 eval "$3=no"
2281fi
2282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2283fi
2284eval ac_res=\$$3
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2286$as_echo "$ac_res" >&6; }
2287 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2288
2289} # ac_fn_c_check_decl
2290
Matthias Kloseb9621712010-04-24 17:59:49 +00002291# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2292# ----------------------------------------------------
2293# Tries to find if the field MEMBER exists in type AGGR, after including
2294# INCLUDES, setting cache variable VAR accordingly.
2295ac_fn_c_check_member ()
2296{
2297 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2299$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002300if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002301 $as_echo_n "(cached) " >&6
2302else
2303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2304/* end confdefs.h. */
2305$5
2306int
2307main ()
2308{
2309static $2 ac_aggr;
2310if (ac_aggr.$3)
2311return 0;
2312 ;
2313 return 0;
2314}
2315_ACEOF
2316if ac_fn_c_try_compile "$LINENO"; then :
2317 eval "$4=yes"
2318else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320/* end confdefs.h. */
2321$5
2322int
2323main ()
2324{
2325static $2 ac_aggr;
2326if (sizeof ac_aggr.$3)
2327return 0;
2328 ;
2329 return 0;
2330}
2331_ACEOF
2332if ac_fn_c_try_compile "$LINENO"; then :
2333 eval "$4=yes"
2334else
2335 eval "$4=no"
2336fi
2337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2338fi
2339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340fi
2341eval ac_res=\$$4
2342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2343$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002344 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002345
2346} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002348This file contains any messages produced by compilers while
2349running configure, to aid debugging if configure makes a mistake.
2350
Ned Deily5489bda2018-01-31 17:44:09 -05002351It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002352generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002353
2354 $ $0 $@
2355
2356_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002357exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002358{
2359cat <<_ASUNAME
2360## --------- ##
2361## Platform. ##
2362## --------- ##
2363
2364hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2365uname -m = `(uname -m) 2>/dev/null || echo unknown`
2366uname -r = `(uname -r) 2>/dev/null || echo unknown`
2367uname -s = `(uname -s) 2>/dev/null || echo unknown`
2368uname -v = `(uname -v) 2>/dev/null || echo unknown`
2369
2370/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2371/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2372
2373/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2374/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2375/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002376/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002377/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2378/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2379/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2380
2381_ASUNAME
2382
2383as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2384for as_dir in $PATH
2385do
2386 IFS=$as_save_IFS
2387 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002388 $as_echo "PATH: $as_dir"
2389 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002390IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002391
2392} >&5
2393
2394cat >&5 <<_ACEOF
2395
2396
2397## ----------- ##
2398## Core tests. ##
2399## ----------- ##
2400
2401_ACEOF
2402
2403
2404# Keep a trace of the command line.
2405# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002407# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002408# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002409ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002410ac_configure_args0=
2411ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002412ac_must_keep_next=false
2413for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002414do
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 for ac_arg
2416 do
2417 case $ac_arg in
2418 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2419 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2420 | -silent | --silent | --silen | --sile | --sil)
2421 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002422 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002423 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 esac
2425 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002426 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002427 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002428 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002429 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002430 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002432 case $ac_arg in
2433 *=* | --config-cache | -C | -disable-* | --disable-* \
2434 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2435 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2436 | -with-* | --with-* | -without-* | --without-* | --x)
2437 case "$ac_configure_args0 " in
2438 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2439 esac
2440 ;;
2441 -* ) ac_must_keep_next=true ;;
2442 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002443 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002444 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002445 ;;
2446 esac
2447 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002448done
Matthias Kloseb9621712010-04-24 17:59:49 +00002449{ ac_configure_args0=; unset ac_configure_args0;}
2450{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002451
2452# When interrupted or exit'd, cleanup temporary files, and complete
2453# config.log. We remove comments because anyway the quotes in there
2454# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455# WARNING: Use '\'' to represent an apostrophe within the trap.
2456# 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 +00002457trap 'exit_status=$?
2458 # Save into config.log some information that might help in debugging.
2459 {
2460 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002461
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002462 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002463## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002464## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 echo
2466 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467(
2468 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2469 eval ac_val=\$$ac_var
2470 case $ac_val in #(
2471 *${as_nl}*)
2472 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2474$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 esac
2476 case $ac_var in #(
2477 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2479 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac ;;
2481 esac
2482 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2485 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487 "s/'\''/'\''\\\\'\'''\''/g;
2488 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2489 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002490 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002493 esac |
2494 sort
2495)
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002497
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002498 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002499## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 echo
2502 for ac_var in $ac_subst_vars
2503 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504 eval ac_val=\$$ac_var
2505 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002506 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 done | sort
2510 echo
2511
2512 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002513 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 echo
2517 for ac_var in $ac_subst_files
2518 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002519 eval ac_val=\$$ac_var
2520 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 done | sort
2525 echo
2526 fi
2527
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002529 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002530## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002531## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 echo
2535 fi
2536 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 $as_echo "$as_me: caught signal $ac_signal"
2538 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 rm -f core *.core core.conftest.* &&
2541 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002544for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002546done
2547ac_signal=0
2548
2549# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
Matthias Kloseb9621712010-04-24 17:59:49 +00002552$as_echo "/* confdefs.h */" > confdefs.h
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554# Predefined preprocessor variables.
2555
2556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_NAME "$PACKAGE_NAME"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_VERSION "$PACKAGE_VERSION"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_STRING "$PACKAGE_STRING"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572cat >>confdefs.h <<_ACEOF
2573#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2574_ACEOF
2575
Matthias Kloseb9621712010-04-24 17:59:49 +00002576cat >>confdefs.h <<_ACEOF
2577#define PACKAGE_URL "$PACKAGE_URL"
2578_ACEOF
2579
Martin v. Löwis11437992002-04-12 09:54:03 +00002580
2581# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002582# Prefer an explicitly selected file to automatically selected ones.
2583ac_site_file1=NONE
2584ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002586 # We do not want a PATH search for config.site.
2587 case $CONFIG_SITE in #((
2588 -*) ac_site_file1=./$CONFIG_SITE;;
2589 */*) ac_site_file1=$CONFIG_SITE;;
2590 *) ac_site_file1=./$CONFIG_SITE;;
2591 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 ac_site_file1=$prefix/share/config.site
2594 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595else
Matthias Kloseb9621712010-04-24 17:59:49 +00002596 ac_site_file1=$ac_default_prefix/share/config.site
2597 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002599for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600do
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 test "x$ac_site_file" = xNONE && continue
2602 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2604$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002606 . "$ac_site_file" \
2607 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2609as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002610See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002611 fi
2612done
2613
2614if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002615 # Some versions of bash will fail to source /dev/null (special files
2616 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2617 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2619$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2622 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 esac
2624 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002625else
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2627$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 >$cache_file
2629fi
2630
2631# Check that the precious variables saved in the cache have kept the same
2632# value.
2633ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2636 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002637 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2638 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 case $ac_old_set,$ac_new_set in
2640 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2642$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 +00002643 ac_cache_corrupted=: ;;
2644 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2646$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_cache_corrupted=: ;;
2648 ,);;
2649 *)
2650 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 # differences in whitespace do not lead to failure.
2652 ac_old_val_w=`echo x $ac_old_val`
2653 ac_new_val_w=`echo x $ac_new_val`
2654 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2656$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2657 ac_cache_corrupted=:
2658 else
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2660$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2661 eval $ac_var=\$ac_old_val
2662 fi
2663 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2664$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2665 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2666$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 fi;;
2668 esac
2669 # Pass precious variables to config.status.
2670 if test "$ac_new_set" = set; then
2671 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 *) ac_arg=$ac_var=$ac_new_val ;;
2674 esac
2675 case " $ac_configure_args " in
2676 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002677 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 esac
2679 fi
2680done
2681if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002682 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2683$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2684 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2685$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002688## -------------------- ##
2689## Main body of script. ##
2690## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691
Guido van Rossum7f43da71994-08-01 12:15:30 +00002692ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002693ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002694ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2695ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2696ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002697
Guido van Rossum627b2d71993-12-24 10:39:16 +00002698
Michael W. Hudson54241132001-12-07 15:38:26 +00002699
Trent Nelson4d4ec652012-10-16 08:51:24 -04002700
Christian Heimesff5be6e2018-01-20 13:19:21 +01002701
2702
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002703if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002704 # If we're building out-of-tree, we need to make sure the following
2705 # resources get picked up before their $srcdir counterparts.
2706 # Objects/ -> typeslots.inc
2707 # Include/ -> Python-ast.h, graminit.h
2708 # Python/ -> importlib.h
2709 # (A side effect of this is that these resources will automatically be
2710 # regenerated when building out-of-tree, regardless of whether or not
2711 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2712 # off.)
2713 BASECPPFLAGS="-IObjects -IInclude -IPython"
2714else
2715 BASECPPFLAGS=""
2716fi
2717
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718
2719
2720
2721
Victor Stinner9ed34a82017-05-02 22:35:58 +02002722if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002724# Extract the first word of "git", so it can be a program name with args.
2725set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2727$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002728if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002729 $as_echo_n "(cached) " >&6
2730else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 if test -n "$HAS_GIT"; then
2732 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733else
2734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in $PATH
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746 done
2747IFS=$as_save_IFS
2748
Ned Deily5c4b0d02017-03-04 00:19:55 -05002749 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002750fi
2751fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002752HAS_GIT=$ac_cv_prog_HAS_GIT
2753if test -n "$HAS_GIT"; then
2754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2755$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756else
2757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2758$as_echo "no" >&6; }
2759fi
2760
2761
2762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002765if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766then
Xiang Zhang4c855572018-08-20 22:36:19 +08002767 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2768 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2769 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002770else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002771 GITVERSION=""
2772 GITTAG=""
2773 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774fi
2775
2776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002778
2779
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002780ac_aux_dir=
2781for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2782 if test -f "$ac_dir/install-sh"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/install-sh -c"
2785 break
2786 elif test -f "$ac_dir/install.sh"; then
2787 ac_aux_dir=$ac_dir
2788 ac_install_sh="$ac_aux_dir/install.sh -c"
2789 break
2790 elif test -f "$ac_dir/shtool"; then
2791 ac_aux_dir=$ac_dir
2792 ac_install_sh="$ac_aux_dir/shtool install -c"
2793 break
2794 fi
2795done
2796if test -z "$ac_aux_dir"; then
2797 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2798fi
2799
2800# These three variables are undocumented and unsupported,
2801# and are intended to be withdrawn in a future Autoconf release.
2802# They can cause serious problems if a builder's source tree is in a directory
2803# whose full name contains unusual characters.
2804ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2805ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2806ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2807
2808
2809# Make sure we can run config.sub.
2810$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2811 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2812
2813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2814$as_echo_n "checking build system type... " >&6; }
2815if ${ac_cv_build+:} false; then :
2816 $as_echo_n "(cached) " >&6
2817else
2818 ac_build_alias=$build_alias
2819test "x$ac_build_alias" = x &&
2820 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2821test "x$ac_build_alias" = x &&
2822 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2823ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2824 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2825
2826fi
2827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2828$as_echo "$ac_cv_build" >&6; }
2829case $ac_cv_build in
2830*-*-*) ;;
2831*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2832esac
2833build=$ac_cv_build
2834ac_save_IFS=$IFS; IFS='-'
2835set x $ac_cv_build
2836shift
2837build_cpu=$1
2838build_vendor=$2
2839shift; shift
2840# Remember, the first character of IFS is used to create $*,
2841# except with old shells:
2842build_os=$*
2843IFS=$ac_save_IFS
2844case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2845
2846
2847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2848$as_echo_n "checking host system type... " >&6; }
2849if ${ac_cv_host+:} false; then :
2850 $as_echo_n "(cached) " >&6
2851else
2852 if test "x$host_alias" = x; then
2853 ac_cv_host=$ac_cv_build
2854else
2855 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2856 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2857fi
2858
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2861$as_echo "$ac_cv_host" >&6; }
2862case $ac_cv_host in
2863*-*-*) ;;
2864*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2865esac
2866host=$ac_cv_host
2867ac_save_IFS=$IFS; IFS='-'
2868set x $ac_cv_host
2869shift
2870host_cpu=$1
2871host_vendor=$2
2872shift; shift
2873# Remember, the first character of IFS is used to create $*,
2874# except with old shells:
2875host_os=$*
2876IFS=$ac_save_IFS
2877case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2878
2879
2880
doko@python.orga10e4a92013-01-25 18:45:12 +01002881
2882
Ned Deilyfcbc2462014-08-22 13:32:49 -07002883# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2884rm -f pybuilddir.txt
2885
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002886for ac_prog in python$PACKAGE_VERSION python3 python
2887do
2888 # Extract the first word of "$ac_prog", so it can be a program name with args.
2889set dummy $ac_prog; ac_word=$2
2890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2891$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002892if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002893 $as_echo_n "(cached) " >&6
2894else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 if test -n "$PYTHON_FOR_REGEN"; then
2896 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002897else
2898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2899for as_dir in $PATH
2900do
2901 IFS=$as_save_IFS
2902 test -z "$as_dir" && as_dir=.
2903 for ac_exec_ext in '' $ac_executable_extensions; do
2904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2907 break 2
2908 fi
2909done
2910 done
2911IFS=$as_save_IFS
2912
2913fi
2914fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2916if test -n "$PYTHON_FOR_REGEN"; then
2917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2918$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919else
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2921$as_echo "no" >&6; }
2922fi
2923
2924
Victor Stinnera5c62a82017-05-03 18:21:48 +02002925 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002926done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002927test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002928
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002937 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 +02002938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002947 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 +02002948 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002949elif test "$cross_compiling" = maybe; then
2950 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951else
2952 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily5489bda2018-01-31 17:44:09 -05002971VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003018 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003240
3241cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003242#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003243_ACEOF
3244
3245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003262 *-*-linux-android*)
3263 ac_sys_system=Linux-android
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *-*-linux*)
3266 ac_sys_system=Linux
3267 ;;
3268 *-*-cygwin*)
3269 ac_sys_system=Cygwin
3270 ;;
3271 *)
3272 # for now, limit cross builds to known configurations
3273 MACHDEP="unknown"
3274 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3275 esac
3276 ac_sys_release=
3277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003279 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003280 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 fi
3286 ac_md_system=`echo $ac_sys_system |
3287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3288 ac_md_release=`echo $ac_sys_release |
3289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003291
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003296 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003297 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003298fi
Guido van Rossum91922671997-10-09 20:24:13 +00003299
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003300
3301if test "$cross_compiling" = yes; then
3302 case "$host" in
3303 *-*-linux*)
3304 case "$host_cpu" in
3305 arm*)
3306 _host_cpu=arm
3307 ;;
3308 *)
3309 _host_cpu=$host_cpu
3310 esac
3311 ;;
3312 *-*-cygwin*)
3313 _host_cpu=
3314 ;;
3315 *)
3316 # for now, limit cross builds to known configurations
3317 MACHDEP="unknown"
3318 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3319 esac
3320 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3321fi
3322
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003323# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3324# disable features if it is defined, without any means to access these
3325# features as extensions. For these systems, we skip the definition of
3326# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3327# some feature, make sure there is no alternative way to access this
3328# feature. Also, when using wildcards, make sure you have verified the
3329# need for not defining _XOPEN_SOURCE on all systems matching the
3330# wildcard, and that the wildcard does not include future systems
3331# (which may remove their limitations).
3332case $ac_sys_system/$ac_sys_release in
3333 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3334 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003335 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003336 # In addition, Stefan Krah confirms that issue #1244610 exists through
3337 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003338 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339 define_xopen_source=no
3340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345
3346 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003347 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3349 # also defined. This can be overridden by defining _BSD_SOURCE
3350 # As this has a different meaning on Linux, only define it on OpenBSD
3351
Matthias Kloseb9621712010-04-24 17:59:49 +00003352$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353
3354 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003355 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3356 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3357 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003358 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 +00003359 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003360 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3361 # request to enable features supported by the standard as a request
3362 # to disable features not supported by the standard. The best way
3363 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3364 # entirely and define __EXTENSIONS__ instead.
3365 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003366 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003367 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3368 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003369 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003370 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 define_xopen_source=no;;
3372 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003373 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003375 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003376 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3377 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3378 # identifies itself as Darwin/7.*
3379 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # disables platform specific features beyond repair.
3381 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3382 # has no effect, don't bother defining them
3383 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003384 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003385 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3388 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3389 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003390 AIX/4)
3391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 AIX/5)
3393 if test `uname -r` -eq 1; then
3394 define_xopen_source=no
3395 fi
3396 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003397 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3398 # defining NI_NUMERICHOST.
3399 QNX/6.3.2)
3400 define_xopen_source=no
3401 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403esac
3404
3405if test $define_xopen_source = yes
3406then
Victor Stinner14d098d2011-09-07 22:29:43 +02003407 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Victor Stinner14d098d2011-09-07 22:29:43 +02003409$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3413 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3414 # several APIs are not declared. Since this is also needed in some
3415 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
3419
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003421$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003423fi
3424
Christian Heimes647cd872013-12-07 23:39:33 +01003425# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3426case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003427 hp*|HP*)
3428 define_stdc_a1=yes;;
3429 *)
3430 define_stdc_a1=no;;
3431esac
3432
3433if test $define_stdc_a1 = yes
3434then
Christian Heimes647cd872013-12-07 23:39:33 +01003435
3436$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3437
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438fi
Christian Heimes647cd872013-12-07 23:39:33 +01003439
Jack Jansen6b08a402004-06-03 12:41:45 +00003440# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3441# it may influence the way we can build extensions, so distutils
3442# needs to check it
3443
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003447
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003449
3450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3451# for debug/optimization stuff. BASECFLAGS is for flags that are required
3452# just to get things to compile and link. Users are free to override OPT
3453# when running configure or make. The build should not break if they do.
3454# BASECFLAGS should generally not be messed with, however.
3455
Guido van Rossum8b131c51995-03-09 14:10:13 +00003456# If the user switches compilers, we can't believe the cache
3457if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3458then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003459 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003460(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003461fi
3462
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003463# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3464# when the compiler supports them, but we don't always want -O2, and
3465# we set -g later.
3466if test -z "$CFLAGS"; then
3467 CFLAGS=
3468fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003469
3470if test "$ac_sys_system" = "Darwin"
3471then
3472 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003473 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474 # information
3475 if test -z "${CC}"
3476 then
3477 found_gcc=
3478 found_clang=
3479 as_save_IFS=$IFS; IFS=:
3480 for as_dir in $PATH
3481 do
3482 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003485 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486 fi
3487 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 fi
3492 fi
3493 done
3494 IFS=$as_save_IFS
3495
3496 if test -n "$found_gcc" -a -n "$found_clang"
3497 then
3498 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3499 then
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3501$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3502 CC="$found_clang"
3503 CXX="$found_clang++"
3504 fi
3505
3506
3507 elif test -z "$found_gcc" -a -n "$found_clang"
3508 then
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3510$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3511 CC="$found_clang"
3512 CXX="$found_clang++"
3513
3514 elif test -z "$found_gcc" -a -z "$found_clang"
3515 then
3516 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3517 if test -n "${found_clang}"
3518 then
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3520$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3521 CC="${found_clang}"
3522 CXX="`/usr/bin/xcrun -find clang++`"
3523
3524 # else: use default behaviour
3525 fi
3526 fi
3527 fi
3528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003529ac_ext=c
3530ac_cpp='$CPP $CPPFLAGS'
3531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3533ac_compiler_gnu=$ac_cv_c_compiler_gnu
3534if test -n "$ac_tool_prefix"; then
3535 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3536set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003539if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003540 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003541else
3542 if test -n "$CC"; then
3543 ac_cv_prog_CC="$CC" # Let the user override the test.
3544else
Martin v. Löwis11437992002-04-12 09:54:03 +00003545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546for as_dir in $PATH
3547do
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 $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 +00003554 break 2
3555 fi
3556done
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003559
Jack Jansendd19cf82001-12-06 22:36:17 +00003560fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003563if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3565$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003566else
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003569fi
3570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572fi
3573if test -z "$ac_cv_prog_CC"; then
3574 ac_ct_CC=$CC
3575 # Extract the first word of "gcc", so it can be a program name with args.
3576set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003581else
3582 if test -n "$ac_ct_CC"; then
3583 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $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 +00003594 break 2
3595 fi
3596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
3600fi
3601fi
3602ac_ct_CC=$ac_cv_prog_ac_ct_CC
3603if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3605$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 if test "x$ac_ct_CC" = x; then
3612 CC=""
3613 else
3614 case $cross_compiling:$ac_tool_warned in
3615yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618ac_tool_warned=yes ;;
3619esac
3620 CC=$ac_ct_CC
3621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003624fi
3625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 if test -n "$ac_tool_prefix"; then
3628 # 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 +00003629set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003632if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003634else
3635 if test -n "$CC"; then
3636 ac_cv_prog_CC="$CC" # Let the user override the test.
3637else
Martin v. Löwis11437992002-04-12 09:54:03 +00003638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $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 +00003647 break 2
3648 fi
3649done
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655CC=$ac_cv_prog_CC
3656if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3658$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667if test -z "$CC"; then
3668 # Extract the first word of "cc", so it can be a program name with args.
3669set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003672if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3687 ac_prog_rejected=yes
3688 continue
3689 fi
3690 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $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 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698if test $ac_prog_rejected = yes; then
3699 # We found a bogon in the path, so make sure we never use it.
3700 set dummy $ac_cv_prog_CC
3701 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703 # We chose a different compiler from the bogus one.
3704 # However, it has the same basename, so the bogon will be chosen
3705 # first if we set CC to just the basename; use the full file name.
3706 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003707 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 fi
3709fi
3710fi
3711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3715$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716else
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719fi
3720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723if test -z "$CC"; then
3724 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 do
3727 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003731if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003733else
3734 if test -n "$CC"; then
3735 ac_cv_prog_CC="$CC" # Let the user override the test.
3736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
3752fi
3753fi
3754CC=$ac_cv_prog_CC
3755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$CC" && break
3765 done
3766fi
3767if test -z "$CC"; then
3768 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770do
3771 # Extract the first word of "$ac_prog", so it can be a program name with args.
3772set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003777else
3778 if test -n "$ac_ct_CC"; then
3779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3780else
3781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $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 +00003790 break 2
3791 fi
3792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797fi
3798ac_ct_CC=$ac_cv_prog_ac_ct_CC
3799if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3801$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$ac_ct_CC" && break
3809done
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 if test "x$ac_ct_CC" = x; then
3812 CC=""
3813 else
3814 case $cross_compiling:$ac_tool_warned in
3815yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818ac_tool_warned=yes ;;
3819esac
3820 CC=$ac_ct_CC
3821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
3823
3824fi
3825
3826
Matthias Kloseb9621712010-04-24 17:59:49 +00003827test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003829as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003830See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003833$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3834set X $ac_compile
3835ac_compiler=$2
3836for ac_option in --version -v -V -qversion; do
3837 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838case "(($ac_try" in
3839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3840 *) ac_try_echo=$ac_try;;
3841esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3843$as_echo "$ac_try_echo"; } >&5
3844 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 if test -s conftest.err; then
3847 sed '10a\
3848... rest of stderr output deleted ...
3849 10q' conftest.err >conftest.er1
3850 cat conftest.er1 >&5
3851 fi
3852 rm -f conftest.er1 conftest.err
3853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3854 test $ac_status = 0; }
3855done
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
Matthias Kloseb9621712010-04-24 17:59:49 +00003857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003858/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860int
3861main ()
3862{
3863
3864 ;
3865 return 0;
3866}
3867_ACEOF
3868ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003869ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003870# Try to create an executable without -o first, disregard a.out.
3871# It will help us diagnose broken compilers, and finding out an intuition
3872# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3874$as_echo_n "checking whether the C compiler works... " >&6; }
3875ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3876
3877# The possible output files:
3878ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880ac_rmfiles=
3881for ac_file in $ac_files
3882do
3883 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3886 esac
3887done
3888rm -f $ac_rmfiles
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3902# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3903# in a Makefile. We should not override ac_cv_exeext if it was cached,
3904# so that the user can short-circuit this test for compilers unknown to
3905# Autoconf.
3906for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003907do
3908 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 ;;
3912 [ab].out )
3913 # We found the default executable, but exeext='' is most
3914 # certainly right.
3915 break;;
3916 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 then :; else
3919 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3920 fi
3921 # We set ac_cv_exeext here because the later test for it is not
3922 # safe: cross compilers may not add the suffix if given an `-o'
3923 # argument, so we may need to know it at that point already.
3924 # Even if this section looks crufty: it has the advantage of
3925 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003926 break;;
3927 * )
3928 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 esac
3930done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931test "$ac_cv_exeext" = no && ac_cv_exeext=
3932
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003933else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_file=''
3935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003936if test -z "$ac_file"; then :
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003940sed 's/^/| /' conftest.$ac_ext >&5
3941
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003944as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003945See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003946else
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3948$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3951$as_echo_n "checking for C compiler default output file name... " >&6; }
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3953$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3959$as_echo_n "checking for suffix of executables... " >&6; }
3960if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961case "(($ac_try" in
3962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3963 *) ac_try_echo=$ac_try;;
3964esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3966$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3972# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3973# work properly (i.e., refer to `conftest.exe'), while it won't with
3974# `rm'.
3975for ac_file in conftest.exe conftest conftest.*; do
3976 test -f "$ac_file" || continue
3977 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3980 break;;
3981 * ) break;;
3982 esac
3983done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984else
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990rm -f conftest conftest$ac_cv_exeext
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3992$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993
3994rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003995EXEEXT=$ac_cv_exeext
3996ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998/* end confdefs.h. */
3999#include <stdio.h>
4000int
4001main ()
4002{
4003FILE *f = fopen ("conftest.out", "w");
4004 return ferror (f) || fclose (f) != 0;
4005
4006 ;
4007 return 0;
4008}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004010ac_clean_files="$ac_clean_files conftest.out"
4011# Check that the compiler produces executables we can run. If not, either
4012# the compiler is broken, or we cross compile.
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4014$as_echo_n "checking whether we are cross compiling... " >&6; }
4015if test "$cross_compiling" != yes; then
4016 { { ac_try="$ac_link"
4017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
4021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_link") 2>&5
4024 ac_status=$?
4025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4026 test $ac_status = 0; }
4027 if { ac_try='./conftest$ac_cv_exeext'
4028 { { case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
4032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4033$as_echo "$ac_try_echo"; } >&5
4034 (eval "$ac_try") 2>&5
4035 ac_status=$?
4036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }; }; then
4038 cross_compiling=no
4039 else
4040 if test "$cross_compiling" = maybe; then
4041 cross_compiling=yes
4042 else
4043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004045as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004046If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004047See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 fi
4049 fi
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4052$as_echo "$cross_compiling" >&6; }
4053
4054rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4055ac_clean_files=$ac_clean_files_save
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4057$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004058if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo_n "(cached) " >&6
4060else
4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004062/* end confdefs.h. */
4063
4064int
4065main ()
4066{
4067
4068 ;
4069 return 0;
4070}
4071_ACEOF
4072rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004073if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 for ac_file in conftest.o conftest.obj conftest.*; do
4085 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4089 break;;
4090 esac
4091done
4092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004094sed 's/^/| /' conftest.$ac_ext >&5
4095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004098as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004099See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004100fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4104$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004105OBJEXT=$ac_cv_objext
4106ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4108$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004109if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004114
Martin v. Löwis11437992002-04-12 09:54:03 +00004115int
4116main ()
4117{
4118#ifndef __GNUC__
4119 choke me
4120#endif
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 ac_compiler_gnu=yes
4128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004132ac_cv_c_compiler_gnu=$ac_compiler_gnu
4133
4134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4136$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4137if test $ac_compiler_gnu = yes; then
4138 GCC=yes
4139else
4140 GCC=
4141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004142ac_test_CFLAGS=${CFLAGS+set}
4143ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4145$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004148else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149 ac_save_c_werror_flag=$ac_c_werror_flag
4150 ac_c_werror_flag=yes
4151 ac_cv_prog_cc_g=no
4152 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004165 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 CFLAGS=""
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004169/* end confdefs.h. */
4170
4171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180
Matthias Kloseb9621712010-04-24 17:59:49 +00004181else
4182 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185/* end confdefs.h. */
4186
4187int
4188main ()
4189{
4190
4191 ;
4192 return 0;
4193}
4194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004195if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203 ac_c_werror_flag=$ac_save_c_werror_flag
4204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4206$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004207if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209elif test $ac_cv_prog_cc_g = yes; then
4210 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 CFLAGS="-g -O2"
4212 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214 fi
4215else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004216 if test "$GCC" = yes; then
4217 CFLAGS="-O2"
4218 else
4219 CFLAGS=
4220 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4223$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004228ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
4231#include <stdarg.h>
4232#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004233struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4235struct buf { int x; };
4236FILE * (*rcsopen) (struct buf *, struct stat *, int);
4237static char *e (p, i)
4238 char **p;
4239 int i;
4240{
4241 return p[i];
4242}
4243static char *f (char * (*g) (char **, int), char **p, ...)
4244{
4245 char *s;
4246 va_list v;
4247 va_start (v,p);
4248 s = g (p, va_arg (v,int));
4249 va_end (v);
4250 return s;
4251}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252
4253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4254 function prototypes and stuff, but not '\xHH' hex character constants.
4255 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4258 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4263 inside strings and character constants. */
4264#define FOO(x) 'x'
4265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4266
Skip Montanaro6dead952003-09-25 14:50:04 +00004267int test (int i, double x);
4268struct s1 {int (*f) (int a);};
4269struct s2 {int (*f) (double a);};
4270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4271int argc;
4272char **argv;
4273int
4274main ()
4275{
4276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4277 ;
4278 return 0;
4279}
4280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4282 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004283do
4284 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext
4289 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292CC=$ac_save_CC
4293
4294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295# AC_CACHE_VAL
4296case "x$ac_cv_prog_cc_c89" in
4297 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4299$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4302$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004303 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4324$as_echo_n "checking how to run the C preprocessor... " >&6; }
4325# On Suns, sometimes $CPP names a directory.
4326if test -n "$CPP" && test -d "$CPP"; then
4327 CPP=
4328fi
4329if test -z "$CPP"; then
4330 if ${ac_cv_prog_CPP+:} false; then :
4331 $as_echo_n "(cached) " >&6
4332else
4333 # Double quotes because CPP needs to be expanded
4334 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4335 do
4336 ac_preproc_ok=false
4337for ac_c_preproc_warn_flag in '' yes
4338do
4339 # Use a header file that comes with gcc, so configuring glibc
4340 # with a fresh cross-compiler works.
4341 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4342 # <limits.h> exists even on freestanding compilers.
4343 # On the NeXT, cc -E runs the code through the compiler's parser,
4344 # not just through cpp. "Syntax error" is here to catch this case.
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346/* end confdefs.h. */
4347#ifdef __STDC__
4348# include <limits.h>
4349#else
4350# include <assert.h>
4351#endif
4352 Syntax error
4353_ACEOF
4354if ac_fn_c_try_cpp "$LINENO"; then :
4355
4356else
4357 # Broken: fails on valid input.
4358continue
4359fi
4360rm -f conftest.err conftest.i conftest.$ac_ext
4361
4362 # OK, works on sane cases. Now check whether nonexistent headers
4363 # can be detected and how.
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#include <ac_nonexistent.h>
4367_ACEOF
4368if ac_fn_c_try_cpp "$LINENO"; then :
4369 # Broken: success on invalid input.
4370continue
4371else
4372 # Passes both tests.
4373ac_preproc_ok=:
4374break
4375fi
4376rm -f conftest.err conftest.i conftest.$ac_ext
4377
4378done
4379# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4380rm -f conftest.i conftest.err conftest.$ac_ext
4381if $ac_preproc_ok; then :
4382 break
4383fi
4384
4385 done
4386 ac_cv_prog_CPP=$CPP
4387
4388fi
4389 CPP=$ac_cv_prog_CPP
4390else
4391 ac_cv_prog_CPP=$CPP
4392fi
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4394$as_echo "$CPP" >&6; }
4395ac_preproc_ok=false
4396for ac_c_preproc_warn_flag in '' yes
4397do
4398 # Use a header file that comes with gcc, so configuring glibc
4399 # with a fresh cross-compiler works.
4400 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4401 # <limits.h> exists even on freestanding compilers.
4402 # On the NeXT, cc -E runs the code through the compiler's parser,
4403 # not just through cpp. "Syntax error" is here to catch this case.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#ifdef __STDC__
4407# include <limits.h>
4408#else
4409# include <assert.h>
4410#endif
4411 Syntax error
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414
4415else
4416 # Broken: fails on valid input.
4417continue
4418fi
4419rm -f conftest.err conftest.i conftest.$ac_ext
4420
4421 # OK, works on sane cases. Now check whether nonexistent headers
4422 # can be detected and how.
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4424/* end confdefs.h. */
4425#include <ac_nonexistent.h>
4426_ACEOF
4427if ac_fn_c_try_cpp "$LINENO"; then :
4428 # Broken: success on invalid input.
4429continue
4430else
4431 # Passes both tests.
4432ac_preproc_ok=:
4433break
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437done
4438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4439rm -f conftest.i conftest.err conftest.$ac_ext
4440if $ac_preproc_ok; then :
4441
4442else
4443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4445as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4446See \`config.log' for more details" "$LINENO" 5; }
4447fi
4448
4449ac_ext=c
4450ac_cpp='$CPP $CPPFLAGS'
4451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4453ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4456$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4457if ${ac_cv_path_GREP+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459else
4460 if test -z "$GREP"; then
4461 ac_path_GREP_found=false
4462 # Loop through the user's path and test for each of PROGNAME-LIST
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4465do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
4468 for ac_prog in grep ggrep; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4471 as_fn_executable_p "$ac_path_GREP" || continue
4472# Check for GNU ac_path_GREP and select it if it is found.
4473 # Check for GNU $ac_path_GREP
4474case `"$ac_path_GREP" --version 2>&1` in
4475*GNU*)
4476 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4477*)
4478 ac_count=0
4479 $as_echo_n 0123456789 >"conftest.in"
4480 while :
4481 do
4482 cat "conftest.in" "conftest.in" >"conftest.tmp"
4483 mv "conftest.tmp" "conftest.in"
4484 cp "conftest.in" "conftest.nl"
4485 $as_echo 'GREP' >> "conftest.nl"
4486 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4487 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4488 as_fn_arith $ac_count + 1 && ac_count=$as_val
4489 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4490 # Best one so far, save it but keep looking for a better one
4491 ac_cv_path_GREP="$ac_path_GREP"
4492 ac_path_GREP_max=$ac_count
4493 fi
4494 # 10*(2^10) chars as input seems more than enough
4495 test $ac_count -gt 10 && break
4496 done
4497 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4498esac
4499
4500 $ac_path_GREP_found && break 3
4501 done
4502 done
4503 done
4504IFS=$as_save_IFS
4505 if test -z "$ac_cv_path_GREP"; then
4506 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4507 fi
4508else
4509 ac_cv_path_GREP=$GREP
4510fi
4511
4512fi
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4514$as_echo "$ac_cv_path_GREP" >&6; }
4515 GREP="$ac_cv_path_GREP"
4516
4517
Łukasz Langaa785c872016-09-09 17:37:37 -07004518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4519$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4520if ${ac_cv_path_SED+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4524 for ac_i in 1 2 3 4 5 6 7; do
4525 ac_script="$ac_script$as_nl$ac_script"
4526 done
4527 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4528 { ac_script=; unset ac_script;}
4529 if test -z "$SED"; then
4530 ac_path_SED_found=false
4531 # Loop through the user's path and test for each of PROGNAME-LIST
4532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533for as_dir in $PATH
4534do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
4537 for ac_prog in sed gsed; do
4538 for ac_exec_ext in '' $ac_executable_extensions; do
4539 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4540 as_fn_executable_p "$ac_path_SED" || continue
4541# Check for GNU ac_path_SED and select it if it is found.
4542 # Check for GNU $ac_path_SED
4543case `"$ac_path_SED" --version 2>&1` in
4544*GNU*)
4545 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4546*)
4547 ac_count=0
4548 $as_echo_n 0123456789 >"conftest.in"
4549 while :
4550 do
4551 cat "conftest.in" "conftest.in" >"conftest.tmp"
4552 mv "conftest.tmp" "conftest.in"
4553 cp "conftest.in" "conftest.nl"
4554 $as_echo '' >> "conftest.nl"
4555 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4557 as_fn_arith $ac_count + 1 && ac_count=$as_val
4558 if test $ac_count -gt ${ac_path_SED_max-0}; then
4559 # Best one so far, save it but keep looking for a better one
4560 ac_cv_path_SED="$ac_path_SED"
4561 ac_path_SED_max=$ac_count
4562 fi
4563 # 10*(2^10) chars as input seems more than enough
4564 test $ac_count -gt 10 && break
4565 done
4566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4567esac
4568
4569 $ac_path_SED_found && break 3
4570 done
4571 done
4572 done
4573IFS=$as_save_IFS
4574 if test -z "$ac_cv_path_SED"; then
4575 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4576 fi
4577else
4578 ac_cv_path_SED=$SED
4579fi
4580
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4583$as_echo "$ac_cv_path_SED" >&6; }
4584 SED="$ac_cv_path_SED"
4585 rm -f conftest.sed
4586
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004587
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589
Matthias Kloseb9621712010-04-24 17:59:49 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4591$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004593# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004594if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
4597 case $withval in
4598 no) with_cxx_main=no
4599 MAINCC='$(CC)';;
4600 yes) with_cxx_main=yes
4601 MAINCC='$(CXX)';;
4602 *) with_cxx_main=yes
4603 MAINCC=$withval
4604 if test -z "$CXX"
4605 then
4606 CXX=$withval
4607 fi;;
4608 esac
4609else
4610
4611 with_cxx_main=no
4612 MAINCC='$(CC)'
4613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614fi
4615
Matthias Kloseb9621712010-04-24 17:59:49 +00004616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4617$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004618
4619preset_cxx="$CXX"
4620if test -z "$CXX"
4621then
4622 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 gcc) if test -n "$ac_tool_prefix"; then
4624 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4625set dummy ${ac_tool_prefix}g++; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_CXX+:} false; then :
4629 $as_echo_n "(cached) " >&6
4630else
4631 case $CXX in
4632 [\\/]* | ?:[\\/]*)
4633 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4634 ;;
4635 *)
4636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in notfound
4638do
4639 IFS=$as_save_IFS
4640 test -z "$as_dir" && as_dir=.
4641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004643 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645 break 2
4646 fi
4647done
4648 done
4649IFS=$as_save_IFS
4650
4651 ;;
4652esac
4653fi
4654CXX=$ac_cv_path_CXX
4655if test -n "$CXX"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4657$as_echo "$CXX" >&6; }
4658else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664fi
4665if test -z "$ac_cv_path_CXX"; then
4666 ac_pt_CXX=$CXX
4667 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671if ${ac_cv_path_ac_pt_CXX+:} false; then :
4672 $as_echo_n "(cached) " >&6
4673else
4674 case $ac_pt_CXX in
4675 [\\/]* | ?:[\\/]*)
4676 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4677 ;;
4678 *)
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in notfound
4681do
4682 IFS=$as_save_IFS
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688 break 2
4689 fi
4690done
4691 done
4692IFS=$as_save_IFS
4693
4694 ;;
4695esac
4696fi
4697ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4698if test -n "$ac_pt_CXX"; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4700$as_echo "$ac_pt_CXX" >&6; }
4701else
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706 if test "x$ac_pt_CXX" = x; then
4707 CXX="g++"
4708 else
4709 case $cross_compiling:$ac_tool_warned in
4710yes:)
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4713ac_tool_warned=yes ;;
4714esac
4715 CXX=$ac_pt_CXX
4716 fi
4717else
4718 CXX="$ac_cv_path_CXX"
4719fi
4720 ;;
4721 cc) if test -n "$ac_tool_prefix"; then
4722 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4723set dummy ${ac_tool_prefix}c++; ac_word=$2
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004726if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728else
4729 case $CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743 break 2
4744 fi
4745done
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004747IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 ;;
4750esac
4751fi
4752CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4755$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756else
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761
4762fi
4763if test -z "$ac_cv_path_CXX"; then
4764 ac_pt_CXX=$CXX
4765 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4768$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 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 +00004775 ;;
4776 *)
4777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in notfound
4779do
4780 IFS=$as_save_IFS
4781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 break 2
4787 fi
4788done
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004790IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 ;;
4793esac
4794fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4796if test -n "$ac_pt_CXX"; then
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4798$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799else
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004803
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 if test "x$ac_pt_CXX" = x; then
4805 CXX="c++"
4806 else
4807 case $cross_compiling:$ac_tool_warned in
4808yes:)
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4811ac_tool_warned=yes ;;
4812esac
4813 CXX=$ac_pt_CXX
4814 fi
4815else
4816 CXX="$ac_cv_path_CXX"
4817fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 clang|*/clang) if test -n "$ac_tool_prefix"; then
4820 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4821set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
4824if ${ac_cv_path_CXX+:} false; then :
4825 $as_echo_n "(cached) " >&6
4826else
4827 case $CXX in
4828 [\\/]* | ?:[\\/]*)
4829 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
4837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841 break 2
4842 fi
4843done
4844 done
4845IFS=$as_save_IFS
4846
Ned Deilycbfb9a52012-06-23 16:02:19 -07004847 ;;
4848esac
4849fi
4850CXX=$ac_cv_path_CXX
4851if test -n "$CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4853$as_echo "$CXX" >&6; }
4854else
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859
4860fi
4861if test -z "$ac_cv_path_CXX"; then
4862 ac_pt_CXX=$CXX
4863 # Extract the first word of "clang++", so it can be a program name with args.
4864set dummy clang++; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_ac_pt_CXX+:} false; then :
4868 $as_echo_n "(cached) " >&6
4869else
4870 case $ac_pt_CXX in
4871 [\\/]* | ?:[\\/]*)
4872 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4873 ;;
4874 *)
4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in notfound
4877do
4878 IFS=$as_save_IFS
4879 test -z "$as_dir" && as_dir=.
4880 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884 break 2
4885 fi
4886done
4887 done
4888IFS=$as_save_IFS
4889
4890 ;;
4891esac
4892fi
4893ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4894if test -n "$ac_pt_CXX"; then
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4896$as_echo "$ac_pt_CXX" >&6; }
4897else
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902 if test "x$ac_pt_CXX" = x; then
4903 CXX="clang++"
4904 else
4905 case $cross_compiling:$ac_tool_warned in
4906yes:)
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4909ac_tool_warned=yes ;;
4910esac
4911 CXX=$ac_pt_CXX
4912 fi
4913else
4914 CXX="$ac_cv_path_CXX"
4915fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004916 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004917 icc|*/icc) if test -n "$ac_tool_prefix"; then
4918 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4919set dummy ${ac_tool_prefix}icpc; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948CXX=$ac_cv_path_CXX
4949if test -n "$CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4951$as_echo "$CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958fi
4959if test -z "$ac_cv_path_CXX"; then
4960 ac_pt_CXX=$CXX
4961 # Extract the first word of "icpc", so it can be a program name with args.
4962set dummy icpc; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if ${ac_cv_path_ac_pt_CXX+:} false; then :
4966 $as_echo_n "(cached) " >&6
4967else
4968 case $ac_pt_CXX in
4969 [\\/]* | ?:[\\/]*)
4970 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4971 ;;
4972 *)
4973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in notfound
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
4978 for ac_exec_ext in '' $ac_executable_extensions; do
4979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4980 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982 break 2
4983 fi
4984done
4985 done
4986IFS=$as_save_IFS
4987
4988 ;;
4989esac
4990fi
4991ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4992if test -n "$ac_pt_CXX"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4994$as_echo "$ac_pt_CXX" >&6; }
4995else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000 if test "x$ac_pt_CXX" = x; then
5001 CXX="icpc"
5002 else
5003 case $cross_compiling:$ac_tool_warned in
5004yes:)
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5006$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5007ac_tool_warned=yes ;;
5008esac
5009 CXX=$ac_pt_CXX
5010 fi
5011else
5012 CXX="$ac_cv_path_CXX"
5013fi
5014 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005015 esac
5016 if test "$CXX" = "notfound"
5017 then
5018 CXX=""
5019 fi
5020fi
5021if test -z "$CXX"
5022then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005023 if test -n "$ac_tool_prefix"; then
5024 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5025 do
5026 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005030if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032else
5033 if test -n "$CXX"; then
5034 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5035else
5036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005043 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045 break 2
5046 fi
5047done
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050
5051fi
5052fi
5053CXX=$ac_cv_prog_CXX
5054if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5056$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057else
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060fi
5061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005063 test -n "$CXX" && break
5064 done
5065fi
5066if test -z "$CXX"; then
5067 ac_ct_CXX=$CXX
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069do
5070 # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5075 $as_echo_n "(cached) " >&6
5076else
5077 if test -n "$ac_ct_CXX"; then
5078 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
5085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_ac_ct_CXX="$ac_prog"
5088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089 break 2
5090 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 done
5093IFS=$as_save_IFS
5094
5095fi
5096fi
5097ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5098if test -n "$ac_ct_CXX"; then
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5100$as_echo "$ac_ct_CXX" >&6; }
5101else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107 test -n "$ac_ct_CXX" && break
5108done
5109
5110 if test "x$ac_ct_CXX" = x; then
5111 CXX="notfound"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 CXX=$ac_ct_CXX
5120 fi
5121fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122
5123 if test "$CXX" = "notfound"
5124 then
5125 CXX=""
5126 fi
5127fi
5128if test "$preset_cxx" != "$CXX"
5129then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005130 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131
5132 By default, distutils will build C++ extension modules with \"$CXX\".
5133 If this is not intended, then set CXX on the configure command line.
5134 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005135$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136
5137 By default, distutils will build C++ extension modules with \"$CXX\".
5138 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140fi
5141
5142
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005143MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5144
5145
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5147$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5148cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef bfin
5150#undef cris
5151#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef hppa
5154#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005156#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005157#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005160#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005161 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005162#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163# if defined(__x86_64__) && defined(__LP64__)
5164 x86_64-linux-gnu
5165# elif defined(__x86_64__) && defined(__ILP32__)
5166 x86_64-linux-gnux32
5167# elif defined(__i386__)
5168 i386-linux-gnu
5169# elif defined(__aarch64__) && defined(__AARCH64EL__)
5170# if defined(__ILP32__)
5171 aarch64_ilp32-linux-gnu
5172# else
5173 aarch64-linux-gnu
5174# endif
5175# elif defined(__aarch64__) && defined(__AARCH64EB__)
5176# if defined(__ILP32__)
5177 aarch64_be_ilp32-linux-gnu
5178# else
5179 aarch64_be-linux-gnu
5180# endif
5181# elif defined(__alpha__)
5182 alpha-linux-gnu
5183# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5184# if defined(__ARMEL__)
5185 arm-linux-gnueabihf
5186# else
5187 armeb-linux-gnueabihf
5188# endif
5189# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5190# if defined(__ARMEL__)
5191 arm-linux-gnueabi
5192# else
5193 armeb-linux-gnueabi
5194# endif
5195# elif defined(__hppa__)
5196 hppa-linux-gnu
5197# elif defined(__ia64__)
5198 ia64-linux-gnu
5199# elif defined(__m68k__) && !defined(__mcoldfire__)
5200 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005201# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5202# if _MIPS_SIM == _ABIO32
5203 mipsisa32r6el-linux-gnu
5204# elif _MIPS_SIM == _ABIN32
5205 mipsisa64r6el-linux-gnuabin32
5206# elif _MIPS_SIM == _ABI64
5207 mipsisa64r6el-linux-gnuabi64
5208# else
5209# error unknown platform triplet
5210# endif
5211# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5212# if _MIPS_SIM == _ABIO32
5213 mipsisa32r6-linux-gnu
5214# elif _MIPS_SIM == _ABIN32
5215 mipsisa64r6-linux-gnuabin32
5216# elif _MIPS_SIM == _ABI64
5217 mipsisa64r6-linux-gnuabi64
5218# else
5219# error unknown platform triplet
5220# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005221# elif defined(__mips_hard_float) && defined(_MIPSEL)
5222# if _MIPS_SIM == _ABIO32
5223 mipsel-linux-gnu
5224# elif _MIPS_SIM == _ABIN32
5225 mips64el-linux-gnuabin32
5226# elif _MIPS_SIM == _ABI64
5227 mips64el-linux-gnuabi64
5228# else
5229# error unknown platform triplet
5230# endif
5231# elif defined(__mips_hard_float)
5232# if _MIPS_SIM == _ABIO32
5233 mips-linux-gnu
5234# elif _MIPS_SIM == _ABIN32
5235 mips64-linux-gnuabin32
5236# elif _MIPS_SIM == _ABI64
5237 mips64-linux-gnuabi64
5238# else
5239# error unknown platform triplet
5240# endif
5241# elif defined(__or1k__)
5242 or1k-linux-gnu
5243# elif defined(__powerpc__) && defined(__SPE__)
5244 powerpc-linux-gnuspe
5245# elif defined(__powerpc64__)
5246# if defined(__LITTLE_ENDIAN__)
5247 powerpc64le-linux-gnu
5248# else
5249 powerpc64-linux-gnu
5250# endif
5251# elif defined(__powerpc__)
5252 powerpc-linux-gnu
5253# elif defined(__s390x__)
5254 s390x-linux-gnu
5255# elif defined(__s390__)
5256 s390-linux-gnu
5257# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5258 sh4-linux-gnu
5259# elif defined(__sparc__) && defined(__arch64__)
5260 sparc64-linux-gnu
5261# elif defined(__sparc__)
5262 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005263# elif defined(__riscv)
5264# if __riscv_xlen == 32
5265 riscv32-linux-gnu
5266# elif __riscv_xlen == 64
5267 riscv64-linux-gnu
5268# else
5269# error unknown platform triplet
5270# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005271# else
5272# error unknown platform triplet
5273# endif
5274#elif defined(__FreeBSD_kernel__)
5275# if defined(__LP64__)
5276 x86_64-kfreebsd-gnu
5277# elif defined(__i386__)
5278 i386-kfreebsd-gnu
5279# else
5280# error unknown platform triplet
5281# endif
5282#elif defined(__gnu_hurd__)
5283 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005284#elif defined(__APPLE__)
5285 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005286#else
5287# error unknown platform triplet
5288#endif
5289
5290EOF
5291
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005292if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5295$as_echo "$PLATFORM_TRIPLET" >&6; }
5296else
5297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5298$as_echo "none" >&6; }
5299fi
5300rm -f conftest.c conftest.out
5301
5302if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5303 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5304 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5305 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005306elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5307 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005308fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005309
doko@ubuntu.com55532312016-06-14 08:55:19 +02005310if test x$MULTIARCH != x; then
5311 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5312fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313
5314
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5316$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5317save_LDFLAGS="$LDFLAGS"
5318LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005319
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5321/* end confdefs.h. */
5322
5323int
5324main ()
5325{
5326
5327 ;
5328 return 0;
5329}
5330_ACEOF
5331if ac_fn_c_try_link "$LINENO"; then :
5332 NO_AS_NEEDED="-Wl,--no-as-needed"
5333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5334$as_echo "yes" >&6; }
5335else
5336 NO_AS_NEEDED=""
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340rm -f core conftest.err conftest.$ac_objext \
5341 conftest$ac_exeext conftest.$ac_ext
5342LDFLAGS="$save_LDFLAGS"
5343
5344
5345
5346# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005347
Matthias Kloseb9621712010-04-24 17:59:49 +00005348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5349$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005350if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005351 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005352else
5353 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5354 then ac_cv_path_EGREP="$GREP -E"
5355 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005356 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 # Loop through the user's path and test for each of PROGNAME-LIST
5359 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5361do
5362 IFS=$as_save_IFS
5363 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 for ac_prog in egrep; do
5365 for ac_exec_ext in '' $ac_executable_extensions; do
5366 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005367 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005368# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005369 # Check for GNU $ac_path_EGREP
5370case `"$ac_path_EGREP" --version 2>&1` in
5371*GNU*)
5372 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5373*)
5374 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005375 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005376 while :
5377 do
5378 cat "conftest.in" "conftest.in" >"conftest.tmp"
5379 mv "conftest.tmp" "conftest.in"
5380 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5383 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5386 # Best one so far, save it but keep looking for a better one
5387 ac_cv_path_EGREP="$ac_path_EGREP"
5388 ac_path_EGREP_max=$ac_count
5389 fi
5390 # 10*(2^10) chars as input seems more than enough
5391 test $ac_count -gt 10 && break
5392 done
5393 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5394esac
5395
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 $ac_path_EGREP_found && break 3
5397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005402 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 +00005403 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404else
5405 ac_cv_path_EGREP=$EGREP
5406fi
5407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 fi
5409fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5411$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005413
5414
Matthias Kloseb9621712010-04-24 17:59:49 +00005415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5416$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005417if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005418 $as_echo_n "(cached) " >&6
5419else
5420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005421/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005422#include <stdlib.h>
5423#include <stdarg.h>
5424#include <string.h>
5425#include <float.h>
5426
5427int
5428main ()
5429{
5430
5431 ;
5432 return 0;
5433}
5434_ACEOF
5435if ac_fn_c_try_compile "$LINENO"; then :
5436 ac_cv_header_stdc=yes
5437else
5438 ac_cv_header_stdc=no
5439fi
5440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5441
5442if test $ac_cv_header_stdc = yes; then
5443 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5445/* end confdefs.h. */
5446#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005447
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005448_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005451
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005452else
Matthias Kloseb9621712010-04-24 17:59:49 +00005453 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005455rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005456
Matthias Kloseb9621712010-04-24 17:59:49 +00005457fi
5458
5459if test $ac_cv_header_stdc = yes; then
5460 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5462/* end confdefs.h. */
5463#include <stdlib.h>
5464
5465_ACEOF
5466if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5467 $EGREP "free" >/dev/null 2>&1; then :
5468
5469else
5470 ac_cv_header_stdc=no
5471fi
5472rm -f conftest*
5473
5474fi
5475
5476if test $ac_cv_header_stdc = yes; then
5477 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5478 if test "$cross_compiling" = yes; then :
5479 :
5480else
5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5482/* end confdefs.h. */
5483#include <ctype.h>
5484#include <stdlib.h>
5485#if ((' ' & 0x0FF) == 0x020)
5486# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5487# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5488#else
5489# define ISLOWER(c) \
5490 (('a' <= (c) && (c) <= 'i') \
5491 || ('j' <= (c) && (c) <= 'r') \
5492 || ('s' <= (c) && (c) <= 'z'))
5493# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5494#endif
5495
5496#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5497int
5498main ()
5499{
5500 int i;
5501 for (i = 0; i < 256; i++)
5502 if (XOR (islower (i), ISLOWER (i))
5503 || toupper (i) != TOUPPER (i))
5504 return 2;
5505 return 0;
5506}
5507_ACEOF
5508if ac_fn_c_try_run "$LINENO"; then :
5509
5510else
5511 ac_cv_header_stdc=no
5512fi
5513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5514 conftest.$ac_objext conftest.beam conftest.$ac_ext
5515fi
5516
5517fi
5518fi
5519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5520$as_echo "$ac_cv_header_stdc" >&6; }
5521if test $ac_cv_header_stdc = yes; then
5522
5523$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5524
5525fi
5526
5527# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5528for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5529 inttypes.h stdint.h unistd.h
5530do :
5531 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5532ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5533"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005534if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 cat >>confdefs.h <<_ACEOF
5536#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5537_ACEOF
5538
5539fi
5540
5541done
5542
5543
5544
5545 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 +02005546if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005547 MINIX=yes
5548else
5549 MINIX=
5550fi
5551
5552
5553 if test "$MINIX" = yes; then
5554
5555$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5556
5557
5558$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5559
5560
5561$as_echo "#define _MINIX 1" >>confdefs.h
5562
5563 fi
5564
5565
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5567$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005568if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005569 $as_echo_n "(cached) " >&6
5570else
5571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5572/* end confdefs.h. */
5573
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005574# define __EXTENSIONS__ 1
5575 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005576int
5577main ()
5578{
5579
5580 ;
5581 return 0;
5582}
5583_ACEOF
5584if ac_fn_c_try_compile "$LINENO"; then :
5585 ac_cv_safe_to_define___extensions__=yes
5586else
5587 ac_cv_safe_to_define___extensions__=no
5588fi
5589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5590fi
5591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5592$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5593 test $ac_cv_safe_to_define___extensions__ = yes &&
5594 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5595
5596 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5597
5598 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5599
5600 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5601
5602 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5603
5604
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005605
Xavier de Gaye95750b12016-07-09 11:05:42 +02005606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5607$as_echo_n "checking for the Android API level... " >&6; }
5608cat >> conftest.c <<EOF
5609#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005610android_api = __ANDROID_API__
5611arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612#else
5613#error not Android
5614#endif
5615EOF
5616
5617if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005618 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5619 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5621$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005622 if test -z "$ANDROID_API_LEVEL"; then
5623 echo 'Fatal: you must define __ANDROID_API__'
5624 exit 1
5625 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626
5627cat >>confdefs.h <<_ACEOF
5628#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5629_ACEOF
5630
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005631
5632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5633$as_echo_n "checking for the Android arm ABI... " >&6; }
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5635$as_echo "$_arm_arch" >&6; }
5636 if test "$_arm_arch" = 7; then
5637 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5638 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5639 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005640else
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5642$as_echo "not Android" >&6; }
5643fi
5644rm -f conftest.c conftest.out
5645
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005646# Check for unsupported systems
5647case $ac_sys_system/$ac_sys_release in
5648atheos*|Linux*/1*)
5649 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5650 echo See README for details.
5651 exit 1;;
5652esac
5653
5654
Matthias Kloseb9621712010-04-24 17:59:49 +00005655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5656$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005657
5658# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005659if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005660 withval=$with_suffix;
5661 case $withval in
5662 no) EXEEXT=;;
5663 yes) EXEEXT=.exe;;
5664 *) EXEEXT=$withval;;
5665 esac
5666fi
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5669$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671# Test whether we're running on a non-case-sensitive system, in which
5672# case we give a warning if no ext is given
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5675$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676if test ! -d CaseSensitiveTestDir; then
5677mkdir CaseSensitiveTestDir
5678fi
5679
5680if test -d casesensitivetestdir
5681then
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5683$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005684 BUILDEXEEXT=.exe
5685else
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5687$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 BUILDEXEEXT=$EXEEXT
5689fi
5690rmdir CaseSensitiveTestDir
5691
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692case $ac_sys_system in
5693hp*|HP*)
5694 case $CC in
5695 cc|*/cc) CC="$CC -Ae";;
5696 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697esac
5698
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699
Matthias Kloseb9621712010-04-24 17:59:49 +00005700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5701$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702if test -z "$LIBRARY"
5703then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005704 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5707$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708
5709# LDLIBRARY is the name of the library to link against (as opposed to the
5710# name of the library into which to insert object files). BLDLIBRARY is also
5711# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5712# is blank as the main program is not linked directly against LDLIBRARY.
5713# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5714# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5715# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5716# DLLLIBRARY is the shared (i.e., DLL) library.
5717#
5718# RUNSHARED is used to run shared python without installed libraries
5719#
5720# INSTSONAME is the name of the shared library that will be use to install
5721# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005722#
5723# LDVERSION is the shared library version number, normally the Python version
5724# with the ABI build flags appended.
5725
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726
5727
5728
5729
5730
5731
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005733LDLIBRARY="$LIBRARY"
5734BLDLIBRARY='$(LDLIBRARY)'
5735INSTSONAME='$(LDLIBRARY)'
5736DLLLIBRARY=''
5737LDLIBRARYDIR=''
5738RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005739LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740
5741# LINKCC is the command that links the python executable -- default is $(CC).
5742# If CXX is set, and if it is needed to link a main function that was
5743# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5744# python might then depend on the C++ runtime
5745# This is altered for AIX in order to build the export list before
5746# linking.
5747
Matthias Kloseb9621712010-04-24 17:59:49 +00005748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5749$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750if test -z "$LINKCC"
5751then
5752 LINKCC='$(PURIFY) $(MAINCC)'
5753 case $ac_sys_system in
5754 AIX*)
5755 exp_extra="\"\""
5756 if test $ac_sys_release -ge 5 -o \
5757 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5758 exp_extra="."
5759 fi
5760 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761 QNX*)
5762 # qcc must be used because the other compilers do not
5763 # support -N.
5764 LINKCC=qcc;;
5765 esac
5766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5768$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769
5770# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5771# make sure we default having it set to "no": this is used by
5772# distutils.unixccompiler to know if it should add --enable-new-dtags
5773# to linker command lines, and failing to detect GNU ld simply results
5774# in the same bahaviour as before.
5775
Matthias Kloseb9621712010-04-24 17:59:49 +00005776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5777$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778ac_prog=ld
5779if test "$GCC" = yes; then
5780 ac_prog=`$CC -print-prog-name=ld`
5781fi
5782case `"$ac_prog" -V 2>&1 < /dev/null` in
5783 *GNU*)
5784 GNULD=yes;;
5785 *)
5786 GNULD=no;;
5787esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5789$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790
Matthias Kloseb9621712010-04-24 17:59:49 +00005791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5792$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005794if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795 enableval=$enable_shared;
5796fi
5797
5798
5799if test -z "$enable_shared"
5800then
5801 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005802 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803 enable_shared="yes";;
5804 *)
5805 enable_shared="no";;
5806 esac
5807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5809$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005810
Matthias Kloseb9621712010-04-24 17:59:49 +00005811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5812$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005813# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005814if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005815 enableval=$enable_profiling;
5816fi
5817
5818if test "x$enable_profiling" = xyes; then
5819 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005820 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822/* end confdefs.h. */
5823int main() { return 0; }
5824_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005825if ac_fn_c_try_link "$LINENO"; then :
5826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005827else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005828 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830rm -f core conftest.err conftest.$ac_objext \
5831 conftest$ac_exeext conftest.$ac_ext
5832 CC="$ac_save_cc"
5833else
5834 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5837$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
doko@ubuntu.comba015832012-06-30 16:52:05 +02005839if test "x$enable_profiling" = xyes; then
5840 BASECFLAGS="-pg $BASECFLAGS"
5841 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
5843
Matthias Kloseb9621712010-04-24 17:59:49 +00005844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5845$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846
5847# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5848# library that we build, but we do not want to link against it (we
5849# will find it with a -framework option). For this reason there is an
5850# extra variable BLDLIBRARY against which Python and the extension
5851# modules are linked, BLDLIBRARY. This is normally the same as
5852# LDLIBRARY, but empty for MacOSX framework builds.
5853if test "$enable_framework"
5854then
5855 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005856 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857 BLDLIBRARY=''
5858else
5859 BLDLIBRARY='$(LDLIBRARY)'
5860fi
5861
5862# Other platforms follow
5863if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005864 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005865
Matthias Kloseb9621712010-04-24 17:59:49 +00005866$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
5868 case $ac_sys_system in
5869 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005870 LDLIBRARY='libpython$(LDVERSION).dll.a'
5871 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005872 ;;
5873 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005874 LDLIBRARY='libpython$(LDVERSION).so'
5875 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005876 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005877 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005878 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005879 then
5880 PY3LIBRARY=libpython3.so
5881 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005883 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005884 LDLIBRARY='libpython$(LDVERSION).so'
5885 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005886 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005887 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005888 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005889 then
5890 PY3LIBRARY=libpython3.so
5891 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005892 ;;
5893 hp*|HP*)
5894 case `uname -m` in
5895 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005896 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 ;;
5898 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005899 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
5901 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005903 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 LDLIBRARY='libpython$(LDVERSION).dylib'
5907 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005908 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005910 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005911 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005913 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005914
5915 esac
5916else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005917 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 case $ac_sys_system in
5919 CYGWIN*)
5920 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
5923 esac
5924fi
5925
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005926if test "$cross_compiling" = yes; then
5927 RUNSHARED=
5928fi
5929
Matthias Kloseb9621712010-04-24 17:59:49 +00005930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5931$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005934if test -n "$ac_tool_prefix"; then
5935 for ac_prog in ar aal
5936 do
5937 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5938set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5940$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005941if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005942 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943else
5944 if test -n "$AR"; then
5945 ac_cv_prog_AR="$AR" # Let the user override the test.
5946else
5947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5948for as_dir in $PATH
5949do
5950 IFS=$as_save_IFS
5951 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005952 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005953 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005954 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 break 2
5957 fi
5958done
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960IFS=$as_save_IFS
5961
5962fi
5963fi
5964AR=$ac_cv_prog_AR
5965if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5967$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968else
Matthias Kloseb9621712010-04-24 17:59:49 +00005969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5970$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005971fi
5972
5973
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005974 test -n "$AR" && break
5975 done
5976fi
5977if test -z "$AR"; then
5978 ac_ct_AR=$AR
5979 for ac_prog in ar aal
5980do
5981 # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_prog_ac_ct_AR+:} false; then :
5986 $as_echo_n "(cached) " >&6
5987else
5988 if test -n "$ac_ct_AR"; then
5989 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5990else
5991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5992for as_dir in $PATH
5993do
5994 IFS=$as_save_IFS
5995 test -z "$as_dir" && as_dir=.
5996 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005998 ac_cv_prog_ac_ct_AR="$ac_prog"
5999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6000 break 2
6001 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006003 done
6004IFS=$as_save_IFS
6005
6006fi
6007fi
6008ac_ct_AR=$ac_cv_prog_ac_ct_AR
6009if test -n "$ac_ct_AR"; then
6010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6011$as_echo "$ac_ct_AR" >&6; }
6012else
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6014$as_echo "no" >&6; }
6015fi
6016
6017
6018 test -n "$ac_ct_AR" && break
6019done
6020
6021 if test "x$ac_ct_AR" = x; then
6022 AR="ar"
6023 else
6024 case $cross_compiling:$ac_tool_warned in
6025yes:)
6026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6028ac_tool_warned=yes ;;
6029esac
6030 AR=$ac_ct_AR
6031 fi
6032fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033
6034
6035# tweak ARFLAGS only if the user didn't set it on the command line
6036
6037if test -z "$ARFLAGS"
6038then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006039 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006040fi
6041
doko@ubuntu.com58844492012-06-30 18:25:32 +02006042if test -n "$ac_tool_prefix"; then
6043 for ac_prog in readelf
6044 do
6045 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6046set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6048$as_echo_n "checking for $ac_word... " >&6; }
6049if ${ac_cv_prog_READELF+:} false; then :
6050 $as_echo_n "(cached) " >&6
6051else
6052 if test -n "$READELF"; then
6053 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6054else
6055as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6056for as_dir in $PATH
6057do
6058 IFS=$as_save_IFS
6059 test -z "$as_dir" && as_dir=.
6060 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006062 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6064 break 2
6065 fi
6066done
6067 done
6068IFS=$as_save_IFS
6069
6070fi
6071fi
6072READELF=$ac_cv_prog_READELF
6073if test -n "$READELF"; then
6074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6075$as_echo "$READELF" >&6; }
6076else
6077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6078$as_echo "no" >&6; }
6079fi
6080
6081
6082 test -n "$READELF" && break
6083 done
6084fi
6085if test -z "$READELF"; then
6086 ac_ct_READELF=$READELF
6087 for ac_prog in readelf
6088do
6089 # Extract the first word of "$ac_prog", so it can be a program name with args.
6090set dummy $ac_prog; ac_word=$2
6091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6092$as_echo_n "checking for $ac_word... " >&6; }
6093if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6094 $as_echo_n "(cached) " >&6
6095else
6096 if test -n "$ac_ct_READELF"; then
6097 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6098else
6099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102 IFS=$as_save_IFS
6103 test -z "$as_dir" && as_dir=.
6104 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006105 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006106 ac_cv_prog_ac_ct_READELF="$ac_prog"
6107 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108 break 2
6109 fi
6110done
6111 done
6112IFS=$as_save_IFS
6113
6114fi
6115fi
6116ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6117if test -n "$ac_ct_READELF"; then
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6119$as_echo "$ac_ct_READELF" >&6; }
6120else
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126 test -n "$ac_ct_READELF" && break
6127done
6128
6129 if test "x$ac_ct_READELF" = x; then
6130 READELF=":"
6131 else
6132 case $cross_compiling:$ac_tool_warned in
6133yes:)
6134{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6135$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6136ac_tool_warned=yes ;;
6137esac
6138 READELF=$ac_ct_READELF
6139 fi
6140fi
6141
6142if test "$cross_compiling" = yes; then
6143 case "$READELF" in
6144 readelf|:)
6145 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6146 ;;
6147 esac
6148fi
6149
6150
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006151
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006153hp*|HP*)
6154 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155 if test -z "$INSTALL"
6156 then
6157 INSTALL="${srcdir}/install-sh -c"
6158 fi
6159esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160# Find a good install program. We prefer a C program (faster),
6161# so one script is as good as another. But avoid the broken or
6162# incompatible versions:
6163# SysV /etc/install, /usr/sbin/install
6164# SunOS /usr/etc/install
6165# IRIX /sbin/install
6166# AIX /bin/install
6167# AmigaOS /C/install, which installs bootblocks on floppy discs
6168# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6169# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6170# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6171# OS/2's system install, which has a completely different semantic
6172# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006173# Reject install programs that cannot install multiple files.
6174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6175$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006177if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006179else
6180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6181for as_dir in $PATH
6182do
6183 IFS=$as_save_IFS
6184 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006185 # Account for people who put trailing slashes in PATH elements.
6186case $as_dir/ in #((
6187 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 /usr/ucb/* ) ;;
6191 *)
6192 # OSF1 and SCO ODT 3.0 have their own names for install.
6193 # Don't use installbsd from OSF since it installs stuff as root
6194 # by default.
6195 for ac_prog in ginstall scoinst install; do
6196 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006197 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006198 if test $ac_prog = install &&
6199 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6200 # AIX install. It has an incompatible calling convention.
6201 :
6202 elif test $ac_prog = install &&
6203 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6204 # program-specific install script used by HP pwplus--don't use.
6205 :
6206 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006207 rm -rf conftest.one conftest.two conftest.dir
6208 echo one > conftest.one
6209 echo two > conftest.two
6210 mkdir conftest.dir
6211 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6212 test -s conftest.one && test -s conftest.two &&
6213 test -s conftest.dir/conftest.one &&
6214 test -s conftest.dir/conftest.two
6215 then
6216 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6217 break 3
6218 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219 fi
6220 fi
6221 done
6222 done
6223 ;;
6224esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006225
6226 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227IFS=$as_save_IFS
6228
Matthias Kloseb9621712010-04-24 17:59:49 +00006229rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006230
6231fi
6232 if test "${ac_cv_path_install+set}" = set; then
6233 INSTALL=$ac_cv_path_install
6234 else
6235 # As a last resort, use the slow shell script. Don't cache a
6236 # value for INSTALL within a source directory, because that will
6237 # break other packages using the cache if that directory is
6238 # removed, or if the value is a relative name.
6239 INSTALL=$ac_install_sh
6240 fi
6241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6243$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006244
6245# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6246# It thinks the first close brace ends the variable substitution.
6247test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6248
6249test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6250
6251test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6252
Matthias Klose93a0ef12012-03-15 18:08:34 +01006253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6254$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6255if test -z "$MKDIR_P"; then
6256 if ${ac_cv_path_mkdir+:} false; then :
6257 $as_echo_n "(cached) " >&6
6258else
6259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6260for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6261do
6262 IFS=$as_save_IFS
6263 test -z "$as_dir" && as_dir=.
6264 for ac_prog in mkdir gmkdir; do
6265 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006266 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006267 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6268 'mkdir (GNU coreutils) '* | \
6269 'mkdir (coreutils) '* | \
6270 'mkdir (fileutils) '4.1*)
6271 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6272 break 3;;
6273 esac
6274 done
6275 done
6276 done
6277IFS=$as_save_IFS
6278
6279fi
6280
6281 test -d ./--version && rmdir ./--version
6282 if test "${ac_cv_path_mkdir+set}" = set; then
6283 MKDIR_P="$ac_cv_path_mkdir -p"
6284 else
6285 # As a last resort, use the slow shell script. Don't cache a
6286 # value for MKDIR_P within a source directory, because that will
6287 # break other packages using the cache if that directory is
6288 # removed, or if the value is a relative name.
6289 MKDIR_P="$ac_install_sh -d"
6290 fi
6291fi
6292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6293$as_echo "$MKDIR_P" >&6; }
6294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295
6296# Not every filesystem supports hard links
6297
6298if test -z "$LN" ; then
6299 case $ac_sys_system in
6300 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301 *) LN=ln;;
6302 esac
6303fi
6304
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006305# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006306
6307ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6311$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006312
6313# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006314if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315 withval=$with_pydebug;
6316if test "$withval" != no
6317then
6318
Matthias Kloseb9621712010-04-24 17:59:49 +00006319$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6322$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006323 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006324 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006325else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327fi
6328else
Matthias Kloseb9621712010-04-24 17:59:49 +00006329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331fi
6332
6333
T. Woutersddbfa2c2017-05-23 01:30:49 +02006334# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6335# the ABI. This allows enabling assertions without changing the ABI.
6336assertions='false'
6337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6338$as_echo_n "checking for --with-assertions... " >&6; }
6339
6340# Check whether --with-assertions was given.
6341if test "${with_assertions+set}" = set; then :
6342 withval=$with_assertions;
6343if test "$withval" != no
6344then
6345 assertions='true'
6346fi
6347fi
6348
6349if test "$assertions" = 'true'; then
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6351$as_echo "yes" >&6; }
6352elif test "$Py_DEBUG" = 'true'; then
6353 assertions='true'
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6355$as_echo "implied by --with-pydebug" >&6; }
6356else
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6358$as_echo "no" >&6; }
6359fi
6360
Brett Cannon63d98bc2016-09-06 17:12:40 -07006361# Enable optimization flags
6362
6363
6364Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6366$as_echo_n "checking for --enable-optimizations... " >&6; }
6367# Check whether --enable-optimizations was given.
6368if test "${enable_optimizations+set}" = set; then :
6369 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006370if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006371then
6372 Py_OPT='true'
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6374$as_echo "yes" >&6; };
6375else
6376 Py_OPT='false'
6377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6378$as_echo "no" >&6; };
6379fi
6380else
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6382$as_echo "no" >&6; }
6383fi
6384
6385if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006386 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6387 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006388 # 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 +00006389 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006390 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006391 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006392 DEF_MAKE_RULE="build_all"
6393else
6394 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006395 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006396 DEF_MAKE_RULE="all"
6397fi
6398
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006399# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6400# normal names in the default $PATH (ie: Ubuntu). They exist under the
6401# non-suffixed name in their versioned llvm directory.
6402
6403llvm_bin_dir=''
6404llvm_path="${PATH}"
6405if test "${CC}" = "clang"
6406then
6407 clang_bin=`which clang`
6408 # Some systems install clang elsewhere as a symlink to the real path
6409 # which is where the related llvm tools are located.
6410 if test -L "${clang_bin}"
6411 then
6412 clang_dir=`dirname "${clang_bin}"`
6413 clang_bin=`readlink "${clang_bin}"`
6414 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6415 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6416 fi
6417fi
6418
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006419# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6421$as_echo_n "checking for --with-lto... " >&6; }
6422
6423# Check whether --with-lto was given.
6424if test "${with_lto+set}" = set; then :
6425 withval=$with_lto;
6426if test "$withval" != no
6427then
6428 Py_LTO='true'
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6430$as_echo "yes" >&6; };
6431else
6432 Py_LTO='false'
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6434$as_echo "no" >&6; };
6435fi
6436else
6437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6438$as_echo "no" >&6; }
6439fi
6440
6441if test "$Py_LTO" = 'true' ; then
6442 case $CC in
6443 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006444
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006446$as_echo_n "checking target system type... " >&6; }
6447if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006448 $as_echo_n "(cached) " >&6
6449else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006450 if test "x$target_alias" = x; then
6451 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006452else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006453 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6454 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6455fi
6456
6457fi
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6459$as_echo "$ac_cv_target" >&6; }
6460case $ac_cv_target in
6461*-*-*) ;;
6462*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6463esac
6464target=$ac_cv_target
6465ac_save_IFS=$IFS; IFS='-'
6466set x $ac_cv_target
6467shift
6468target_cpu=$1
6469target_vendor=$2
6470shift; shift
6471# Remember, the first character of IFS is used to create $*,
6472# except with old shells:
6473target_os=$*
6474IFS=$ac_save_IFS
6475case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6476
6477
6478# The aliases save the names the user supplied, while $host etc.
6479# will get canonicalized.
6480test -n "$target_alias" &&
6481 test "$program_prefix$program_suffix$program_transform_name" = \
6482 NONENONEs,x,x, &&
6483 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006484# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6485set dummy $target_alias-llvm-ar; ac_word=$2
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6487$as_echo_n "checking for $ac_word... " >&6; }
6488if ${ac_cv_path_LLVM_AR+:} false; then :
6489 $as_echo_n "(cached) " >&6
6490else
6491 case $LLVM_AR in
6492 [\\/]* | ?:[\\/]*)
6493 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6494 ;;
6495 *)
6496 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6497for as_dir in ${llvm_path}
6498do
6499 IFS=$as_save_IFS
6500 test -z "$as_dir" && as_dir=.
6501 for ac_exec_ext in '' $ac_executable_extensions; do
6502 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6503 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6504 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6505 break 2
6506 fi
6507done
6508 done
6509IFS=$as_save_IFS
6510
6511 ;;
6512esac
6513fi
6514LLVM_AR=$ac_cv_path_LLVM_AR
6515if test -n "$LLVM_AR"; then
6516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6517$as_echo "$LLVM_AR" >&6; }
6518else
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520$as_echo "no" >&6; }
6521fi
6522
6523
6524if test -z "$ac_cv_path_LLVM_AR"; then
6525 if test "$build" = "$target"; then
6526 ac_pt_LLVM_AR=$LLVM_AR
6527 # Extract the first word of "llvm-ar", so it can be a program name with args.
6528set dummy llvm-ar; ac_word=$2
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6530$as_echo_n "checking for $ac_word... " >&6; }
6531if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6532 $as_echo_n "(cached) " >&6
6533else
6534 case $ac_pt_LLVM_AR in
6535 [\\/]* | ?:[\\/]*)
6536 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6537 ;;
6538 *)
6539 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6540for as_dir in ${llvm_path}
6541do
6542 IFS=$as_save_IFS
6543 test -z "$as_dir" && as_dir=.
6544 for ac_exec_ext in '' $ac_executable_extensions; do
6545 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6546 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6547 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6548 break 2
6549 fi
6550done
6551 done
6552IFS=$as_save_IFS
6553
6554 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6555 ;;
6556esac
6557fi
6558ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6559if test -n "$ac_pt_LLVM_AR"; then
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6561$as_echo "$ac_pt_LLVM_AR" >&6; }
6562else
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6564$as_echo "no" >&6; }
6565fi
6566
6567 LLVM_AR=$ac_pt_LLVM_AR
6568 else
6569 LLVM_AR="''"
6570 fi
6571else
6572 LLVM_AR="$ac_cv_path_LLVM_AR"
6573fi
6574
6575
6576 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6577 then
6578 LLVM_AR_FOUND="found"
6579 else
6580 LLVM_AR_FOUND="not-found"
6581 fi
6582 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6583 then
6584 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6585 if test -n "${found_llvm_ar}"
6586 then
6587 LLVM_AR='/usr/bin/xcrun llvm-ar'
6588 LLVM_AR_FOUND=found
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6590$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6591 fi
6592 fi
6593 if test $LLVM_AR_FOUND = not-found
6594 then
6595 LLVM_PROFR_ERR=yes
6596 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6597 else
6598 LLVM_AR_ERR=no
6599 fi
6600 AR="${LLVM_AR}"
6601 case $ac_sys_system in
6602 Darwin*)
6603 # Any changes made here should be reflected in the GCC+Darwin case below
6604 LTOFLAGS="-flto -Wl,-export_dynamic"
6605 ;;
6606 *)
6607 LTOFLAGS="-flto"
6608 ;;
6609 esac
6610 ;;
6611 *gcc*)
6612 case $ac_sys_system in
6613 Darwin*)
6614 LTOFLAGS="-flto -Wl,-export_dynamic"
6615 ;;
6616 *)
6617 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6618 ;;
6619 esac
6620 ;;
6621 esac
6622
6623 if test "$ac_cv_prog_cc_g" = "yes"
6624 then
6625 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6626 # to get debug symbols.
6627 LTOFLAGS="$LTOFLAGS -g"
6628 fi
6629
stratakisf92c7aa2018-12-04 15:54:01 +01006630 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006631 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006632fi
6633
6634# Enable PGO flags.
6635
6636
6637
6638
6639
6640
Gregory P. Smith799520c2016-09-07 16:10:00 -07006641# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6642set dummy $target_alias-llvm-profdata; ac_word=$2
6643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6644$as_echo_n "checking for $ac_word... " >&6; }
6645if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6646 $as_echo_n "(cached) " >&6
6647else
6648 case $LLVM_PROFDATA in
6649 [\\/]* | ?:[\\/]*)
6650 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6651 ;;
6652 *)
6653 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6654for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006655do
6656 IFS=$as_save_IFS
6657 test -z "$as_dir" && as_dir=.
6658 for ac_exec_ext in '' $ac_executable_extensions; do
6659 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006660 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006661 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6662 break 2
6663 fi
6664done
6665 done
6666IFS=$as_save_IFS
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668 ;;
6669esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006670fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006671LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6672if test -n "$LLVM_PROFDATA"; then
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6674$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006675else
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677$as_echo "no" >&6; }
6678fi
6679
6680
Gregory P. Smith799520c2016-09-07 16:10:00 -07006681if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6682 if test "$build" = "$target"; then
6683 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6684 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6685set dummy llvm-profdata; ac_word=$2
6686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6687$as_echo_n "checking for $ac_word... " >&6; }
6688if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6689 $as_echo_n "(cached) " >&6
6690else
6691 case $ac_pt_LLVM_PROFDATA in
6692 [\\/]* | ?:[\\/]*)
6693 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6694 ;;
6695 *)
6696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6697for as_dir in ${llvm_path}
6698do
6699 IFS=$as_save_IFS
6700 test -z "$as_dir" && as_dir=.
6701 for ac_exec_ext in '' $ac_executable_extensions; do
6702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6703 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6705 break 2
6706 fi
6707done
6708 done
6709IFS=$as_save_IFS
6710
6711 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6712 ;;
6713esac
6714fi
6715ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6716if test -n "$ac_pt_LLVM_PROFDATA"; then
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6718$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6719else
6720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6725 else
6726 LLVM_PROFDATA="''"
6727 fi
6728else
6729 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6730fi
6731
6732
6733if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6734then
6735 LLVM_PROF_FOUND="found"
6736else
6737 LLVM_PROF_FOUND="not-found"
6738fi
6739if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6740then
6741 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6742 if test -n "${found_llvm_profdata}"
6743 then
6744 # llvm-profdata isn't directly in $PATH in some cases.
6745 # https://apple.stackexchange.com/questions/197053/
6746 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6747 LLVM_PROF_FOUND=found
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6749$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6750 fi
6751fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006752LLVM_PROF_ERR=no
6753case $CC in
6754 *clang*)
6755 # Any changes made here should be reflected in the GCC+Darwin case below
6756 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6757 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006758 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006759 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6760 if test $LLVM_PROF_FOUND = not-found
6761 then
6762 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 if test "${REQUIRE_PGO}" = "yes"
6764 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006765 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 -07006766 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006767 fi
6768 ;;
6769 *gcc*)
6770 case $ac_sys_system in
6771 Darwin*)
6772 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6773 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006774 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006775 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 then
6778 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006779 if test "${REQUIRE_PGO}" = "yes"
6780 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006781 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 -07006782 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006783 fi
6784 ;;
6785 *)
6786 PGO_PROF_GEN_FLAG="-fprofile-generate"
6787 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6788 LLVM_PROF_MERGER="true"
6789 LLVM_PROF_FILE=""
6790 ;;
6791 esac
6792 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006793 *icc*)
6794 PGO_PROF_GEN_FLAG="-prof-gen"
6795 PGO_PROF_USE_FLAG="-prof-use"
6796 LLVM_PROF_MERGER="true"
6797 LLVM_PROF_FILE=""
6798 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006799esac
6800
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006801# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6802# merged with this chunk of code?
6803
6804# Optimizer/debugger flags
6805# ------------------------
6806# (The following bit of code is complicated enough - please keep things
6807# indented properly. Just pretend you're editing Python code. ;-)
6808
6809# There are two parallel sets of case statements below, one that checks to
6810# see if OPT was set and one that does BASECFLAGS setting based upon
6811# compiler and platform. BASECFLAGS tweaks need to be made even if the
6812# user set OPT.
6813
6814# tweak OPT based on compiler and platform, only if the user didn't set
6815# it on the command line
6816
Victor Stinner9ed34a82017-05-02 22:35:58 +02006817
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006818if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819then
6820 case $GCC in
6821 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6823 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6824 WRAP="-fwrapv"
6825 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006826
Stefan Krahaf04ff22011-12-08 22:20:31 +01006827 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006828 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006829 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006830 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006831 *)
6832 if $CC --version 2>&1 | grep -q clang
6833 then
6834 cc_is_clang=1
6835 else
6836 cc_is_clang=
6837 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006838 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006839
Victor Stinner35f3d242017-04-21 12:35:24 +02006840 if test -n "${cc_is_clang}"
6841 then
6842 # Clang also needs -fwrapv
6843 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006844 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6845 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006846 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006847 fi
6848
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849 case $ac_cv_prog_cc_g in
6850 yes)
6851 if test "$Py_DEBUG" = 'true' ; then
6852 # Optimization messes up debuggers, so turn it off for
6853 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006854 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006855 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006856 else
Victor Stinner28205b22017-04-21 11:24:34 +02006857 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006858 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859 else
Victor Stinner28205b22017-04-21 11:24:34 +02006860 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 fi
6862 ;;
6863 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006864 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006865 ;;
6866 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006868 case $ac_sys_system in
6869 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6870 ;;
6871 esac
6872 ;;
6873
6874 *)
6875 OPT="-O"
6876 ;;
6877 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878fi
6879
6880
6881
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006882
stratakiscf10a752018-12-19 18:19:01 +01006883
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006884# The -arch flags for universal builds on OSX
6885UNIVERSAL_ARCH_FLAGS=
6886
6887
6888# tweak BASECFLAGS based on compiler and platform
6889case $GCC in
6890yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006891 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006892
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6894$as_echo_n "checking for -Wextra... " >&6; }
6895 ac_save_cc="$CC"
6896 CC="$CC -Wextra -Werror"
6897 if ${ac_cv_extra_warnings+:} false; then :
6898 $as_echo_n "(cached) " >&6
6899else
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901/* end confdefs.h. */
6902
6903
6904int
6905main ()
6906{
6907
6908 ;
6909 return 0;
6910}
6911
6912_ACEOF
6913if ac_fn_c_try_compile "$LINENO"; then :
6914
6915 ac_cv_extra_warnings=yes
6916
6917else
6918
6919 ac_cv_extra_warnings=no
6920
6921fi
6922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6923fi
6924
6925 CC="$ac_save_cc"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6927$as_echo "$ac_cv_extra_warnings" >&6; }
6928
6929 if test $ac_cv_extra_warnings = yes
6930 then
6931 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6932 fi
6933
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006934 # Python doesn't violate C99 aliasing rules, but older versions of
6935 # GCC produce warnings for legal Python code. Enable
6936 # -fno-strict-aliasing on versions of GCC that support but produce
6937 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6939$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006940 ac_save_cc="$CC"
6941 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006942 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006943 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006945else
Matthias Kloseb9621712010-04-24 17:59:49 +00006946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006947/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006948
Matthias Kloseb159a552010-04-25 21:00:44 +00006949
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006950int
6951main ()
6952{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006953
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006954 ;
6955 return 0;
6956}
Matthias Kloseb159a552010-04-25 21:00:44 +00006957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006959if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006960
6961 CC="$ac_save_cc -fstrict-aliasing"
6962 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006964/* end confdefs.h. */
6965
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006966 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006967int
6968main ()
6969{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006970double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006971 ;
6972 return 0;
6973}
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006976if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
6978 ac_cv_no_strict_aliasing=no
6979
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006980else
Matthias Kloseb159a552010-04-25 21:00:44 +00006981
6982 ac_cv_no_strict_aliasing=yes
6983
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006986
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006987else
Matthias Kloseb159a552010-04-25 21:00:44 +00006988
6989 ac_cv_no_strict_aliasing=no
6990
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006991fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006993fi
6994
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006996 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6998$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000 then
7001 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7002 fi
7003
Zachary Ware5af85642015-12-21 12:09:17 -06007004 # ICC doesn't recognize the option, but only emits a warning
7005 ## XXX does it emit an unused result warning and can it be disabled?
7006 case "$CC" in
7007 *icc*)
7008 ac_cv_disable_unused_result_warning=no
7009 ;;
7010 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7012$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7013 ac_save_cc="$CC"
7014 CC="$CC -Wunused-result -Werror"
7015 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007016 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007017 $as_echo_n "(cached) " >&6
7018else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020/* end confdefs.h. */
7021
7022
7023int
7024main ()
7025{
7026
7027 ;
7028 return 0;
7029}
7030
7031_ACEOF
7032if ac_fn_c_try_compile "$LINENO"; then :
7033
7034 ac_cv_disable_unused_result_warning=yes
7035
7036else
7037
7038 ac_cv_disable_unused_result_warning=no
7039
7040fi
7041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7042fi
7043
7044 CFLAGS="$save_CFLAGS"
7045 CC="$ac_save_cc"
7046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7047$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007048 ;;
7049 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007050
7051 if test $ac_cv_disable_unused_result_warning = yes
7052 then
7053 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007054 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7055 fi
7056
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7058$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7059 ac_save_cc="$CC"
7060 CC="$CC -Wunused-parameter -Werror"
7061 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7062 $as_echo_n "(cached) " >&6
7063else
7064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7065/* end confdefs.h. */
7066
7067
7068int
7069main ()
7070{
7071
7072 ;
7073 return 0;
7074}
7075
7076_ACEOF
7077if ac_fn_c_try_compile "$LINENO"; then :
7078
7079 ac_cv_disable_unused_parameter_warning=yes
7080
7081else
7082
7083 ac_cv_disable_unused_parameter_warning=no
7084
7085fi
7086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7087fi
7088
7089 CC="$ac_save_cc"
7090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7091$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7092
7093 if test $ac_cv_disable_unused_parameter_warning = yes
7094 then
7095 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7096 fi
7097
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7099$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7100 ac_save_cc="$CC"
7101 CC="$CC -Wmissing-field-initializers -Werror"
7102 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7103 $as_echo_n "(cached) " >&6
7104else
7105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7106/* end confdefs.h. */
7107
7108
7109int
7110main ()
7111{
7112
7113 ;
7114 return 0;
7115}
7116
7117_ACEOF
7118if ac_fn_c_try_compile "$LINENO"; then :
7119
7120 ac_cv_disable_missing_field_initializers=yes
7121
7122else
7123
7124 ac_cv_disable_missing_field_initializers=no
7125
7126fi
7127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7128fi
7129
7130 CC="$ac_save_cc"
7131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7132$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7133
7134 if test $ac_cv_disable_missing_field_initializers = yes
7135 then
7136 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007137 fi
7138
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7140$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7141 ac_save_cc="$CC"
7142 CC="$CC -Wsign-compare"
7143 save_CFLAGS="$CFLAGS"
7144 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7145 $as_echo_n "(cached) " >&6
7146else
7147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7148/* end confdefs.h. */
7149
7150
7151int
7152main ()
7153{
7154
7155 ;
7156 return 0;
7157}
7158
7159_ACEOF
7160if ac_fn_c_try_compile "$LINENO"; then :
7161
7162 ac_cv_enable_sign_compare_warning=yes
7163
7164else
7165
7166 ac_cv_enable_sign_compare_warning=no
7167
7168fi
7169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7170fi
7171
7172 CFLAGS="$save_CFLAGS"
7173 CC="$ac_save_cc"
7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7175$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7176
7177 if test $ac_cv_enable_sign_compare_warning = yes
7178 then
7179 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7180 fi
7181
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7183$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7184 ac_save_cc="$CC"
7185 CC="$CC -Wunreachable-code"
7186 save_CFLAGS="$CFLAGS"
7187 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7188 $as_echo_n "(cached) " >&6
7189else
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192
7193
7194int
7195main ()
7196{
7197
7198 ;
7199 return 0;
7200}
7201
7202_ACEOF
7203if ac_fn_c_try_compile "$LINENO"; then :
7204
7205 ac_cv_enable_unreachable_code_warning=yes
7206
7207else
7208
7209 ac_cv_enable_unreachable_code_warning=no
7210
7211fi
7212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213fi
7214
7215 CFLAGS="$save_CFLAGS"
7216 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007217
7218 # Don't enable unreachable code warning in debug mode, since it usually
7219 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007220 # Issue #24324: Unfortunately, the unreachable code warning does not work
7221 # correctly on gcc and has been silently removed from the compiler.
7222 # It is supported on clang but on OS X systems gcc may be an alias
7223 # for clang. Try to determine if the compiler is not really gcc and,
7224 # if so, only then enable the warning.
7225 if test $ac_cv_enable_unreachable_code_warning = yes && \
7226 test "$Py_DEBUG" != "true" && \
7227 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007228 then
7229 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007230 else
7231 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007232 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7234$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007235
INADA Naokie3364842018-06-05 20:40:53 +09007236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7237$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7238 ac_save_cc="$CC"
7239 CC="$CC -Werror -Wstrict-prototypes"
7240 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7241 $as_echo_n "(cached) " >&6
7242else
7243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7244/* end confdefs.h. */
7245
7246
7247int
7248main ()
7249{
7250
7251 ;
7252 return 0;
7253}
7254
7255_ACEOF
7256if ac_fn_c_try_compile "$LINENO"; then :
7257
7258 ac_cv_enable_strict_prototypes_warning=yes
7259
7260else
7261
7262 ac_cv_enable_strict_prototypes_warning=no
7263
7264fi
7265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7266fi
7267
7268 CC="$ac_save_cc"
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7270$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7271
7272 if test $ac_cv_enable_strict_prototypes_warning = yes
7273 then
7274 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7275 fi
7276
Victor Stinner193ee0a2017-02-06 14:24:00 +01007277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7278$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7279 ac_save_cc="$CC"
7280 CC="$CC -Werror=implicit-function-declaration"
7281 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7282 $as_echo_n "(cached) " >&6
7283else
7284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7285/* end confdefs.h. */
7286
7287
7288int
7289main ()
7290{
7291
7292 ;
7293 return 0;
7294}
7295
7296_ACEOF
7297if ac_fn_c_try_compile "$LINENO"; then :
7298
7299 ac_cv_enable_implicit_function_declaration_error=yes
7300
7301else
7302
7303 ac_cv_enable_implicit_function_declaration_error=no
7304
7305fi
7306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7307fi
7308
7309 CC="$ac_save_cc"
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7311$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7312
7313 if test $ac_cv_enable_implicit_function_declaration_error = yes
7314 then
7315 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7316 fi
7317
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7319 # support. Without this, treatment of subnormals doesn't follow
7320 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007321 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 alpha*)
7323 BASECFLAGS="$BASECFLAGS -mieee"
7324 ;;
7325 esac
7326
7327 case $ac_sys_system in
7328 SCO_SV*)
7329 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7330 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007331
Ned Deily87adb6e2013-10-18 21:09:56 -07007332 Darwin*)
7333 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7334 # used to be here, but non-Apple gcc doesn't accept them.
7335 if test "${CC}" = gcc
7336 then
7337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007338$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007339 case "${UNIVERSALSDK}" in
7340 */MacOSX10.4u.sdk)
7341 # Build using 10.4 SDK, force usage of gcc when the
7342 # compiler is gcc, otherwise the user will get very
7343 # confusing error messages when building on OSX 10.6
7344 CC=gcc-4.0
7345 CPP=cpp-4.0
7346 ;;
7347 esac
7348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007349$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351
Ned Deily87adb6e2013-10-18 21:09:56 -07007352 if test "${enable_universalsdk}"
7353 then
7354 case "$UNIVERSAL_ARCHS" in
7355 32-bit)
7356 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7357 LIPO_32BIT_FLAGS=""
7358 ARCH_RUN_32BIT=""
7359 ;;
7360 64-bit)
7361 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7362 LIPO_32BIT_FLAGS=""
7363 ARCH_RUN_32BIT="true"
7364 ;;
7365 all)
7366 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7367 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7368 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7369 ;;
7370 intel)
7371 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7372 LIPO_32BIT_FLAGS="-extract i386"
7373 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7374 ;;
7375 intel-32)
7376 UNIVERSAL_ARCH_FLAGS="-arch i386"
7377 LIPO_32BIT_FLAGS=""
7378 ARCH_RUN_32BIT=""
7379 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007380 intel-64)
7381 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7382 LIPO_32BIT_FLAGS=""
7383 ARCH_RUN_32BIT="true"
7384 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007385 3-way)
7386 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7387 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7388 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7389 ;;
7390 *)
7391 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7392 ;;
7393 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394
Ned Deily87adb6e2013-10-18 21:09:56 -07007395 if test "${UNIVERSALSDK}" != "/"
7396 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007397 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7398 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007399 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007400 else
7401 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7402 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007403 fi
7404 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405
Ned Deily87adb6e2013-10-18 21:09:56 -07007406 # Calculate an appropriate deployment target for this build:
7407 # The deployment target value is used explicitly to enable certain
7408 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007409 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007410 # component of the string returned by distutils.get_platform().
7411 #
7412 # Use the value from:
7413 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7414 # 2. the operating system version of the build machine if >= 10.6
7415 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7416 # below to pick either 10.3, 10.4, or 10.5 as the target.
7417 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7420$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007421 cur_target_major=`sw_vers -productVersion | \
7422 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7423 cur_target_minor=`sw_vers -productVersion | \
7424 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7425 cur_target="${cur_target_major}.${cur_target_minor}"
7426 if test ${cur_target_major} -eq 10 && \
7427 test ${cur_target_minor} -ge 3 && \
7428 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007429 then
Ned Deily36820b62014-06-25 13:44:22 -07007430 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 cur_target=10.3
7432 if test ${enable_universalsdk}
7433 then
7434 case "$UNIVERSAL_ARCHS" in
7435 all|3-way|intel|64-bit)
7436 # These configurations were first supported in 10.5
7437 cur_target='10.5'
7438 ;;
7439 esac
7440 else
7441 if test `/usr/bin/arch` = "i386"
7442 then
7443 # 10.4 was the first release to support Intel archs
7444 cur_target="10.4"
7445 fi
7446 fi
7447 fi
7448 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007449
Ned Deily87adb6e2013-10-18 21:09:56 -07007450 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7451 # environment with a value that is the same as what we'll use
7452 # in the Makefile to ensure that we'll get the same compiler
7453 # environment during configure and build time.
7454 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7455 export MACOSX_DEPLOYMENT_TARGET
7456 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7458$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007459
Ned Deily87adb6e2013-10-18 21:09:56 -07007460 # end of Darwin* tests
7461 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462 esac
7463 ;;
7464
7465*)
7466 case $ac_sys_system in
7467 OpenUNIX*|UnixWare*)
7468 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7469 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470 SCO_SV*)
7471 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7472 ;;
7473 esac
7474 ;;
7475esac
7476
Zachary Ware5af85642015-12-21 12:09:17 -06007477# ICC needs -fp-model strict or floats behave badly
7478case "$CC" in
7479*icc*)
7480 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7481 ;;
7482esac
7483
T. Woutersddbfa2c2017-05-23 01:30:49 +02007484if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485 :
7486else
7487 OPT="-DNDEBUG $OPT"
7488fi
7489
7490if test "$ac_arch_flags"
7491then
7492 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7493fi
7494
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007495# On some compilers, pthreads are available without further options
7496# (e.g. MacOS X). On some of these systems, the compiler will not
7497# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7498# So we have to see first whether pthreads are available without
7499# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7501$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007502if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007503 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504else
Matthias Kloseb9621712010-04-24 17:59:49 +00007505 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007506 ac_cv_pthread_is_default=no
7507else
Matthias Kloseb9621712010-04-24 17:59:49 +00007508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007509/* end confdefs.h. */
7510
Stefan Krah7dba5942012-11-22 22:49:11 +01007511#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512#include <pthread.h>
7513
7514void* routine(void* p){return NULL;}
7515
7516int main(){
7517 pthread_t p;
7518 if(pthread_create(&p,NULL,routine,NULL)!=0)
7519 return 1;
7520 (void)pthread_detach(p);
7521 return 0;
7522}
7523
7524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007525if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526
7527 ac_cv_pthread_is_default=yes
7528 ac_cv_kthread=no
7529 ac_cv_pthread=no
7530
7531else
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007534rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7535 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007536fi
7537
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539fi
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7542$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543
7544
7545if test $ac_cv_pthread_is_default = yes
7546then
7547 ac_cv_kpthread=no
7548else
7549# -Kpthread, if available, provides the right #defines
7550# and linker options to make pthread_create available
7551# Some compilers won't report that they do not support -Kpthread,
7552# so we need to run a program to see whether it really made the
7553# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7555$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007556if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007557 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558else
7559 ac_save_cc="$CC"
7560CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007561if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007562 ac_cv_kpthread=no
7563else
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007565/* end confdefs.h. */
7566
Stefan Krah7dba5942012-11-22 22:49:11 +01007567#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007568#include <pthread.h>
7569
7570void* routine(void* p){return NULL;}
7571
7572int main(){
7573 pthread_t p;
7574 if(pthread_create(&p,NULL,routine,NULL)!=0)
7575 return 1;
7576 (void)pthread_detach(p);
7577 return 0;
7578}
7579
7580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007581if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582 ac_cv_kpthread=yes
7583else
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7587 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007588fi
7589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590CC="$ac_save_cc"
7591fi
7592
Matthias Kloseb9621712010-04-24 17:59:49 +00007593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7594$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595fi
7596
7597if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7598then
7599# -Kthread, if available, provides the right #defines
7600# and linker options to make pthread_create available
7601# Some compilers won't report that they do not support -Kthread,
7602# so we need to run a program to see whether it really made the
7603# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7605$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007606if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608else
7609 ac_save_cc="$CC"
7610CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007611if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612 ac_cv_kthread=no
7613else
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007615/* end confdefs.h. */
7616
Stefan Krah7dba5942012-11-22 22:49:11 +01007617#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618#include <pthread.h>
7619
7620void* routine(void* p){return NULL;}
7621
7622int main(){
7623 pthread_t p;
7624 if(pthread_create(&p,NULL,routine,NULL)!=0)
7625 return 1;
7626 (void)pthread_detach(p);
7627 return 0;
7628}
7629
7630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007631if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632 ac_cv_kthread=yes
7633else
Matthias Kloseb9621712010-04-24 17:59:49 +00007634 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007638fi
7639
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640CC="$ac_save_cc"
7641fi
7642
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7644$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645fi
7646
7647if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7648then
7649# -pthread, if available, provides the right #defines
7650# and linker options to make pthread_create available
7651# Some compilers won't report that they do not support -pthread,
7652# so we need to run a program to see whether it really made the
7653# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7655$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007656if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658else
7659 ac_save_cc="$CC"
7660CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007661if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662 ac_cv_pthread=no
7663else
Matthias Kloseb9621712010-04-24 17:59:49 +00007664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007665/* end confdefs.h. */
7666
Stefan Krah7dba5942012-11-22 22:49:11 +01007667#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668#include <pthread.h>
7669
7670void* routine(void* p){return NULL;}
7671
7672int main(){
7673 pthread_t p;
7674 if(pthread_create(&p,NULL,routine,NULL)!=0)
7675 return 1;
7676 (void)pthread_detach(p);
7677 return 0;
7678}
7679
7680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007681if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682 ac_cv_pthread=yes
7683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7687 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007688fi
7689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690CC="$ac_save_cc"
7691fi
7692
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7694$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695fi
7696
7697# If we have set a CC compiler flag for thread support then
7698# check if it works for CXX, too.
7699ac_cv_cxx_thread=no
7700if test ! -z "$CXX"
7701then
Matthias Kloseb9621712010-04-24 17:59:49 +00007702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7703$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704ac_save_cxx="$CXX"
7705
7706if test "$ac_cv_kpthread" = "yes"
7707then
7708 CXX="$CXX -Kpthread"
7709 ac_cv_cxx_thread=yes
7710elif test "$ac_cv_kthread" = "yes"
7711then
7712 CXX="$CXX -Kthread"
7713 ac_cv_cxx_thread=yes
7714elif test "$ac_cv_pthread" = "yes"
7715then
7716 CXX="$CXX -pthread"
7717 ac_cv_cxx_thread=yes
7718fi
7719
7720if test $ac_cv_cxx_thread = yes
7721then
7722 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7723 $CXX -c conftest.$ac_ext 2>&5
7724 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7725 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7726 then
7727 ac_cv_cxx_thread=yes
7728 else
7729 ac_cv_cxx_thread=no
7730 fi
7731 rm -fr conftest*
7732fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7734$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007735fi
7736CXX="$ac_save_cxx"
7737
7738
7739# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7741$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007742if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007746/* end confdefs.h. */
7747#include <stdlib.h>
7748#include <stdarg.h>
7749#include <string.h>
7750#include <float.h>
7751
7752int
7753main ()
7754{
7755
7756 ;
7757 return 0;
7758}
7759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007760if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761 ac_cv_header_stdc=yes
7762else
Matthias Kloseb9621712010-04-24 17:59:49 +00007763 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7766
7767if test $ac_cv_header_stdc = yes; then
7768 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007770/* end confdefs.h. */
7771#include <string.h>
7772
7773_ACEOF
7774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007775 $EGREP "memchr" >/dev/null 2>&1; then :
7776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777else
7778 ac_cv_header_stdc=no
7779fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007780rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781
7782fi
7783
7784if test $ac_cv_header_stdc = yes; then
7785 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787/* end confdefs.h. */
7788#include <stdlib.h>
7789
7790_ACEOF
7791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $EGREP "free" >/dev/null 2>&1; then :
7793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794else
7795 ac_cv_header_stdc=no
7796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007797rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798
7799fi
7800
7801if test $ac_cv_header_stdc = yes; then
7802 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804 :
7805else
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807/* end confdefs.h. */
7808#include <ctype.h>
7809#include <stdlib.h>
7810#if ((' ' & 0x0FF) == 0x020)
7811# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7812# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7813#else
7814# define ISLOWER(c) \
7815 (('a' <= (c) && (c) <= 'i') \
7816 || ('j' <= (c) && (c) <= 'r') \
7817 || ('s' <= (c) && (c) <= 'z'))
7818# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7819#endif
7820
7821#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7822int
7823main ()
7824{
7825 int i;
7826 for (i = 0; i < 256; i++)
7827 if (XOR (islower (i), ISLOWER (i))
7828 || toupper (i) != TOUPPER (i))
7829 return 2;
7830 return 0;
7831}
7832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007833if ac_fn_c_try_run "$LINENO"; then :
7834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835else
Matthias Kloseb9621712010-04-24 17:59:49 +00007836 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7839 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840fi
7841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007842fi
7843fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7845$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007846if test $ac_cv_header_stdc = yes; then
7847
Matthias Kloseb9621712010-04-24 17:59:49 +00007848$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007849
7850fi
7851
stratakise768c862018-01-23 16:11:24 +01007852for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007853fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007854ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007855sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007856utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007857poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007858sys/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 +01007859sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007860sys/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 +01007861sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007862sys/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 -07007863libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007864linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007865sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007866do :
7867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7868ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007869if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007871#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007872_ACEOF
7873
7874fi
7875
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876done
7877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007878ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007879for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007880 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7882$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007883if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007885else
Matthias Kloseb9621712010-04-24 17:59:49 +00007886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007887/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007888#include <sys/types.h>
7889#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007890
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
7894if ((DIR *) 0)
7895return 0;
7896 ;
7897 return 0;
7898}
7899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007900if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907eval ac_res=\$$as_ac_Header
7908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7909$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007910if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007911 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007912#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007913_ACEOF
7914
7915ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918done
7919# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7920if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7922$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007923if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007925else
Martin v. Löwis11437992002-04-12 09:54:03 +00007926 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007929
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007930/* Override any GCC internal prototype to avoid an error.
7931 Use char because int might match the return type of a GCC
7932 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007933#ifdef __cplusplus
7934extern "C"
7935#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007936char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007940return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 ;
7942 return 0;
7943}
7944_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945for ac_lib in '' dir; do
7946 if test -z "$ac_lib"; then
7947 ac_res="none required"
7948 else
7949 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007950 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007955rm -f core conftest.err conftest.$ac_objext \
7956 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007957 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960done
Victor Stinnere0be4232011-10-25 13:06:09 +02007961if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007962
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007963else
7964 ac_cv_search_opendir=no
7965fi
7966rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007967LIBS=$ac_func_search_save_LIBS
7968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7970$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007972if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007974
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Michael W. Hudson54241132001-12-07 15:38:26 +00007977else
Matthias Kloseb9621712010-04-24 17:59:49 +00007978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7979$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007980if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007982else
7983 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007984cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007987/* Override any GCC internal prototype to avoid an error.
7988 Use char because int might match the return type of a GCC
7989 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007990#ifdef __cplusplus
7991extern "C"
7992#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007993char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007994int
7995main ()
7996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007998 ;
7999 return 0;
8000}
8001_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008002for ac_lib in '' x; do
8003 if test -z "$ac_lib"; then
8004 ac_res="none required"
8005 else
8006 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008007 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008008 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008011fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008012rm -f core conftest.err conftest.$ac_objext \
8013 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008014 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017done
Victor Stinnere0be4232011-10-25 13:06:09 +02008018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008019
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008020else
8021 ac_cv_search_opendir=no
8022fi
8023rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008024LIBS=$ac_func_search_save_LIBS
8025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8027$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008029if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008032fi
8033
8034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8037$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008038if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008039 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008040else
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008042/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008043#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008044int
8045main ()
8046{
8047return makedev(0, 0);
8048 ;
8049 return 0;
8050}
8051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008053 ac_cv_header_sys_types_h_makedev=yes
8054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008056fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008057rm -f core conftest.err conftest.$ac_objext \
8058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008059
8060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8062$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008063
8064if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008065ac_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 +02008066if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008067
Matthias Kloseb9621712010-04-24 17:59:49 +00008068$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008069
8070fi
8071
8072
8073
8074 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 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 +02008076if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008077
Matthias Kloseb9621712010-04-24 17:59:49 +00008078$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008079
8080fi
8081
8082
8083 fi
8084fi
8085
Michael W. Hudson54241132001-12-07 15:38:26 +00008086
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008087# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8088# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8089SAVE_CFLAGS=$CFLAGS
8090CFLAGS="-std=c99 $CFLAGS"
8091for ac_header in bluetooth/bluetooth.h
8092do :
8093 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8094if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8095 cat >>confdefs.h <<_ACEOF
8096#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8097_ACEOF
8098
8099fi
8100
8101done
8102
8103CFLAGS=$SAVE_CFLAGS
8104
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008105# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8106for ac_header in net/if.h
8107do :
8108 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8109#ifdef STDC_HEADERS
8110# include <stdlib.h>
8111# include <stddef.h>
8112#else
8113# ifdef HAVE_STDLIB_H
8114# include <stdlib.h>
8115# endif
8116#endif
8117#ifdef HAVE_SYS_SOCKET_H
8118# include <sys/socket.h>
8119#endif
8120
8121"
Victor Stinnere0be4232011-10-25 13:06:09 +02008122if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008123 cat >>confdefs.h <<_ACEOF
8124#define HAVE_NET_IF_H 1
8125_ACEOF
8126
8127fi
8128
8129done
8130
8131
Martin v. Löwis11017b12006-01-14 18:12:57 +00008132# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008133for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008134do :
8135 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 +00008136#ifdef HAVE_ASM_TYPES_H
8137#include <asm/types.h>
8138#endif
8139#ifdef HAVE_SYS_SOCKET_H
8140#include <sys/socket.h>
8141#endif
8142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143"
Victor Stinnere0be4232011-10-25 13:06:09 +02008144if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008145 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008146#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008147_ACEOF
8148
8149fi
8150
8151done
8152
8153
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008154# On Linux, qrtr.h requires asm/types.h
8155for ac_header in linux/qrtr.h
8156do :
8157 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8158#ifdef HAVE_ASM_TYPES_H
8159#include <asm/types.h>
8160#endif
8161#ifdef HAVE_SYS_SOCKET_H
8162#include <sys/socket.h>
8163#endif
8164
8165"
8166if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8167 cat >>confdefs.h <<_ACEOF
8168#define HAVE_LINUX_QRTR_H 1
8169_ACEOF
8170
8171fi
8172
8173done
8174
8175
caaveryeffc12f2017-09-06 18:18:10 -04008176for ac_header in linux/vm_sockets.h
8177do :
8178 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8179#ifdef HAVE_SYS_SOCKET_H
8180#include <sys/socket.h>
8181#endif
8182
8183"
8184if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8185 cat >>confdefs.h <<_ACEOF
8186#define HAVE_LINUX_VM_SOCKETS_H 1
8187_ACEOF
8188
8189fi
8190
8191done
8192
8193
Charles-François Natali47413c12011-10-06 19:47:44 +02008194# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008195for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008196do :
8197 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8198ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8199#ifdef HAVE_SYS_SOCKET_H
8200#include <sys/socket.h>
8201#endif
8202
8203"
8204if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8205 cat >>confdefs.h <<_ACEOF
8206#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8207_ACEOF
8208
8209fi
8210
8211done
8212
8213
Guido van Rossum627b2d71993-12-24 10:39:16 +00008214# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008215was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8217$as_echo_n "checking for clock_t in time.h... " >&6; }
8218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008219/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008220#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008221
8222_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008224 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008225 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008226else
Martin v. Löwis11437992002-04-12 09:54:03 +00008227
8228
Matthias Kloseb9621712010-04-24 17:59:49 +00008229$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008230
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008231
Guido van Rossum627b2d71993-12-24 10:39:16 +00008232fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008233rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008234
Matthias Kloseb9621712010-04-24 17:59:49 +00008235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8236$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008237
Matthias Kloseb9621712010-04-24 17:59:49 +00008238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8239$as_echo_n "checking for makedev... " >&6; }
8240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008241/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008242
Jesus Cea740f53a2010-04-28 11:35:30 +00008243#if defined(MAJOR_IN_MKDEV)
8244#include <sys/mkdev.h>
8245#elif defined(MAJOR_IN_SYSMACROS)
8246#include <sys/sysmacros.h>
8247#else
8248#include <sys/types.h>
8249#endif
8250
Neal Norwitz11690112002-07-30 01:08:28 +00008251int
8252main ()
8253{
Jesus Cea740f53a2010-04-28 11:35:30 +00008254
8255 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008256 ;
8257 return 0;
8258}
Matthias Kloseb159a552010-04-25 21:00:44 +00008259
Neal Norwitz11690112002-07-30 01:08:28 +00008260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008261if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008262 ac_cv_has_makedev=yes
8263else
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266rm -f core conftest.err conftest.$ac_objext \
8267 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8269$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008270if test "$ac_cv_has_makedev" = "yes"; then
8271
Matthias Kloseb9621712010-04-24 17:59:49 +00008272$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008273
8274fi
8275
Christian Heimes985ecdc2013-11-20 11:46:18 +01008276# byte swapping
8277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8278$as_echo_n "checking for le64toh... " >&6; }
8279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8280/* end confdefs.h. */
8281
8282#ifdef HAVE_ENDIAN_H
8283#include <endian.h>
8284#elif defined(HAVE_SYS_ENDIAN_H)
8285#include <sys/endian.h>
8286#endif
8287
8288int
8289main ()
8290{
8291
8292 le64toh(1)
8293 ;
8294 return 0;
8295}
8296
8297_ACEOF
8298if ac_fn_c_try_link "$LINENO"; then :
8299 ac_cv_has_le64toh=yes
8300else
8301 ac_cv_has_le64toh=no
8302fi
8303rm -f core conftest.err conftest.$ac_objext \
8304 conftest$ac_exeext conftest.$ac_ext
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8306$as_echo "$ac_cv_has_le64toh" >&6; }
8307if test "$ac_cv_has_le64toh" = "yes"; then
8308
8309$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8310
8311fi
8312
Martin v. Löwis399a6892002-10-04 10:22:02 +00008313use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008314# Don't use largefile support for GNU/Hurd
8315case $ac_sys_system in GNU*)
8316 use_lfs=no
8317esac
8318
Martin v. Löwis399a6892002-10-04 10:22:02 +00008319if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008320# Two defines needed to enable largefile support on various platforms
8321# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008322case $ac_sys_system/$ac_sys_release in
8323AIX*)
8324
8325$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8326
8327 ;;
8328esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008331
8332
Matthias Kloseb9621712010-04-24 17:59:49 +00008333$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008334
Martin v. Löwis399a6892002-10-04 10:22:02 +00008335fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008336
Guido van Rossum84e7b241996-08-19 21:59:00 +00008337# Add some code to confdefs.h so that the test for off_t works on SCO
8338cat >> confdefs.h <<\EOF
8339#if defined(SCO_DS)
8340#undef _OFF_T
8341#endif
8342EOF
8343
Guido van Rossumef2255b2000-03-10 22:30:29 +00008344# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008345ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008346if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008348else
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350cat >>confdefs.h <<_ACEOF
8351#define mode_t int
8352_ACEOF
8353
8354fi
8355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008357if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008358
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008359else
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
8361cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008363_ACEOF
8364
8365fi
8366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008368if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008370else
Martin v. Löwis11437992002-04-12 09:54:03 +00008371
8372cat >>confdefs.h <<_ACEOF
8373#define pid_t int
8374_ACEOF
8375
8376fi
8377
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008378
Martin v. Löwis11437992002-04-12 09:54:03 +00008379cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008380#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008381_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008382
Matthias Kloseb9621712010-04-24 17:59:49 +00008383ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008386else
Martin v. Löwis11437992002-04-12 09:54:03 +00008387
8388cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008389#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008390_ACEOF
8391
8392fi
8393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8395$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008396if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008398else
Matthias Kloseb9621712010-04-24 17:59:49 +00008399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008400/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008401#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008402
8403_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008405 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008406 ac_cv_type_uid_t=yes
8407else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008408 ac_cv_type_uid_t=no
8409fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008410rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8414$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008415if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008416
Matthias Kloseb9621712010-04-24 17:59:49 +00008417$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008418
8419
Matthias Kloseb9621712010-04-24 17:59:49 +00008420$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008421
8422fi
8423
Mark Dickinson983bc162012-12-02 12:11:38 +00008424
Matthias Kloseb9621712010-04-24 17:59:49 +00008425ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008426if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427
Matthias Kloseb9621712010-04-24 17:59:49 +00008428$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008429
8430fi
8431
Stefan Krah1919b7e2012-03-21 18:25:23 +01008432ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8433if test "x$ac_cv_type___uint128_t" = xyes; then :
8434
8435$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8436
8437fi
8438
Jack Jansendd19cf82001-12-06 22:36:17 +00008439
Michael W. Hudson54241132001-12-07 15:38:26 +00008440# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008441# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442# The cast to long int works around a bug in the HP C Compiler
8443# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8444# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8445# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8447$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008448if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008450else
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 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 +00008452
Martin v. Löwis11437992002-04-12 09:54:03 +00008453else
Matthias Kloseb9621712010-04-24 17:59:49 +00008454 if test "$ac_cv_type_int" = yes; then
8455 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8456$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008457as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008458See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459 else
8460 ac_cv_sizeof_int=0
8461 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008462fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008463
Martin v. Löwis11437992002-04-12 09:54:03 +00008464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8466$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467
8468
8469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008471#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008472_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008473
8474
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475# The cast to long int works around a bug in the HP C Compiler
8476# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8477# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8478# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8480$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008481if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008483else
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 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 +00008485
Martin v. Löwis11437992002-04-12 09:54:03 +00008486else
Matthias Kloseb9621712010-04-24 17:59:49 +00008487 if test "$ac_cv_type_long" = yes; then
8488 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008490as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008491See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 else
8493 ac_cv_sizeof_long=0
8494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008496
Martin v. Löwis11437992002-04-12 09:54:03 +00008497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8499$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500
8501
8502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008504#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008505_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008506
8507
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508# The cast to long int works around a bug in the HP C Compiler
8509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8511# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8513$as_echo_n "checking size of long long... " >&6; }
8514if ${ac_cv_sizeof_long_long+:} false; then :
8515 $as_echo_n "(cached) " >&6
8516else
8517 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8518
8519else
8520 if test "$ac_cv_type_long_long" = yes; then
8521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8523as_fn_error 77 "cannot compute sizeof (long long)
8524See \`config.log' for more details" "$LINENO" 5; }
8525 else
8526 ac_cv_sizeof_long_long=0
8527 fi
8528fi
8529
8530fi
8531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8532$as_echo "$ac_cv_sizeof_long_long" >&6; }
8533
8534
8535
8536cat >>confdefs.h <<_ACEOF
8537#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8538_ACEOF
8539
8540
8541# The cast to long int works around a bug in the HP C Compiler
8542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8544# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8546$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008547if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008549else
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 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 +00008551
Martin v. Löwis11437992002-04-12 09:54:03 +00008552else
Matthias Kloseb9621712010-04-24 17:59:49 +00008553 if test "$ac_cv_type_void_p" = yes; then
8554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008556as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008557See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 else
8559 ac_cv_sizeof_void_p=0
8560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008562
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8565$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008566
8567
8568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008570#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008571_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008572
8573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574# The cast to long int works around a bug in the HP C Compiler
8575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8577# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8579$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008580if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008582else
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 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 +00008584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585else
Matthias Kloseb9621712010-04-24 17:59:49 +00008586 if test "$ac_cv_type_short" = yes; then
8587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008589as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008590See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591 else
8592 ac_cv_sizeof_short=0
8593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8598$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599
8600
8601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008603#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008604_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008605
8606
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008607# The cast to long int works around a bug in the HP C Compiler
8608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8610# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8612$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008613if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008615else
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 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 +00008617
Martin v. Löwis11437992002-04-12 09:54:03 +00008618else
Matthias Kloseb9621712010-04-24 17:59:49 +00008619 if test "$ac_cv_type_float" = yes; then
8620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008622as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008623See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 else
8625 ac_cv_sizeof_float=0
8626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008628
Martin v. Löwis11437992002-04-12 09:54:03 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8631$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008632
8633
8634
Martin v. Löwis11437992002-04-12 09:54:03 +00008635cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008636#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008637_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008638
8639
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8645$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008646if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008648else
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 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 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651else
Matthias Kloseb9621712010-04-24 17:59:49 +00008652 if test "$ac_cv_type_double" = yes; then
8653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008655as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008656See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657 else
8658 ac_cv_sizeof_double=0
8659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8664$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008665
8666
8667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008669#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008670_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008671
8672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008673# The cast to long int works around a bug in the HP C Compiler
8674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8676# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8678$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008679if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008681else
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 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 +00008683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684else
Matthias Kloseb9621712010-04-24 17:59:49 +00008685 if test "$ac_cv_type_fpos_t" = yes; then
8686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008688as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008689See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690 else
8691 ac_cv_sizeof_fpos_t=0
8692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008693fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008694
Martin v. Löwis11437992002-04-12 09:54:03 +00008695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8697$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008698
8699
8700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008702#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008703_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008704
Michael W. Hudson54241132001-12-07 15:38:26 +00008705
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706# The cast to long int works around a bug in the HP C Compiler
8707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8709# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8711$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008712if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008714else
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 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 +00008716
Martin v. Löwis18e16552006-02-15 17:27:45 +00008717else
Matthias Kloseb9621712010-04-24 17:59:49 +00008718 if test "$ac_cv_type_size_t" = yes; then
8719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008721as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008722See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723 else
8724 ac_cv_sizeof_size_t=0
8725 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008726fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008727
Martin v. Löwis18e16552006-02-15 17:27:45 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8730$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732
8733
Martin v. Löwis18e16552006-02-15 17:27:45 +00008734cat >>confdefs.h <<_ACEOF
8735#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8736_ACEOF
8737
8738
Christian Heimes400adb02008-02-01 08:12:03 +00008739# The cast to long int works around a bug in the HP C Compiler
8740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8742# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8744$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008745if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008747else
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 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 +00008749
Christian Heimes400adb02008-02-01 08:12:03 +00008750else
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 if test "$ac_cv_type_pid_t" = yes; then
8752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008754as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008755See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008756 else
8757 ac_cv_sizeof_pid_t=0
8758 fi
8759fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008760
Christian Heimes400adb02008-02-01 08:12:03 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8763$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008764
8765
8766
8767cat >>confdefs.h <<_ACEOF
8768#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8769_ACEOF
8770
8771
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008772# The cast to long int works around a bug in the HP C Compiler
8773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8775# This bug is HP SR number 8606223364.
8776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8777$as_echo_n "checking size of uintptr_t... " >&6; }
8778if ${ac_cv_sizeof_uintptr_t+:} false; then :
8779 $as_echo_n "(cached) " >&6
8780else
8781 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8782
8783else
8784 if test "$ac_cv_type_uintptr_t" = yes; then
8785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8787as_fn_error 77 "cannot compute sizeof (uintptr_t)
8788See \`config.log' for more details" "$LINENO" 5; }
8789 else
8790 ac_cv_sizeof_uintptr_t=0
8791 fi
8792fi
8793
8794fi
8795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8796$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8797
8798
8799
8800cat >>confdefs.h <<_ACEOF
8801#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8802_ACEOF
8803
8804
Michael W. Hudson54241132001-12-07 15:38:26 +00008805
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008806
Eitan Adler3055c942018-05-15 22:58:09 -07008807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8808$as_echo_n "checking for long double... " >&6; }
8809if ${ac_cv_type_long_double+:} false; then :
8810 $as_echo_n "(cached) " >&6
8811else
8812 if test "$GCC" = yes; then
8813 ac_cv_type_long_double=yes
8814 else
8815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8816/* end confdefs.h. */
8817/* The Stardent Vistra knows sizeof (long double), but does
8818 not support it. */
8819 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008820int
8821main ()
8822{
Eitan Adler3055c942018-05-15 22:58:09 -07008823static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8824 sizeof (double) <= sizeof (long double))];
8825test_array [0] = 0;
8826return test_array [0];
8827
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008828 ;
8829 return 0;
8830}
8831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008832if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008833 ac_cv_type_long_double=yes
8834else
8835 ac_cv_type_long_double=no
8836fi
8837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8838 fi
8839fi
8840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8841$as_echo "$ac_cv_type_long_double" >&6; }
8842 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008845
Eitan Adler3055c942018-05-15 22:58:09 -07008846 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008847
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008848# The cast to long int works around a bug in the HP C Compiler
8849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8851# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8853$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008854if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008855 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008856else
Matthias Kloseb9621712010-04-24 17:59:49 +00008857 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 +00008858
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008859else
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if test "$ac_cv_type_long_double" = yes; then
8861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008863as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008864See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008865 else
8866 ac_cv_sizeof_long_double=0
8867 fi
8868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008870fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8872$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
8874
8875
8876cat >>confdefs.h <<_ACEOF
8877#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8878_ACEOF
8879
8880
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882# The cast to long int works around a bug in the HP C Compiler
8883# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8884# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8885# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8887$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008888if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008889 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008890else
Matthias Kloseb9621712010-04-24 17:59:49 +00008891 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 +00008892
Thomas Woutersb2137042007-02-01 18:02:27 +00008893else
Matthias Kloseb9621712010-04-24 17:59:49 +00008894 if test "$ac_cv_type__Bool" = yes; then
8895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008897as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008898See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899 else
8900 ac_cv_sizeof__Bool=0
8901 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903
Thomas Woutersb2137042007-02-01 18:02:27 +00008904fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8906$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907
8908
8909
Thomas Woutersb2137042007-02-01 18:02:27 +00008910cat >>confdefs.h <<_ACEOF
8911#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8912_ACEOF
8913
8914
Thomas Woutersb2137042007-02-01 18:02:27 +00008915
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008916# The cast to long int works around a bug in the HP C Compiler
8917# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8918# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8919# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8921$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008922if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924else
Matthias Kloseb9621712010-04-24 17:59:49 +00008925 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008926#ifdef HAVE_SYS_TYPES_H
8927#include <sys/types.h>
8928#endif
8929
Matthias Kloseb9621712010-04-24 17:59:49 +00008930"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008931
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 if test "$ac_cv_type_off_t" = yes; then
8934 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008936as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008937See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008938 else
8939 ac_cv_sizeof_off_t=0
8940 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008942
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8945$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008947
8948
Martin v. Löwis11437992002-04-12 09:54:03 +00008949cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008950#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008951_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008952
Michael W. Hudson54241132001-12-07 15:38:26 +00008953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954
Matthias Kloseb9621712010-04-24 17:59:49 +00008955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8956$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008957if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008958 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008959
Matthias Kloseb9621712010-04-24 17:59:49 +00008960$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008961
Matthias Kloseb9621712010-04-24 17:59:49 +00008962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8963$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008964else
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008967fi
8968
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008969# The cast to long int works around a bug in the HP C Compiler
8970# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8971# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8972# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8974$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008975if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008976 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008979#ifdef HAVE_SYS_TYPES_H
8980#include <sys/types.h>
8981#endif
8982#ifdef HAVE_TIME_H
8983#include <time.h>
8984#endif
8985
Matthias Kloseb9621712010-04-24 17:59:49 +00008986"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008988else
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 if test "$ac_cv_type_time_t" = yes; then
8990 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008992as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008993See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994 else
8995 ac_cv_sizeof_time_t=0
8996 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008997fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008998
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008999fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9001$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009003
9004
Martin v. Löwis11437992002-04-12 09:54:03 +00009005cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009006#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009007_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009008
Michael W. Hudson54241132001-12-07 15:38:26 +00009009
9010
Trent Mick635f6fb2000-08-23 21:33:05 +00009011# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009012ac_save_cc="$CC"
9013if test "$ac_cv_kpthread" = "yes"
9014then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009015elif test "$ac_cv_kthread" = "yes"
9016then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009017elif test "$ac_cv_pthread" = "yes"
9018then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009019fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020
Matthias Kloseb9621712010-04-24 17:59:49 +00009021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9022$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009023have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009025/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009026
9027 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
9030{
Guido van Rossum12580492000-09-24 16:47:19 +00009031pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ;
9033 return 0;
9034}
Matthias Kloseb159a552010-04-25 21:00:44 +00009035
Martin v. Löwis11437992002-04-12 09:54:03 +00009036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009037if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009038 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9042$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009043if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9047# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9049$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009050if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009051 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009052else
Matthias Kloseb9621712010-04-24 17:59:49 +00009053 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009054#ifdef HAVE_PTHREAD_H
9055#include <pthread.h>
9056#endif
9057
Matthias Kloseb9621712010-04-24 17:59:49 +00009058"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009059
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009060else
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 if test "$ac_cv_type_pthread_t" = yes; then
9062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009064as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009065See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009066 else
9067 ac_cv_sizeof_pthread_t=0
9068 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009070
Trent Mick635f6fb2000-08-23 21:33:05 +00009071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9073$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009075
9076
Martin v. Löwis11437992002-04-12 09:54:03 +00009077cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009078#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009079_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009080
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009081
Trent Mick635f6fb2000-08-23 21:33:05 +00009082fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009083
9084# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9085# This checking will be unnecessary after removing deprecated TLS API.
9086# The cast to long int works around a bug in the HP C Compiler
9087# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9088# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9089# This bug is HP SR number 8606223364.
9090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9091$as_echo_n "checking size of pthread_key_t... " >&6; }
9092if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9093 $as_echo_n "(cached) " >&6
9094else
9095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9096"; then :
9097
9098else
9099 if test "$ac_cv_type_pthread_key_t" = yes; then
9100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9102as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9103See \`config.log' for more details" "$LINENO" 5; }
9104 else
9105 ac_cv_sizeof_pthread_key_t=0
9106 fi
9107fi
9108
9109fi
9110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9111$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9112
9113
9114
9115cat >>confdefs.h <<_ACEOF
9116#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9117_ACEOF
9118
9119
9120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9121$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9122if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9124/* end confdefs.h. */
9125#include <pthread.h>
9126int
9127main ()
9128{
9129pthread_key_t k; k * 1;
9130 ;
9131 return 0;
9132}
9133_ACEOF
9134if ac_fn_c_try_compile "$LINENO"; then :
9135 ac_pthread_key_t_is_arithmetic_type=yes
9136else
9137 ac_pthread_key_t_is_arithmetic_type=no
9138
9139fi
9140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9142$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9143 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9144
9145$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9146
9147 fi
9148else
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9150$as_echo "no" >&6; }
9151fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009152CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009153
Michael W. Hudson54241132001-12-07 15:38:26 +00009154
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009155case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009156 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009157 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9158 ;;
9159 Darwin/*)
9160 OTHER_LIBTOOL_OPT=""
9161 ;;
9162esac
9163
9164
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009165
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009166case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009167 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009168 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9169 if test "${enable_universalsdk}"; then
9170 :
9171 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009172 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009173 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009174 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009175 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009176 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009177 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009178 if test ${gcc_version} '<' 4.0
9179 then
9180 LIBTOOL_CRUFT="-lcc_dynamic"
9181 else
9182 LIBTOOL_CRUFT=""
9183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009184 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009185 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009186else
Matthias Kloseb9621712010-04-24 17:59:49 +00009187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009188/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009189
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009190 #include <unistd.h>
9191 int main(int argc, char*argv[])
9192 {
9193 if (sizeof(long) == 4) {
9194 return 0;
9195 } else {
9196 return 1;
9197 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009198 }
9199
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009201if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009202 ac_osx_32bit=yes
9203else
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009205fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009208fi
9209
9210
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009211 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009212 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009213 i386)
9214 MACOSX_DEFAULT_ARCH="i386"
9215 ;;
9216 ppc)
9217 MACOSX_DEFAULT_ARCH="ppc"
9218 ;;
9219 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009220 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009221 ;;
9222 esac
9223 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009224 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009225 i386)
9226 MACOSX_DEFAULT_ARCH="x86_64"
9227 ;;
9228 ppc)
9229 MACOSX_DEFAULT_ARCH="ppc64"
9230 ;;
9231 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009232 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009233 ;;
9234 esac
9235
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236 fi
9237
9238 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009239 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009240 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009241esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9243$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009244if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009245then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009246 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009247 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009248 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009249
Matthias Kloseb9621712010-04-24 17:59:49 +00009250$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009251
Matthias Kloseb9621712010-04-24 17:59:49 +00009252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9253$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009254 if test $enable_shared = "yes"
9255 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009256 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 +00009257 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009258else
Matthias Kloseb9621712010-04-24 17:59:49 +00009259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9260$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009261fi
9262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9264$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009265case $ac_sys_system/$ac_sys_release in
9266 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009267
Matthias Kloseb9621712010-04-24 17:59:49 +00009268$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009269
Matthias Kloseb9621712010-04-24 17:59:49 +00009270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9271$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009272 ;;
9273 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9275$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009276 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009277esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009278
Guido van Rossum0a516c91994-09-12 10:58:40 +00009279# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009280
Michael W. Hudson54241132001-12-07 15:38:26 +00009281
9282
9283
9284
Benjamin Peterson99f03762010-04-11 22:15:28 +00009285
Thomas Wouters477c8d52006-05-27 19:21:47 +00009286
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009287# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9288# -- usually .so, .sl on HP-UX, .dll on Cygwin
9289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9290$as_echo_n "checking the extension of shared libraries... " >&6; }
9291if test -z "$SHLIB_SUFFIX"; then
9292 case $ac_sys_system in
9293 hp*|HP*)
9294 case `uname -m` in
9295 ia64) SHLIB_SUFFIX=.so;;
9296 *) SHLIB_SUFFIX=.sl;;
9297 esac
9298 ;;
9299 CYGWIN*) SHLIB_SUFFIX=.dll;;
9300 *) SHLIB_SUFFIX=.so;;
9301 esac
9302fi
9303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9304$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009305
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009307# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009308# (Shared libraries in this instance are shared modules to be loaded into
9309# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9311$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009312if test -z "$LDSHARED"
9313then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009314 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009315 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009316 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009317 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009318 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009319 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009320 if test "$GCC" = "yes" ; then
9321 LDSHARED='$(CC) -shared'
9322 LDCXXSHARED='$(CXX) -shared'
9323 else
9324 LDSHARED='$(CC) -G'
9325 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009326 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009327 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009328 if test "$GCC" = "yes" ; then
9329 LDSHARED='$(CC) -shared'
9330 LDCXXSHARED='$(CXX) -shared'
9331 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009332 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009333 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009334 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009335 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009336 LDSHARED='$(CC) -bundle'
9337 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009338 if test "$enable_framework" ; then
9339 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009340 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9341 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009342 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009343 else
9344 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009345 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009346 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009347 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009348 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009349 LDSHARED='$(CC) -bundle'
9350 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009351 if test "$enable_framework" ; then
9352 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009353 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9354 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009355 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009356 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009357 # No framework, use the Python app as bundle-loader
9358 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009359 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009360 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009361 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009362 Darwin/*)
9363 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9364 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009365
Ned Deily36820b62014-06-25 13:44:22 -07009366 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9367 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9368 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9369 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9370 if test ${dep_target_major} -eq 10 && \
9371 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009372 then
Ned Deily36820b62014-06-25 13:44:22 -07009373 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009374 LDSHARED='$(CC) -bundle'
9375 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009376 if test "$enable_framework" ; then
9377 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009378 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9379 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009380 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009381 else
9382 # No framework, use the Python app as bundle-loader
9383 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9384 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009385 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009386 fi
Ned Deily36820b62014-06-25 13:44:22 -07009387 else
9388 # building for OS X 10.3 and later
9389 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9390 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9391 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009392 fi
9393 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009394 Linux*|GNU*|QNX*)
9395 LDSHARED='$(CC) -shared'
9396 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009397 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009398 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009399 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009400 LDSHARED='$(CC) -shared'
9401 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009402 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009403 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009404 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009405 OpenBSD*)
9406 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9407 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009408 LDSHARED='$(CC) -shared $(CCSHARED)'
9409 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009410 else
9411 case `uname -r` in
9412 [01].* | 2.[0-7] | 2.[0-7].*)
9413 LDSHARED="ld -Bshareable ${LDFLAGS}"
9414 ;;
9415 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED='$(CC) -shared $(CCSHARED)'
9417 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009418 ;;
9419 esac
9420 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009421 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009422 LDSHARED='$(CC) -shared'
9423 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009424 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009425 if test "$GCC" = "yes" ; then
9426 LDSHARED='$(CC) -shared'
9427 LDCXXSHARED='$(CXX) -shared'
9428 else
9429 LDSHARED='$(CC) -G'
9430 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009431 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009432 SCO_SV*)
9433 LDSHARED='$(CC) -Wl,-G,-Bexport'
9434 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9435 CYGWIN*)
9436 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9437 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009438 *) LDSHARED="ld";;
9439 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9442$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009443LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009444BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009445# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009446# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9448$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009449if test -z "$CCSHARED"
9450then
Guido van Rossum07397971997-04-29 21:49:50 +00009451 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009452 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009453 then CCSHARED="-fPIC";
9454 elif test `uname -p` = sparc;
9455 then CCSHARED="-xcode=pic32";
9456 else CCSHARED="-Kpic";
9457 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009458 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009459 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009460 else CCSHARED="+z";
9461 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009462 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009463 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009464 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009465 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009466 if test "$GCC" = "yes"
9467 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009469 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009470 SCO_SV*)
9471 if test "$GCC" = "yes"
9472 then CCSHARED="-fPIC"
9473 else CCSHARED="-Kpic -belf"
9474 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009475 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009476fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9478$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009479# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009480# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9482$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009483if test -z "$LINKFORSHARED"
9484then
Guido van Rossum07397971997-04-29 21:49:50 +00009485 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009486 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009487 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009488 LINKFORSHARED="-Wl,-E -Wl,+s";;
9489# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009490 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009491 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009492 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009494 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009495
9496 # Issue #18075: the default maximum stack size (8MBytes) is too
9497 # small for the default recursion limit. Increase the stack size
9498 # to ensure that tests don't crash
9499 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9500
Jack Jansene578a632001-08-15 01:27:14 +00009501 if test "$enable_framework"
9502 then
Jack Jansenda49e192005-01-07 13:08:22 +00009503 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009504 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009505 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009506 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009507 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009508 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009509 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009510 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9511 then
9512 LINKFORSHARED="-Wl,--export-dynamic"
9513 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009514 SunOS/5*) case $CC in
9515 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009516 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009517 then
9518 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009519 fi;;
9520 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009521 CYGWIN*)
9522 if test $enable_shared = "no"
9523 then
9524 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9525 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009526 QNX*)
9527 # -Wl,-E causes the symbols to be added to the dynamic
9528 # symbol table so that they can be found when a module
9529 # is loaded. -N 2048K causes the stack size to be set
9530 # to 2048 kilobytes so that the stack doesn't overflow
9531 # when running test_compile.py.
9532 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009533 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9536$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009537
Michael W. Hudson54241132001-12-07 15:38:26 +00009538
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9541$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009542if test ! "$LIBRARY" = "$LDLIBRARY"
9543then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009544 case $ac_sys_system in
9545 CYGWIN*)
9546 # Cygwin needs CCSHARED when building extension DLLs
9547 # but not when building the interpreter DLL.
9548 CFLAGSFORSHARED='';;
9549 *)
9550 CFLAGSFORSHARED='$(CCSHARED)'
9551 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009552fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9554$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009555
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009556# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9557# library (with --enable-shared).
9558# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009559# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9560# if it is not required, since it creates a dependency of the shared library
9561# to LIBS. This, in turn, means that applications linking the shared libpython
9562# don't need to link LIBS explicitly. The default should be only changed
9563# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009564
Matthias Kloseb9621712010-04-24 17:59:49 +00009565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9566$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009567case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009568 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009569 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009570esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9572$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009573
9574
Guido van Rossum627b2d71993-12-24 10:39:16 +00009575# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9577$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009579 $as_echo_n "(cached) " >&6
9580else
9581 ac_check_lib_save_LIBS=$LIBS
9582LIBS="-lsendfile $LIBS"
9583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9584/* end confdefs.h. */
9585
9586/* Override any GCC internal prototype to avoid an error.
9587 Use char because int might match the return type of a GCC
9588 builtin and then its argument prototype would still apply. */
9589#ifdef __cplusplus
9590extern "C"
9591#endif
9592char sendfile ();
9593int
9594main ()
9595{
9596return sendfile ();
9597 ;
9598 return 0;
9599}
9600_ACEOF
9601if ac_fn_c_try_link "$LINENO"; then :
9602 ac_cv_lib_sendfile_sendfile=yes
9603else
9604 ac_cv_lib_sendfile_sendfile=no
9605fi
9606rm -f core conftest.err conftest.$ac_objext \
9607 conftest$ac_exeext conftest.$ac_ext
9608LIBS=$ac_check_lib_save_LIBS
9609fi
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9611$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009612if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009613 cat >>confdefs.h <<_ACEOF
9614#define HAVE_LIBSENDFILE 1
9615_ACEOF
9616
9617 LIBS="-lsendfile $LIBS"
9618
9619fi
9620
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9622$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009623if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009624 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625else
Martin v. Löwis11437992002-04-12 09:54:03 +00009626 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009627LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009631/* Override any GCC internal prototype to avoid an error.
9632 Use char because int might match the return type of a GCC
9633 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009634#ifdef __cplusplus
9635extern "C"
9636#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009637char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009638int
9639main ()
9640{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009642 ;
9643 return 0;
9644}
9645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009646if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Matthias Kloseb9621712010-04-24 17:59:49 +00009649 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009651rm -f core conftest.err conftest.$ac_objext \
9652 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009653LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009654fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9656$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009657if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 cat >>confdefs.h <<_ACEOF
9659#define HAVE_LIBDL 1
9660_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009661
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009662 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009663
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009664fi
9665 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9667$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009668if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009672LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676/* Override any GCC internal prototype to avoid an error.
9677 Use char because int might match the return type of a GCC
9678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009682char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693else
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9701$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 cat >>confdefs.h <<_ACEOF
9704#define HAVE_LIBDLD 1
9705_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009707 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009709fi
9710 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009711
Michael Felt0d3ccb42017-12-30 22:39:20 +01009712# checks for uuid.h location
9713for ac_header in uuid/uuid.h uuid.h
9714do :
9715 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9716ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9717if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9718 cat >>confdefs.h <<_ACEOF
9719#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9720_ACEOF
9721
9722fi
9723
9724done
9725
9726
Berker Peksag9a10ff42017-11-08 23:09:16 +03009727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9728$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9730/* end confdefs.h. */
9731#include <uuid/uuid.h>
9732int
9733main ()
9734{
9735
9736#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009737void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009738#endif
9739
9740 ;
9741 return 0;
9742}
9743_ACEOF
9744if ac_fn_c_try_compile "$LINENO"; then :
9745
9746$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9747
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9749$as_echo "yes" >&6; }
9750else
9751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9752$as_echo "no" >&6; }
9753
9754fi
9755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9756
Michael Felt0d3ccb42017-12-30 22:39:20 +01009757# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009758# FreeBSD and OpenBSD provides support as well
9759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9760$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9762/* end confdefs.h. */
9763#include <uuid.h>
9764int
9765main ()
9766{
9767
9768#ifndef uuid_create
9769void *x = uuid_create
9770#endif
9771
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776if ac_fn_c_try_compile "$LINENO"; then :
9777
9778$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9779
9780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9781$as_echo "yes" >&6; }
9782else
9783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784$as_echo "no" >&6; }
9785
9786fi
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9788
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009789# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9790# stream in big-endian byte-order
9791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9792$as_echo_n "checking for uuid_enc_be... " >&6; }
9793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9794/* end confdefs.h. */
9795#include <uuid.h>
9796int
9797main ()
9798{
9799
9800#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009801void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009802#endif
9803
9804 ;
9805 return 0;
9806}
9807_ACEOF
9808if ac_fn_c_try_compile "$LINENO"; then :
9809
9810$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9811
9812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
9814else
9815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9816$as_echo "no" >&6; }
9817
9818fi
9819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9820
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009821# 'Real Time' functions on Solaris
9822# posix4 on Solaris 2.6
9823# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009826if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009828else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009829 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009831/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833/* Override any GCC internal prototype to avoid an error.
9834 Use char because int might match the return type of a GCC
9835 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009836#ifdef __cplusplus
9837extern "C"
9838#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009839char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009840int
9841main ()
9842{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009843return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009844 ;
9845 return 0;
9846}
9847_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848for ac_lib in '' pthread rt posix4; do
9849 if test -z "$ac_lib"; then
9850 ac_res="none required"
9851 else
9852 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009853 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009855 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009858rm -f core conftest.err conftest.$ac_objext \
9859 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009860 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863done
Victor Stinnere0be4232011-10-25 13:06:09 +02009864if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866else
9867 ac_cv_search_sem_init=no
9868fi
9869rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009870LIBS=$ac_func_search_save_LIBS
9871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9873$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009875if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009877
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009878fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009879
Martin v. Löwis519adae2003-09-20 10:47:47 +00009880
Martin v. Löwis19d17342003-06-14 21:03:05 +00009881# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9883$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009884if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009885 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009886else
9887 ac_check_lib_save_LIBS=$LIBS
9888LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009890/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892/* Override any GCC internal prototype to avoid an error.
9893 Use char because int might match the return type of a GCC
9894 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009895#ifdef __cplusplus
9896extern "C"
9897#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009898char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009899int
9900main ()
9901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009903 ;
9904 return 0;
9905}
9906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009908 ac_cv_lib_intl_textdomain=yes
9909else
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009912rm -f core conftest.err conftest.$ac_objext \
9913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009914LIBS=$ac_check_lib_save_LIBS
9915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9917$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009918if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919
Matthias Kloseb9621712010-04-24 17:59:49 +00009920$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921
Brett Cannonc6d936e2009-06-07 20:09:53 +00009922 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009923fi
9924
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009925
9926# checks for system dependent C++ extensions support
9927case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009928 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9929$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009932
Georg Brandl59e87bd2011-02-15 19:48:59 +00009933 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009934int
9935main ()
9936{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009937loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009938 ;
9939 return 0;
9940}
Matthias Kloseb159a552010-04-25 21:00:44 +00009941
Martin v. Löwis11437992002-04-12 09:54:03 +00009942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009943if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009944
Matthias Kloseb159a552010-04-25 21:00:44 +00009945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
Matthias Kloseb159a552010-04-25 21:00:44 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009951else
Matthias Kloseb159a552010-04-25 21:00:44 +00009952
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009957rm -f core conftest.err conftest.$ac_objext \
9958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009959 *) ;;
9960esac
9961
Christian Heimes985ecdc2013-11-20 11:46:18 +01009962# check for systems that require aligned memory access
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9964$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009965if ${ac_cv_aligned_required+:} false; then :
9966 $as_echo_n "(cached) " >&6
9967else
9968 if test "$cross_compiling" = yes; then :
9969 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009970else
9971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9972/* end confdefs.h. */
9973
9974int main()
9975{
9976 char s[16];
9977 int i, *p1, *p2;
9978 for (i=0; i < 16; i++)
9979 s[i] = i;
9980 p1 = (int*)(s+1);
9981 p2 = (int*)(s+2);
9982 if (*p1 == *p2)
9983 return 1;
9984 return 0;
9985}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009986_ACEOF
9987if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009988 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009989else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009990 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009991fi
9992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9993 conftest.$ac_objext conftest.beam conftest.$ac_ext
9994fi
9995
9996
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009997fi
9998
9999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10000$as_echo "$ac_cv_aligned_required" >&6; }
10001if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010002
10003$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10004
10005fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010006
10007# str, bytes and memoryview hash algorithm
10008
10009
10010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10011$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10012
10013# Check whether --with-hash_algorithm was given.
10014if test "${with_hash_algorithm+set}" = set; then :
10015 withval=$with_hash_algorithm;
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10017$as_echo "$withval" >&6; }
10018case "$withval" in
10019 siphash24)
10020 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10021
10022 ;;
10023 fnv)
10024 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10025
10026 ;;
10027 *)
10028 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10029 ;;
10030esac
10031
10032else
10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10034$as_echo "default" >&6; }
10035fi
10036
10037
Charles-François Natalid30b0222014-05-08 23:08:51 +010010038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10039$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10040
10041# Check whether --with-address_sanitizer was given.
10042if test "${with_address_sanitizer+set}" = set; then :
10043 withval=$with_address_sanitizer;
10044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10045$as_echo "$withval" >&6; }
10046BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10047LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010048# ASan works by controlling memory allocation, our own malloc interferes.
10049with_pymalloc="no"
10050
10051else
10052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
10054fi
10055
10056
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10058$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10059
10060# Check whether --with-memory_sanitizer was given.
10061if test "${with_memory_sanitizer+set}" = set; then :
10062 withval=$with_memory_sanitizer;
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10064$as_echo "$withval" >&6; }
10065BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10066LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10067# MSan works by controlling memory allocation, our own malloc interferes.
10068with_pymalloc="no"
10069
10070else
10071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072$as_echo "no" >&6; }
10073fi
10074
10075
10076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10077$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10078
10079# Check whether --with-undefined_behavior_sanitizer was given.
10080if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10081 withval=$with_undefined_behavior_sanitizer;
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10083$as_echo "$withval" >&6; }
10084BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10085LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010086
10087else
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
Guido van Rossum70c7f481998-03-26 18:44:10 +000010093# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10095$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010096if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010097 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010098else
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010100LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010104/* Override any GCC internal prototype to avoid an error.
10105 Use char because int might match the return type of a GCC
10106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010107#ifdef __cplusplus
10108extern "C"
10109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010110char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010111int
10112main ()
10113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010115 ;
10116 return 0;
10117}
10118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010121else
Matthias Kloseb9621712010-04-24 17:59:49 +000010122 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010124rm -f core conftest.err conftest.$ac_objext \
10125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010126LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10129$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010130if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010131 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010132fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010133 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10135$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010136if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010137 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010138else
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010140LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144/* Override any GCC internal prototype to avoid an error.
10145 Use char because int might match the return type of a GCC
10146 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010147#ifdef __cplusplus
10148extern "C"
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010151int
10152main ()
10153{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 ;
10156 return 0;
10157}
10158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010161else
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010164rm -f core conftest.err conftest.$ac_objext \
10165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010166LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010167fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10169$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010170if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010171 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010172fi
10173 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10176$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010179if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10182$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010183LIBS="$withval $LIBS"
10184
10185else
Matthias Kloseb9621712010-04-24 17:59:49 +000010186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10187$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188fi
10189
Guido van Rossum7f43da71994-08-01 12:15:30 +000010190
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010191
10192
10193
10194
10195
10196
10197
10198if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10199 if test -n "$ac_tool_prefix"; then
10200 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10201set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10203$as_echo_n "checking for $ac_word... " >&6; }
10204if ${ac_cv_path_PKG_CONFIG+:} false; then :
10205 $as_echo_n "(cached) " >&6
10206else
10207 case $PKG_CONFIG in
10208 [\\/]* | ?:[\\/]*)
10209 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10210 ;;
10211 *)
10212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10213for as_dir in $PATH
10214do
10215 IFS=$as_save_IFS
10216 test -z "$as_dir" && as_dir=.
10217 for ac_exec_ext in '' $ac_executable_extensions; do
10218 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10219 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10220 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10221 break 2
10222 fi
10223done
10224 done
10225IFS=$as_save_IFS
10226
10227 ;;
10228esac
10229fi
10230PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10231if test -n "$PKG_CONFIG"; then
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10233$as_echo "$PKG_CONFIG" >&6; }
10234else
10235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10236$as_echo "no" >&6; }
10237fi
10238
10239
10240fi
10241if test -z "$ac_cv_path_PKG_CONFIG"; then
10242 ac_pt_PKG_CONFIG=$PKG_CONFIG
10243 # Extract the first word of "pkg-config", so it can be a program name with args.
10244set dummy pkg-config; ac_word=$2
10245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10246$as_echo_n "checking for $ac_word... " >&6; }
10247if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10248 $as_echo_n "(cached) " >&6
10249else
10250 case $ac_pt_PKG_CONFIG in
10251 [\\/]* | ?:[\\/]*)
10252 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10253 ;;
10254 *)
10255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10256for as_dir in $PATH
10257do
10258 IFS=$as_save_IFS
10259 test -z "$as_dir" && as_dir=.
10260 for ac_exec_ext in '' $ac_executable_extensions; do
10261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10262 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10264 break 2
10265 fi
10266done
10267 done
10268IFS=$as_save_IFS
10269
10270 ;;
10271esac
10272fi
10273ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10274if test -n "$ac_pt_PKG_CONFIG"; then
10275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10276$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10277else
10278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10279$as_echo "no" >&6; }
10280fi
10281
10282 if test "x$ac_pt_PKG_CONFIG" = x; then
10283 PKG_CONFIG=""
10284 else
10285 case $cross_compiling:$ac_tool_warned in
10286yes:)
10287{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10288$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10289ac_tool_warned=yes ;;
10290esac
10291 PKG_CONFIG=$ac_pt_PKG_CONFIG
10292 fi
10293else
10294 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10295fi
10296
10297fi
10298if test -n "$PKG_CONFIG"; then
10299 _pkg_min_version=0.9.0
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10301$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10302 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10304$as_echo "yes" >&6; }
10305 else
10306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10307$as_echo "no" >&6; }
10308 PKG_CONFIG=""
10309 fi
10310fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010311
10312# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10314$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010315
10316# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010317if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010318 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010319else
10320 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010321fi
10322
10323
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10325$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010326
10327# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10329$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010330
10331# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010332if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010333 withval=$with_system_ffi;
10334fi
10335
10336
Zachary Waref40d4dd2016-09-17 01:25:24 -050010337if test "$ac_sys_system" = "Darwin"
10338then
10339 case "$with_system_ffi" in
10340 "")
10341 with_system_ffi="no"
10342 ;;
10343 yes|no)
10344 ;;
10345 *)
10346 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10347 ;;
10348 esac
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10350$as_echo "$with_system_ffi" >&6; }
10351else
10352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10353$as_echo "yes" >&6; }
10354 if test "$with_system_ffi" != ""
10355 then
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10357$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10358 fi
10359 with_system_ffi="yes"
10360fi
Zachary Ware935043d2016-09-09 17:01:21 -070010361
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010362if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010363 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10364else
10365 LIBFFI_INCLUDEDIR=""
10366fi
10367
10368
Stefan Krah60187b52012-03-23 19:06:27 +010010369# Check for use of the system libmpdec library
10370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10371$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10372
10373# Check whether --with-system_libmpdec was given.
10374if test "${with_system_libmpdec+set}" = set; then :
10375 withval=$with_system_libmpdec;
10376else
10377 with_system_libmpdec="no"
10378fi
10379
10380
10381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10382$as_echo "$with_system_libmpdec" >&6; }
10383
Benjamin Peterson076ed002010-10-31 17:11:02 +000010384# Check for support for loadable sqlite extensions
10385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10386$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10387# Check whether --enable-loadable-sqlite-extensions was given.
10388if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10389 enableval=$enable_loadable_sqlite_extensions;
10390else
10391 enable_loadable_sqlite_extensions="no"
10392fi
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10396$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10397
Ned Deilyd819b932013-09-06 01:07:05 -070010398# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10399
10400
10401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10402$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10403
10404# Check whether --with-tcltk-includes was given.
10405if test "${with_tcltk_includes+set}" = set; then :
10406 withval=$with_tcltk_includes;
10407else
10408 with_tcltk_includes="default"
10409fi
10410
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10412$as_echo "$with_tcltk_includes" >&6; }
10413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10414$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10415
10416# Check whether --with-tcltk-libs was given.
10417if test "${with_tcltk_libs+set}" = set; then :
10418 withval=$with_tcltk_libs;
10419else
10420 with_tcltk_libs="default"
10421fi
10422
10423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10424$as_echo "$with_tcltk_libs" >&6; }
10425if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10426then
10427 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10428 then
10429 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10430 fi
10431 TCLTK_INCLUDES=""
10432 TCLTK_LIBS=""
10433else
10434 TCLTK_INCLUDES="$with_tcltk_includes"
10435 TCLTK_LIBS="$with_tcltk_libs"
10436fi
10437
Matthias Klose55708cc2009-04-30 08:06:49 +000010438# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10440$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010441
10442# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010443if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010444 withval=$with_dbmliborder;
10445if test x$with_dbmliborder = xyes
10446then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010447as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010448else
10449 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10450 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10451 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010452 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010453 fi
10454 done
10455fi
10456fi
10457
Matthias Kloseb9621712010-04-24 17:59:49 +000010458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10459$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010460
Martin v. Löwis11437992002-04-12 09:54:03 +000010461# Templates for things AC_DEFINEd more than once.
10462# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010463
10464
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010465if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010466then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010467 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010469
10470 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010471elif test "$ac_cv_kpthread" = "yes"
10472then
10473 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010474 if test "$ac_cv_cxx_thread" = "yes"; then
10475 CXX="$CXX -Kpthread"
10476 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010477 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010478elif test "$ac_cv_kthread" = "yes"
10479then
10480 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010481 if test "$ac_cv_cxx_thread" = "yes"; then
10482 CXX="$CXX -Kthread"
10483 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010484 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010485elif test "$ac_cv_pthread" = "yes"
10486then
10487 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010488 if test "$ac_cv_cxx_thread" = "yes"; then
10489 CXX="$CXX -pthread"
10490 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010491 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010492else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010493 if test ! -z "$withval" -a -d "$withval"
10494 then LDFLAGS="$LDFLAGS -L$withval"
10495 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010496
10497 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010498 # define _POSIX_THREADS in unistd.h. Some apparently don't
10499 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10501$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010504
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010505#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010506#ifdef _POSIX_THREADS
10507yes
10508#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
10510_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010513 unistd_defines_pthreads=yes
10514else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010515 unistd_defines_pthreads=no
10516fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010517rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010518
Matthias Kloseb9621712010-04-24 17:59:49 +000010519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10520$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010521
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010523
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010524 # Just looking for pthread_create in libpthread is not enough:
10525 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10526 # So we really have to include pthread.h, and then link.
10527 _libs=$LIBS
10528 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10530$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010533
10534#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010535#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010536
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010537void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010538int
10539main ()
10540{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010541
10542pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ;
10544 return 0;
10545}
10546_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010548
Matthias Kloseb9621712010-04-24 17:59:49 +000010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10550$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010551 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010552
Guido van Rossum02a1c402000-02-25 19:26:31 +000010553else
Martin v. Löwis11437992002-04-12 09:54:03 +000010554
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010555 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010557if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010559 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010560
Guido van Rossumad678af1998-10-02 14:42:15 +000010561else
Guido van Rossumad678af1998-10-02 14:42:15 +000010562
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10564$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010565if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010567else
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010569LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573/* Override any GCC internal prototype to avoid an error.
10574 Use char because int might match the return type of a GCC
10575 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010576#ifdef __cplusplus
10577extern "C"
10578#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010579char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010580int
10581main ()
10582{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010583return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010584 ;
10585 return 0;
10586}
10587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010588if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010590else
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010592fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010593rm -f core conftest.err conftest.$ac_objext \
10594 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010595LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010596fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10598$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010602 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010603
Greg Steinadf63d62000-07-05 10:38:09 +000010604else
Greg Steinadf63d62000-07-05 10:38:09 +000010605
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10607$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010608if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010609 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010610else
Martin v. Löwis11437992002-04-12 09:54:03 +000010611 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010612LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616/* Override any GCC internal prototype to avoid an error.
10617 Use char because int might match the return type of a GCC
10618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010619#ifdef __cplusplus
10620extern "C"
10621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010622char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010623int
10624main ()
10625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010626return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010627 ;
10628 return 0;
10629}
10630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010633else
Matthias Kloseb9621712010-04-24 17:59:49 +000010634 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010636rm -f core conftest.err conftest.$ac_objext \
10637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10641$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010643
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010644 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010645 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010646
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010647else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010648
Matthias Kloseb9621712010-04-24 17:59:49 +000010649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10650$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010651if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010652 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010653else
Martin v. Löwis11437992002-04-12 09:54:03 +000010654 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010655LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010659/* Override any GCC internal prototype to avoid an error.
10660 Use char because int might match the return type of a GCC
10661 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010662#ifdef __cplusplus
10663extern "C"
10664#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010665char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010666int
10667main ()
10668{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010669return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010670 ;
10671 return 0;
10672}
10673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010676else
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010678fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010679rm -f core conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010681LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010682fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10684$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010685if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010686
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010687 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010688 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010689
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010690else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010691
Matthias Kloseb9621712010-04-24 17:59:49 +000010692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10693$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010694if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010695 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010696else
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010698LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702/* Override any GCC internal prototype to avoid an error.
10703 Use char because int might match the return type of a GCC
10704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010705#ifdef __cplusplus
10706extern "C"
10707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010708char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010709int
10710main ()
10711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ;
10714 return 0;
10715}
10716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010719else
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010722rm -f core conftest.err conftest.$ac_objext \
10723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010724LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010725fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10727$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010728if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010729
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010730 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010731 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010732
Guido van Rossumb93a8621998-05-07 13:27:32 +000010733else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010734
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010735 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10736
Guido van Rossum2d38f911996-06-26 19:47:01 +000010737fi
10738
Guido van Rossum627b2d71993-12-24 10:39:16 +000010739
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010740fi
10741
Guido van Rossum0be3e491997-05-22 20:33:33 +000010742fi
10743
Guido van Rossum49545951997-12-02 19:28:29 +000010744fi
10745
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746fi
10747
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010749rm -f core conftest.err conftest.$ac_objext \
10750 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10753$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010754if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010756else
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010758LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762/* Override any GCC internal prototype to avoid an error.
10763 Use char because int might match the return type of a GCC
10764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010765#ifdef __cplusplus
10766extern "C"
10767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010768char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010769int
10770main ()
10771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010772return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010773 ;
10774 return 0;
10775}
10776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010779else
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010782rm -f core conftest.err conftest.$ac_objext \
10783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10787$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010788if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010789
Martin v. Löwis130fb172001-07-19 11:00:41 +000010790 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010791
Guido van Rossum627b2d71993-12-24 10:39:16 +000010792fi
10793
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010794
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010795fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010796
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010797if test "$posix_threads" = "yes"; then
10798 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010801
10802 fi
10803
10804 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10805 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010806 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010807$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010808
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010809 ;;
10810 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010811$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812
10813 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010814 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010815$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010816
10817 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818 esac
10819
Matthias Kloseb9621712010-04-24 17:59:49 +000010820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10821$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010822 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010823 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010824else
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010826 ac_cv_pthread_system_supported=no
10827else
Matthias Kloseb9621712010-04-24 17:59:49 +000010828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010829/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010830
10831 #include <stdio.h>
10832 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833 void *foo(void *parm) {
10834 return NULL;
10835 }
10836 main() {
10837 pthread_attr_t attr;
10838 pthread_t id;
10839 if (pthread_attr_init(&attr)) exit(-1);
10840 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10841 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10842 exit(0);
10843 }
10844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010845if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846 ac_cv_pthread_system_supported=yes
10847else
Matthias Kloseb9621712010-04-24 17:59:49 +000010848 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010850rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10851 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010854
Guido van Rossum627b2d71993-12-24 10:39:16 +000010855fi
10856
Matthias Kloseb9621712010-04-24 17:59:49 +000010857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10858$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 if test "$ac_cv_pthread_system_supported" = "yes"; then
10860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862
10863 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 for ac_func in pthread_sigmask
10865do :
10866 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010867if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010869#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010870_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010871 case $ac_sys_system in
10872 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010875
10876 ;;
10877 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878fi
10879done
10880
pdoxe14679c2017-10-05 00:01:56 -070010881 for ac_func in pthread_getcpuclockid
10882do :
10883 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10884if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10885 cat >>confdefs.h <<_ACEOF
10886#define HAVE_PTHREAD_GETCPUCLOCKID 1
10887_ACEOF
10888
10889fi
10890done
10891
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010892fi
10893
10894
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10898$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010899# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010900if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010901 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010902 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10904$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010905 ipv6=no
10906 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10908$as_echo "yes" >&6; }
10909 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010910
10911 ipv6=yes
10912 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010914else
Martin v. Löwis11437992002-04-12 09:54:03 +000010915
Matthias Kloseb9621712010-04-24 17:59:49 +000010916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010918 /* AF_INET6 available check */
10919#include <sys/types.h>
10920#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010921int
10922main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010924int domain = AF_INET6;
10925 ;
10926 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927}
Martin v. Löwis11437992002-04-12 09:54:03 +000010928_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010929if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010930
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10932$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010933 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010934
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935else
Matthias Kloseb159a552010-04-25 21:00:44 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10938$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010940
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010941fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010944if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10946$as_echo_n "checking if RFC2553 API is available... " >&6; }
10947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010948/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010949
10950 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010951#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010952int
10953main ()
10954{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010955struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010956 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010957 ;
10958 return 0;
10959}
Matthias Kloseb159a552010-04-25 21:00:44 +000010960
Martin v. Löwis11437992002-04-12 09:54:03 +000010961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010963
10964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010966 ipv6=yes
10967
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010968else
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010972 ipv6=no
10973
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010974fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010976fi
10977
10978if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010980
10981fi
10982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983fi
10984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985
10986ipv6type=unknown
10987ipv6lib=none
10988ipv6trylibc=no
10989
10990if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10992$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010993 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10994 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010995 case $i in
10996 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011000#include <netinet/in.h>
11001#ifdef IPV6_INRIA_VERSION
11002yes
11003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011006 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011007 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011010
11011 ;;
11012 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011014/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011015
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016#include <netinet/in.h>
11017#ifdef __KAME__
11018yes
11019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011020_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011023 ipv6type=$i;
11024 ipv6lib=inet6
11025 ipv6libdir=/usr/local/v6/lib
11026 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011028rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029
11030 ;;
11031 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011033/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035#include <features.h>
11036#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11037yes
11038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011039_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042 ipv6type=$i;
11043 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011045rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011046
11047 ;;
11048 linux-inet6)
11049 if test -d /usr/inet6; then
11050 ipv6type=$i
11051 ipv6lib=inet6
11052 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011053 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011054 fi
11055 ;;
11056 solaris)
11057 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011058 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011059 ipv6type=$i
11060 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061 fi
11062 fi
11063 ;;
11064 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068#include <sys/param.h>
11069#ifdef _TOSHIBA_INET6
11070yes
11071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 ipv6type=$i;
11076 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011077 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011079rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080
11081 ;;
11082 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011084/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011085
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011086#include </usr/local/v6/include/sys/v6config.h>
11087#ifdef __V6D__
11088yes
11089#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011091if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011092 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011093 ipv6type=$i;
11094 ipv6lib=v6;
11095 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011096 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011098rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099
11100 ;;
11101 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011103/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011104
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011105#include <sys/param.h>
11106#ifdef _ZETA_MINAMI_INET6
11107yes
11108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011109_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112 ipv6type=$i;
11113 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011114 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011115fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011116rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117
11118 ;;
11119 esac
11120 if test "$ipv6type" != "unknown"; then
11121 break
11122 fi
11123 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11125$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126fi
11127
11128if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11129 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11130 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11131 echo "using lib$ipv6lib"
11132 else
11133 if test $ipv6trylibc = "yes"; then
11134 echo "using libc"
11135 else
11136 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11137 echo "You need to fetch lib$ipv6lib.a from appropriate"
11138 echo 'ipv6 kit and compile beforehand.'
11139 exit 1
11140 fi
11141 fi
11142fi
11143
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11145$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11147/* end confdefs.h. */
11148 /* CAN_RAW_FD_FRAMES available check */
11149#include <linux/can/raw.h>
11150int
11151main ()
11152{
11153int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11154 ;
11155 return 0;
11156}
11157_ACEOF
11158if ac_fn_c_try_compile "$LINENO"; then :
11159
11160
11161$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11162
11163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11164$as_echo "yes" >&6; }
11165
11166else
11167
11168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11169$as_echo "no" >&6; }
11170
11171fi
11172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11173
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011174# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11176$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011179if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180 withval=$with_doc_strings;
11181fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011182
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011183
11184if test -z "$with_doc_strings"
11185then with_doc_strings="yes"
11186fi
11187if test "$with_doc_strings" != "no"
11188then
11189
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011191
11192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11194$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011195
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011196# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11198$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011201if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011202 withval=$with_pymalloc;
11203fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011204
Neil Schemenauera35c6882001-02-27 04:45:05 +000011205
Neil Schemenauer16c22972002-03-22 15:34:49 +000011206if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011207then
11208 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011209fi
11210if test "$with_pymalloc" != "no"
11211then
Martin v. Löwis11437992002-04-12 09:54:03 +000011212
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011214
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011215 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11218$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011219
Nick Coghlan6ea41862017-06-11 13:16:15 +100011220# Check for --with-c-locale-coercion
11221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11222$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11223
11224# Check whether --with-c-locale-coercion was given.
11225if test "${with_c_locale_coercion+set}" = set; then :
11226 withval=$with_c_locale_coercion;
11227fi
11228
11229
11230if test -z "$with_c_locale_coercion"
11231then
11232 with_c_locale_coercion="yes"
11233fi
11234if test "$with_c_locale_coercion" != "no"
11235then
11236
11237$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11238
11239fi
11240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11241$as_echo "$with_c_locale_coercion" >&6; }
11242
Benjamin Peterson05159c42009-12-03 03:01:27 +000011243# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11245$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011246
11247# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011248if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011249 withval=$with_valgrind;
11250else
11251 with_valgrind=no
11252fi
11253
Matthias Kloseb9621712010-04-24 17:59:49 +000011254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11255$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011256if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 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 +020011258if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011261
11262else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011263 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011264
11265fi
11266
11267
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011268 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011269fi
11270
Łukasz Langaa785c872016-09-09 17:37:37 -070011271# Check for DTrace support
11272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11273$as_echo_n "checking for --with-dtrace... " >&6; }
11274
11275# Check whether --with-dtrace was given.
11276if test "${with_dtrace+set}" = set; then :
11277 withval=$with_dtrace;
11278else
11279 with_dtrace=no
11280fi
11281
11282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11283$as_echo "$with_dtrace" >&6; }
11284
11285
11286
11287
11288
11289DTRACE=
11290DFLAGS=
11291DTRACE_HEADERS=
11292DTRACE_OBJS=
11293
11294if test "$with_dtrace" = "yes"
11295then
11296 # Extract the first word of "dtrace", so it can be a program name with args.
11297set dummy dtrace; ac_word=$2
11298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11299$as_echo_n "checking for $ac_word... " >&6; }
11300if ${ac_cv_path_DTRACE+:} false; then :
11301 $as_echo_n "(cached) " >&6
11302else
11303 case $DTRACE in
11304 [\\/]* | ?:[\\/]*)
11305 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11306 ;;
11307 *)
11308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11309for as_dir in $PATH
11310do
11311 IFS=$as_save_IFS
11312 test -z "$as_dir" && as_dir=.
11313 for ac_exec_ext in '' $ac_executable_extensions; do
11314 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11315 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11316 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11317 break 2
11318 fi
11319done
11320 done
11321IFS=$as_save_IFS
11322
11323 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11324 ;;
11325esac
11326fi
11327DTRACE=$ac_cv_path_DTRACE
11328if test -n "$DTRACE"; then
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11330$as_echo "$DTRACE" >&6; }
11331else
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337 if test "$DTRACE" = "not found"; then
11338 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11339 fi
11340
11341$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11342
11343 DTRACE_HEADERS="Include/pydtrace_probes.h"
11344
11345 # On OS X, DTrace providers do not need to be explicitly compiled and
11346 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11347 # generation flag '-G'. We check for presence of this flag, rather than
11348 # hardcoding support by OS, in the interest of robustness.
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11350$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11351if ${ac_cv_dtrace_link+:} false; then :
11352 $as_echo_n "(cached) " >&6
11353else
11354 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011355 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011356 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11357 ac_cv_dtrace_link=yes
11358
11359fi
11360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11361$as_echo "$ac_cv_dtrace_link" >&6; }
11362 if test "$ac_cv_dtrace_link" = "yes"; then
11363 DTRACE_OBJS="Python/pydtrace.o"
11364 fi
11365fi
11366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011367# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011368
Guido van Rossum98935bf2001-09-05 19:13:16 +000011369DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011370
Guido van Rossume97ee181999-12-20 21:27:22 +000011371# the dlopen() function means we might want to use dynload_shlib.o. some
11372# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011373for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011374do :
11375 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011376if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011377 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011378#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011379_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011380
Guido van Rossume97ee181999-12-20 21:27:22 +000011381fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011382done
Guido van Rossume97ee181999-12-20 21:27:22 +000011383
Michael W. Hudson54241132001-12-07 15:38:26 +000011384
Guido van Rossume97ee181999-12-20 21:27:22 +000011385# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11386# loading of modules.
11387
Matthias Kloseb9621712010-04-24 17:59:49 +000011388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11389$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011390if test -z "$DYNLOADFILE"
11391then
11392 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011393 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11394 if test "$ac_cv_func_dlopen" = yes
11395 then DYNLOADFILE="dynload_shlib.o"
11396 else DYNLOADFILE="dynload_aix.o"
11397 fi
11398 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011399 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011400 *)
11401 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11402 # out any dynamic loading
11403 if test "$ac_cv_func_dlopen" = yes
11404 then DYNLOADFILE="dynload_shlib.o"
11405 else DYNLOADFILE="dynload_stub.o"
11406 fi
11407 ;;
11408 esac
11409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11411$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011412if test "$DYNLOADFILE" != "dynload_stub.o"
11413then
Martin v. Löwis11437992002-04-12 09:54:03 +000011414
Matthias Kloseb9621712010-04-24 17:59:49 +000011415$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011416
11417fi
11418
Neil Schemenauer4e425612001-06-19 15:44:15 +000011419# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11420
Michael W. Hudson54241132001-12-07 15:38:26 +000011421
Matthias Kloseb9621712010-04-24 17:59:49 +000011422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11423$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011424if test -z "$MACHDEP_OBJS"
11425then
Jack Jansene578a632001-08-15 01:27:14 +000011426 MACHDEP_OBJS=$extra_machdep_objs
11427else
11428 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011429fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011430if test -z "$MACHDEP_OBJS"; then
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11432$as_echo "none" >&6; }
11433else
11434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11435$as_echo "$MACHDEP_OBJS" >&6; }
11436fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011437
Guido van Rossum627b2d71993-12-24 10:39:16 +000011438# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011439for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011440 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011441 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011442 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011443 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011444 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011445 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011446 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011447 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011448 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011449 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011450 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Pablo Galindo4defba32018-01-27 16:16:37 +000011451 pthread_init pthread_kill putenv pwrite pwritev pwritev2 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011452 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011453 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011454 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011455 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11456 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011457 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011458 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011459 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011460 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011461 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011462do :
11463 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11464ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011465if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011467#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011468_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011469
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011470fi
11471done
11472
Michael W. Hudson54241132001-12-07 15:38:26 +000011473
Benjamin Peterson40caa052018-09-12 15:52:40 -070011474# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11475# links. Some libc implementations have a stub lchmod implementation that always
11476# returns an error.
11477if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011478 for ac_func in lchmod
11479do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011480 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11481if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011482 cat >>confdefs.h <<_ACEOF
11483#define HAVE_LCHMOD 1
11484_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011485
11486fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011487done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011488
11489fi
11490
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011491ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11492 #include <dirent.h>
11493"
11494if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11495
11496$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11497
11498fi
11499
11500
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011501# For some functions, having a definition is not sufficient, since
11502# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11504$as_echo_n "checking for chroot... " >&6; }
11505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011507#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011508int
11509main ()
11510{
11511void *x=chroot
11512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011517
Matthias Kloseb9621712010-04-24 17:59:49 +000011518$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011519
Matthias Kloseb159a552010-04-25 21:00:44 +000011520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011521$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011522else
Matthias Kloseb9621712010-04-24 17:59:49 +000011523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11524$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011525
11526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11529$as_echo_n "checking for link... " >&6; }
11530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011531/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011532#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011533int
11534main ()
11535{
11536void *x=link
11537 ;
11538 return 0;
11539}
11540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011541if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011542
Matthias Kloseb9621712010-04-24 17:59:49 +000011543$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544
Matthias Kloseb159a552010-04-25 21:00:44 +000011545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011546$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011547else
Matthias Kloseb9621712010-04-24 17:59:49 +000011548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11549$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011550
11551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11554$as_echo_n "checking for symlink... " >&6; }
11555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558int
11559main ()
11560{
11561void *x=symlink
11562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569
Matthias Kloseb159a552010-04-25 21:00:44 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011571$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575
11576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11579$as_echo_n "checking for fchdir... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011582#include <unistd.h>
11583int
11584main ()
11585{
11586void *x=fchdir
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011594
Matthias Kloseb159a552010-04-25 21:00:44 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11604$as_echo_n "checking for fsync... " >&6; }
11605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011607#include <unistd.h>
11608int
11609main ()
11610{
11611void *x=fsync
11612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011617
Matthias Kloseb9621712010-04-24 17:59:49 +000011618$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011619
Matthias Kloseb159a552010-04-25 21:00:44 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011622else
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011625
11626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11629$as_echo_n "checking for fdatasync... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011632#include <unistd.h>
11633int
11634main ()
11635{
11636void *x=fdatasync
11637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650
11651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11654$as_echo_n "checking for epoll... " >&6; }
11655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011656/* end confdefs.h. */
11657#include <sys/epoll.h>
11658int
11659main ()
11660{
11661void *x=epoll_create
11662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011669
Matthias Kloseb159a552010-04-25 21:00:44 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011671$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011675
11676fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11679$as_echo_n "checking for epoll_create1... " >&6; }
11680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11681/* end confdefs.h. */
11682#include <sys/epoll.h>
11683int
11684main ()
11685{
11686void *x=epoll_create1
11687 ;
11688 return 0;
11689}
11690_ACEOF
11691if ac_fn_c_try_compile "$LINENO"; then :
11692
11693$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11694
11695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11696$as_echo "yes" >&6; }
11697else
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699$as_echo "no" >&6; }
11700
11701fi
11702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11704$as_echo_n "checking for kqueue... " >&6; }
11705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011706/* end confdefs.h. */
11707
11708#include <sys/types.h>
11709#include <sys/event.h>
11710
11711int
11712main ()
11713{
11714int x=kqueue()
11715 ;
11716 return 0;
11717}
11718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011719if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011720
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011722
Matthias Kloseb159a552010-04-25 21:00:44 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011724$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011725else
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11727$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728
11729fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11732$as_echo_n "checking for prlimit... " >&6; }
11733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11734/* end confdefs.h. */
11735
11736#include <sys/time.h>
11737#include <sys/resource.h>
11738
11739int
11740main ()
11741{
11742void *x=prlimit
11743 ;
11744 return 0;
11745}
11746_ACEOF
11747if ac_fn_c_try_compile "$LINENO"; then :
11748
11749$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11750
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11752$as_echo "yes" >&6; }
11753else
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755$as_echo "no" >&6; }
11756
11757fi
11758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11759
Martin v. Löwisd5843682002-11-21 20:41:28 +000011760# On some systems (eg. FreeBSD 5), we would find a definition of the
11761# functions ctermid_r, setgroups in the library, but no prototype
11762# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11763# address to avoid compiler warnings and potential miscompilations
11764# because of the missing prototypes.
11765
Matthias Kloseb9621712010-04-24 17:59:49 +000011766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11767$as_echo_n "checking for ctermid_r... " >&6; }
11768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011769/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011770
Martin v. Löwisd5843682002-11-21 20:41:28 +000011771#include <stdio.h>
11772
Martin v. Löwisd5843682002-11-21 20:41:28 +000011773int
11774main ()
11775{
11776void* p = ctermid_r
11777 ;
11778 return 0;
11779}
11780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011782
Matthias Kloseb9621712010-04-24 17:59:49 +000011783$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011784
Matthias Kloseb159a552010-04-25 21:00:44 +000011785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011786$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11789$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011790
11791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11793
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11795$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011796if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011797 $as_echo_n "(cached) " >&6
11798else
11799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011801#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011802int
11803main ()
11804{
11805void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011806
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011807 ;
11808 return 0;
11809}
11810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011812 ac_cv_flock_decl=yes
11813else
11814 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011815
11816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011818
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011819fi
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11821$as_echo "$ac_cv_flock_decl" >&6; }
11822if test "x${ac_cv_flock_decl}" = xyes; then
11823 for ac_func in flock
11824do :
11825 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011826if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011827 cat >>confdefs.h <<_ACEOF
11828#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011829_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011830
Antoine Pitroua3000072010-09-07 14:52:42 +000011831else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011833$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011834if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011835 $as_echo_n "(cached) " >&6
11836else
11837 ac_check_lib_save_LIBS=$LIBS
11838LIBS="-lbsd $LIBS"
11839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11840/* end confdefs.h. */
11841
11842/* Override any GCC internal prototype to avoid an error.
11843 Use char because int might match the return type of a GCC
11844 builtin and then its argument prototype would still apply. */
11845#ifdef __cplusplus
11846extern "C"
11847#endif
11848char flock ();
11849int
11850main ()
11851{
11852return flock ();
11853 ;
11854 return 0;
11855}
11856_ACEOF
11857if ac_fn_c_try_link "$LINENO"; then :
11858 ac_cv_lib_bsd_flock=yes
11859else
11860 ac_cv_lib_bsd_flock=no
11861fi
11862rm -f core conftest.err conftest.$ac_objext \
11863 conftest$ac_exeext conftest.$ac_ext
11864LIBS=$ac_check_lib_save_LIBS
11865fi
11866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11867$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011868if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011869 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011870
11871
11872$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11873
11874
11875fi
11876
11877
11878fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011879done
11880
Antoine Pitroua3000072010-09-07 14:52:42 +000011881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11884$as_echo_n "checking for getpagesize... " >&6; }
11885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011887
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011888#include <unistd.h>
11889
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011890int
11891main ()
11892{
11893void* p = getpagesize
11894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011901
Matthias Kloseb159a552010-04-25 21:00:44 +000011902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011903$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011907
11908fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011910
Victor Stinner984890f2011-11-24 13:53:38 +010011911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11912$as_echo_n "checking for broken unsetenv... " >&6; }
11913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11914/* end confdefs.h. */
11915
11916#include <stdlib.h>
11917
11918int
11919main ()
11920{
11921int res = unsetenv("DUMMY")
11922 ;
11923 return 0;
11924}
11925_ACEOF
11926if ac_fn_c_try_compile "$LINENO"; then :
11927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
11929else
11930
11931$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11932
11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11934$as_echo "yes" >&6; }
11935
11936fi
11937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11938
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011939for ac_prog in true
11940do
11941 # Extract the first word of "$ac_prog", so it can be a program name with args.
11942set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11944$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011945if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011946 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011947else
11948 if test -n "$TRUE"; then
11949 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11950else
11951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952for as_dir in $PATH
11953do
11954 IFS=$as_save_IFS
11955 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011956 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011958 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011959 $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 +000011960 break 2
11961 fi
11962done
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011964IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011965
11966fi
11967fi
11968TRUE=$ac_cv_prog_TRUE
11969if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11971$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011972else
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011975fi
11976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011978 test -n "$TRUE" && break
11979done
11980test -n "$TRUE" || TRUE="/bin/true"
11981
11982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11984$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011985if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011986 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011987else
11988 ac_check_lib_save_LIBS=$LIBS
11989LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011991/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011993/* Override any GCC internal prototype to avoid an error.
11994 Use char because int might match the return type of a GCC
11995 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011996#ifdef __cplusplus
11997extern "C"
11998#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011999char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012000int
12001main ()
12002{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012004 ;
12005 return 0;
12006}
12007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009 ac_cv_lib_c_inet_aton=yes
12010else
Matthias Kloseb9621712010-04-24 17:59:49 +000012011 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012013rm -f core conftest.err conftest.$ac_objext \
12014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012015LIBS=$ac_check_lib_save_LIBS
12016fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12018$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012019if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012020 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012021else
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12023$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012024if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012025 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012026else
12027 ac_check_lib_save_LIBS=$LIBS
12028LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012032/* Override any GCC internal prototype to avoid an error.
12033 Use char because int might match the return type of a GCC
12034 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012035#ifdef __cplusplus
12036extern "C"
12037#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012038char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039int
12040main ()
12041{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012042return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012043 ;
12044 return 0;
12045}
12046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048 ac_cv_lib_resolv_inet_aton=yes
12049else
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012052rm -f core conftest.err conftest.$ac_objext \
12053 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054LIBS=$ac_check_lib_save_LIBS
12055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12057$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012059 cat >>confdefs.h <<_ACEOF
12060#define HAVE_LIBRESOLV 1
12061_ACEOF
12062
12063 LIBS="-lresolv $LIBS"
12064
12065fi
12066
12067
12068fi
12069
12070
Christian Heimesd0764e22007-12-04 15:00:33 +000012071# On Tru64, chflags seems to be present, but calling it will
12072# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12074$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012075if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012077else
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012079 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012080else
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012082/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012083
Christian Heimesd0764e22007-12-04 15:00:33 +000012084#include <sys/stat.h>
12085#include <unistd.h>
12086int main(int argc, char*argv[])
12087{
12088 if(chflags(argv[0], 0) != 0)
12089 return 1;
12090 return 0;
12091}
Ned Deily3eb67d52011-06-28 00:00:28 -070012092
Christian Heimesd0764e22007-12-04 15:00:33 +000012093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012095 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012099rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12100 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012101fi
12102
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012103
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12106$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012107if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012108 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012110 ac_cv_have_chflags="yes"
12111else
12112 ac_cv_have_chflags="no"
12113fi
12114
12115fi
12116if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012117
Matthias Kloseb9621712010-04-24 17:59:49 +000012118$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012119
12120fi
12121
Matthias Kloseb9621712010-04-24 17:59:49 +000012122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12123$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012124if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012126else
Matthias Kloseb9621712010-04-24 17:59:49 +000012127 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012128 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012129else
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012131/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012132
Christian Heimesd0764e22007-12-04 15:00:33 +000012133#include <sys/stat.h>
12134#include <unistd.h>
12135int main(int argc, char*argv[])
12136{
12137 if(lchflags(argv[0], 0) != 0)
12138 return 1;
12139 return 0;
12140}
Ned Deily3eb67d52011-06-28 00:00:28 -070012141
Christian Heimesd0764e22007-12-04 15:00:33 +000012142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012143if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012150fi
12151
12152
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12155$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012156if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012158if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012159 ac_cv_have_lchflags="yes"
12160else
12161 ac_cv_have_lchflags="no"
12162fi
12163
12164fi
12165if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012168
12169fi
12170
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012171case $ac_sys_system/$ac_sys_release in
12172Darwin/*)
12173 _CUR_CFLAGS="${CFLAGS}"
12174 _CUR_LDFLAGS="${LDFLAGS}"
12175 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12176 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12177 ;;
12178esac
12179
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12181$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012182if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012184else
12185 ac_check_lib_save_LIBS=$LIBS
12186LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012188/* end confdefs.h. */
12189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012190/* Override any GCC internal prototype to avoid an error.
12191 Use char because int might match the return type of a GCC
12192 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012193#ifdef __cplusplus
12194extern "C"
12195#endif
12196char inflateCopy ();
12197int
12198main ()
12199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012200return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012201 ;
12202 return 0;
12203}
12204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012205if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012206 ac_cv_lib_z_inflateCopy=yes
12207else
Matthias Kloseb9621712010-04-24 17:59:49 +000012208 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012210rm -f core conftest.err conftest.$ac_objext \
12211 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012212LIBS=$ac_check_lib_save_LIBS
12213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12215$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012216if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012217
Matthias Kloseb9621712010-04-24 17:59:49 +000012218$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012219
12220fi
12221
12222
12223case $ac_sys_system/$ac_sys_release in
12224Darwin/*)
12225 CFLAGS="${_CUR_CFLAGS}"
12226 LDFLAGS="${_CUR_LDFLAGS}"
12227 ;;
12228esac
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12231$as_echo_n "checking for hstrerror... " >&6; }
12232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012233/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012234
Martin v. Löwise9416172003-05-03 10:12:45 +000012235#include <netdb.h>
12236
Martin v. Löwise9416172003-05-03 10:12:45 +000012237int
12238main ()
12239{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012240void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012241 ;
12242 return 0;
12243}
12244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012245if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012248
Matthias Kloseb159a552010-04-25 21:00:44 +000012249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012250$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12253$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012254
12255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012256rm -f core conftest.err conftest.$ac_objext \
12257 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012258
Matthias Kloseb9621712010-04-24 17:59:49 +000012259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12260$as_echo_n "checking for inet_aton... " >&6; }
12261cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012262/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012263
Martin v. Löwis86d66262006-02-17 08:40:11 +000012264#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012265#include <sys/socket.h>
12266#include <netinet/in.h>
12267#include <arpa/inet.h>
12268
Martin v. Löwise9416172003-05-03 10:12:45 +000012269int
12270main ()
12271{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012272void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012278
Matthias Kloseb9621712010-04-24 17:59:49 +000012279$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012280
Matthias Kloseb159a552010-04-25 21:00:44 +000012281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012282$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012283else
Matthias Kloseb9621712010-04-24 17:59:49 +000012284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12285$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012286
12287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012288rm -f core conftest.err conftest.$ac_objext \
12289 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12292$as_echo_n "checking for inet_pton... " >&6; }
12293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012295
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012296#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012297#include <sys/socket.h>
12298#include <netinet/in.h>
12299#include <arpa/inet.h>
12300
Martin v. Löwise9416172003-05-03 10:12:45 +000012301int
12302main ()
12303{
12304void* p = inet_pton
12305 ;
12306 return 0;
12307}
12308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012310
Matthias Kloseb9621712010-04-24 17:59:49 +000012311$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012312
Matthias Kloseb159a552010-04-25 21:00:44 +000012313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012314$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12317$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012318
12319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012321
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012322# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12324$as_echo_n "checking for setgroups... " >&6; }
12325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012327
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012328#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012329#ifdef HAVE_GRP_H
12330#include <grp.h>
12331#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012332
Martin v. Löwisd5843682002-11-21 20:41:28 +000012333int
12334main ()
12335{
12336void* p = setgroups
12337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012342
Matthias Kloseb9621712010-04-24 17:59:49 +000012343$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012344
Matthias Kloseb159a552010-04-25 21:00:44 +000012345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012346$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012347else
Matthias Kloseb9621712010-04-24 17:59:49 +000012348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12349$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012350
12351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012354# check for openpty and forkpty
12355
12356for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012357do :
12358 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012359if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012361#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012362_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012363
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012364else
Matthias Kloseb9621712010-04-24 17:59:49 +000012365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12366$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012367if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012368 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012369else
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012371LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012374
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375/* Override any GCC internal prototype to avoid an error.
12376 Use char because int might match the return type of a GCC
12377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012378#ifdef __cplusplus
12379extern "C"
12380#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012381char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012382int
12383main ()
12384{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012385return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ;
12387 return 0;
12388}
12389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012392else
Matthias Kloseb9621712010-04-24 17:59:49 +000012393 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012394fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012395rm -f core conftest.err conftest.$ac_objext \
12396 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012397LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012398fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12400$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012401if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012402 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012403 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012404else
Matthias Kloseb9621712010-04-24 17:59:49 +000012405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12406$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012407if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012408 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012409else
12410 ac_check_lib_save_LIBS=$LIBS
12411LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012413/* end confdefs.h. */
12414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012415/* Override any GCC internal prototype to avoid an error.
12416 Use char because int might match the return type of a GCC
12417 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012418#ifdef __cplusplus
12419extern "C"
12420#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012421char openpty ();
12422int
12423main ()
12424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012426 ;
12427 return 0;
12428}
12429_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012430if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012431 ac_cv_lib_bsd_openpty=yes
12432else
Matthias Kloseb9621712010-04-24 17:59:49 +000012433 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012435rm -f core conftest.err conftest.$ac_objext \
12436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012437LIBS=$ac_check_lib_save_LIBS
12438fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12440$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012441if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012442 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012443 LIBS="$LIBS -lbsd"
12444fi
12445
12446
12447fi
12448
Fred Drake8cef4cf2000-06-28 16:40:38 +000012449
12450fi
12451done
12452
12453for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012454do :
12455 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012456if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012457 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012459_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460
Fred Drake8cef4cf2000-06-28 16:40:38 +000012461else
Matthias Kloseb9621712010-04-24 17:59:49 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12463$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012464if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012466else
Martin v. Löwis11437992002-04-12 09:54:03 +000012467 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012468LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012472/* Override any GCC internal prototype to avoid an error.
12473 Use char because int might match the return type of a GCC
12474 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012475#ifdef __cplusplus
12476extern "C"
12477#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012478char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012479int
12480main ()
12481{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012482return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012494LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012495fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12497$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012498if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012500 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012501else
Matthias Kloseb9621712010-04-24 17:59:49 +000012502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12503$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012506else
12507 ac_check_lib_save_LIBS=$LIBS
12508LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012510/* end confdefs.h. */
12511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012512/* Override any GCC internal prototype to avoid an error.
12513 Use char because int might match the return type of a GCC
12514 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012515#ifdef __cplusplus
12516extern "C"
12517#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012518char forkpty ();
12519int
12520main ()
12521{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012523 ;
12524 return 0;
12525}
12526_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012527if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528 ac_cv_lib_bsd_forkpty=yes
12529else
Matthias Kloseb9621712010-04-24 17:59:49 +000012530 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012531fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012532rm -f core conftest.err conftest.$ac_objext \
12533 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012534LIBS=$ac_check_lib_save_LIBS
12535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12537$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012540 LIBS="$LIBS -lbsd"
12541fi
12542
12543
12544fi
12545
Fred Drake8cef4cf2000-06-28 16:40:38 +000012546
12547fi
12548done
12549
Jack Jansendd19cf82001-12-06 22:36:17 +000012550
Michael W. Hudson54241132001-12-07 15:38:26 +000012551# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012552for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012553do :
12554 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12555ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012556if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012558#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012559_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012560
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012561fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012562done
12563
Michael W. Hudson54241132001-12-07 15:38:26 +000012564
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012565ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012566if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012567 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012568
Martin v. Löwis1142de32002-03-29 16:28:31 +000012569else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012571 *" dup2.$ac_objext "* ) ;;
12572 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012574esac
12575
Martin v. Löwis1142de32002-03-29 16:28:31 +000012576fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012577
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012578ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012579if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012580 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12581
12582else
12583 case " $LIBOBJS " in
12584 *" strdup.$ac_objext "* ) ;;
12585 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12586 ;;
12587esac
12588
12589fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012590
12591
12592for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012593do :
12594 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012595if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012596 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012602int
12603main ()
12604{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012605getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012606 ;
12607 return 0;
12608}
12609_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012610if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012611
Matthias Kloseb9621712010-04-24 17:59:49 +000012612$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012613
Guido van Rossum627b2d71993-12-24 10:39:16 +000012614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012616
Guido van Rossum627b2d71993-12-24 10:39:16 +000012617fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012618done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012619
Jack Jansen150753c2003-03-29 22:07:47 +000012620for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012621do :
12622 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012623if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012624 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012628/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012629#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012630int
12631main ()
12632{
12633setpgrp(0,0);
12634 ;
12635 return 0;
12636}
12637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012641
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012642fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012644
12645fi
12646done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012647
Thomas Wouters3a584202000-08-05 23:28:51 +000012648for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012649do :
12650 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012651if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012652 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012656/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012658int
12659main ()
12660{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012662 ;
12663 return 0;
12664}
12665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666if ac_fn_c_try_compile "$LINENO"; then :
12667
Guido van Rossum627b2d71993-12-24 10:39:16 +000012668else
Skip Montanaro6dead952003-09-25 14:50:04 +000012669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671
Martin v. Löwis11437992002-04-12 09:54:03 +000012672
Guido van Rossum627b2d71993-12-24 10:39:16 +000012673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012676fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012677done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012678
Michael W. Hudson54241132001-12-07 15:38:26 +000012679
Gregory P. Smith387512c2018-12-30 15:42:32 -080012680# We search for both crypt and crypt_r as one or the other may be defined
12681# This gets us our -lcrypt in LIBS when required on the target platform.
12682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12683$as_echo_n "checking for library containing crypt... " >&6; }
12684if ${ac_cv_search_crypt+:} false; then :
12685 $as_echo_n "(cached) " >&6
12686else
12687 ac_func_search_save_LIBS=$LIBS
12688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12689/* end confdefs.h. */
12690
12691/* Override any GCC internal prototype to avoid an error.
12692 Use char because int might match the return type of a GCC
12693 builtin and then its argument prototype would still apply. */
12694#ifdef __cplusplus
12695extern "C"
12696#endif
12697char crypt ();
12698int
12699main ()
12700{
12701return crypt ();
12702 ;
12703 return 0;
12704}
12705_ACEOF
12706for ac_lib in '' crypt; do
12707 if test -z "$ac_lib"; then
12708 ac_res="none required"
12709 else
12710 ac_res=-l$ac_lib
12711 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12712 fi
12713 if ac_fn_c_try_link "$LINENO"; then :
12714 ac_cv_search_crypt=$ac_res
12715fi
12716rm -f core conftest.err conftest.$ac_objext \
12717 conftest$ac_exeext
12718 if ${ac_cv_search_crypt+:} false; then :
12719 break
12720fi
12721done
12722if ${ac_cv_search_crypt+:} false; then :
12723
12724else
12725 ac_cv_search_crypt=no
12726fi
12727rm conftest.$ac_ext
12728LIBS=$ac_func_search_save_LIBS
12729fi
12730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12731$as_echo "$ac_cv_search_crypt" >&6; }
12732ac_res=$ac_cv_search_crypt
12733if test "$ac_res" != no; then :
12734 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12735
12736fi
12737
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12739$as_echo_n "checking for library containing crypt_r... " >&6; }
12740if ${ac_cv_search_crypt_r+:} false; then :
12741 $as_echo_n "(cached) " >&6
12742else
12743 ac_func_search_save_LIBS=$LIBS
12744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12745/* end confdefs.h. */
12746
12747/* Override any GCC internal prototype to avoid an error.
12748 Use char because int might match the return type of a GCC
12749 builtin and then its argument prototype would still apply. */
12750#ifdef __cplusplus
12751extern "C"
12752#endif
12753char crypt_r ();
12754int
12755main ()
12756{
12757return crypt_r ();
12758 ;
12759 return 0;
12760}
12761_ACEOF
12762for ac_lib in '' crypt; do
12763 if test -z "$ac_lib"; then
12764 ac_res="none required"
12765 else
12766 ac_res=-l$ac_lib
12767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12768 fi
12769 if ac_fn_c_try_link "$LINENO"; then :
12770 ac_cv_search_crypt_r=$ac_res
12771fi
12772rm -f core conftest.err conftest.$ac_objext \
12773 conftest$ac_exeext
12774 if ${ac_cv_search_crypt_r+:} false; then :
12775 break
12776fi
12777done
12778if ${ac_cv_search_crypt_r+:} false; then :
12779
12780else
12781 ac_cv_search_crypt_r=no
12782fi
12783rm conftest.$ac_ext
12784LIBS=$ac_func_search_save_LIBS
12785fi
12786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12787$as_echo "$ac_cv_search_crypt_r" >&6; }
12788ac_res=$ac_cv_search_crypt_r
12789if test "$ac_res" != no; then :
12790 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12791
12792fi
12793
12794
12795ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12796if test "x$ac_cv_func_crypt_r" = xyes; then :
12797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12798/* end confdefs.h. */
12799
12800#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12801#include <crypt.h>
12802
12803int
12804main ()
12805{
12806
12807struct crypt_data d;
12808char *r = crypt_r("", "", &d);
12809
12810 ;
12811 return 0;
12812}
12813_ACEOF
12814if ac_fn_c_try_compile "$LINENO"; then :
12815
12816$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12817
12818fi
12819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12820
12821fi
12822
12823
Victor Stinnere0be4232011-10-25 13:06:09 +020012824for ac_func in clock_gettime
12825do :
12826 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12827if test "x$ac_cv_func_clock_gettime" = xyes; then :
12828 cat >>confdefs.h <<_ACEOF
12829#define HAVE_CLOCK_GETTIME 1
12830_ACEOF
12831
12832else
12833
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12835$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12836if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12837 $as_echo_n "(cached) " >&6
12838else
12839 ac_check_lib_save_LIBS=$LIBS
12840LIBS="-lrt $LIBS"
12841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12842/* end confdefs.h. */
12843
12844/* Override any GCC internal prototype to avoid an error.
12845 Use char because int might match the return type of a GCC
12846 builtin and then its argument prototype would still apply. */
12847#ifdef __cplusplus
12848extern "C"
12849#endif
12850char clock_gettime ();
12851int
12852main ()
12853{
12854return clock_gettime ();
12855 ;
12856 return 0;
12857}
12858_ACEOF
12859if ac_fn_c_try_link "$LINENO"; then :
12860 ac_cv_lib_rt_clock_gettime=yes
12861else
12862 ac_cv_lib_rt_clock_gettime=no
12863fi
12864rm -f core conftest.err conftest.$ac_objext \
12865 conftest$ac_exeext conftest.$ac_ext
12866LIBS=$ac_check_lib_save_LIBS
12867fi
12868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12869$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12870if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12871
Victor Stinner7efb8332014-08-29 15:41:08 +020012872 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012873 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12874
12875
12876$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12877
12878
12879fi
12880
12881
12882fi
12883done
12884
12885
12886for ac_func in clock_getres
12887do :
12888 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12889if test "x$ac_cv_func_clock_getres" = xyes; then :
12890 cat >>confdefs.h <<_ACEOF
12891#define HAVE_CLOCK_GETRES 1
12892_ACEOF
12893
12894else
12895
12896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12897$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12898if ${ac_cv_lib_rt_clock_getres+:} false; then :
12899 $as_echo_n "(cached) " >&6
12900else
12901 ac_check_lib_save_LIBS=$LIBS
12902LIBS="-lrt $LIBS"
12903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12904/* end confdefs.h. */
12905
12906/* Override any GCC internal prototype to avoid an error.
12907 Use char because int might match the return type of a GCC
12908 builtin and then its argument prototype would still apply. */
12909#ifdef __cplusplus
12910extern "C"
12911#endif
12912char clock_getres ();
12913int
12914main ()
12915{
12916return clock_getres ();
12917 ;
12918 return 0;
12919}
12920_ACEOF
12921if ac_fn_c_try_link "$LINENO"; then :
12922 ac_cv_lib_rt_clock_getres=yes
12923else
12924 ac_cv_lib_rt_clock_getres=no
12925fi
12926rm -f core conftest.err conftest.$ac_objext \
12927 conftest$ac_exeext conftest.$ac_ext
12928LIBS=$ac_check_lib_save_LIBS
12929fi
12930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12931$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12932if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12933
12934 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12935
12936
12937fi
12938
12939
12940fi
12941done
12942
12943
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012944for ac_func in clock_settime
12945do :
12946 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12947if test "x$ac_cv_func_clock_settime" = xyes; then :
12948 cat >>confdefs.h <<_ACEOF
12949#define HAVE_CLOCK_SETTIME 1
12950_ACEOF
12951
12952else
12953
12954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12955$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12956if ${ac_cv_lib_rt_clock_settime+:} false; then :
12957 $as_echo_n "(cached) " >&6
12958else
12959 ac_check_lib_save_LIBS=$LIBS
12960LIBS="-lrt $LIBS"
12961cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12962/* end confdefs.h. */
12963
12964/* Override any GCC internal prototype to avoid an error.
12965 Use char because int might match the return type of a GCC
12966 builtin and then its argument prototype would still apply. */
12967#ifdef __cplusplus
12968extern "C"
12969#endif
12970char clock_settime ();
12971int
12972main ()
12973{
12974return clock_settime ();
12975 ;
12976 return 0;
12977}
12978_ACEOF
12979if ac_fn_c_try_link "$LINENO"; then :
12980 ac_cv_lib_rt_clock_settime=yes
12981else
12982 ac_cv_lib_rt_clock_settime=no
12983fi
12984rm -f core conftest.err conftest.$ac_objext \
12985 conftest$ac_exeext conftest.$ac_ext
12986LIBS=$ac_check_lib_save_LIBS
12987fi
12988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12989$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12990if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12991
12992 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12993
12994
12995fi
12996
12997
12998fi
12999done
13000
13001
Matthias Kloseb9621712010-04-24 17:59:49 +000013002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13003$as_echo_n "checking for major... " >&6; }
13004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013005/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013006
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013007#if defined(MAJOR_IN_MKDEV)
13008#include <sys/mkdev.h>
13009#elif defined(MAJOR_IN_SYSMACROS)
13010#include <sys/sysmacros.h>
13011#else
13012#include <sys/types.h>
13013#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013014
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013015int
13016main ()
13017{
13018
13019 makedev(major(0),minor(0));
13020
13021 ;
13022 return 0;
13023}
13024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013026
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13031$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013032
13033else
Skip Montanaro6dead952003-09-25 14:50:04 +000013034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13036$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013037
13038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013039rm -f core conftest.err conftest.$ac_objext \
13040 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013041
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013042# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013043# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13045$as_echo_n "checking for getaddrinfo... " >&6; }
13046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013047/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013048
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013049#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013050#include <sys/socket.h>
13051#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013052#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013053
Martin v. Löwis11437992002-04-12 09:54:03 +000013054int
13055main ()
13056{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013057getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ;
13059 return 0;
13060}
13061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013062if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013063 have_getaddrinfo=yes
13064else
Matthias Kloseb9621712010-04-24 17:59:49 +000013065 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013067rm -f core conftest.err conftest.$ac_objext \
13068 conftest$ac_exeext conftest.$ac_ext
13069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13070$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013071if test $have_getaddrinfo = yes
13072then
Matthias Kloseb9621712010-04-24 17:59:49 +000013073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13074$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013075 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013076 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013077else
Matthias Kloseb9621712010-04-24 17:59:49 +000013078 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013079
13080if test "${enable_ipv6+set}" = set; then
13081 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13082else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013083 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013084fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013085else
Matthias Kloseb9621712010-04-24 17:59:49 +000013086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013087/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013088
Stefan Krah19c21392012-11-22 23:47:32 +010013089#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013090#include <sys/types.h>
13091#include <netdb.h>
13092#include <string.h>
13093#include <sys/socket.h>
13094#include <netinet/in.h>
13095
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013096int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013097{
13098 int passive, gaierr, inet4 = 0, inet6 = 0;
13099 struct addrinfo hints, *ai, *aitop;
13100 char straddr[INET6_ADDRSTRLEN], strport[16];
13101
13102 for (passive = 0; passive <= 1; passive++) {
13103 memset(&hints, 0, sizeof(hints));
13104 hints.ai_family = AF_UNSPEC;
13105 hints.ai_flags = passive ? AI_PASSIVE : 0;
13106 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013107 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13109 (void)gai_strerror(gaierr);
13110 goto bad;
13111 }
13112 for (ai = aitop; ai; ai = ai->ai_next) {
13113 if (ai->ai_addr == NULL ||
13114 ai->ai_addrlen == 0 ||
13115 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13116 straddr, sizeof(straddr), strport, sizeof(strport),
13117 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13118 goto bad;
13119 }
13120 switch (ai->ai_family) {
13121 case AF_INET:
13122 if (strcmp(strport, "54321") != 0) {
13123 goto bad;
13124 }
13125 if (passive) {
13126 if (strcmp(straddr, "0.0.0.0") != 0) {
13127 goto bad;
13128 }
13129 } else {
13130 if (strcmp(straddr, "127.0.0.1") != 0) {
13131 goto bad;
13132 }
13133 }
13134 inet4++;
13135 break;
13136 case AF_INET6:
13137 if (strcmp(strport, "54321") != 0) {
13138 goto bad;
13139 }
13140 if (passive) {
13141 if (strcmp(straddr, "::") != 0) {
13142 goto bad;
13143 }
13144 } else {
13145 if (strcmp(straddr, "::1") != 0) {
13146 goto bad;
13147 }
13148 }
13149 inet6++;
13150 break;
13151 case AF_UNSPEC:
13152 goto bad;
13153 break;
13154 default:
13155 /* another family support? */
13156 break;
13157 }
13158 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013159 freeaddrinfo(aitop);
13160 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013161 }
13162
13163 if (!(inet4 == 0 || inet4 == 2))
13164 goto bad;
13165 if (!(inet6 == 0 || inet6 == 2))
13166 goto bad;
13167
13168 if (aitop)
13169 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013170 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013171
13172 bad:
13173 if (aitop)
13174 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013175 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013176}
13177
Martin v. Löwis11437992002-04-12 09:54:03 +000013178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013179if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013180 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013181else
Matthias Kloseb9621712010-04-24 17:59:49 +000013182 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13185 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013186fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13193$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13194
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013195if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196then
13197 if test $ipv6 = yes
13198 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199 echo 'Fatal: You must get working getaddrinfo() function.'
13200 echo ' or you can specify "--disable-ipv6"'.
13201 exit 1
13202 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013203else
Martin v. Löwis11437992002-04-12 09:54:03 +000013204
Matthias Kloseb9621712010-04-24 17:59:49 +000013205$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013206
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013208
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013209for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013210do :
13211 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013212if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013215_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013216
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217fi
13218done
13219
Michael W. Hudson54241132001-12-07 15:38:26 +000013220
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013221# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13223$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013224if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013225 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013226else
Matthias Kloseb9621712010-04-24 17:59:49 +000013227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013229#include <sys/types.h>
13230#include <sys/time.h>
13231#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
13236if ((struct tm *) 0)
13237return 0;
13238 ;
13239 return 0;
13240}
13241_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013242if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13250$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013251if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013252
Matthias Kloseb9621712010-04-24 17:59:49 +000013253$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013254
13255fi
13256
Matthias Kloseb9621712010-04-24 17:59:49 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13258$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013259if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013260 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261else
Matthias Kloseb9621712010-04-24 17:59:49 +000013262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013263/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013264#include <sys/types.h>
13265#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Martin v. Löwis11437992002-04-12 09:54:03 +000013267int
13268main ()
13269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013270struct tm tm;
13271 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 ;
13274 return 0;
13275}
13276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013278 ac_cv_struct_tm=time.h
13279else
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013281fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13285$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013286if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
Matthias Kloseb9621712010-04-24 17:59:49 +000013288$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013289
13290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292ac_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 +000013293#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
Matthias Kloseb9621712010-04-24 17:59:49 +000013295"
Victor Stinnere0be4232011-10-25 13:06:09 +020013296if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013297
13298cat >>confdefs.h <<_ACEOF
13299#define HAVE_STRUCT_TM_TM_ZONE 1
13300_ACEOF
13301
13302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013304
Martin v. Löwis11437992002-04-12 09:54:03 +000013305if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013308
13309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13311"
Victor Stinnere0be4232011-10-25 13:06:09 +020013312if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013313 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314else
Matthias Kloseb9621712010-04-24 17:59:49 +000013315 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316fi
13317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013318cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013319#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320_ACEOF
13321
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13323$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013324if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013326else
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013328/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013329#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013330#if !HAVE_DECL_TZNAME
13331extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334int
13335main ()
13336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 ;
13339 return 0;
13340}
13341_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013342if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343 ac_cv_var_tzname=yes
13344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013346fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013347rm -f core conftest.err conftest.$ac_objext \
13348 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13351$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013352 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Matthias Kloseb9621712010-04-24 17:59:49 +000013354$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356 fi
13357fi
13358
Matthias Kloseb9621712010-04-24 17:59:49 +000013359ac_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 +020013360if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
13362cat >>confdefs.h <<_ACEOF
13363#define HAVE_STRUCT_STAT_ST_RDEV 1
13364_ACEOF
13365
13366
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013367fi
13368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369ac_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 +020013370if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013371
Martin v. Löwis11437992002-04-12 09:54:03 +000013372cat >>confdefs.h <<_ACEOF
13373#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13374_ACEOF
13375
13376
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013377fi
13378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379ac_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 +020013380if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013381
13382cat >>confdefs.h <<_ACEOF
13383#define HAVE_STRUCT_STAT_ST_FLAGS 1
13384_ACEOF
13385
13386
13387fi
13388
Matthias Kloseb9621712010-04-24 17:59:49 +000013389ac_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 +020013390if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013391
13392cat >>confdefs.h <<_ACEOF
13393#define HAVE_STRUCT_STAT_ST_GEN 1
13394_ACEOF
13395
13396
13397fi
13398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399ac_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 +020013400if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013401
13402cat >>confdefs.h <<_ACEOF
13403#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13404_ACEOF
13405
13406
13407fi
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409ac_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 +020013410if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412cat >>confdefs.h <<_ACEOF
13413#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13414_ACEOF
13415
13416
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013417fi
13418
Stefan Krah267b6392016-04-26 01:09:18 +020013419ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13420 #include <sys/types.h>
13421 #include <pwd.h>
13422
13423"
13424if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13425
13426cat >>confdefs.h <<_ACEOF
13427#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13428_ACEOF
13429
13430
13431fi
13432ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13433 #include <sys/types.h>
13434 #include <pwd.h>
13435
13436"
13437if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13438
13439cat >>confdefs.h <<_ACEOF
13440#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13441_ACEOF
13442
13443
13444fi
13445
Zachary Ware6a6967e2016-10-01 00:47:27 -050013446# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13447ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13448"
13449if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13450
13451cat >>confdefs.h <<_ACEOF
13452#define HAVE_SIGINFO_T_SI_BAND 1
13453_ACEOF
13454
13455
13456fi
13457
Michael W. Hudson54241132001-12-07 15:38:26 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13460$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013461if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013462 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463else
Matthias Kloseb159a552010-04-25 21:00:44 +000013464
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013467#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013468int
13469main ()
13470{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013471return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 ;
13473 return 0;
13474}
13475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013476if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477 ac_cv_header_time_altzone=yes
13478else
Matthias Kloseb9621712010-04-24 17:59:49 +000013479 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483fi
13484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13486$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013487if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
Matthias Kloseb9621712010-04-24 17:59:49 +000013489$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490
13491fi
13492
Guido van Rossumda88dad1995-01-26 00:46:29 +000013493was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13495$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013497/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013498
13499#include <sys/types.h>
13500#include <sys/select.h>
13501#include <sys/time.h>
13502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503int
13504main ()
13505{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013506;
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 ;
13508 return 0;
13509}
13510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013512
13513
Matthias Kloseb9621712010-04-24 17:59:49 +000013514$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013515
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013516 was_it_defined=yes
13517
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13521$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013522
Matthias Kloseb9621712010-04-24 17:59:49 +000013523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13524$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013525if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013526 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013527else
Matthias Kloseb9621712010-04-24 17:59:49 +000013528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013530#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013531int
13532main ()
13533{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013534struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013535 ;
13536 return 0;
13537}
13538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013540 ac_cv_struct_addrinfo=yes
13541else
Matthias Kloseb9621712010-04-24 17:59:49 +000013542 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13545fi
13546
Matthias Kloseb9621712010-04-24 17:59:49 +000013547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13548$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013549if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013552
13553fi
13554
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13556$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013557if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013558 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013561/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013562
13563# include <sys/types.h>
13564# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013565int
13566main ()
13567{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013568struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013569 ;
13570 return 0;
13571}
13572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013573if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013574 ac_cv_struct_sockaddr_storage=yes
13575else
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13579fi
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13582$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013583if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013584
Matthias Kloseb9621712010-04-24 17:59:49 +000013585$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586
13587fi
13588
Christian Heimesdffa3942016-09-05 23:54:41 +020013589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13590$as_echo_n "checking for sockaddr_alg... " >&6; }
13591if ${ac_cv_struct_sockaddr_alg+:} false; then :
13592 $as_echo_n "(cached) " >&6
13593else
13594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13595/* end confdefs.h. */
13596
13597# include <sys/types.h>
13598# include <sys/socket.h>
13599# include <linux/if_alg.h>
13600int
13601main ()
13602{
13603struct sockaddr_alg s
13604 ;
13605 return 0;
13606}
13607_ACEOF
13608if ac_fn_c_try_compile "$LINENO"; then :
13609 ac_cv_struct_sockaddr_alg=yes
13610else
13611 ac_cv_struct_sockaddr_alg=no
13612fi
13613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13614fi
13615
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13617$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13618if test $ac_cv_struct_sockaddr_alg = yes; then
13619
13620$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13621
13622fi
13623
Guido van Rossum627b2d71993-12-24 10:39:16 +000013624# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13627$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013628if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013633$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013634int
13635main ()
13636{
13637static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013638test_array [0] = 0;
13639return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
13641 ;
13642 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013643}
Martin v. Löwis11437992002-04-12 09:54:03 +000013644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013645if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013646 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013651fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13653$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013654if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013656
13657fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013658
Matthias Kloseb9621712010-04-24 17:59:49 +000013659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13660$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013661if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013663else
Matthias Kloseb9621712010-04-24 17:59:49 +000013664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013665/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013666
Martin v. Löwis11437992002-04-12 09:54:03 +000013667int
13668main ()
13669{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013670
Martin v. Löwis11437992002-04-12 09:54:03 +000013671#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013672 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013673 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013674 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013675 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013676 char const *const *pcpcc;
13677 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 /* NEC SVR4.0.2 mips cc rejects this. */
13679 struct point {int x, y;};
13680 static struct point const zero = {0,0};
13681 /* AIX XL C 1.02.0.0 rejects this.
13682 It does not let you subtract one const X* pointer from another in
13683 an arm of an if-expression whose if-part is not a constant
13684 expression */
13685 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013686 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013687 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013688 ++pcpcc;
13689 ppc = (char**) pcpcc;
13690 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013691 { /* SCO 3.2v4 cc rejects this sort of thing. */
13692 char tx;
13693 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013694 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013695
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 }
13699 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13700 int x[] = {25, 17};
13701 const int *foo = &x[0];
13702 ++foo;
13703 }
13704 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13705 typedef const int *iptr;
13706 iptr p = 0;
13707 ++p;
13708 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013709 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013710 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013711 struct s { int j; const int *ap[3]; } bx;
13712 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 }
13714 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13715 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013716 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013717 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013718 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013719#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721 ;
13722 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013723}
Martin v. Löwis11437992002-04-12 09:54:03 +000013724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013725if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013726 ac_cv_c_const=yes
13727else
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013731fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13733$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013734if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013735
Matthias Kloseb9621712010-04-24 17:59:49 +000013736$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013737
13738fi
13739
Michael W. Hudson54241132001-12-07 15:38:26 +000013740
Guido van Rossumda88dad1995-01-26 00:46:29 +000013741works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13743$as_echo_n "checking for working signed char... " >&6; }
13744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013745/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747int
13748main ()
13749{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013750signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013751 ;
13752 return 0;
13753}
13754_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013755if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013756 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013757else
Skip Montanaro6dead952003-09-25 14:50:04 +000013758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013760
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013761
Guido van Rossum7f43da71994-08-01 12:15:30 +000013762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13765$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013766
Guido van Rossumda88dad1995-01-26 00:46:29 +000013767have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13769$as_echo_n "checking for prototypes... " >&6; }
13770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013771/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013772int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013773int
13774main ()
13775{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ;
13778 return 0;
13779}
13780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013782
Matthias Kloseb9621712010-04-24 17:59:49 +000013783$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013784
Matthias Kloseb159a552010-04-25 21:00:44 +000013785 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13789$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790
Guido van Rossumda88dad1995-01-26 00:46:29 +000013791works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13793$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013796
13797#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013798int foo(int x, ...) {
13799 va_list va;
13800 va_start(va, x);
13801 va_arg(va, int);
13802 va_arg(va, char *);
13803 va_arg(va, double);
13804 return 0;
13805}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013806
Martin v. Löwis11437992002-04-12 09:54:03 +000013807int
13808main ()
13809{
Guido van Rossum90eea071996-08-30 20:58:57 +000013810return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 ;
13812 return 0;
13813}
13814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013815if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013820 works=yes
13821
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13825$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826
Martin v. Löwisd6320502004-08-12 13:45:08 +000013827# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13829$as_echo_n "checking for socketpair... " >&6; }
13830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013831/* end confdefs.h. */
13832
13833#include <sys/types.h>
13834#include <sys/socket.h>
13835
13836int
13837main ()
13838{
13839void *x=socketpair
13840 ;
13841 return 0;
13842}
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013845
Matthias Kloseb9621712010-04-24 17:59:49 +000013846$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013847
Matthias Kloseb159a552010-04-25 21:00:44 +000013848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013849$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013850else
Matthias Kloseb9621712010-04-24 17:59:49 +000013851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13852$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013853
13854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013856
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013857# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13859$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13860cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013861/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013862#include <sys/types.h>
13863#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013864int
13865main ()
13866{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013867struct sockaddr x;
13868x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 ;
13870 return 0;
13871}
13872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013873if ac_fn_c_try_compile "$LINENO"; then :
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13875$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013876
Matthias Kloseb9621712010-04-24 17:59:49 +000013877$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013878
13879else
Matthias Kloseb9621712010-04-24 17:59:49 +000013880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13881$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013882
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013885
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013886# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013887
13888
Matthias Kloseb9621712010-04-24 17:59:49 +000013889ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013890if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013891
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013893
Matthias Kloseb9621712010-04-24 17:59:49 +000013894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13895$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013896 OLD_CFLAGS=$CFLAGS
13897 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013899/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013900
13901# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Martin v. Löwis11437992002-04-12 09:54:03 +000013903int
13904main ()
13905{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013906
13907 char *name;
13908 struct hostent *he, *res;
13909 char buffer[2048];
13910 int buflen = 2048;
13911 int h_errnop;
13912
13913 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013914
13915 ;
13916 return 0;
13917}
13918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013919if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013922
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
Matthias Kloseb9621712010-04-24 17:59:49 +000013924$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13927$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013929else
Skip Montanaro6dead952003-09-25 14:50:04 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13932$as_echo "no" >&6; }
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13934$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013936/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013937
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013938# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013939
Martin v. Löwis11437992002-04-12 09:54:03 +000013940int
13941main ()
13942{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943
13944 char *name;
13945 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013946 char buffer[2048];
13947 int buflen = 2048;
13948 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013949
Matthias Kloseb159a552010-04-25 21:00:44 +000013950 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013951
13952 ;
13953 return 0;
13954}
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013959
Martin v. Löwis11437992002-04-12 09:54:03 +000013960
Matthias Kloseb159a552010-04-25 21:00:44 +000013961$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013962
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13964$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013966else
Skip Montanaro6dead952003-09-25 14:50:04 +000013967
Matthias Kloseb9621712010-04-24 17:59:49 +000013968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13969$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13971$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13973/* end confdefs.h. */
13974
13975# include <netdb.h>
13976
13977int
13978main ()
13979{
13980
13981 char *name;
13982 struct hostent *he;
13983 struct hostent_data data;
13984
13985 (void) gethostbyname_r(name, he, &data);
13986
13987 ;
13988 return 0;
13989}
13990_ACEOF
13991if ac_fn_c_try_compile "$LINENO"; then :
13992
13993 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13994
13995
13996$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13997
13998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13999$as_echo "yes" >&6; }
14000
14001else
14002
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
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
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014014 CFLAGS=$OLD_CFLAGS
14015
14016else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 for ac_func in gethostbyname
14019do :
14020 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014021if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014023#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014024_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014025
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014026fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014027done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028
Michael W. Hudson54241132001-12-07 15:38:26 +000014029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030fi
14031
Michael W. Hudson54241132001-12-07 15:38:26 +000014032
14033
14034
14035
14036
14037
Guido van Rossum627b2d71993-12-24 10:39:16 +000014038# checks for system services
14039# (none yet)
14040
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014041# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014042ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014043if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014044
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014045else
Matthias Kloseb9621712010-04-24 17:59:49 +000014046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14047$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014050else
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014052LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056/* Override any GCC internal prototype to avoid an error.
14057 Use char because int might match the return type of a GCC
14058 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014059#ifdef __cplusplus
14060extern "C"
14061#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014062char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014071if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014073else
Matthias Kloseb9621712010-04-24 17:59:49 +000014074 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014075fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014076rm -f core conftest.err conftest.$ac_objext \
14077 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014078LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14081$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014082if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 cat >>confdefs.h <<_ACEOF
14084#define HAVE_LIBIEEE 1
14085_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014086
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014087 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014088
Guido van Rossum627b2d71993-12-24 10:39:16 +000014089fi
14090
Michael W. Hudson54241132001-12-07 15:38:26 +000014091
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014092fi
14093
Michael W. Hudson54241132001-12-07 15:38:26 +000014094
Guido van Rossum7f43da71994-08-01 12:15:30 +000014095# check for --with-libm=...
14096
Guido van Rossum563e7081996-09-10 18:20:48 +000014097case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014098Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014099*) LIBM=-lm
14100esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14102$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014105if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014107if test "$withval" = no
14108then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14110$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014111elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014112then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14114$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014115else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014116fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14119$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120fi
14121
Guido van Rossum7f43da71994-08-01 12:15:30 +000014122
14123# check for --with-libc=...
14124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14126$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014129if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014131if test "$withval" = no
14132then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14134$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014135elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014136then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14138$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014139else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014140fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014141else
Matthias Kloseb9621712010-04-24 17:59:49 +000014142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14143$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014144fi
14145
Guido van Rossum7f43da71994-08-01 12:15:30 +000014146
Stefan Krah1919b7e2012-03-21 18:25:23 +010014147# **************************************
14148# * Check for gcc x64 inline assembler *
14149# **************************************
14150
14151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14152$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14154/* end confdefs.h. */
14155
14156int
14157main ()
14158{
14159
14160 __asm__ __volatile__ ("movq %rcx, %rax");
14161
14162 ;
14163 return 0;
14164}
14165_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014166if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014167 have_gcc_asm_for_x64=yes
14168else
14169 have_gcc_asm_for_x64=no
14170fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014171rm -f core conftest.err conftest.$ac_objext \
14172 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14174$as_echo "$have_gcc_asm_for_x64" >&6; }
14175if test "$have_gcc_asm_for_x64" = yes
14176then
14177
14178$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14179
14180fi
14181
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014182# **************************************************
14183# * Check for various properties of floating point *
14184# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014185
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14187$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14188if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014190else
14191
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014192
14193ax_cv_c_float_words_bigendian=unknown
14194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014195/* end confdefs.h. */
14196
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014197
14198double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14199
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014200
14201_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014202if ac_fn_c_try_compile "$LINENO"; then :
14203
14204
14205if grep noonsees conftest.$ac_objext >/dev/null ; then
14206 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014207fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014208if grep seesnoon conftest.$ac_objext >/dev/null ; then
14209 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14210 ax_cv_c_float_words_bigendian=no
14211 else
14212 ax_cv_c_float_words_bigendian=unknown
14213 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014214fi
14215
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014216
14217fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014219fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14221$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014222
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014223case $ax_cv_c_float_words_bigendian in
14224 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014225
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014226$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14227 ;;
14228 no)
14229 ;;
14230 *)
14231 as_fn_error $? "
14232
14233Unknown float word ordering. You need to manually preset
14234ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14235
14236 " "$LINENO" 5 ;;
14237esac
14238
14239
14240if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241then
14242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014244
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014245elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014246then
14247
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014248$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14249
14250else
14251 # Some ARM platforms use a mixed-endian representation for doubles.
14252 # While Python doesn't currently have full support for these platforms
14253 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14254 # conversions work.
14255 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14256 # or little, then it must be this?
14257
Matthias Kloseb9621712010-04-24 17:59:49 +000014258$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014259
14260fi
14261
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014262# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014263# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014264# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014265# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014266# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014267# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014268
14269# This inline assembler syntax may also work for suncc and icc,
14270# so we try it on all platforms.
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14273$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014275/* end confdefs.h. */
14276
14277int
14278main ()
14279{
14280
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014281 unsigned short cw;
14282 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14283 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014284
14285 ;
14286 return 0;
14287}
14288_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014289if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014290 have_gcc_asm_for_x87=yes
14291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014294rm -f core conftest.err conftest.$ac_objext \
14295 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14297$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014298if test "$have_gcc_asm_for_x87" = yes
14299then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014300
Matthias Kloseb9621712010-04-24 17:59:49 +000014301$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014302
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014303fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014304
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14306$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14308/* end confdefs.h. */
14309
14310int
14311main ()
14312{
14313
14314 unsigned int fpcr;
14315 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14316 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14317
14318 ;
14319 return 0;
14320}
14321_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014322if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014323 have_gcc_asm_for_mc68881=yes
14324else
14325 have_gcc_asm_for_mc68881=no
14326fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014327rm -f core conftest.err conftest.$ac_objext \
14328 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14330$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14331if test "$have_gcc_asm_for_mc68881" = yes
14332then
14333
14334$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14335
14336fi
14337
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014338# Detect whether system arithmetic is subject to x87-style double
14339# rounding issues. The result of this test has little meaning on non
14340# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14341# mode is round-to-nearest and double rounding issues are present, and
14342# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14344$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014345# $BASECFLAGS may affect the result
14346ac_save_cc="$CC"
14347CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014348if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014349 ac_cv_x87_double_rounding=no
14350else
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014352/* end confdefs.h. */
14353
14354#include <stdlib.h>
14355#include <math.h>
14356int main() {
14357 volatile double x, y, z;
14358 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14359 x = 0.99999999999999989; /* 1-2**-53 */
14360 y = 1./x;
14361 if (y != 1.)
14362 exit(0);
14363 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14364 x = 1e16;
14365 y = 2.99999;
14366 z = x + y;
14367 if (z != 1e16+4.)
14368 exit(0);
14369 /* both tests show evidence of double rounding */
14370 exit(1);
14371}
14372
14373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014374if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014375 ac_cv_x87_double_rounding=no
14376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014378fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014381fi
14382
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014383CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14385$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014386if test "$ac_cv_x87_double_rounding" = yes
14387then
14388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014390
14391fi
14392
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014393# ************************************
14394# * Check for mathematical functions *
14395# ************************************
14396
14397LIBS_SAVE=$LIBS
14398LIBS="$LIBS $LIBM"
14399
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014400for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14401do :
14402 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14403ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014404if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014405 cat >>confdefs.h <<_ACEOF
14406#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14407_ACEOF
14408
14409fi
14410done
14411
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014412for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014413do :
14414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14415ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014416if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014417 cat >>confdefs.h <<_ACEOF
14418#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14419_ACEOF
14420
14421fi
14422done
14423
14424ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14425"
Victor Stinnere0be4232011-10-25 13:06:09 +020014426if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014427 ac_have_decl=1
14428else
14429 ac_have_decl=0
14430fi
14431
14432cat >>confdefs.h <<_ACEOF
14433#define HAVE_DECL_ISINF $ac_have_decl
14434_ACEOF
14435ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14436"
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014438 ac_have_decl=1
14439else
14440 ac_have_decl=0
14441fi
14442
14443cat >>confdefs.h <<_ACEOF
14444#define HAVE_DECL_ISNAN $ac_have_decl
14445_ACEOF
14446ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14447"
Victor Stinnere0be4232011-10-25 13:06:09 +020014448if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014449 ac_have_decl=1
14450else
14451 ac_have_decl=0
14452fi
14453
14454cat >>confdefs.h <<_ACEOF
14455#define HAVE_DECL_ISFINITE $ac_have_decl
14456_ACEOF
14457
14458
Mark Dickinsona614f042009-11-28 12:48:43 +000014459# For multiprocessing module, check that sem_open
14460# actually works. For FreeBSD versions <= 7.2,
14461# the kernel module that provides POSIX semaphores
14462# isn't loaded by default, so an attempt to call
14463# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14465$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014466if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014467 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014468else
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014470 ac_cv_posix_semaphores_enabled=yes
14471else
Matthias Kloseb9621712010-04-24 17:59:49 +000014472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014473/* end confdefs.h. */
14474
14475#include <unistd.h>
14476#include <fcntl.h>
14477#include <stdio.h>
14478#include <semaphore.h>
14479#include <sys/stat.h>
14480
14481int main(void) {
14482 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14483 if (a == SEM_FAILED) {
14484 perror("sem_open");
14485 return 1;
14486 }
14487 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014488 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014489 return 0;
14490}
14491
14492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014493if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014494 ac_cv_posix_semaphores_enabled=yes
14495else
Matthias Kloseb9621712010-04-24 17:59:49 +000014496 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14499 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014500fi
14501
14502
Mark Dickinsona614f042009-11-28 12:48:43 +000014503fi
14504
Matthias Kloseb9621712010-04-24 17:59:49 +000014505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14506$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014507if test $ac_cv_posix_semaphores_enabled = no
14508then
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014511
14512fi
14513
Mark Dickinson10683072009-04-18 21:18:19 +000014514# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14516$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014517if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014519else
Matthias Kloseb9621712010-04-24 17:59:49 +000014520 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014521 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014522else
Matthias Kloseb9621712010-04-24 17:59:49 +000014523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014524/* end confdefs.h. */
14525
14526#include <unistd.h>
14527#include <fcntl.h>
14528#include <stdio.h>
14529#include <semaphore.h>
14530#include <sys/stat.h>
14531
14532int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014533 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014534 int count;
14535 int res;
14536 if(a==SEM_FAILED){
14537 perror("sem_open");
14538 return 1;
14539
14540 }
14541 res = sem_getvalue(a, &count);
14542 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014543 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014544 return res==-1 ? 1 : 0;
14545}
14546
Mark Dickinson10683072009-04-18 21:18:19 +000014547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014548if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014549 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014550else
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14554 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014555fi
14556
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014557
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014558fi
14559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14561$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014562if test $ac_cv_broken_sem_getvalue = yes
14563then
14564
Matthias Kloseb9621712010-04-24 17:59:49 +000014565$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014566
14567fi
14568
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014569ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14570"
14571if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14572 ac_have_decl=1
14573else
14574 ac_have_decl=0
14575fi
14576
14577cat >>confdefs.h <<_ACEOF
14578#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14579_ACEOF
14580ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14581"
14582if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14583 ac_have_decl=1
14584else
14585 ac_have_decl=0
14586fi
14587
14588cat >>confdefs.h <<_ACEOF
14589#define HAVE_DECL_RTLD_NOW $ac_have_decl
14590_ACEOF
14591ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14592"
14593if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14594 ac_have_decl=1
14595else
14596 ac_have_decl=0
14597fi
14598
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14601_ACEOF
14602ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14603"
14604if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14605 ac_have_decl=1
14606else
14607 ac_have_decl=0
14608fi
14609
14610cat >>confdefs.h <<_ACEOF
14611#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14612_ACEOF
14613ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14614"
14615if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14616 ac_have_decl=1
14617else
14618 ac_have_decl=0
14619fi
14620
14621cat >>confdefs.h <<_ACEOF
14622#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14623_ACEOF
14624ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14625"
14626if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14627 ac_have_decl=1
14628else
14629 ac_have_decl=0
14630fi
14631
14632cat >>confdefs.h <<_ACEOF
14633#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14634_ACEOF
14635ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14636"
14637if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14638 ac_have_decl=1
14639else
14640 ac_have_decl=0
14641fi
14642
14643cat >>confdefs.h <<_ACEOF
14644#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14645_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014646ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14647"
14648if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14649 ac_have_decl=1
14650else
14651 ac_have_decl=0
14652fi
14653
14654cat >>confdefs.h <<_ACEOF
14655#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14656_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014657
14658
Mark Dickinsonbd792642009-03-18 20:06:12 +000014659# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14661$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014662# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014663if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014664 enableval=$enable_big_digits; case $enable_big_digits in
14665yes)
14666 enable_big_digits=30 ;;
14667no)
14668 enable_big_digits=15 ;;
1466915|30)
14670 ;;
14671*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014672 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 +000014673esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14675$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014676
14677cat >>confdefs.h <<_ACEOF
14678#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14679_ACEOF
14680
14681
14682else
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14684$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014685fi
14686
14687
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014689ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014690if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014691
14692
Matthias Kloseb9621712010-04-24 17:59:49 +000014693$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014694
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014695 wchar_h="yes"
14696
Guido van Rossumef2255b2000-03-10 22:30:29 +000014697else
Martin v. Löwis11437992002-04-12 09:54:03 +000014698 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014699
14700fi
14701
Michael W. Hudson54241132001-12-07 15:38:26 +000014702
Martin v. Löwis11437992002-04-12 09:54:03 +000014703
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014704# determine wchar_t size
14705if test "$wchar_h" = yes
14706then
Matthias Kloseb9621712010-04-24 17:59:49 +000014707 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014708# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14709# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14710# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14712$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014713if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014715else
Matthias Kloseb9621712010-04-24 17:59:49 +000014716 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14717"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014718
Martin v. Löwis11437992002-04-12 09:54:03 +000014719else
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 if test "$ac_cv_type_wchar_t" = yes; then
14721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014723as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014725 else
14726 ac_cv_sizeof_wchar_t=0
14727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014729
Martin v. Löwis11437992002-04-12 09:54:03 +000014730fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14732$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014733
14734
14735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014737#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014738_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014739
Michael W. Hudson54241132001-12-07 15:38:26 +000014740
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014741fi
14742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14744$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014745have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014747/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014748
14749#include <tcl.h>
14750#if TCL_UTF_MAX != 6
14751# error "NOT UCS4_TCL"
14752#endif
14753int
14754main ()
14755{
14756
14757 ;
14758 return 0;
14759}
14760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014761if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014762
14763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014765
14766 have_ucs4_tcl=yes
14767
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14771$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014772
Skip Montanaro6dead952003-09-25 14:50:04 +000014773# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014774if test "$wchar_h" = yes
14775then
14776 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14778$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014779 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014781else
14782
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014784 ac_cv_wchar_t_signed=yes
14785else
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014787/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014788
14789 #include <wchar.h>
14790 int main()
14791 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014792 /* Success: exit code 0 */
14793 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014794 }
14795
14796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014797if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014798 ac_cv_wchar_t_signed=yes
14799else
Matthias Kloseb9621712010-04-24 17:59:49 +000014800 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014804fi
14805
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014806fi
14807
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14809$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014810fi
14811
Michael Osipov3738fad2018-08-24 18:17:19 +020014812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14813$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014814# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014815if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014816 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014817then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014818
Matthias Kloseb9621712010-04-24 17:59:49 +000014819$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014820
Michael Osipov3738fad2018-08-24 18:17:19 +020014821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14822$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014823else
Michael Osipov3738fad2018-08-24 18:17:19 +020014824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14825$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014826fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014827
14828# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14830$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014831if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014832 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014833else
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 ac_cv_c_bigendian=unknown
14835 # See if we're dealing with a universal compiler.
14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14837/* end confdefs.h. */
14838#ifndef __APPLE_CC__
14839 not a universal capable compiler
14840 #endif
14841 typedef int dummy;
14842
Skip Montanaro6dead952003-09-25 14:50:04 +000014843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014844if ac_fn_c_try_compile "$LINENO"; then :
14845
14846 # Check for potential -arch flags. It is not universal unless
14847 # there are at least two -arch flags with different values.
14848 ac_arch=
14849 ac_prev=
14850 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14851 if test -n "$ac_prev"; then
14852 case $ac_word in
14853 i?86 | x86_64 | ppc | ppc64)
14854 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14855 ac_arch=$ac_word
14856 else
14857 ac_cv_c_bigendian=universal
14858 break
14859 fi
14860 ;;
14861 esac
14862 ac_prev=
14863 elif test "x$ac_word" = "x-arch"; then
14864 ac_prev=arch
14865 fi
14866 done
14867fi
14868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14869 if test $ac_cv_c_bigendian = unknown; then
14870 # See if sys/param.h defines the BYTE_ORDER macro.
14871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014872/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014873#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014874 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014875
Martin v. Löwis11437992002-04-12 09:54:03 +000014876int
14877main ()
14878{
Matthias Kloseb9621712010-04-24 17:59:49 +000014879#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14880 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14881 && LITTLE_ENDIAN)
14882 bogus endian macros
14883 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014884
14885 ;
14886 return 0;
14887}
14888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014890 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014892/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014893#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014895
Martin v. Löwis11437992002-04-12 09:54:03 +000014896int
14897main ()
14898{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014899#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 not big endian
14901 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014902
14903 ;
14904 return 0;
14905}
14906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014907if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014908 ac_cv_c_bigendian=yes
14909else
Matthias Kloseb9621712010-04-24 17:59:49 +000014910 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014913fi
14914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14915 fi
14916 if test $ac_cv_c_bigendian = unknown; then
14917 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014919/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014920#include <limits.h>
14921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922int
14923main ()
14924{
Matthias Kloseb9621712010-04-24 17:59:49 +000014925#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14926 bogus endian macros
14927 #endif
14928
Martin v. Löwis11437992002-04-12 09:54:03 +000014929 ;
14930 return 0;
14931}
14932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014933if ac_fn_c_try_compile "$LINENO"; then :
14934 # It does; now see whether it defined to _BIG_ENDIAN or not.
14935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14936/* end confdefs.h. */
14937#include <limits.h>
14938
14939int
14940main ()
14941{
14942#ifndef _BIG_ENDIAN
14943 not big endian
14944 #endif
14945
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014952else
Matthias Kloseb9621712010-04-24 17:59:49 +000014953 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14956fi
14957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14958 fi
14959 if test $ac_cv_c_bigendian = unknown; then
14960 # Compile a test program.
14961 if test "$cross_compiling" = yes; then :
14962 # Try to guess by grepping values from an object file.
14963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14964/* end confdefs.h. */
14965short int ascii_mm[] =
14966 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14967 short int ascii_ii[] =
14968 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14969 int use_ascii (int i) {
14970 return ascii_mm[i] + ascii_ii[i];
14971 }
14972 short int ebcdic_ii[] =
14973 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14974 short int ebcdic_mm[] =
14975 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14976 int use_ebcdic (int i) {
14977 return ebcdic_mm[i] + ebcdic_ii[i];
14978 }
14979 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981int
14982main ()
14983{
14984return use_ascii (foo) == use_ebcdic (foo);
14985 ;
14986 return 0;
14987}
14988_ACEOF
14989if ac_fn_c_try_compile "$LINENO"; then :
14990 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14991 ac_cv_c_bigendian=yes
14992 fi
14993 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14994 if test "$ac_cv_c_bigendian" = unknown; then
14995 ac_cv_c_bigendian=no
14996 else
14997 # finding both strings is unlikely to happen, but who knows?
14998 ac_cv_c_bigendian=unknown
14999 fi
15000 fi
15001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015003else
Matthias Kloseb9621712010-04-24 17:59:49 +000015004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015005/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015007int
15008main ()
15009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015010
Matthias Kloseb9621712010-04-24 17:59:49 +000015011 /* Are we little or big endian? From Harbison&Steele. */
15012 union
15013 {
15014 long int l;
15015 char c[sizeof (long int)];
15016 } u;
15017 u.l = 1;
15018 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019
15020 ;
15021 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015022}
Martin v. Löwis11437992002-04-12 09:54:03 +000015023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015024if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015025 ac_cv_c_bigendian=no
15026else
Matthias Kloseb9621712010-04-24 17:59:49 +000015027 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015029rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15030 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15036$as_echo "$ac_cv_c_bigendian" >&6; }
15037 case $ac_cv_c_bigendian in #(
15038 yes)
15039 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15040;; #(
15041 no)
15042 ;; #(
15043 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015044
Matthias Kloseb9621712010-04-24 17:59:49 +000015045$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047 ;; #(
15048 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015049 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015050 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015054# ABI version string for Python extension modules. This appears between the
15055# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15056# from the following attributes which affect the ABI of this Python build (in
15057# this order):
15058#
15059# * The Python implementation (always 'cpython-' for us)
15060# * The major and minor version numbers
15061# * --with-pydebug (adds a 'd')
15062# * --with-pymalloc (adds a 'm')
15063# * --with-wide-unicode (adds a 'u')
15064#
15065# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015066# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15067# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015068
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15070$as_echo_n "checking ABIFLAGS... " >&6; }
15071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15072$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15074$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015075SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15077$as_echo "$SOABI" >&6; }
15078
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015079
15080case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070015081 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015082 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15083 *)
15084 EXT_SUFFIX=${SHLIB_SUFFIX};;
15085esac
15086
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15088$as_echo_n "checking LDVERSION... " >&6; }
15089LDVERSION='$(VERSION)$(ABIFLAGS)'
15090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15091$as_echo "$LDVERSION" >&6; }
15092
doko@python.org87421192013-01-26 11:39:31 +010015093
doko@ubuntu.com55532312016-06-14 08:55:19 +020015094if test x$PLATFORM_TRIPLET = x; then
15095 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15096else
15097 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15098fi
doko@python.org87421192013-01-26 11:39:31 +010015099
15100
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015101# Check whether right shifting a negative integer extends the sign bit
15102# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15104$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015105if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015106 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015107else
Martin v. Löwis11437992002-04-12 09:54:03 +000015108
Matthias Kloseb9621712010-04-24 17:59:49 +000015109if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015110 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015111else
Matthias Kloseb9621712010-04-24 17:59:49 +000015112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015113/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015114
15115int main()
15116{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015117 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015118}
15119
Martin v. Löwis11437992002-04-12 09:54:03 +000015120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015121if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015122 ac_cv_rshift_extends_sign=yes
15123else
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15127 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015128fi
15129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130fi
15131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15133$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015134if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015135then
Martin v. Löwis11437992002-04-12 09:54:03 +000015136
Matthias Kloseb9621712010-04-24 17:59:49 +000015137$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015138
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015139fi
15140
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015141# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15143$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015144if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015146else
Martin v. Löwis11437992002-04-12 09:54:03 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015149/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015150#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015151int
15152main ()
15153{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015154
15155 FILE *f = fopen("/dev/null", "r");
15156 flockfile(f);
15157 getc_unlocked(f);
15158 funlockfile(f);
15159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 ;
15161 return 0;
15162}
15163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015164if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015165 ac_cv_have_getc_unlocked=yes
15166else
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 ac_cv_have_getc_unlocked=no
15168fi
15169rm -f core conftest.err conftest.$ac_objext \
15170 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15174$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015175if test "$ac_cv_have_getc_unlocked" = yes
15176then
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015179
15180fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015181
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015182# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015183# save the value of LIBS so we don't actually link Python with readline
15184LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015185
Gregory P. Smith18820942008-09-07 06:24:49 +000015186# On some systems we need to link readline to a termcap compatible
15187# library. NOTE: Keep the precedence of listed libraries synchronised
15188# with setup.py.
15189py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15191$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015192for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015193 if test -z "$py_libtermcap"; then
15194 READLINE_LIBS="-lreadline"
15195 else
15196 READLINE_LIBS="-lreadline -l$py_libtermcap"
15197 fi
15198 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015200/* end confdefs.h. */
15201
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202/* Override any GCC internal prototype to avoid an error.
15203 Use char because int might match the return type of a GCC
15204 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015205#ifdef __cplusplus
15206extern "C"
15207#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015208char readline ();
15209int
15210main ()
15211{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015212return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015213 ;
15214 return 0;
15215}
15216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015217if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015218 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015220rm -f core conftest.err conftest.$ac_objext \
15221 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015222 if test $py_cv_lib_readline = yes; then
15223 break
15224 fi
15225done
15226# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15227#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015228if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15230$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015231else
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15233$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015234
Matthias Kloseb9621712010-04-24 17:59:49 +000015235$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015236
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015237fi
15238
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015239# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015241/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015242#include <readline/readline.h>
15243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015244if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015245 have_readline=yes
15246else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015247 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015248
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015249fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015250rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015251if test $have_readline = yes
15252then
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015254/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015255#include <readline/readline.h>
15256
15257_ACEOF
15258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015259 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015260
Matthias Kloseb9621712010-04-24 17:59:49 +000015261$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015262
15263fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015264rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015265
Matthias Kloseb9621712010-04-24 17:59:49 +000015266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015267/* end confdefs.h. */
15268#include <readline/readline.h>
15269
15270_ACEOF
15271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015275
15276fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015277rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015278
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015279fi
15280
Martin v. Löwis0daad592001-09-30 21:09:59 +000015281# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15283$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015284if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015286else
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015288LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292/* Override any GCC internal prototype to avoid an error.
15293 Use char because int might match the return type of a GCC
15294 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015295#ifdef __cplusplus
15296extern "C"
15297#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015298char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015299int
15300main ()
15301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ;
15304 return 0;
15305}
15306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015309else
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015312rm -f core conftest.err conftest.$ac_objext \
15313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015314LIBS=$ac_check_lib_save_LIBS
15315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15317$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015318if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015319
Matthias Kloseb9621712010-04-24 17:59:49 +000015320$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015321
Martin v. Löwis0daad592001-09-30 21:09:59 +000015322fi
15323
Michael W. Hudson54241132001-12-07 15:38:26 +000015324
Thomas Wouters89d996e2007-09-08 17:39:28 +000015325# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15327$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015328if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015330else
15331 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015332LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015334/* end confdefs.h. */
15335
15336/* Override any GCC internal prototype to avoid an error.
15337 Use char because int might match the return type of a GCC
15338 builtin and then its argument prototype would still apply. */
15339#ifdef __cplusplus
15340extern "C"
15341#endif
15342char rl_completion_display_matches_hook ();
15343int
15344main ()
15345{
15346return rl_completion_display_matches_hook ();
15347 ;
15348 return 0;
15349}
15350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015351if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15353else
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015356rm -f core conftest.err conftest.$ac_objext \
15357 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015358LIBS=$ac_check_lib_save_LIBS
15359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15361$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015362if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015363
Matthias Kloseb9621712010-04-24 17:59:49 +000015364$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015365
15366fi
15367
15368
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015369# also in 4.0, but not in editline
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15371$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15372if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15373 $as_echo_n "(cached) " >&6
15374else
15375 ac_check_lib_save_LIBS=$LIBS
15376LIBS="-lreadline $READLINE_LIBS $LIBS"
15377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15378/* end confdefs.h. */
15379
15380/* Override any GCC internal prototype to avoid an error.
15381 Use char because int might match the return type of a GCC
15382 builtin and then its argument prototype would still apply. */
15383#ifdef __cplusplus
15384extern "C"
15385#endif
15386char rl_resize_terminal ();
15387int
15388main ()
15389{
15390return rl_resize_terminal ();
15391 ;
15392 return 0;
15393}
15394_ACEOF
15395if ac_fn_c_try_link "$LINENO"; then :
15396 ac_cv_lib_readline_rl_resize_terminal=yes
15397else
15398 ac_cv_lib_readline_rl_resize_terminal=no
15399fi
15400rm -f core conftest.err conftest.$ac_objext \
15401 conftest$ac_exeext conftest.$ac_ext
15402LIBS=$ac_check_lib_save_LIBS
15403fi
15404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15405$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15406if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15407
15408$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15409
15410fi
15411
15412
Martin v. Löwis0daad592001-09-30 21:09:59 +000015413# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15415$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015416if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015417 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015418else
Martin v. Löwis11437992002-04-12 09:54:03 +000015419 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015420LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424/* Override any GCC internal prototype to avoid an error.
15425 Use char because int might match the return type of a GCC
15426 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015427#ifdef __cplusplus
15428extern "C"
15429#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015430char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015431int
15432main ()
15433{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015434return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015435 ;
15436 return 0;
15437}
15438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015439if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015440 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015441else
Matthias Kloseb9621712010-04-24 17:59:49 +000015442 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015444rm -f core conftest.err conftest.$ac_objext \
15445 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015446LIBS=$ac_check_lib_save_LIBS
15447fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15449$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015450if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015451
Matthias Kloseb9621712010-04-24 17:59:49 +000015452$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015453
Guido van Rossum353ae582001-07-10 16:45:32 +000015454fi
15455
Jack Jansendd19cf82001-12-06 22:36:17 +000015456
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015457# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015459/* end confdefs.h. */
15460#include <readline/readline.h>
15461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015462if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015463 have_readline=yes
15464else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015465 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015466
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015467fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015468rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015469if test $have_readline = yes
15470then
Matthias Kloseb9621712010-04-24 17:59:49 +000015471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015472/* end confdefs.h. */
15473#include <readline/readline.h>
15474
15475_ACEOF
15476if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015478
Matthias Kloseb9621712010-04-24 17:59:49 +000015479$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015480
15481fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015482rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015483
15484fi
15485
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15487$as_echo_n "checking for append_history in -lreadline... " >&6; }
15488if ${ac_cv_lib_readline_append_history+:} false; then :
15489 $as_echo_n "(cached) " >&6
15490else
15491 ac_check_lib_save_LIBS=$LIBS
15492LIBS="-lreadline $READLINE_LIBS $LIBS"
15493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15494/* end confdefs.h. */
15495
15496/* Override any GCC internal prototype to avoid an error.
15497 Use char because int might match the return type of a GCC
15498 builtin and then its argument prototype would still apply. */
15499#ifdef __cplusplus
15500extern "C"
15501#endif
15502char append_history ();
15503int
15504main ()
15505{
15506return append_history ();
15507 ;
15508 return 0;
15509}
15510_ACEOF
15511if ac_fn_c_try_link "$LINENO"; then :
15512 ac_cv_lib_readline_append_history=yes
15513else
15514 ac_cv_lib_readline_append_history=no
15515fi
15516rm -f core conftest.err conftest.$ac_objext \
15517 conftest$ac_exeext conftest.$ac_ext
15518LIBS=$ac_check_lib_save_LIBS
15519fi
15520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15521$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15522if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15523
15524$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15525
15526fi
15527
15528
Martin v. Löwis82bca632006-02-10 20:49:30 +000015529# End of readline checks: restore LIBS
15530LIBS=$LIBS_no_readline
15531
Matthias Kloseb9621712010-04-24 17:59:49 +000015532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15533$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015534if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015536else
Martin v. Löwis11437992002-04-12 09:54:03 +000015537
Matthias Kloseb9621712010-04-24 17:59:49 +000015538if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015539 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015540else
Matthias Kloseb9621712010-04-24 17:59:49 +000015541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015543
15544int main()
15545{
15546 int val1 = nice(1);
15547 if (val1 != -1 && val1 == nice(2))
15548 exit(0);
15549 exit(1);
15550}
15551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015553if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015554 ac_cv_broken_nice=yes
15555else
Matthias Kloseb9621712010-04-24 17:59:49 +000015556 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015560fi
15561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562fi
15563
Matthias Kloseb9621712010-04-24 17:59:49 +000015564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15565$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015566if test "$ac_cv_broken_nice" = yes
15567then
Martin v. Löwis11437992002-04-12 09:54:03 +000015568
Matthias Kloseb9621712010-04-24 17:59:49 +000015569$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015570
15571fi
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15574$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015575if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015577else
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015579 ac_cv_broken_poll=no
15580else
Matthias Kloseb9621712010-04-24 17:59:49 +000015581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015582/* end confdefs.h. */
15583
15584#include <poll.h>
15585
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015586int main()
15587{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015588 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015589 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015590
15591 close (42);
15592
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015593 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015594 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015595 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015596 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015597 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015598 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015599 return 1;
15600}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015601
15602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015603if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015604 ac_cv_broken_poll=yes
15605else
Matthias Kloseb9621712010-04-24 17:59:49 +000015606 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15609 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015612fi
15613
Matthias Kloseb9621712010-04-24 17:59:49 +000015614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15615$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015616if test "$ac_cv_broken_poll" = yes
15617then
15618
Matthias Kloseb9621712010-04-24 17:59:49 +000015619$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015620
15621fi
15622
Martin v. Löwis1d459062005-03-14 21:23:33 +000015623# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15625$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015626if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015628else
15629
Matthias Kloseb9621712010-04-24 17:59:49 +000015630if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015631 ac_cv_working_tzset=no
15632else
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015634/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015635
15636#include <stdlib.h>
15637#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015638#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015639
15640#if HAVE_TZNAME
15641extern char *tzname[];
15642#endif
15643
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015644int main()
15645{
Brett Cannon18367812003-09-19 00:59:16 +000015646 /* Note that we need to ensure that not only does tzset(3)
15647 do 'something' with localtime, but it works as documented
15648 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015649 This includes making sure that tzname is set properly if
15650 tm->tm_zone does not exist since it is the alternative way
15651 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015652
15653 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015654 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015655 */
15656
Martin v. Löwis1d459062005-03-14 21:23:33 +000015657 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015658 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15659
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015660 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015661 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015662 if (localtime(&groundhogday)->tm_hour != 0)
15663 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015664#if HAVE_TZNAME
15665 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15666 if (strcmp(tzname[0], "UTC") ||
15667 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15668 exit(1);
15669#endif
Brett Cannon18367812003-09-19 00:59:16 +000015670
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015671 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015672 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015673 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015674 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015675#if HAVE_TZNAME
15676 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15677 exit(1);
15678#endif
Brett Cannon18367812003-09-19 00:59:16 +000015679
15680 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15681 tzset();
15682 if (localtime(&groundhogday)->tm_hour != 11)
15683 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015684#if HAVE_TZNAME
15685 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15686 exit(1);
15687#endif
15688
15689#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015690 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15691 exit(1);
15692 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15693 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015694#endif
Brett Cannon18367812003-09-19 00:59:16 +000015695
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015696 exit(0);
15697}
15698
15699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015700if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015701 ac_cv_working_tzset=yes
15702else
Matthias Kloseb9621712010-04-24 17:59:49 +000015703 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15706 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015707fi
15708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709fi
15710
Matthias Kloseb9621712010-04-24 17:59:49 +000015711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15712$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015713if test "$ac_cv_working_tzset" = yes
15714then
15715
Matthias Kloseb9621712010-04-24 17:59:49 +000015716$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015717
15718fi
15719
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015720# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15722$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015723if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015724 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015725else
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015727/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015728#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015729int
15730main ()
15731{
15732
15733struct stat st;
15734st.st_mtim.tv_nsec = 1;
15735
15736 ;
15737 return 0;
15738}
15739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015740if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015741 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15746fi
15747
Matthias Kloseb9621712010-04-24 17:59:49 +000015748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15749$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015750if test "$ac_cv_stat_tv_nsec" = yes
15751then
15752
Matthias Kloseb9621712010-04-24 17:59:49 +000015753$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015754
15755fi
15756
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015757# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15759$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015760if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015762else
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015764/* end confdefs.h. */
15765#include <sys/stat.h>
15766int
15767main ()
15768{
15769
15770struct stat st;
15771st.st_mtimespec.tv_nsec = 1;
15772
15773 ;
15774 return 0;
15775}
15776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015777if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015778 ac_cv_stat_tv_nsec2=yes
15779else
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015781fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15783fi
15784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15786$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015787if test "$ac_cv_stat_tv_nsec2" = yes
15788then
15789
Matthias Kloseb9621712010-04-24 17:59:49 +000015790$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015791
15792fi
15793
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015794# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015795ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015796if test "$cross_compiling" = no; then
15797 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15798fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015799
15800for ac_header in curses.h ncurses.h
15801do :
15802 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15803ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15804if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15805 cat >>confdefs.h <<_ACEOF
15806#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15807_ACEOF
15808
15809fi
15810
15811done
15812
15813
15814# On Solaris, term.h requires curses.h
15815for ac_header in term.h
15816do :
15817 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15818#ifdef HAVE_CURSES_H
15819#include <curses.h>
15820#endif
15821
15822"
15823if test "x$ac_cv_header_term_h" = xyes; then :
15824 cat >>confdefs.h <<_ACEOF
15825#define HAVE_TERM_H 1
15826_ACEOF
15827
15828fi
15829
15830done
15831
15832
Jack Jansen666b1e72001-10-31 12:11:48 +000015833# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15835$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015836if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015837 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015838else
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015840/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015841#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015842int
15843main ()
15844{
Jack Jansen666b1e72001-10-31 12:11:48 +000015845
15846 int rtn;
15847 rtn = mvwdelch(0,0,0);
15848
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 ;
15850 return 0;
15851}
15852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015853if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015854 ac_cv_mvwdelch_is_expression=yes
15855else
Matthias Kloseb9621712010-04-24 17:59:49 +000015856 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15859fi
15860
Matthias Kloseb9621712010-04-24 17:59:49 +000015861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15862$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015863
15864if test "$ac_cv_mvwdelch_is_expression" = yes
15865then
Martin v. Löwis11437992002-04-12 09:54:03 +000015866
Matthias Kloseb9621712010-04-24 17:59:49 +000015867$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015868
15869fi
15870
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015871# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15872# structs since version 5.7. If the macro is defined as zero before including
15873# [n]curses.h, ncurses will expose fields of the structs regardless of the
15874# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15876$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015877if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015881/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015882
15883 #define NCURSES_OPAQUE 0
15884 #include <curses.h>
15885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886int
15887main ()
15888{
Jack Jansen666b1e72001-10-31 12:11:48 +000015889
15890 WINDOW *w;
15891 w->_flags = 0;
15892
Martin v. Löwis11437992002-04-12 09:54:03 +000015893 ;
15894 return 0;
15895}
15896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015897if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015898 ac_cv_window_has_flags=yes
15899else
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15903fi
15904
Matthias Kloseb9621712010-04-24 17:59:49 +000015905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15906$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015907
Jack Jansen666b1e72001-10-31 12:11:48 +000015908
15909if test "$ac_cv_window_has_flags" = yes
15910then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
Matthias Kloseb9621712010-04-24 17:59:49 +000015912$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015913
15914fi
15915
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15917$as_echo_n "checking for is_pad... " >&6; }
15918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15919/* end confdefs.h. */
15920#include <curses.h>
15921int
15922main ()
15923{
15924
15925#ifndef is_pad
15926void *x=is_pad
15927#endif
15928
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933if ac_fn_c_try_compile "$LINENO"; then :
15934
15935$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15936
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15938$as_echo "yes" >&6; }
15939else
15940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15941$as_echo "no" >&6; }
15942
15943fi
15944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15945
Matthias Kloseb9621712010-04-24 17:59:49 +000015946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15947$as_echo_n "checking for is_term_resized... " >&6; }
15948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015949/* end confdefs.h. */
15950#include <curses.h>
15951int
15952main ()
15953{
15954void *x=is_term_resized
15955 ;
15956 return 0;
15957}
15958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015959if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015962
Matthias Kloseb159a552010-04-25 21:00:44 +000015963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015964$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015965else
Matthias Kloseb9621712010-04-24 17:59:49 +000015966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15967$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015968
15969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15973$as_echo_n "checking for resize_term... " >&6; }
15974cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015975/* end confdefs.h. */
15976#include <curses.h>
15977int
15978main ()
15979{
15980void *x=resize_term
15981 ;
15982 return 0;
15983}
15984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015985if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015988
Matthias Kloseb159a552010-04-25 21:00:44 +000015989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015990$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015991else
Matthias Kloseb9621712010-04-24 17:59:49 +000015992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15993$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015994
15995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
Matthias Kloseb9621712010-04-24 17:59:49 +000015998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15999$as_echo_n "checking for resizeterm... " >&6; }
16000cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016001/* end confdefs.h. */
16002#include <curses.h>
16003int
16004main ()
16005{
16006void *x=resizeterm
16007 ;
16008 return 0;
16009}
16010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016011if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014
Matthias Kloseb159a552010-04-25 21:00:44 +000016015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016016$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016017else
Matthias Kloseb9621712010-04-24 17:59:49 +000016018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16019$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016020
16021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016023
16024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16025$as_echo_n "checking for immedok... " >&6; }
16026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16027/* end confdefs.h. */
16028#include <curses.h>
16029int
16030main ()
16031{
16032
16033#ifndef immedok
16034void *x=immedok
16035#endif
16036
16037 ;
16038 return 0;
16039}
16040_ACEOF
16041if ac_fn_c_try_compile "$LINENO"; then :
16042
16043$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16044
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16046$as_echo "yes" >&6; }
16047else
16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16049$as_echo "no" >&6; }
16050
16051fi
16052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16053
16054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16055$as_echo_n "checking for syncok... " >&6; }
16056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057/* end confdefs.h. */
16058#include <curses.h>
16059int
16060main ()
16061{
16062
16063#ifndef syncok
16064void *x=syncok
16065#endif
16066
16067 ;
16068 return 0;
16069}
16070_ACEOF
16071if ac_fn_c_try_compile "$LINENO"; then :
16072
16073$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16074
16075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16076$as_echo "yes" >&6; }
16077else
16078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16079$as_echo "no" >&6; }
16080
16081fi
16082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16083
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16085$as_echo_n "checking for wchgat... " >&6; }
16086cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16087/* end confdefs.h. */
16088#include <curses.h>
16089int
16090main ()
16091{
16092
16093#ifndef wchgat
16094void *x=wchgat
16095#endif
16096
16097 ;
16098 return 0;
16099}
16100_ACEOF
16101if ac_fn_c_try_compile "$LINENO"; then :
16102
16103$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16104
16105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16106$as_echo "yes" >&6; }
16107else
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16109$as_echo "no" >&6; }
16110
16111fi
16112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16113
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16115$as_echo_n "checking for filter... " >&6; }
16116cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16117/* end confdefs.h. */
16118#include <curses.h>
16119int
16120main ()
16121{
16122
16123#ifndef filter
16124void *x=filter
16125#endif
16126
16127 ;
16128 return 0;
16129}
16130_ACEOF
16131if ac_fn_c_try_compile "$LINENO"; then :
16132
16133$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16134
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16136$as_echo "yes" >&6; }
16137else
16138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16139$as_echo "no" >&6; }
16140
16141fi
16142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16143
16144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16145$as_echo_n "checking for has_key... " >&6; }
16146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16147/* end confdefs.h. */
16148#include <curses.h>
16149int
16150main ()
16151{
16152
16153#ifndef has_key
16154void *x=has_key
16155#endif
16156
16157 ;
16158 return 0;
16159}
16160_ACEOF
16161if ac_fn_c_try_compile "$LINENO"; then :
16162
16163$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16164
16165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16166$as_echo "yes" >&6; }
16167else
16168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16169$as_echo "no" >&6; }
16170
16171fi
16172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16173
16174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16175$as_echo_n "checking for typeahead... " >&6; }
16176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16177/* end confdefs.h. */
16178#include <curses.h>
16179int
16180main ()
16181{
16182
16183#ifndef typeahead
16184void *x=typeahead
16185#endif
16186
16187 ;
16188 return 0;
16189}
16190_ACEOF
16191if ac_fn_c_try_compile "$LINENO"; then :
16192
16193$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16194
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16196$as_echo "yes" >&6; }
16197else
16198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16199$as_echo "no" >&6; }
16200
16201fi
16202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16203
16204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16205$as_echo_n "checking for use_env... " >&6; }
16206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16207/* end confdefs.h. */
16208#include <curses.h>
16209int
16210main ()
16211{
16212
16213#ifndef use_env
16214void *x=use_env
16215#endif
16216
16217 ;
16218 return 0;
16219}
16220_ACEOF
16221if ac_fn_c_try_compile "$LINENO"; then :
16222
16223$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16224
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16226$as_echo "yes" >&6; }
16227else
16228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16229$as_echo "no" >&6; }
16230
16231fi
16232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016233# last curses configure check
16234CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016235
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16237$as_echo "$as_me: checking for device files" >&6;}
16238
16239if test "x$cross_compiling" = xyes; then
16240 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16242$as_echo_n "checking for /dev/ptmx... " >&6; }
16243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16244$as_echo "not set" >&6; }
16245 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16246 fi
16247 if test "${ac_cv_file__dev_ptc+set}" != set; then
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16249$as_echo_n "checking for /dev/ptc... " >&6; }
16250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16251$as_echo "not set" >&6; }
16252 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16253 fi
16254fi
16255
Matthias Kloseb9621712010-04-24 17:59:49 +000016256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16257$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016258if ${ac_cv_file__dev_ptmx+:} false; then :
16259 $as_echo_n "(cached) " >&6
16260else
16261 test "$cross_compiling" = yes &&
16262 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16263if test -r "/dev/ptmx"; then
16264 ac_cv_file__dev_ptmx=yes
16265else
16266 ac_cv_file__dev_ptmx=no
16267fi
16268fi
16269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16270$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16271if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016272
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016273fi
16274
16275if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016276
Matthias Kloseb9621712010-04-24 17:59:49 +000016277$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016278
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16281$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016282if ${ac_cv_file__dev_ptc+:} false; then :
16283 $as_echo_n "(cached) " >&6
16284else
16285 test "$cross_compiling" = yes &&
16286 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16287if test -r "/dev/ptc"; then
16288 ac_cv_file__dev_ptc=yes
16289else
16290 ac_cv_file__dev_ptc=no
16291fi
16292fi
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16294$as_echo "$ac_cv_file__dev_ptc" >&6; }
16295if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016296
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016297fi
16298
16299if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016300
Matthias Kloseb9621712010-04-24 17:59:49 +000016301$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016302
Neal Norwitz865400f2003-03-21 01:42:58 +000016303fi
16304
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016305if test $ac_sys_system = Darwin
16306then
16307 LIBS="$LIBS -framework CoreFoundation"
16308fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016309
Matthias Kloseb9621712010-04-24 17:59:49 +000016310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16311$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016312if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016314else
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016316 ac_cv_have_size_t_format="cross -- assuming yes"
16317
Thomas Wouters477c8d52006-05-27 19:21:47 +000016318else
Matthias Kloseb9621712010-04-24 17:59:49 +000016319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016320/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016321
Thomas Wouters477c8d52006-05-27 19:21:47 +000016322#include <stdio.h>
16323#include <stddef.h>
16324#include <string.h>
16325
Christian Heimes2c181612007-12-17 20:04:13 +000016326#ifdef HAVE_SYS_TYPES_H
16327#include <sys/types.h>
16328#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016329
16330#ifdef HAVE_SSIZE_T
16331typedef ssize_t Py_ssize_t;
16332#elif SIZEOF_VOID_P == SIZEOF_LONG
16333typedef long Py_ssize_t;
16334#else
16335typedef int Py_ssize_t;
16336#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016337
Christian Heimes2c181612007-12-17 20:04:13 +000016338int main()
16339{
16340 char buffer[256];
16341
Thomas Wouters477c8d52006-05-27 19:21:47 +000016342 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16343 return 1;
16344
Thomas Wouters89f507f2006-12-13 04:49:30 +000016345 if (strcmp(buffer, "123"))
16346 return 1;
16347
16348 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16349 return 1;
16350
16351 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016352 return 1;
16353
16354 return 0;
16355}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016356
Thomas Wouters477c8d52006-05-27 19:21:47 +000016357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016358if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016359 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016360else
Matthias Kloseb9621712010-04-24 17:59:49 +000016361 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016365fi
16366
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16369$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016370if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016371
Matthias Kloseb9621712010-04-24 17:59:49 +000016372$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016373
16374fi
16375
Matthias Kloseb9621712010-04-24 17:59:49 +000016376ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016377#ifdef HAVE_SYS_TYPES_H
16378#include <sys/types.h>
16379#endif
16380#ifdef HAVE_SYS_SOCKET_H
16381#include <sys/socket.h>
16382#endif
16383
Matthias Kloseb9621712010-04-24 17:59:49 +000016384"
Victor Stinnere0be4232011-10-25 13:06:09 +020016385if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016386
Martin v. Löwis11437992002-04-12 09:54:03 +000016387else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016388
Matthias Kloseb9621712010-04-24 17:59:49 +000016389$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016390
16391fi
16392
Michael W. Hudson54241132001-12-07 15:38:26 +000016393
Matthias Kloseb9621712010-04-24 17:59:49 +000016394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16395$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016396if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016397 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016398else
Matthias Kloseb9621712010-04-24 17:59:49 +000016399 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016400 ac_cv_broken_mbstowcs=no
16401else
Matthias Kloseb9621712010-04-24 17:59:49 +000016402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016403/* end confdefs.h. */
16404
Stefan Krah19c21392012-11-22 23:47:32 +010016405#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016406#include<stdlib.h>
16407int main() {
16408 size_t len = -1;
16409 const char *str = "text";
16410 len = mbstowcs(NULL, str, 0);
16411 return (len != 4);
16412}
16413
16414_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016415if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016416 ac_cv_broken_mbstowcs=no
16417else
Matthias Kloseb9621712010-04-24 17:59:49 +000016418 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016419fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016420rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16421 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016422fi
16423
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016424fi
16425
Matthias Kloseb9621712010-04-24 17:59:49 +000016426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16427$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016428if test "$ac_cv_broken_mbstowcs" = yes
16429then
16430
Matthias Kloseb9621712010-04-24 17:59:49 +000016431$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016432
16433fi
16434
Antoine Pitroub52ec782009-01-25 16:34:23 +000016435# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16437$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016438
16439# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016440if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016441 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016442if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016443then
16444
Matthias Kloseb9621712010-04-24 17:59:49 +000016445$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016446
Matthias Kloseb9621712010-04-24 17:59:49 +000016447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16448$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016449fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016450if test "$withval" = no
16451then
16452
16453$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16456$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016457fi
16458
Antoine Pitrou042b1282010-08-13 21:15:58 +000016459else
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16461$as_echo "no value specified" >&6; }
16462fi
16463
Antoine Pitroub52ec782009-01-25 16:34:23 +000016464
Matthias Kloseb17289e2012-03-15 19:51:34 +010016465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16466$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16467if ${ac_cv_computed_gotos+:} false; then :
16468 $as_echo_n "(cached) " >&6
16469else
16470 if test "$cross_compiling" = yes; then :
16471 if test "${with_computed_gotos+set}" = set; then
16472 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16473 else
16474 ac_cv_computed_gotos=no
16475 fi
16476else
16477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16478/* end confdefs.h. */
16479
16480int main(int argc, char **argv)
16481{
16482 static void *targets[1] = { &&LABEL1 };
16483 goto LABEL2;
16484LABEL1:
16485 return 0;
16486LABEL2:
16487 goto *targets[0];
16488 return 1;
16489}
16490
16491_ACEOF
16492if ac_fn_c_try_run "$LINENO"; then :
16493 ac_cv_computed_gotos=yes
16494else
16495 ac_cv_computed_gotos=no
16496fi
16497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16498 conftest.$ac_objext conftest.beam conftest.$ac_ext
16499fi
16500
16501fi
16502
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16504$as_echo "$ac_cv_computed_gotos" >&6; }
16505case "$ac_cv_computed_gotos" in yes*)
16506
16507$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16508
16509esac
16510
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016511case $ac_sys_system in
16512AIX*)
16513
16514$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16515 ;;
16516esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016517
Michael W. Hudson54241132001-12-07 15:38:26 +000016518
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016519
16520
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016521for h in `(cd $srcdir;echo Python/thread_*.h)`
16522do
16523 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16524done
16525
Michael W. Hudson54241132001-12-07 15:38:26 +000016526
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016527SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16529$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016530for dir in $SRCDIRS; do
16531 if test ! -d $dir; then
16532 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016533 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016534done
Matthias Kloseb9621712010-04-24 17:59:49 +000016535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16536$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016537
Stefan Krah1919b7e2012-03-21 18:25:23 +010016538# Availability of -O2:
16539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16540$as_echo_n "checking for -O2... " >&6; }
16541saved_cflags="$CFLAGS"
16542CFLAGS="-O2"
16543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16544/* end confdefs.h. */
16545
16546int
16547main ()
16548{
16549
16550
16551 ;
16552 return 0;
16553}
16554_ACEOF
16555if ac_fn_c_try_compile "$LINENO"; then :
16556 have_O2=yes
16557else
16558 have_O2=no
16559fi
16560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16562$as_echo "$have_O2" >&6; }
16563CFLAGS="$saved_cflags"
16564
16565# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16566# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16568$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16569saved_cflags="$CFLAGS"
16570CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16571if test "$have_O2" = no; then
16572 CFLAGS=""
16573fi
16574if test "$cross_compiling" = yes; then :
16575 have_glibc_memmove_bug=undefined
16576else
16577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16578/* end confdefs.h. */
16579
16580#include <stdio.h>
16581#include <stdlib.h>
16582#include <string.h>
16583void foo(void *p, void *q) { memmove(p, q, 19); }
16584int main() {
16585 char a[32] = "123456789000000000";
16586 foo(&a[9], a);
16587 if (strcmp(a, "123456789123456789000000000") != 0)
16588 return 1;
16589 foo(a, &a[9]);
16590 if (strcmp(a, "123456789000000000") != 0)
16591 return 1;
16592 return 0;
16593}
16594
16595_ACEOF
16596if ac_fn_c_try_run "$LINENO"; then :
16597 have_glibc_memmove_bug=no
16598else
16599 have_glibc_memmove_bug=yes
16600fi
16601rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16602 conftest.$ac_objext conftest.beam conftest.$ac_ext
16603fi
16604
16605CFLAGS="$saved_cflags"
16606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16607$as_echo "$have_glibc_memmove_bug" >&6; }
16608if test "$have_glibc_memmove_bug" = yes; then
16609
16610$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16611
16612fi
16613
16614if test "$have_gcc_asm_for_x87" = yes; then
16615 # Some versions of gcc miscompile inline asm:
16616 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16617 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16618 case $CC in
16619 *gcc*)
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16621$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16622 saved_cflags="$CFLAGS"
16623 CFLAGS="-O2"
16624 if test "$cross_compiling" = yes; then :
16625 have_ipa_pure_const_bug=undefined
16626else
16627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16628/* end confdefs.h. */
16629
16630 __attribute__((noinline)) int
16631 foo(int *p) {
16632 int r;
16633 asm ( "movl \$6, (%1)\n\t"
16634 "xorl %0, %0\n\t"
16635 : "=r" (r) : "r" (p) : "memory"
16636 );
16637 return r;
16638 }
16639 int main() {
16640 int p = 8;
16641 if ((foo(&p) ? : p) != 6)
16642 return 1;
16643 return 0;
16644 }
16645
16646_ACEOF
16647if ac_fn_c_try_run "$LINENO"; then :
16648 have_ipa_pure_const_bug=no
16649else
16650 have_ipa_pure_const_bug=yes
16651fi
16652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16653 conftest.$ac_objext conftest.beam conftest.$ac_ext
16654fi
16655
16656 CFLAGS="$saved_cflags"
16657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16658$as_echo "$have_ipa_pure_const_bug" >&6; }
16659 if test "$have_ipa_pure_const_bug" = yes; then
16660
16661$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16662
16663 fi
16664 ;;
16665 esac
16666fi
16667
Victor Stinner4f5366e2015-01-09 02:13:19 +010016668# Check for stdatomic.h
16669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16670$as_echo_n "checking for stdatomic.h... " >&6; }
16671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16672/* end confdefs.h. */
16673
16674
16675 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016676 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016677 int main() {
16678 int loaded_value = atomic_load(&value);
16679 return 0;
16680 }
16681
16682
16683_ACEOF
16684if ac_fn_c_try_link "$LINENO"; then :
16685 have_stdatomic_h=yes
16686else
16687 have_stdatomic_h=no
16688fi
16689rm -f core conftest.err conftest.$ac_objext \
16690 conftest$ac_exeext conftest.$ac_ext
16691
16692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16693$as_echo "$have_stdatomic_h" >&6; }
16694
16695if test "$have_stdatomic_h" = yes; then
16696
16697$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16698
16699fi
16700
16701# Check for GCC >= 4.7 __atomic builtins
16702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16703$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16705/* end confdefs.h. */
16706
16707
16708 volatile int val = 1;
16709 int main() {
16710 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16711 return 0;
16712 }
16713
16714
16715_ACEOF
16716if ac_fn_c_try_link "$LINENO"; then :
16717 have_builtin_atomic=yes
16718else
16719 have_builtin_atomic=no
16720fi
16721rm -f core conftest.err conftest.$ac_objext \
16722 conftest$ac_exeext conftest.$ac_ext
16723
16724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16725$as_echo "$have_builtin_atomic" >&6; }
16726
16727if test "$have_builtin_atomic" = yes; then
16728
16729$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16730
16731fi
16732
Ned Deily322f5ba2013-11-21 23:01:59 -080016733# ensurepip option
16734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16735$as_echo_n "checking for ensurepip... " >&6; }
16736
16737# Check whether --with-ensurepip was given.
16738if test "${with_ensurepip+set}" = set; then :
16739 withval=$with_ensurepip;
16740else
16741 with_ensurepip=upgrade
16742fi
16743
16744case $with_ensurepip in #(
16745 yes|upgrade) :
16746 ENSUREPIP=upgrade ;; #(
16747 install) :
16748 ENSUREPIP=install ;; #(
16749 no) :
16750 ENSUREPIP=no ;; #(
16751 *) :
16752 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16753esac
16754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16755$as_echo "$ENSUREPIP" >&6; }
16756
16757
Victor Stinner35a97c02015-03-08 02:59:09 +010016758# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16760$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16762/* end confdefs.h. */
16763
16764
16765 #include <dirent.h>
16766
16767 int main() {
16768 struct dirent entry;
16769 return entry.d_type == DT_UNKNOWN;
16770 }
16771
16772
16773_ACEOF
16774if ac_fn_c_try_link "$LINENO"; then :
16775 have_dirent_d_type=yes
16776else
16777 have_dirent_d_type=no
16778fi
16779rm -f core conftest.err conftest.$ac_objext \
16780 conftest$ac_exeext conftest.$ac_ext
16781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16782$as_echo "$have_dirent_d_type" >&6; }
16783
16784if test "$have_dirent_d_type" = yes; then
16785
16786$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16787
16788fi
16789
Victor Stinner9eb57c52015-03-19 22:21:49 +010016790# check if the Linux getrandom() syscall is available
16791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16792$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16793cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16794/* end confdefs.h. */
16795
16796
Victor Stinner1b80b242016-04-12 22:34:58 +020016797 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016798 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016799 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016800
16801 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016802 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016803 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016804 const int flags = GRND_NONBLOCK;
16805 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016806 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016807 return 0;
16808 }
16809
16810
16811_ACEOF
16812if ac_fn_c_try_link "$LINENO"; then :
16813 have_getrandom_syscall=yes
16814else
16815 have_getrandom_syscall=no
16816fi
16817rm -f core conftest.err conftest.$ac_objext \
16818 conftest$ac_exeext conftest.$ac_ext
16819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16820$as_echo "$have_getrandom_syscall" >&6; }
16821
16822if test "$have_getrandom_syscall" = yes; then
16823
16824$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16825
16826fi
16827
Victor Stinner3abf44e2015-09-18 15:38:37 +020016828# check if the getrandom() function is available
16829# the test was written for the Solaris function of <sys/random.h>
16830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16831$as_echo_n "checking for the getrandom() function... " >&6; }
16832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16833/* end confdefs.h. */
16834
16835
16836 #include <sys/random.h>
16837
16838 int main() {
16839 char buffer[1];
16840 const size_t buflen = sizeof(buffer);
16841 const int flags = 0;
16842 /* ignore the result, Python checks for ENOSYS at runtime */
16843 (void)getrandom(buffer, buflen, flags);
16844 return 0;
16845 }
16846
16847
16848_ACEOF
16849if ac_fn_c_try_link "$LINENO"; then :
16850 have_getrandom=yes
16851else
16852 have_getrandom=no
16853fi
16854rm -f core conftest.err conftest.$ac_objext \
16855 conftest$ac_exeext conftest.$ac_ext
16856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16857$as_echo "$have_getrandom" >&6; }
16858
16859if test "$have_getrandom" = yes; then
16860
16861$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16862
16863fi
16864
Christian Heimesff5be6e2018-01-20 13:19:21 +010016865# Check for usable OpenSSL
16866
16867 found=false
16868
16869# Check whether --with-openssl was given.
16870if test "${with_openssl+set}" = set; then :
16871 withval=$with_openssl;
16872 case "$withval" in
16873 "" | y | ye | yes | n | no)
16874 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16875 ;;
16876 *) ssldirs="$withval"
16877 ;;
16878 esac
16879
16880else
16881
16882 # if pkg-config is installed and openssl has installed a .pc file,
16883 # then use that information and don't search ssldirs
16884 if test -n "$ac_tool_prefix"; then
16885 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16886set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16888$as_echo_n "checking for $ac_word... " >&6; }
16889if ${ac_cv_prog_PKG_CONFIG+:} false; then :
16890 $as_echo_n "(cached) " >&6
16891else
16892 if test -n "$PKG_CONFIG"; then
16893 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
16894else
16895as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16896for as_dir in $PATH
16897do
16898 IFS=$as_save_IFS
16899 test -z "$as_dir" && as_dir=.
16900 for ac_exec_ext in '' $ac_executable_extensions; do
16901 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16902 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
16903 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16904 break 2
16905 fi
16906done
16907 done
16908IFS=$as_save_IFS
16909
16910fi
16911fi
16912PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
16913if test -n "$PKG_CONFIG"; then
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
16915$as_echo "$PKG_CONFIG" >&6; }
16916else
16917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16918$as_echo "no" >&6; }
16919fi
16920
16921
16922fi
16923if test -z "$ac_cv_prog_PKG_CONFIG"; then
16924 ac_ct_PKG_CONFIG=$PKG_CONFIG
16925 # Extract the first word of "pkg-config", so it can be a program name with args.
16926set dummy pkg-config; ac_word=$2
16927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16928$as_echo_n "checking for $ac_word... " >&6; }
16929if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
16930 $as_echo_n "(cached) " >&6
16931else
16932 if test -n "$ac_ct_PKG_CONFIG"; then
16933 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
16934else
16935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16936for as_dir in $PATH
16937do
16938 IFS=$as_save_IFS
16939 test -z "$as_dir" && as_dir=.
16940 for ac_exec_ext in '' $ac_executable_extensions; do
16941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16942 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
16943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16944 break 2
16945 fi
16946done
16947 done
16948IFS=$as_save_IFS
16949
16950fi
16951fi
16952ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
16953if test -n "$ac_ct_PKG_CONFIG"; then
16954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
16955$as_echo "$ac_ct_PKG_CONFIG" >&6; }
16956else
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16958$as_echo "no" >&6; }
16959fi
16960
16961 if test "x$ac_ct_PKG_CONFIG" = x; then
16962 PKG_CONFIG=""
16963 else
16964 case $cross_compiling:$ac_tool_warned in
16965yes:)
16966{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
16967$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
16968ac_tool_warned=yes ;;
16969esac
16970 PKG_CONFIG=$ac_ct_PKG_CONFIG
16971 fi
16972else
16973 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
16974fi
16975
16976 if test x"$PKG_CONFIG" != x""; then
16977 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
16978 if test $? = 0; then
16979 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
16980 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
16981 found=true
16982 fi
16983 fi
16984
16985 # no such luck; use some default ssldirs
16986 if ! $found; then
16987 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
16988 fi
16989
16990
16991fi
16992
16993
16994
16995 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
16996 # an 'openssl' subdirectory
16997
16998 if ! $found; then
16999 OPENSSL_INCLUDES=
17000 for ssldir in $ssldirs; do
17001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17002$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17003 if test -f "$ssldir/include/openssl/ssl.h"; then
17004 OPENSSL_INCLUDES="-I$ssldir/include"
17005 OPENSSL_LDFLAGS="-L$ssldir/lib"
17006 OPENSSL_LIBS="-lssl -lcrypto"
17007 found=true
17008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17009$as_echo "yes" >&6; }
17010 break
17011 else
17012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17013$as_echo "no" >&6; }
17014 fi
17015 done
17016
17017 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17018 # it will just work!
17019 fi
17020
17021 # try the preprocessor and linker with our new flags,
17022 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17023
17024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17025$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17026 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17027 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17028
17029 save_LIBS="$LIBS"
17030 save_LDFLAGS="$LDFLAGS"
17031 save_CPPFLAGS="$CPPFLAGS"
17032 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17033 LIBS="$OPENSSL_LIBS $LIBS"
17034 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17036/* end confdefs.h. */
17037#include <openssl/ssl.h>
17038int
17039main ()
17040{
17041SSL_new(NULL)
17042 ;
17043 return 0;
17044}
17045_ACEOF
17046if ac_fn_c_try_link "$LINENO"; then :
17047
17048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17049$as_echo "yes" >&6; }
17050 have_openssl=yes
17051
17052else
17053
17054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17055$as_echo "no" >&6; }
17056 have_openssl=no
17057
17058fi
17059rm -f core conftest.err conftest.$ac_objext \
17060 conftest$ac_exeext conftest.$ac_ext
17061 CPPFLAGS="$save_CPPFLAGS"
17062 LDFLAGS="$save_LDFLAGS"
17063 LIBS="$save_LIBS"
17064
17065
17066
17067
17068
17069
17070if test "$have_openssl" = yes; then
17071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17072$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17073
17074 save_LIBS="$LIBS"
17075 save_LDFLAGS="$LDFLAGS"
17076 save_CPPFLAGS="$CPPFLAGS"
17077 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17078 LIBS="$OPENSSL_LIBS $LIBS"
17079 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17080
17081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082/* end confdefs.h. */
17083
17084 #include <openssl/x509_vfy.h>
17085
17086int
17087main ()
17088{
17089
17090 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17091 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17092 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17093 X509_VERIFY_PARAM_set_hostflags(p, 0);
17094
17095 ;
17096 return 0;
17097}
17098
17099_ACEOF
17100if ac_fn_c_try_link "$LINENO"; then :
17101
17102 ac_cv_has_x509_verify_param_set1_host=yes
17103
17104else
17105
17106 ac_cv_has_x509_verify_param_set1_host=no
17107
17108fi
17109rm -f core conftest.err conftest.$ac_objext \
17110 conftest$ac_exeext conftest.$ac_ext
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17112$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17113 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17114
17115$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17116
17117 fi
17118
17119 CPPFLAGS="$save_CPPFLAGS"
17120 LDFLAGS="$save_LDFLAGS"
17121 LIBS="$save_LIBS"
17122fi
17123
Christian Heimes892d66e2018-01-29 14:10:18 +010017124# ssl module default cipher suite string
17125
17126
17127
17128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17129$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17130
17131# Check whether --with-ssl-default-suites was given.
17132if test "${with_ssl_default_suites+set}" = set; then :
17133 withval=$with_ssl_default_suites;
17134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17135$as_echo "$withval" >&6; }
17136case "$withval" in
17137 python)
17138 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17139
17140 ;;
17141 openssl)
17142 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17143
17144 ;;
17145 *)
17146 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17147
17148 cat >>confdefs.h <<_ACEOF
17149#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17150_ACEOF
17151
17152 ;;
17153esac
17154
17155else
17156
17157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17158$as_echo "python" >&6; }
17159$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17160
17161
17162fi
17163
17164
17165
Guido van Rossum627b2d71993-12-24 10:39:16 +000017166# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017167ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017168
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017169ac_config_files="$ac_config_files Modules/ld_so_aix"
17170
Martin v. Löwis11437992002-04-12 09:54:03 +000017171cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017172# This file is a shell script that caches the results of configure
17173# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017174# scripts and configure runs, see configure's option --config-cache.
17175# It is not useful on other systems. If it contains results you don't
17176# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017177#
Martin v. Löwis11437992002-04-12 09:54:03 +000017178# config.status only pays attention to the cache file if you give it
17179# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017180#
Skip Montanaro6dead952003-09-25 14:50:04 +000017181# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017182# loading this file, other *unset* `ac_cv_foo' will be assigned the
17183# following values.
17184
17185_ACEOF
17186
Guido van Rossumf78abae1997-01-21 22:02:36 +000017187# The following way of writing the cache mishandles newlines in values,
17188# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017190# Ultrix sh set writes to stderr and can't be redirected directly,
17191# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192(
17193 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17194 eval ac_val=\$$ac_var
17195 case $ac_val in #(
17196 *${as_nl}*)
17197 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017198 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17199$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017200 esac
17201 case $ac_var in #(
17202 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017203 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17204 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 esac ;;
17206 esac
17207 done
17208
Martin v. Löwis11437992002-04-12 09:54:03 +000017209 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017210 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17211 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017212 # `set' does not quote correctly, so add quotes: double-quote
17213 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017215 "s/'/'\\\\''/g;
17216 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017217 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 *)
17219 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017220 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017221 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017222 esac |
17223 sort
17224) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017225 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017226 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017227 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017228 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017229 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17230 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017231 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17232 :end' >>confcache
17233if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17234 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017235 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017236 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17237$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017238 if test ! -f "$cache_file" || test -h "$cache_file"; then
17239 cat confcache >"$cache_file"
17240 else
17241 case $cache_file in #(
17242 */* | ?:*)
17243 mv -f confcache "$cache_file"$$ &&
17244 mv -f "$cache_file"$$ "$cache_file" ;; #(
17245 *)
17246 mv -f confcache "$cache_file" ;;
17247 esac
17248 fi
17249 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017250 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017251 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17252$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017254fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017255rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017256
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017257test "x$prefix" = xNONE && prefix=$ac_default_prefix
17258# Let make expand exec_prefix.
17259test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017260
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017261DEFS=-DHAVE_CONFIG_H
17262
Skip Montanaro6dead952003-09-25 14:50:04 +000017263ac_libobjs=
17264ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017265U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017266for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17267 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017268 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017269 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017270 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17271 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017272 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17273 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017274done
17275LIBOBJS=$ac_libobjs
17276
17277LTLIBOBJS=$ac_ltlibobjs
17278
17279
Martin v. Löwis11437992002-04-12 09:54:03 +000017280
Matthias Kloseb9621712010-04-24 17:59:49 +000017281
Victor Stinnere0be4232011-10-25 13:06:09 +020017282: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017283ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017284ac_clean_files_save=$ac_clean_files
17285ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017286{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17287$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17288as_write_fail=0
17289cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017290#! $SHELL
17291# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017292# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017293# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017294# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017295
Martin v. Löwis11437992002-04-12 09:54:03 +000017296debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017297ac_cs_recheck=false
17298ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017299
Matthias Kloseb9621712010-04-24 17:59:49 +000017300SHELL=\${CONFIG_SHELL-$SHELL}
17301export SHELL
17302_ASEOF
17303cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17304## -------------------- ##
17305## M4sh Initialization. ##
17306## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017307
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017308# Be more Bourne compatible
17309DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017310if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017311 emulate sh
17312 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017313 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017314 # is contrary to our usage. Disable this feature.
17315 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017317else
Matthias Kloseb9621712010-04-24 17:59:49 +000017318 case `(set -o) 2>/dev/null` in #(
17319 *posix*) :
17320 set -o posix ;; #(
17321 *) :
17322 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017324fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017325
17326
Matthias Kloseb9621712010-04-24 17:59:49 +000017327as_nl='
17328'
17329export as_nl
17330# Printing a long string crashes Solaris 7 /usr/bin/printf.
17331as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17332as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17333as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17334# Prefer a ksh shell builtin over an external printf program on Solaris,
17335# but without wasting forks for bash or zsh.
17336if test -z "$BASH_VERSION$ZSH_VERSION" \
17337 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17338 as_echo='print -r --'
17339 as_echo_n='print -rn --'
17340elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17341 as_echo='printf %s\n'
17342 as_echo_n='printf %s'
17343else
17344 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17345 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17346 as_echo_n='/usr/ucb/echo -n'
17347 else
17348 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17349 as_echo_n_body='eval
17350 arg=$1;
17351 case $arg in #(
17352 *"$as_nl"*)
17353 expr "X$arg" : "X\\(.*\\)$as_nl";
17354 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17355 esac;
17356 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17357 '
17358 export as_echo_n_body
17359 as_echo_n='sh -c $as_echo_n_body as_echo'
17360 fi
17361 export as_echo_body
17362 as_echo='sh -c $as_echo_body as_echo'
17363fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017364
17365# The user is always right.
17366if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 PATH_SEPARATOR=:
17368 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17369 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17370 PATH_SEPARATOR=';'
17371 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017373
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017374
17375# IFS
17376# We need space, tab and new line, in precisely that order. Quoting is
17377# there to prevent editors from complaining about space-tab.
17378# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17379# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380IFS=" "" $as_nl"
17381
17382# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017383as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017384case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017385 *[\\/]* ) as_myself=$0 ;;
17386 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017387for as_dir in $PATH
17388do
17389 IFS=$as_save_IFS
17390 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17392 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017393IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017395 ;;
17396esac
17397# We did not find ourselves, most probably we were run as `sh COMMAND'
17398# in which case we are not to be found in the path.
17399if test "x$as_myself" = x; then
17400 as_myself=$0
17401fi
17402if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17404 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405fi
17406
Matthias Kloseb9621712010-04-24 17:59:49 +000017407# Unset variables that we do not need and which cause bugs (e.g. in
17408# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17409# suppresses any "Segmentation fault" message there. '((' could
17410# trigger a bug in pdksh 5.2.14.
17411for as_var in BASH_ENV ENV MAIL MAILPATH
17412do eval test x\${$as_var+set} = xset \
17413 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017414done
17415PS1='$ '
17416PS2='> '
17417PS4='+ '
17418
17419# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017420LC_ALL=C
17421export LC_ALL
17422LANGUAGE=C
17423export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424
Matthias Kloseb9621712010-04-24 17:59:49 +000017425# CDPATH.
17426(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17427
17428
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017429# as_fn_error STATUS ERROR [LINENO LOG_FD]
17430# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017431# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17432# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017433# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017434as_fn_error ()
17435{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017436 as_status=$1; test $as_status -eq 0 && as_status=1
17437 if test "$4"; then
17438 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17439 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017441 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017442 as_fn_exit $as_status
17443} # as_fn_error
17444
17445
17446# as_fn_set_status STATUS
17447# -----------------------
17448# Set $? to STATUS, without forking.
17449as_fn_set_status ()
17450{
17451 return $1
17452} # as_fn_set_status
17453
17454# as_fn_exit STATUS
17455# -----------------
17456# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17457as_fn_exit ()
17458{
17459 set +e
17460 as_fn_set_status $1
17461 exit $1
17462} # as_fn_exit
17463
17464# as_fn_unset VAR
17465# ---------------
17466# Portably unset VAR.
17467as_fn_unset ()
17468{
17469 { eval $1=; unset $1;}
17470}
17471as_unset=as_fn_unset
17472# as_fn_append VAR VALUE
17473# ----------------------
17474# Append the text in VALUE to the end of the definition contained in VAR. Take
17475# advantage of any shell optimizations that allow amortized linear growth over
17476# repeated appends, instead of the typical quadratic growth present in naive
17477# implementations.
17478if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17479 eval 'as_fn_append ()
17480 {
17481 eval $1+=\$2
17482 }'
17483else
17484 as_fn_append ()
17485 {
17486 eval $1=\$$1\$2
17487 }
17488fi # as_fn_append
17489
17490# as_fn_arith ARG...
17491# ------------------
17492# Perform arithmetic evaluation on the ARGs, and store the result in the
17493# global $as_val. Take advantage of shells that can avoid forks. The arguments
17494# must be portable across $(()) and expr.
17495if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17496 eval 'as_fn_arith ()
17497 {
17498 as_val=$(( $* ))
17499 }'
17500else
17501 as_fn_arith ()
17502 {
17503 as_val=`expr "$@" || test $? -eq 1`
17504 }
17505fi # as_fn_arith
17506
17507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508if expr a : '\(a\)' >/dev/null 2>&1 &&
17509 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17510 as_expr=expr
17511else
17512 as_expr=false
17513fi
17514
17515if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17516 as_basename=basename
17517else
17518 as_basename=false
17519fi
17520
Matthias Kloseb9621712010-04-24 17:59:49 +000017521if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17522 as_dirname=dirname
17523else
17524 as_dirname=false
17525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527as_me=`$as_basename -- "$0" ||
17528$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17529 X"$0" : 'X\(//\)$' \| \
17530 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017531$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017532 sed '/^.*\/\([^/][^/]*\)\/*$/{
17533 s//\1/
17534 q
17535 }
17536 /^X\/\(\/\/\)$/{
17537 s//\1/
17538 q
17539 }
17540 /^X\/\(\/\).*/{
17541 s//\1/
17542 q
17543 }
17544 s/.*/./; q'`
17545
Matthias Kloseb9621712010-04-24 17:59:49 +000017546# Avoid depending upon Character Ranges.
17547as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17548as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17549as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17550as_cr_digits='0123456789'
17551as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552
17553ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017554case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017556 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 xy) ECHO_C='\c';;
17559 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17560 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017561 esac;;
17562*)
17563 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017564esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017565
Martin v. Löwis11437992002-04-12 09:54:03 +000017566rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017567if test -d conf$$.dir; then
17568 rm -f conf$$.dir/conf$$.file
17569else
17570 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017571 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017573if (echo >conf$$.file) 2>/dev/null; then
17574 if ln -s conf$$.file conf$$ 2>/dev/null; then
17575 as_ln_s='ln -s'
17576 # ... but there are two gotchas:
17577 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17578 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017579 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017581 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017582 elif ln conf$$.file conf$$ 2>/dev/null; then
17583 as_ln_s=ln
17584 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017585 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017586 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017587else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017588 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017590rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17591rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017592
Matthias Kloseb9621712010-04-24 17:59:49 +000017593
17594# as_fn_mkdir_p
17595# -------------
17596# Create "$as_dir" as a directory, including parents if necessary.
17597as_fn_mkdir_p ()
17598{
17599
17600 case $as_dir in #(
17601 -*) as_dir=./$as_dir;;
17602 esac
17603 test -d "$as_dir" || eval $as_mkdir_p || {
17604 as_dirs=
17605 while :; do
17606 case $as_dir in #(
17607 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17608 *) as_qdir=$as_dir;;
17609 esac
17610 as_dirs="'$as_qdir' $as_dirs"
17611 as_dir=`$as_dirname -- "$as_dir" ||
17612$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17613 X"$as_dir" : 'X\(//\)[^/]' \| \
17614 X"$as_dir" : 'X\(//\)$' \| \
17615 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17616$as_echo X"$as_dir" |
17617 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17618 s//\1/
17619 q
17620 }
17621 /^X\(\/\/\)[^/].*/{
17622 s//\1/
17623 q
17624 }
17625 /^X\(\/\/\)$/{
17626 s//\1/
17627 q
17628 }
17629 /^X\(\/\).*/{
17630 s//\1/
17631 q
17632 }
17633 s/.*/./; q'`
17634 test -d "$as_dir" && break
17635 done
17636 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017637 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017638
17639
17640} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017641if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017643else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017644 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017645 as_mkdir_p=false
17646fi
17647
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017648
17649# as_fn_executable_p FILE
17650# -----------------------
17651# Test if FILE is an executable regular file.
17652as_fn_executable_p ()
17653{
17654 test -f "$1" && test -x "$1"
17655} # as_fn_executable_p
17656as_test_x='test -x'
17657as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017658
17659# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017660as_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 +000017661
17662# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017664
17665
Martin v. Löwis11437992002-04-12 09:54:03 +000017666exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017667## ----------------------------------- ##
17668## Main body of $CONFIG_STATUS script. ##
17669## ----------------------------------- ##
17670_ASEOF
17671test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017672
Matthias Kloseb9621712010-04-24 17:59:49 +000017673cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17674# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017675# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017676# values after options handling.
17677ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017678This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017679generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017680
17681 CONFIG_FILES = $CONFIG_FILES
17682 CONFIG_HEADERS = $CONFIG_HEADERS
17683 CONFIG_LINKS = $CONFIG_LINKS
17684 CONFIG_COMMANDS = $CONFIG_COMMANDS
17685 $ $0 $@
17686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687on `(hostname || uname -n) 2>/dev/null | sed 1q`
17688"
17689
Martin v. Löwis11437992002-04-12 09:54:03 +000017690_ACEOF
17691
Matthias Kloseb9621712010-04-24 17:59:49 +000017692case $ac_config_files in *"
17693"*) set x $ac_config_files; shift; ac_config_files=$*;;
17694esac
17695
17696case $ac_config_headers in *"
17697"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17698esac
17699
17700
17701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017702# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017703config_files="$ac_config_files"
17704config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017707
Matthias Kloseb9621712010-04-24 17:59:49 +000017708cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017709ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017710\`$as_me' instantiates files and other configuration actions
17711from templates according to the current configuration. Unless the files
17712and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017713
Matthias Kloseb9621712010-04-24 17:59:49 +000017714Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017715
17716 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017717 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 --config print configuration, then exit
17719 -q, --quiet, --silent
17720 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 -d, --debug don't remove temporary files
17722 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017723 --file=FILE[:TEMPLATE]
17724 instantiate the configuration file FILE
17725 --header=FILE[:TEMPLATE]
17726 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017727
17728Configuration files:
17729$config_files
17730
17731Configuration headers:
17732$config_headers
17733
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017734Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017737cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17738ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017739ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017740python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017741configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017742 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017743
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017744Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017745This config.status script is free software; the Free Software Foundation
17746gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747
17748ac_pwd='$ac_pwd'
17749srcdir='$srcdir'
17750INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017751MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017752test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017753_ACEOF
17754
Matthias Kloseb9621712010-04-24 17:59:49 +000017755cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17756# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017757ac_need_defaults=:
17758while test $# != 0
17759do
17760 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017761 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017762 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17763 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017764 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017765 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017766 --*=)
17767 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17768 ac_optarg=
17769 ac_shift=:
17770 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017771 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017772 ac_option=$1
17773 ac_optarg=$2
17774 ac_shift=shift
17775 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017776 esac
17777
Skip Montanaro6dead952003-09-25 14:50:04 +000017778 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017779 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017780 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17781 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017783 $as_echo "$ac_cs_version"; exit ;;
17784 --config | --confi | --conf | --con | --co | --c )
17785 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017786 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017787 debug=: ;;
17788 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017789 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017790 case $ac_optarg in
17791 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017792 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 esac
17794 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017795 ac_need_defaults=false;;
17796 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017797 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017798 case $ac_optarg in
17799 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17800 esac
17801 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017802 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017803 --he | --h)
17804 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017805 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017806Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017807 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017808 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017809 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17810 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17811 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017812
17813 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017814 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017815Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017816
Matthias Kloseb9621712010-04-24 17:59:49 +000017817 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017819
17820 esac
17821 shift
17822done
17823
Skip Montanaro6dead952003-09-25 14:50:04 +000017824ac_configure_extra_args=
17825
17826if $ac_cs_silent; then
17827 exec 6>/dev/null
17828 ac_configure_extra_args="$ac_configure_extra_args --silent"
17829fi
17830
17831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017833if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017834 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017835 shift
17836 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17837 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017839 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017840fi
17841
Martin v. Löwis11437992002-04-12 09:54:03 +000017842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017843cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017844exec 5>>config.log
17845{
17846 echo
17847 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17848## Running $as_me. ##
17849_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017850 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017851} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017855_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017856
Matthias Kloseb9621712010-04-24 17:59:49 +000017857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858
17859# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017860for ac_config_target in $ac_config_targets
17861do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862 case $ac_config_target in
17863 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17864 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17865 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017866 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17867 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017869 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017870 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017871 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872
Victor Stinnere0be4232011-10-25 13:06:09 +020017873 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017874 esac
17875done
17876
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017877
Martin v. Löwis11437992002-04-12 09:54:03 +000017878# If the user did not use the arguments to specify the items to instantiate,
17879# then the envvar interface is used. Set only those that are not.
17880# We use the long form for the default assignment because of an extremely
17881# bizarre bug on SunOS 4.1.3.
17882if $ac_need_defaults; then
17883 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17884 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17885fi
17886
Skip Montanaro6dead952003-09-25 14:50:04 +000017887# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017889# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017890# Hook for its removal unless debugging.
17891# Note that there is a small window in which the directory will not be cleaned:
17892# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017893$debug ||
17894{
Victor Stinnere0be4232011-10-25 13:06:09 +020017895 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017896 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017897 : "${ac_tmp:=$tmp}"
17898 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017900 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017901}
Martin v. Löwis11437992002-04-12 09:54:03 +000017902# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017903
Martin v. Löwis11437992002-04-12 09:54:03 +000017904{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017905 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017906 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017907} ||
17908{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017909 tmp=./conf$$-$RANDOM
17910 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017911} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017912ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017913
Matthias Kloseb9621712010-04-24 17:59:49 +000017914# Set up the scripts for CONFIG_FILES section.
17915# No need to generate them if there are no CONFIG_FILES.
17916# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017918
Matthias Kloseb9621712010-04-24 17:59:49 +000017919
17920ac_cr=`echo X | tr X '\015'`
17921# On cygwin, bash can eat \r inside `` if the user requested igncr.
17922# But we know of no other shell where ac_cr would be empty at this
17923# point, so we can use a bashism as a fallback.
17924if test "x$ac_cr" = x; then
17925 eval ac_cr=\$\'\\r\'
17926fi
17927ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17928if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017929 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017930else
17931 ac_cs_awk_cr=$ac_cr
17932fi
17933
Victor Stinnere0be4232011-10-25 13:06:09 +020017934echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017935_ACEOF
17936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937
Matthias Kloseb9621712010-04-24 17:59:49 +000017938{
17939 echo "cat >conf$$subs.awk <<_ACEOF" &&
17940 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17941 echo "_ACEOF"
17942} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017943 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17944ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945ac_delim='%!_!# '
17946for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017947 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017948 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017949
Matthias Kloseb9621712010-04-24 17:59:49 +000017950 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17951 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952 break
17953 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017954 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955 else
17956 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958done
Matthias Kloseb9621712010-04-24 17:59:49 +000017959rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960
Matthias Kloseb9621712010-04-24 17:59:49 +000017961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017962cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017964sed -n '
17965h
17966s/^/S["/; s/!.*/"]=/
17967p
17968g
17969s/^[^!]*!//
17970:repl
17971t repl
17972s/'"$ac_delim"'$//
17973t delim
17974:nl
17975h
17976s/\(.\{148\}\)..*/\1/
17977t more1
17978s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17979p
17980n
17981b repl
17982:more1
17983s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17984p
17985g
17986s/.\{148\}//
17987t nl
17988:delim
17989h
17990s/\(.\{148\}\)..*/\1/
17991t more2
17992s/["\\]/\\&/g; s/^/"/; s/$/"/
17993p
17994b
17995:more2
17996s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17997p
17998g
17999s/.\{148\}//
18000t delim
18001' <conf$$subs.awk | sed '
18002/^[^""]/{
18003 N
18004 s/\n//
18005}
18006' >>$CONFIG_STATUS || ac_write_fail=1
18007rm -f conf$$subs.awk
18008cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18009_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018010cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018011 for (key in S) S_is_set[key] = 1
18012 FS = ""
18013
18014}
18015{
18016 line = $ 0
18017 nfields = split(line, field, "@")
18018 substed = 0
18019 len = length(field[1])
18020 for (i = 2; i < nfields; i++) {
18021 key = field[i]
18022 keylen = length(key)
18023 if (S_is_set[key]) {
18024 value = S[key]
18025 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18026 len += length(value) + length(field[++i])
18027 substed = 1
18028 } else
18029 len += 1 + keylen
18030 }
18031
18032 print line
18033}
18034
18035_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018037cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18038if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18039 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18040else
18041 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018042fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018043 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018044_ACEOF
18045
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018046# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18047# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048# trailing colons and then remove the whole line if VPATH becomes empty
18049# (actually we leave an empty line to preserve line numbers).
18050if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018051 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18052h
18053s///
18054s/^/:/
18055s/[ ]*$/:/
18056s/:\$(srcdir):/:/g
18057s/:\${srcdir}:/:/g
18058s/:@srcdir@:/:/g
18059s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018061x
18062s/\(=[ ]*\).*/\1/
18063G
18064s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018065s/^[^=]*=[ ]*$//
18066}'
18067fi
18068
Matthias Kloseb9621712010-04-24 17:59:49 +000018069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018070fi # test -n "$CONFIG_FILES"
18071
Matthias Kloseb9621712010-04-24 17:59:49 +000018072# Set up the scripts for CONFIG_HEADERS section.
18073# No need to generate them if there are no CONFIG_HEADERS.
18074# This happens for instance with `./config.status Makefile'.
18075if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018076cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018077BEGIN {
18078_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018079
Matthias Kloseb9621712010-04-24 17:59:49 +000018080# Transform confdefs.h into an awk script `defines.awk', embedded as
18081# here-document in config.status, that substitutes the proper values into
18082# config.h.in to produce config.h.
18083
18084# Create a delimiter string that does not exist in confdefs.h, to ease
18085# handling of long lines.
18086ac_delim='%!_!# '
18087for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018088 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18089 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018090 break
18091 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018092 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018093 else
18094 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18095 fi
18096done
18097
18098# For the awk script, D is an array of macro values keyed by name,
18099# likewise P contains macro parameters if any. Preserve backslash
18100# newline sequences.
18101
18102ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18103sed -n '
18104s/.\{148\}/&'"$ac_delim"'/g
18105t rset
18106:rset
18107s/^[ ]*#[ ]*define[ ][ ]*/ /
18108t def
18109d
18110:def
18111s/\\$//
18112t bsnl
18113s/["\\]/\\&/g
18114s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18115D["\1"]=" \3"/p
18116s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18117d
18118:bsnl
18119s/["\\]/\\&/g
18120s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18121D["\1"]=" \3\\\\\\n"\\/p
18122t cont
18123s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18124t cont
18125d
18126:cont
18127n
18128s/.\{148\}/&'"$ac_delim"'/g
18129t clear
18130:clear
18131s/\\$//
18132t bsnlc
18133s/["\\]/\\&/g; s/^/"/; s/$/"/p
18134d
18135:bsnlc
18136s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18137b cont
18138' <confdefs.h | sed '
18139s/'"$ac_delim"'/"\\\
18140"/g' >>$CONFIG_STATUS || ac_write_fail=1
18141
18142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18143 for (key in D) D_is_set[key] = 1
18144 FS = ""
18145}
18146/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18147 line = \$ 0
18148 split(line, arg, " ")
18149 if (arg[1] == "#") {
18150 defundef = arg[2]
18151 mac1 = arg[3]
18152 } else {
18153 defundef = substr(arg[1], 2)
18154 mac1 = arg[2]
18155 }
18156 split(mac1, mac2, "(") #)
18157 macro = mac2[1]
18158 prefix = substr(line, 1, index(line, defundef) - 1)
18159 if (D_is_set[macro]) {
18160 # Preserve the white space surrounding the "#".
18161 print prefix "define", macro P[macro] D[macro]
18162 next
18163 } else {
18164 # Replace #undef with comments. This is necessary, for example,
18165 # in the case of _POSIX_SOURCE, which is predefined and required
18166 # on some systems where configure will not decide to define it.
18167 if (defundef == "undef") {
18168 print "/*", prefix defundef, macro, "*/"
18169 next
18170 }
18171 }
18172}
18173{ print }
18174_ACAWK
18175_ACEOF
18176cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018178fi # test -n "$CONFIG_HEADERS"
18179
18180
18181eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18182shift
18183for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018184do
18185 case $ac_tag in
18186 :[FHLC]) ac_mode=$ac_tag; continue;;
18187 esac
18188 case $ac_mode$ac_tag in
18189 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018190 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191 :[FH]-) ac_tag=-:-;;
18192 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18193 esac
18194 ac_save_IFS=$IFS
18195 IFS=:
18196 set x $ac_tag
18197 IFS=$ac_save_IFS
18198 shift
18199 ac_file=$1
18200 shift
18201
18202 case $ac_mode in
18203 :L) ac_source=$1;;
18204 :[FH])
18205 ac_file_inputs=
18206 for ac_f
18207 do
18208 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018209 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210 *) # Look for the file first in the build tree, then in the source tree
18211 # (if the path is not absolute). The absolute path cannot be DOS-style,
18212 # because $ac_f cannot contain `:'.
18213 test -f "$ac_f" ||
18214 case $ac_f in
18215 [\\/$]*) false;;
18216 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18217 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018218 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018219 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018220 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18221 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018222 done
18223
18224 # Let's still pretend it is `configure' which instantiates (i.e., don't
18225 # use $as_me), people would be surprised to read:
18226 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018227 configure_input='Generated from '`
18228 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18229 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230 if test x"$ac_file" != x-; then
18231 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018232 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18233$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018235 # Neutralize special characters interpreted by sed in replacement strings.
18236 case $configure_input in #(
18237 *\&* | *\|* | *\\* )
18238 ac_sed_conf_input=`$as_echo "$configure_input" |
18239 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18240 *) ac_sed_conf_input=$configure_input;;
18241 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018242
18243 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018244 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18245 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018246 esac
18247 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018248 esac
18249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018251$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018252 X"$ac_file" : 'X\(//\)[^/]' \| \
18253 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018254 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018255$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18257 s//\1/
18258 q
18259 }
18260 /^X\(\/\/\)[^/].*/{
18261 s//\1/
18262 q
18263 }
18264 /^X\(\/\/\)$/{
18265 s//\1/
18266 q
18267 }
18268 /^X\(\/\).*/{
18269 s//\1/
18270 q
18271 }
18272 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018273 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018274 ac_builddir=.
18275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276case "$ac_dir" in
18277.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18278*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018279 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018280 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018281 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018282 case $ac_top_builddir_sub in
18283 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18284 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18285 esac ;;
18286esac
18287ac_abs_top_builddir=$ac_pwd
18288ac_abs_builddir=$ac_pwd$ac_dir_suffix
18289# for backward compatibility:
18290ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
18292case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018293 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018294 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018295 ac_top_srcdir=$ac_top_builddir_sub
18296 ac_abs_top_srcdir=$ac_pwd ;;
18297 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018298 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299 ac_top_srcdir=$srcdir
18300 ac_abs_top_srcdir=$srcdir ;;
18301 *) # Relative name.
18302 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18303 ac_top_srcdir=$ac_top_build_prefix$srcdir
18304 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018305esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309 case $ac_mode in
18310 :F)
18311 #
18312 # CONFIG_FILE
18313 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018314
18315 case $INSTALL in
18316 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018319 ac_MKDIR_P=$MKDIR_P
18320 case $MKDIR_P in
18321 [\\/$]* | ?:[\\/]* ) ;;
18322 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18323 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018324_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018325
Matthias Kloseb9621712010-04-24 17:59:49 +000018326cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018327# If the template does not know about datarootdir, expand it.
18328# FIXME: This hack should be removed a few years after 2.60.
18329ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018330ac_sed_dataroot='
18331/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332 p
18333 q
18334}
18335/@datadir@/p
18336/@docdir@/p
18337/@infodir@/p
18338/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018339/@mandir@/p'
18340case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341*datarootdir*) ac_datarootdir_seen=yes;;
18342*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18344$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018346cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347 ac_datarootdir_hack='
18348 s&@datadir@&$datadir&g
18349 s&@docdir@&$docdir&g
18350 s&@infodir@&$infodir&g
18351 s&@localedir@&$localedir&g
18352 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018353 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354esac
18355_ACEOF
18356
18357# Neutralize VPATH when `$srcdir' = `.'.
18358# Shell code in configure.ac might set extrasub.
18359# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018360cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18361ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018362$extrasub
18363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018364cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018365:t
18366/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018367s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018369s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018370s&@srcdir@&$ac_srcdir&;t t
18371s&@abs_srcdir@&$ac_abs_srcdir&;t t
18372s&@top_srcdir@&$ac_top_srcdir&;t t
18373s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18374s&@builddir@&$ac_builddir&;t t
18375s&@abs_builddir@&$ac_abs_builddir&;t t
18376s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18377s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018378s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018379$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018380"
Victor Stinnere0be4232011-10-25 13:06:09 +020018381eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18382 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018384test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018385 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18386 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18387 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018389which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018390$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018391which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018392
Victor Stinnere0be4232011-10-25 13:06:09 +020018393 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018394 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018395 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18396 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018397 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018398 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018399 ;;
18400 :H)
18401 #
18402 # CONFIG_HEADER
18403 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018404 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018405 {
18406 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018407 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18408 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018409 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018410 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018411 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18412$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018414 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018415 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018416 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018417 fi
18418 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018419 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018420 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018421 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018423 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425
18426 esac
18427
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018428
18429 case $ac_file$ac_mode in
18430 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18431
18432 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018433done # for ac_tag
18434
Guido van Rossum627b2d71993-12-24 10:39:16 +000018435
Matthias Kloseb9621712010-04-24 17:59:49 +000018436as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018437_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018438ac_clean_files=$ac_clean_files_save
18439
Matthias Kloseb9621712010-04-24 17:59:49 +000018440test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018441 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018442
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
18444# configure is writing to config.log, and then calls config.status.
18445# config.status does its own redirection, appending to config.log.
18446# Unfortunately, on DOS this fails, as config.log is still kept open
18447# by configure, so config.status won't be able to write to it; its
18448# output is simply discarded. So we exec the FD to /dev/null,
18449# effectively closing config.log, so it can be properly (re)opened and
18450# appended to by config.status. When coming back to configure, we
18451# need to make the FD available again.
18452if test "$no_create" != yes; then
18453 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018454 ac_config_status_args=
18455 test "$silent" = yes &&
18456 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018457 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018458 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 exec 5>>config.log
18460 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18461 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018462 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018463fi
18464if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18466$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018467fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018468
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018469
Christian Heimes75ed8902013-11-20 01:11:18 +010018470echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018471if test ! -f Modules/Setup.local
18472then
18473 echo "# Edit this file for local setup changes" >Modules/Setup.local
18474fi
18475
Christian Heimes75ed8902013-11-20 01:11:18 +010018476echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018477$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018478 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018479 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018480mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018481
18482if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18483 echo "" >&6
18484 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018485 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 +000018486 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018487 echo "" >&6
18488 echo "" >&6
18489fi
18490