blob: d0ef8a601b287b602f192f8dca013ae15bcae32b [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 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003271 *-*-vxworks*)
3272 ac_sys_system=VxWorks
3273 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003274 *)
3275 # for now, limit cross builds to known configurations
3276 MACHDEP="unknown"
3277 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3278 esac
3279 ac_sys_release=
3280 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003282 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003283 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003285 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003286 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003287 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 fi
3289 ac_md_system=`echo $ac_sys_system |
3290 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3291 ac_md_release=`echo $ac_sys_release |
3292 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3293 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003294
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003295 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003296 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003297 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003298 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003299 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003300 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003301fi
Guido van Rossum91922671997-10-09 20:24:13 +00003302
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003303
3304if test "$cross_compiling" = yes; then
3305 case "$host" in
3306 *-*-linux*)
3307 case "$host_cpu" in
3308 arm*)
3309 _host_cpu=arm
3310 ;;
3311 *)
3312 _host_cpu=$host_cpu
3313 esac
3314 ;;
3315 *-*-cygwin*)
3316 _host_cpu=
3317 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003318 *-*-vxworks*)
3319 _host_cpu=$host_cpu
3320 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003321 *)
3322 # for now, limit cross builds to known configurations
3323 MACHDEP="unknown"
3324 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3325 esac
3326 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3327fi
3328
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003329# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3330# disable features if it is defined, without any means to access these
3331# features as extensions. For these systems, we skip the definition of
3332# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3333# some feature, make sure there is no alternative way to access this
3334# feature. Also, when using wildcards, make sure you have verified the
3335# need for not defining _XOPEN_SOURCE on all systems matching the
3336# wildcard, and that the wildcard does not include future systems
3337# (which may remove their limitations).
3338case $ac_sys_system/$ac_sys_release in
3339 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3340 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003341 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003342 # In addition, Stefan Krah confirms that issue #1244610 exists through
3343 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003345 define_xopen_source=no
3346 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3347 # also defined. This can be overridden by defining _BSD_SOURCE
3348 # As this has a different meaning on Linux, only define it on OpenBSD
3349
Matthias Kloseb9621712010-04-24 17:59:49 +00003350$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003351
3352 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003353 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3355 # also defined. This can be overridden by defining _BSD_SOURCE
3356 # As this has a different meaning on Linux, only define it on OpenBSD
3357
Matthias Kloseb9621712010-04-24 17:59:49 +00003358$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003359
3360 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003361 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3362 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3363 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003364 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 +00003365 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003366 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3367 # request to enable features supported by the standard as a request
3368 # to disable features not supported by the standard. The best way
3369 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3370 # entirely and define __EXTENSIONS__ instead.
3371 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003372 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3374 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003375 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003376 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003377 define_xopen_source=no;;
3378 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003379 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003380 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003381 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003382 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3383 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3384 # identifies itself as Darwin/7.*
3385 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3386 # disables platform specific features beyond repair.
3387 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3388 # has no effect, don't bother defining them
3389 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003390 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003391 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003392 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003393 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3394 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3395 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003396 AIX/4)
3397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 AIX/5)
3399 if test `uname -r` -eq 1; then
3400 define_xopen_source=no
3401 fi
3402 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003403 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3404 # defining NI_NUMERICHOST.
3405 QNX/6.3.2)
3406 define_xopen_source=no
3407 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003408 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3409 # in network headers still using system V types.
3410 VxWorks/*)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Christian Heimes647cd872013-12-07 23:39:33 +01003436# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3437case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438 hp*|HP*)
3439 define_stdc_a1=yes;;
3440 *)
3441 define_stdc_a1=no;;
3442esac
3443
3444if test $define_stdc_a1 = yes
3445then
Christian Heimes647cd872013-12-07 23:39:33 +01003446
3447$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3448
Christian Heimesb02bcae2013-12-08 15:21:08 +01003449fi
Christian Heimes647cd872013-12-07 23:39:33 +01003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3452# it may influence the way we can build extensions, so distutils
3453# needs to check it
3454
Thomas Wouters477c8d52006-05-27 19:21:47 +00003455
Jack Jansen6b08a402004-06-03 12:41:45 +00003456CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003457EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003460
3461# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3462# for debug/optimization stuff. BASECFLAGS is for flags that are required
3463# just to get things to compile and link. Users are free to override OPT
3464# when running configure or make. The build should not break if they do.
3465# BASECFLAGS should generally not be messed with, however.
3466
Guido van Rossum8b131c51995-03-09 14:10:13 +00003467# If the user switches compilers, we can't believe the cache
3468if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3469then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003470 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003471(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003472fi
3473
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003474# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3475# when the compiler supports them, but we don't always want -O2, and
3476# we set -g later.
3477if test -z "$CFLAGS"; then
3478 CFLAGS=
3479fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003480
3481if test "$ac_sys_system" = "Darwin"
3482then
3483 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003484 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003485 # information
3486 if test -z "${CC}"
3487 then
3488 found_gcc=
3489 found_clang=
3490 as_save_IFS=$IFS; IFS=:
3491 for as_dir in $PATH
3492 do
3493 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003494 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003495 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003496 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003497 fi
3498 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003499 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003500 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003501 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502 fi
3503 fi
3504 done
3505 IFS=$as_save_IFS
3506
3507 if test -n "$found_gcc" -a -n "$found_clang"
3508 then
3509 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3510 then
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3512$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3513 CC="$found_clang"
3514 CXX="$found_clang++"
3515 fi
3516
3517
3518 elif test -z "$found_gcc" -a -n "$found_clang"
3519 then
3520 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3521$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3522 CC="$found_clang"
3523 CXX="$found_clang++"
3524
3525 elif test -z "$found_gcc" -a -z "$found_clang"
3526 then
3527 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3528 if test -n "${found_clang}"
3529 then
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3531$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3532 CC="${found_clang}"
3533 CXX="`/usr/bin/xcrun -find clang++`"
3534
3535 # else: use default behaviour
3536 fi
3537 fi
3538 fi
3539fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003540ac_ext=c
3541ac_cpp='$CPP $CPPFLAGS'
3542ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3543ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3544ac_compiler_gnu=$ac_cv_c_compiler_gnu
3545if test -n "$ac_tool_prefix"; then
3546 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3547set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3549$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003550if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003551 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003552else
3553 if test -n "$CC"; then
3554 ac_cv_prog_CC="$CC" # Let the user override the test.
3555else
Martin v. Löwis11437992002-04-12 09:54:03 +00003556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3557for as_dir in $PATH
3558do
3559 IFS=$as_save_IFS
3560 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003563 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 $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 +00003565 break 2
3566 fi
3567done
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003570
Jack Jansendd19cf82001-12-06 22:36:17 +00003571fi
3572fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003573CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003574if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3576$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003577else
Matthias Kloseb9621712010-04-24 17:59:49 +00003578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3579$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003580fi
3581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003582
Martin v. Löwis11437992002-04-12 09:54:03 +00003583fi
3584if test -z "$ac_cv_prog_CC"; then
3585 ac_ct_CC=$CC
3586 # Extract the first word of "gcc", so it can be a program name with args.
3587set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3589$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003590if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003592else
3593 if test -n "$ac_ct_CC"; then
3594 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3595else
3596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3597for as_dir in $PATH
3598do
3599 IFS=$as_save_IFS
3600 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003603 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 $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 +00003605 break 2
3606 fi
3607done
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003609IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003610
3611fi
3612fi
3613ac_ct_CC=$ac_cv_prog_ac_ct_CC
3614if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3616$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003617else
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3619$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003620fi
3621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622 if test "x$ac_ct_CC" = x; then
3623 CC=""
3624 else
3625 case $cross_compiling:$ac_tool_warned in
3626yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629ac_tool_warned=yes ;;
3630esac
3631 CC=$ac_ct_CC
3632 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003633else
3634 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003635fi
3636
Jack Jansendd19cf82001-12-06 22:36:17 +00003637if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003638 if test -n "$ac_tool_prefix"; then
3639 # 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 +00003640set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3642$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003643if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003645else
3646 if test -n "$CC"; then
3647 ac_cv_prog_CC="$CC" # Let the user override the test.
3648else
Martin v. Löwis11437992002-04-12 09:54:03 +00003649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3650for as_dir in $PATH
3651do
3652 IFS=$as_save_IFS
3653 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003656 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 $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 +00003658 break 2
3659 fi
3660done
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003662IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003663
3664fi
3665fi
3666CC=$ac_cv_prog_CC
3667if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3669$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003670else
Matthias Kloseb9621712010-04-24 17:59:49 +00003671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3672$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003673fi
3674
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003677fi
3678if test -z "$CC"; then
3679 # Extract the first word of "cc", so it can be a program name with args.
3680set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3682$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003683if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003685else
3686 if test -n "$CC"; then
3687 ac_cv_prog_CC="$CC" # Let the user override the test.
3688else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003689 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003690as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3691for as_dir in $PATH
3692do
3693 IFS=$as_save_IFS
3694 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003697 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3698 ac_prog_rejected=yes
3699 continue
3700 fi
3701 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003702 $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 +00003703 break 2
3704 fi
3705done
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003708
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003709if test $ac_prog_rejected = yes; then
3710 # We found a bogon in the path, so make sure we never use it.
3711 set dummy $ac_cv_prog_CC
3712 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003714 # We chose a different compiler from the bogus one.
3715 # However, it has the same basename, so the bogon will be chosen
3716 # first if we set CC to just the basename; use the full file name.
3717 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003718 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719 fi
3720fi
3721fi
3722fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003723CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3726$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003727else
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3729$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003730fi
3731
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733fi
3734if test -z "$CC"; then
3735 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003737 do
3738 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3739set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3741$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003742if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003743 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003744else
3745 if test -n "$CC"; then
3746 ac_cv_prog_CC="$CC" # Let the user override the test.
3747else
Martin v. Löwis11437992002-04-12 09:54:03 +00003748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3749for as_dir in $PATH
3750do
3751 IFS=$as_save_IFS
3752 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003754 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003755 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 $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 +00003757 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003758 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003759done
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
3763fi
3764fi
3765CC=$ac_cv_prog_CC
3766if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3768$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003769else
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003772fi
3773
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775 test -n "$CC" && break
3776 done
3777fi
3778if test -z "$CC"; then
3779 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003781do
3782 # Extract the first word of "$ac_prog", so it can be a program name with args.
3783set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3785$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003786if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003788else
3789 if test -n "$ac_ct_CC"; then
3790 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3791else
3792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3793for as_dir in $PATH
3794do
3795 IFS=$as_save_IFS
3796 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003799 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 $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 +00003801 break 2
3802 fi
3803done
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807fi
3808fi
3809ac_ct_CC=$ac_cv_prog_ac_ct_CC
3810if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3812$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
Matthias Kloseb9621712010-04-24 17:59:49 +00003814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3815$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003816fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 test -n "$ac_ct_CC" && break
3820done
Michael W. Hudson54241132001-12-07 15:38:26 +00003821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822 if test "x$ac_ct_CC" = x; then
3823 CC=""
3824 else
3825 case $cross_compiling:$ac_tool_warned in
3826yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3828$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829ac_tool_warned=yes ;;
3830esac
3831 CC=$ac_ct_CC
3832 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003833fi
3834
3835fi
3836
3837
Matthias Kloseb9621712010-04-24 17:59:49 +00003838test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3839$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003840as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003841See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842
3843# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003844$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3845set X $ac_compile
3846ac_compiler=$2
3847for ac_option in --version -v -V -qversion; do
3848 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849case "(($ac_try" in
3850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3851 *) ac_try_echo=$ac_try;;
3852esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003853eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3854$as_echo "$ac_try_echo"; } >&5
3855 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 if test -s conftest.err; then
3858 sed '10a\
3859... rest of stderr output deleted ...
3860 10q' conftest.err >conftest.er1
3861 cat conftest.er1 >&5
3862 fi
3863 rm -f conftest.er1 conftest.err
3864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3865 test $ac_status = 0; }
3866done
Martin v. Löwis11437992002-04-12 09:54:03 +00003867
Matthias Kloseb9621712010-04-24 17:59:49 +00003868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003869/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871int
3872main ()
3873{
3874
3875 ;
3876 return 0;
3877}
3878_ACEOF
3879ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003880ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003881# Try to create an executable without -o first, disregard a.out.
3882# It will help us diagnose broken compilers, and finding out an intuition
3883# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3885$as_echo_n "checking whether the C compiler works... " >&6; }
3886ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3887
3888# The possible output files:
3889ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891ac_rmfiles=
3892for ac_file in $ac_files
3893do
3894 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003895 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003896 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3897 esac
3898done
3899rm -f $ac_rmfiles
3900
Matthias Kloseb9621712010-04-24 17:59:49 +00003901if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003902case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003906eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003908 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3911 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3913# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3914# in a Makefile. We should not override ac_cv_exeext if it was cached,
3915# so that the user can short-circuit this test for compilers unknown to
3916# Autoconf.
3917for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003918do
3919 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003922 ;;
3923 [ab].out )
3924 # We found the default executable, but exeext='' is most
3925 # certainly right.
3926 break;;
3927 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929 then :; else
3930 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3931 fi
3932 # We set ac_cv_exeext here because the later test for it is not
3933 # safe: cross compilers may not add the suffix if given an `-o'
3934 # argument, so we may need to know it at that point already.
3935 # Even if this section looks crufty: it has the advantage of
3936 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003937 break;;
3938 * )
3939 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003940 esac
3941done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942test "$ac_cv_exeext" = no && ac_cv_exeext=
3943
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003944else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945 ac_file=''
3946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003947if test -z "$ac_file"; then :
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3949$as_echo "no" >&6; }
3950$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003951sed 's/^/| /' conftest.$ac_ext >&5
3952
Matthias Kloseb9621712010-04-24 17:59:49 +00003953{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003955as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003956See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003957else
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3959$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3962$as_echo_n "checking for C compiler default output file name... " >&6; }
3963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3964$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003966
Matthias Kloseb9621712010-04-24 17:59:49 +00003967rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003968ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3970$as_echo_n "checking for suffix of executables... " >&6; }
3971if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972case "(($ac_try" in
3973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3974 *) ac_try_echo=$ac_try;;
3975esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003976eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3977$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3981 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003982 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3983# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3984# work properly (i.e., refer to `conftest.exe'), while it won't with
3985# `rm'.
3986for ac_file in conftest.exe conftest conftest.*; do
3987 test -f "$ac_file" || continue
3988 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3991 break;;
3992 * ) break;;
3993 esac
3994done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995else
Matthias Kloseb9621712010-04-24 17:59:49 +00003996 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003998as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003999See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004001rm -f conftest conftest$ac_cv_exeext
4002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4003$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004
4005rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004006EXEEXT=$ac_cv_exeext
4007ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4009/* end confdefs.h. */
4010#include <stdio.h>
4011int
4012main ()
4013{
4014FILE *f = fopen ("conftest.out", "w");
4015 return ferror (f) || fclose (f) != 0;
4016
4017 ;
4018 return 0;
4019}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004021ac_clean_files="$ac_clean_files conftest.out"
4022# Check that the compiler produces executables we can run. If not, either
4023# the compiler is broken, or we cross compile.
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4025$as_echo_n "checking whether we are cross compiling... " >&6; }
4026if test "$cross_compiling" != yes; then
4027 { { ac_try="$ac_link"
4028case "(($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_link") 2>&5
4035 ac_status=$?
4036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }
4038 if { ac_try='./conftest$ac_cv_exeext'
4039 { { case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
4043eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4044$as_echo "$ac_try_echo"; } >&5
4045 (eval "$ac_try") 2>&5
4046 ac_status=$?
4047 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4048 test $ac_status = 0; }; }; then
4049 cross_compiling=no
4050 else
4051 if test "$cross_compiling" = maybe; then
4052 cross_compiling=yes
4053 else
4054 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4055$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004056as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004057If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004058See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 fi
4060 fi
4061fi
4062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4063$as_echo "$cross_compiling" >&6; }
4064
4065rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4066ac_clean_files=$ac_clean_files_save
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4068$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004069if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004070 $as_echo_n "(cached) " >&6
4071else
4072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004073/* end confdefs.h. */
4074
4075int
4076main ()
4077{
4078
4079 ;
4080 return 0;
4081}
4082_ACEOF
4083rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004084if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004085case "(($ac_try" in
4086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4087 *) ac_try_echo=$ac_try;;
4088esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004089eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4090$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004091 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4094 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095 for ac_file in conftest.o conftest.obj conftest.*; do
4096 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004097 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004098 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004099 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4100 break;;
4101 esac
4102done
4103else
Matthias Kloseb9621712010-04-24 17:59:49 +00004104 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004105sed 's/^/| /' conftest.$ac_ext >&5
4106
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004109as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004110See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004111fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004112rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4115$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004116OBJEXT=$ac_cv_objext
4117ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4119$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004120if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004121 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004122else
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004125
Martin v. Löwis11437992002-04-12 09:54:03 +00004126int
4127main ()
4128{
4129#ifndef __GNUC__
4130 choke me
4131#endif
4132
4133 ;
4134 return 0;
4135}
4136_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004137if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004138 ac_compiler_gnu=yes
4139else
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004143ac_cv_c_compiler_gnu=$ac_compiler_gnu
4144
4145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4147$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4148if test $ac_compiler_gnu = yes; then
4149 GCC=yes
4150else
4151 GCC=
4152fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004153ac_test_CFLAGS=${CFLAGS+set}
4154ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4156$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004157if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004160 ac_save_c_werror_flag=$ac_c_werror_flag
4161 ac_c_werror_flag=yes
4162 ac_cv_prog_cc_g=no
4163 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004166
Martin v. Löwis11437992002-04-12 09:54:03 +00004167int
4168main ()
4169{
4170
4171 ;
4172 return 0;
4173}
4174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004175if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004176 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 CFLAGS=""
4179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180/* end confdefs.h. */
4181
4182int
4183main ()
4184{
4185
4186 ;
4187 return 0;
4188}
4189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004190if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004191
Matthias Kloseb9621712010-04-24 17:59:49 +00004192else
4193 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004194 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196/* end confdefs.h. */
4197
4198int
4199main ()
4200{
4201
4202 ;
4203 return 0;
4204}
4205_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004206if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004207 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4214 ac_c_werror_flag=$ac_save_c_werror_flag
4215fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4217$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004218if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004219 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004220elif test $ac_cv_prog_cc_g = yes; then
4221 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004222 CFLAGS="-g -O2"
4223 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004224 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225 fi
4226else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004227 if test "$GCC" = yes; then
4228 CFLAGS="-O2"
4229 else
4230 CFLAGS=
4231 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4234$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004235if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004236 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004237else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004238 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004239ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004241/* end confdefs.h. */
4242#include <stdarg.h>
4243#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004244struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4246struct buf { int x; };
4247FILE * (*rcsopen) (struct buf *, struct stat *, int);
4248static char *e (p, i)
4249 char **p;
4250 int i;
4251{
4252 return p[i];
4253}
4254static char *f (char * (*g) (char **, int), char **p, ...)
4255{
4256 char *s;
4257 va_list v;
4258 va_start (v,p);
4259 s = g (p, va_arg (v,int));
4260 va_end (v);
4261 return s;
4262}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004263
4264/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4265 function prototypes and stuff, but not '\xHH' hex character constants.
4266 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004267 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004268 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4269 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004271int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4272
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4274 inside strings and character constants. */
4275#define FOO(x) 'x'
4276int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4277
Skip Montanaro6dead952003-09-25 14:50:04 +00004278int test (int i, double x);
4279struct s1 {int (*f) (int a);};
4280struct s2 {int (*f) (double a);};
4281int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4282int argc;
4283char **argv;
4284int
4285main ()
4286{
4287return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4288 ;
4289 return 0;
4290}
4291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4293 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004294do
4295 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004296 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299rm -f core conftest.err conftest.$ac_objext
4300 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004301done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004303CC=$ac_save_CC
4304
4305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306# AC_CACHE_VAL
4307case "x$ac_cv_prog_cc_c89" in
4308 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4310$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4313$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004314 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004315 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4317$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004318esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004319if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004320
Matthias Kloseb9621712010-04-24 17:59:49 +00004321fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004322
Martin v. Löwis11437992002-04-12 09:54:03 +00004323ac_ext=c
4324ac_cpp='$CPP $CPPFLAGS'
4325ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4326ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4327ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
4334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4335$as_echo_n "checking how to run the C preprocessor... " >&6; }
4336# On Suns, sometimes $CPP names a directory.
4337if test -n "$CPP" && test -d "$CPP"; then
4338 CPP=
4339fi
4340if test -z "$CPP"; then
4341 if ${ac_cv_prog_CPP+:} false; then :
4342 $as_echo_n "(cached) " >&6
4343else
4344 # Double quotes because CPP needs to be expanded
4345 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4346 do
4347 ac_preproc_ok=false
4348for ac_c_preproc_warn_flag in '' yes
4349do
4350 # Use a header file that comes with gcc, so configuring glibc
4351 # with a fresh cross-compiler works.
4352 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4353 # <limits.h> exists even on freestanding compilers.
4354 # On the NeXT, cc -E runs the code through the compiler's parser,
4355 # not just through cpp. "Syntax error" is here to catch this case.
4356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4357/* end confdefs.h. */
4358#ifdef __STDC__
4359# include <limits.h>
4360#else
4361# include <assert.h>
4362#endif
4363 Syntax error
4364_ACEOF
4365if ac_fn_c_try_cpp "$LINENO"; then :
4366
4367else
4368 # Broken: fails on valid input.
4369continue
4370fi
4371rm -f conftest.err conftest.i conftest.$ac_ext
4372
4373 # OK, works on sane cases. Now check whether nonexistent headers
4374 # can be detected and how.
4375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4376/* end confdefs.h. */
4377#include <ac_nonexistent.h>
4378_ACEOF
4379if ac_fn_c_try_cpp "$LINENO"; then :
4380 # Broken: success on invalid input.
4381continue
4382else
4383 # Passes both tests.
4384ac_preproc_ok=:
4385break
4386fi
4387rm -f conftest.err conftest.i conftest.$ac_ext
4388
4389done
4390# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4391rm -f conftest.i conftest.err conftest.$ac_ext
4392if $ac_preproc_ok; then :
4393 break
4394fi
4395
4396 done
4397 ac_cv_prog_CPP=$CPP
4398
4399fi
4400 CPP=$ac_cv_prog_CPP
4401else
4402 ac_cv_prog_CPP=$CPP
4403fi
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4405$as_echo "$CPP" >&6; }
4406ac_preproc_ok=false
4407for ac_c_preproc_warn_flag in '' yes
4408do
4409 # Use a header file that comes with gcc, so configuring glibc
4410 # with a fresh cross-compiler works.
4411 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4412 # <limits.h> exists even on freestanding compilers.
4413 # On the NeXT, cc -E runs the code through the compiler's parser,
4414 # not just through cpp. "Syntax error" is here to catch this case.
4415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4416/* end confdefs.h. */
4417#ifdef __STDC__
4418# include <limits.h>
4419#else
4420# include <assert.h>
4421#endif
4422 Syntax error
4423_ACEOF
4424if ac_fn_c_try_cpp "$LINENO"; then :
4425
4426else
4427 # Broken: fails on valid input.
4428continue
4429fi
4430rm -f conftest.err conftest.i conftest.$ac_ext
4431
4432 # OK, works on sane cases. Now check whether nonexistent headers
4433 # can be detected and how.
4434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4435/* end confdefs.h. */
4436#include <ac_nonexistent.h>
4437_ACEOF
4438if ac_fn_c_try_cpp "$LINENO"; then :
4439 # Broken: success on invalid input.
4440continue
4441else
4442 # Passes both tests.
4443ac_preproc_ok=:
4444break
4445fi
4446rm -f conftest.err conftest.i conftest.$ac_ext
4447
4448done
4449# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4450rm -f conftest.i conftest.err conftest.$ac_ext
4451if $ac_preproc_ok; then :
4452
4453else
4454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4456as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4457See \`config.log' for more details" "$LINENO" 5; }
4458fi
4459
4460ac_ext=c
4461ac_cpp='$CPP $CPPFLAGS'
4462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4464ac_compiler_gnu=$ac_cv_c_compiler_gnu
4465
4466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4467$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4468if ${ac_cv_path_GREP+:} false; then :
4469 $as_echo_n "(cached) " >&6
4470else
4471 if test -z "$GREP"; then
4472 ac_path_GREP_found=false
4473 # Loop through the user's path and test for each of PROGNAME-LIST
4474 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4475for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4476do
4477 IFS=$as_save_IFS
4478 test -z "$as_dir" && as_dir=.
4479 for ac_prog in grep ggrep; do
4480 for ac_exec_ext in '' $ac_executable_extensions; do
4481 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4482 as_fn_executable_p "$ac_path_GREP" || continue
4483# Check for GNU ac_path_GREP and select it if it is found.
4484 # Check for GNU $ac_path_GREP
4485case `"$ac_path_GREP" --version 2>&1` in
4486*GNU*)
4487 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4488*)
4489 ac_count=0
4490 $as_echo_n 0123456789 >"conftest.in"
4491 while :
4492 do
4493 cat "conftest.in" "conftest.in" >"conftest.tmp"
4494 mv "conftest.tmp" "conftest.in"
4495 cp "conftest.in" "conftest.nl"
4496 $as_echo 'GREP' >> "conftest.nl"
4497 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4498 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4499 as_fn_arith $ac_count + 1 && ac_count=$as_val
4500 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4501 # Best one so far, save it but keep looking for a better one
4502 ac_cv_path_GREP="$ac_path_GREP"
4503 ac_path_GREP_max=$ac_count
4504 fi
4505 # 10*(2^10) chars as input seems more than enough
4506 test $ac_count -gt 10 && break
4507 done
4508 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4509esac
4510
4511 $ac_path_GREP_found && break 3
4512 done
4513 done
4514 done
4515IFS=$as_save_IFS
4516 if test -z "$ac_cv_path_GREP"; then
4517 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4518 fi
4519else
4520 ac_cv_path_GREP=$GREP
4521fi
4522
4523fi
4524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4525$as_echo "$ac_cv_path_GREP" >&6; }
4526 GREP="$ac_cv_path_GREP"
4527
4528
Łukasz Langaa785c872016-09-09 17:37:37 -07004529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4530$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4531if ${ac_cv_path_SED+:} false; then :
4532 $as_echo_n "(cached) " >&6
4533else
4534 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4535 for ac_i in 1 2 3 4 5 6 7; do
4536 ac_script="$ac_script$as_nl$ac_script"
4537 done
4538 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4539 { ac_script=; unset ac_script;}
4540 if test -z "$SED"; then
4541 ac_path_SED_found=false
4542 # Loop through the user's path and test for each of PROGNAME-LIST
4543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4544for as_dir in $PATH
4545do
4546 IFS=$as_save_IFS
4547 test -z "$as_dir" && as_dir=.
4548 for ac_prog in sed gsed; do
4549 for ac_exec_ext in '' $ac_executable_extensions; do
4550 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4551 as_fn_executable_p "$ac_path_SED" || continue
4552# Check for GNU ac_path_SED and select it if it is found.
4553 # Check for GNU $ac_path_SED
4554case `"$ac_path_SED" --version 2>&1` in
4555*GNU*)
4556 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4557*)
4558 ac_count=0
4559 $as_echo_n 0123456789 >"conftest.in"
4560 while :
4561 do
4562 cat "conftest.in" "conftest.in" >"conftest.tmp"
4563 mv "conftest.tmp" "conftest.in"
4564 cp "conftest.in" "conftest.nl"
4565 $as_echo '' >> "conftest.nl"
4566 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4567 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4568 as_fn_arith $ac_count + 1 && ac_count=$as_val
4569 if test $ac_count -gt ${ac_path_SED_max-0}; then
4570 # Best one so far, save it but keep looking for a better one
4571 ac_cv_path_SED="$ac_path_SED"
4572 ac_path_SED_max=$ac_count
4573 fi
4574 # 10*(2^10) chars as input seems more than enough
4575 test $ac_count -gt 10 && break
4576 done
4577 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4578esac
4579
4580 $ac_path_SED_found && break 3
4581 done
4582 done
4583 done
4584IFS=$as_save_IFS
4585 if test -z "$ac_cv_path_SED"; then
4586 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4587 fi
4588else
4589 ac_cv_path_SED=$SED
4590fi
4591
4592fi
4593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4594$as_echo "$ac_cv_path_SED" >&6; }
4595 SED="$ac_cv_path_SED"
4596 rm -f conftest.sed
4597
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004598
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004599
4600
Matthias Kloseb9621712010-04-24 17:59:49 +00004601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4602$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004604# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004605if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004606 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004607
4608 case $withval in
4609 no) with_cxx_main=no
4610 MAINCC='$(CC)';;
4611 yes) with_cxx_main=yes
4612 MAINCC='$(CXX)';;
4613 *) with_cxx_main=yes
4614 MAINCC=$withval
4615 if test -z "$CXX"
4616 then
4617 CXX=$withval
4618 fi;;
4619 esac
4620else
4621
4622 with_cxx_main=no
4623 MAINCC='$(CC)'
4624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004625fi
4626
Matthias Kloseb9621712010-04-24 17:59:49 +00004627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4628$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004629
4630preset_cxx="$CXX"
4631if test -z "$CXX"
4632then
4633 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004634 gcc) if test -n "$ac_tool_prefix"; then
4635 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4636set dummy ${ac_tool_prefix}g++; ac_word=$2
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
4639if ${ac_cv_path_CXX+:} false; then :
4640 $as_echo_n "(cached) " >&6
4641else
4642 case $CXX in
4643 [\\/]* | ?:[\\/]*)
4644 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4645 ;;
4646 *)
4647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in notfound
4649do
4650 IFS=$as_save_IFS
4651 test -z "$as_dir" && as_dir=.
4652 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004654 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656 break 2
4657 fi
4658done
4659 done
4660IFS=$as_save_IFS
4661
4662 ;;
4663esac
4664fi
4665CXX=$ac_cv_path_CXX
4666if test -n "$CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4668$as_echo "$CXX" >&6; }
4669else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
4674
4675fi
4676if test -z "$ac_cv_path_CXX"; then
4677 ac_pt_CXX=$CXX
4678 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004679set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004682if ${ac_cv_path_ac_pt_CXX+:} false; then :
4683 $as_echo_n "(cached) " >&6
4684else
4685 case $ac_pt_CXX in
4686 [\\/]* | ?:[\\/]*)
4687 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4688 ;;
4689 *)
4690 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in notfound
4692do
4693 IFS=$as_save_IFS
4694 test -z "$as_dir" && as_dir=.
4695 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004696 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4698 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699 break 2
4700 fi
4701done
4702 done
4703IFS=$as_save_IFS
4704
4705 ;;
4706esac
4707fi
4708ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4709if test -n "$ac_pt_CXX"; then
4710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4711$as_echo "$ac_pt_CXX" >&6; }
4712else
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717 if test "x$ac_pt_CXX" = x; then
4718 CXX="g++"
4719 else
4720 case $cross_compiling:$ac_tool_warned in
4721yes:)
4722{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4723$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4724ac_tool_warned=yes ;;
4725esac
4726 CXX=$ac_pt_CXX
4727 fi
4728else
4729 CXX="$ac_cv_path_CXX"
4730fi
4731 ;;
4732 cc) if test -n "$ac_tool_prefix"; then
4733 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4734set dummy ${ac_tool_prefix}c++; ac_word=$2
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004737if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004738 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004739else
4740 case $CXX in
4741 [\\/]* | ?:[\\/]*)
4742 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4743 ;;
4744 *)
4745 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4746for as_dir in notfound
4747do
4748 IFS=$as_save_IFS
4749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004753 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754 break 2
4755 fi
4756done
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004758IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004759
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004760 ;;
4761esac
4762fi
4763CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004764if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4766$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004767else
Matthias Kloseb9621712010-04-24 17:59:49 +00004768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004771
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772
4773fi
4774if test -z "$ac_cv_path_CXX"; then
4775 ac_pt_CXX=$CXX
4776 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004781 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004782else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004783 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004785 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 +00004786 ;;
4787 *)
4788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789for as_dir in notfound
4790do
4791 IFS=$as_save_IFS
4792 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004794 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 break 2
4798 fi
4799done
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004801IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 ;;
4804esac
4805fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4807if test -n "$ac_pt_CXX"; then
4808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4809$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004810else
Matthias Kloseb9621712010-04-24 17:59:49 +00004811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004814
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004815 if test "x$ac_pt_CXX" = x; then
4816 CXX="c++"
4817 else
4818 case $cross_compiling:$ac_tool_warned in
4819yes:)
4820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4822ac_tool_warned=yes ;;
4823esac
4824 CXX=$ac_pt_CXX
4825 fi
4826else
4827 CXX="$ac_cv_path_CXX"
4828fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830 clang|*/clang) if test -n "$ac_tool_prefix"; then
4831 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4832set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4834$as_echo_n "checking for $ac_word... " >&6; }
4835if ${ac_cv_path_CXX+:} false; then :
4836 $as_echo_n "(cached) " >&6
4837else
4838 case $CXX in
4839 [\\/]* | ?:[\\/]*)
4840 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4841 ;;
4842 *)
4843 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4844for as_dir in notfound
4845do
4846 IFS=$as_save_IFS
4847 test -z "$as_dir" && as_dir=.
4848 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004850 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4852 break 2
4853 fi
4854done
4855 done
4856IFS=$as_save_IFS
4857
Ned Deilycbfb9a52012-06-23 16:02:19 -07004858 ;;
4859esac
4860fi
4861CXX=$ac_cv_path_CXX
4862if test -n "$CXX"; then
4863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4864$as_echo "$CXX" >&6; }
4865else
4866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4867$as_echo "no" >&6; }
4868fi
4869
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870
4871fi
4872if test -z "$ac_cv_path_CXX"; then
4873 ac_pt_CXX=$CXX
4874 # Extract the first word of "clang++", so it can be a program name with args.
4875set dummy clang++; ac_word=$2
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_path_ac_pt_CXX+:} false; then :
4879 $as_echo_n "(cached) " >&6
4880else
4881 case $ac_pt_CXX in
4882 [\\/]* | ?:[\\/]*)
4883 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4884 ;;
4885 *)
4886 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in notfound
4888do
4889 IFS=$as_save_IFS
4890 test -z "$as_dir" && as_dir=.
4891 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004893 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895 break 2
4896 fi
4897done
4898 done
4899IFS=$as_save_IFS
4900
4901 ;;
4902esac
4903fi
4904ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4905if test -n "$ac_pt_CXX"; then
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4907$as_echo "$ac_pt_CXX" >&6; }
4908else
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
4913 if test "x$ac_pt_CXX" = x; then
4914 CXX="clang++"
4915 else
4916 case $cross_compiling:$ac_tool_warned in
4917yes:)
4918{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4919$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4920ac_tool_warned=yes ;;
4921esac
4922 CXX=$ac_pt_CXX
4923 fi
4924else
4925 CXX="$ac_cv_path_CXX"
4926fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004927 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004928 icc|*/icc) if test -n "$ac_tool_prefix"; then
4929 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4930set dummy ${ac_tool_prefix}icpc; ac_word=$2
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4932$as_echo_n "checking for $ac_word... " >&6; }
4933if ${ac_cv_path_CXX+:} false; then :
4934 $as_echo_n "(cached) " >&6
4935else
4936 case $CXX in
4937 [\\/]* | ?:[\\/]*)
4938 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4939 ;;
4940 *)
4941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in notfound
4943do
4944 IFS=$as_save_IFS
4945 test -z "$as_dir" && as_dir=.
4946 for ac_exec_ext in '' $ac_executable_extensions; do
4947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4948 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950 break 2
4951 fi
4952done
4953 done
4954IFS=$as_save_IFS
4955
4956 ;;
4957esac
4958fi
4959CXX=$ac_cv_path_CXX
4960if test -n "$CXX"; then
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4962$as_echo "$CXX" >&6; }
4963else
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4965$as_echo "no" >&6; }
4966fi
4967
4968
4969fi
4970if test -z "$ac_cv_path_CXX"; then
4971 ac_pt_CXX=$CXX
4972 # Extract the first word of "icpc", so it can be a program name with args.
4973set dummy icpc; ac_word=$2
4974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4975$as_echo_n "checking for $ac_word... " >&6; }
4976if ${ac_cv_path_ac_pt_CXX+:} false; then :
4977 $as_echo_n "(cached) " >&6
4978else
4979 case $ac_pt_CXX in
4980 [\\/]* | ?:[\\/]*)
4981 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4982 ;;
4983 *)
4984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4985for as_dir in notfound
4986do
4987 IFS=$as_save_IFS
4988 test -z "$as_dir" && as_dir=.
4989 for ac_exec_ext in '' $ac_executable_extensions; do
4990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4991 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4993 break 2
4994 fi
4995done
4996 done
4997IFS=$as_save_IFS
4998
4999 ;;
5000esac
5001fi
5002ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5003if test -n "$ac_pt_CXX"; then
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5005$as_echo "$ac_pt_CXX" >&6; }
5006else
5007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5008$as_echo "no" >&6; }
5009fi
5010
5011 if test "x$ac_pt_CXX" = x; then
5012 CXX="icpc"
5013 else
5014 case $cross_compiling:$ac_tool_warned in
5015yes:)
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5017$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5018ac_tool_warned=yes ;;
5019esac
5020 CXX=$ac_pt_CXX
5021 fi
5022else
5023 CXX="$ac_cv_path_CXX"
5024fi
5025 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005026 esac
5027 if test "$CXX" = "notfound"
5028 then
5029 CXX=""
5030 fi
5031fi
5032if test -z "$CXX"
5033then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005034 if test -n "$ac_tool_prefix"; then
5035 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5036 do
5037 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5038set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5040$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005041if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005043else
5044 if test -n "$CXX"; then
5045 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5046else
5047as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5048for as_dir in $PATH
5049do
5050 IFS=$as_save_IFS
5051 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005054 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005056 break 2
5057 fi
5058done
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005060IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005061
5062fi
5063fi
5064CXX=$ac_cv_prog_CXX
5065if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5067$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005068else
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5070$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071fi
5072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005074 test -n "$CXX" && break
5075 done
5076fi
5077if test -z "$CXX"; then
5078 ac_ct_CXX=$CXX
5079 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5080do
5081 # Extract the first word of "$ac_prog", so it can be a program name with args.
5082set dummy $ac_prog; ac_word=$2
5083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5084$as_echo_n "checking for $ac_word... " >&6; }
5085if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5086 $as_echo_n "(cached) " >&6
5087else
5088 if test -n "$ac_ct_CXX"; then
5089 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5090else
5091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5092for as_dir in $PATH
5093do
5094 IFS=$as_save_IFS
5095 test -z "$as_dir" && as_dir=.
5096 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 ac_cv_prog_ac_ct_CXX="$ac_prog"
5099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5100 break 2
5101 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005102done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005103 done
5104IFS=$as_save_IFS
5105
5106fi
5107fi
5108ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5109if test -n "$ac_ct_CXX"; then
5110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5111$as_echo "$ac_ct_CXX" >&6; }
5112else
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5114$as_echo "no" >&6; }
5115fi
5116
5117
5118 test -n "$ac_ct_CXX" && break
5119done
5120
5121 if test "x$ac_ct_CXX" = x; then
5122 CXX="notfound"
5123 else
5124 case $cross_compiling:$ac_tool_warned in
5125yes:)
5126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5128ac_tool_warned=yes ;;
5129esac
5130 CXX=$ac_ct_CXX
5131 fi
5132fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 if test "$CXX" = "notfound"
5135 then
5136 CXX=""
5137 fi
5138fi
5139if test "$preset_cxx" != "$CXX"
5140then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005141 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142
5143 By default, distutils will build C++ extension modules with \"$CXX\".
5144 If this is not intended, then set CXX on the configure command line.
5145 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005146$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005147
5148 By default, distutils will build C++ extension modules with \"$CXX\".
5149 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005150 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005151fi
5152
5153
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005154MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5155
5156
5157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5158$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5159cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005160#undef bfin
5161#undef cris
5162#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005164#undef hppa
5165#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005166#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005167#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005168#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005169#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005171#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005172 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005173#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005174# if defined(__x86_64__) && defined(__LP64__)
5175 x86_64-linux-gnu
5176# elif defined(__x86_64__) && defined(__ILP32__)
5177 x86_64-linux-gnux32
5178# elif defined(__i386__)
5179 i386-linux-gnu
5180# elif defined(__aarch64__) && defined(__AARCH64EL__)
5181# if defined(__ILP32__)
5182 aarch64_ilp32-linux-gnu
5183# else
5184 aarch64-linux-gnu
5185# endif
5186# elif defined(__aarch64__) && defined(__AARCH64EB__)
5187# if defined(__ILP32__)
5188 aarch64_be_ilp32-linux-gnu
5189# else
5190 aarch64_be-linux-gnu
5191# endif
5192# elif defined(__alpha__)
5193 alpha-linux-gnu
5194# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5195# if defined(__ARMEL__)
5196 arm-linux-gnueabihf
5197# else
5198 armeb-linux-gnueabihf
5199# endif
5200# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5201# if defined(__ARMEL__)
5202 arm-linux-gnueabi
5203# else
5204 armeb-linux-gnueabi
5205# endif
5206# elif defined(__hppa__)
5207 hppa-linux-gnu
5208# elif defined(__ia64__)
5209 ia64-linux-gnu
5210# elif defined(__m68k__) && !defined(__mcoldfire__)
5211 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005212# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5213# if _MIPS_SIM == _ABIO32
5214 mipsisa32r6el-linux-gnu
5215# elif _MIPS_SIM == _ABIN32
5216 mipsisa64r6el-linux-gnuabin32
5217# elif _MIPS_SIM == _ABI64
5218 mipsisa64r6el-linux-gnuabi64
5219# else
5220# error unknown platform triplet
5221# endif
5222# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5223# if _MIPS_SIM == _ABIO32
5224 mipsisa32r6-linux-gnu
5225# elif _MIPS_SIM == _ABIN32
5226 mipsisa64r6-linux-gnuabin32
5227# elif _MIPS_SIM == _ABI64
5228 mipsisa64r6-linux-gnuabi64
5229# else
5230# error unknown platform triplet
5231# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005232# elif defined(__mips_hard_float) && defined(_MIPSEL)
5233# if _MIPS_SIM == _ABIO32
5234 mipsel-linux-gnu
5235# elif _MIPS_SIM == _ABIN32
5236 mips64el-linux-gnuabin32
5237# elif _MIPS_SIM == _ABI64
5238 mips64el-linux-gnuabi64
5239# else
5240# error unknown platform triplet
5241# endif
5242# elif defined(__mips_hard_float)
5243# if _MIPS_SIM == _ABIO32
5244 mips-linux-gnu
5245# elif _MIPS_SIM == _ABIN32
5246 mips64-linux-gnuabin32
5247# elif _MIPS_SIM == _ABI64
5248 mips64-linux-gnuabi64
5249# else
5250# error unknown platform triplet
5251# endif
5252# elif defined(__or1k__)
5253 or1k-linux-gnu
5254# elif defined(__powerpc__) && defined(__SPE__)
5255 powerpc-linux-gnuspe
5256# elif defined(__powerpc64__)
5257# if defined(__LITTLE_ENDIAN__)
5258 powerpc64le-linux-gnu
5259# else
5260 powerpc64-linux-gnu
5261# endif
5262# elif defined(__powerpc__)
5263 powerpc-linux-gnu
5264# elif defined(__s390x__)
5265 s390x-linux-gnu
5266# elif defined(__s390__)
5267 s390-linux-gnu
5268# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5269 sh4-linux-gnu
5270# elif defined(__sparc__) && defined(__arch64__)
5271 sparc64-linux-gnu
5272# elif defined(__sparc__)
5273 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005274# elif defined(__riscv)
5275# if __riscv_xlen == 32
5276 riscv32-linux-gnu
5277# elif __riscv_xlen == 64
5278 riscv64-linux-gnu
5279# else
5280# error unknown platform triplet
5281# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005282# else
5283# error unknown platform triplet
5284# endif
5285#elif defined(__FreeBSD_kernel__)
5286# if defined(__LP64__)
5287 x86_64-kfreebsd-gnu
5288# elif defined(__i386__)
5289 i386-kfreebsd-gnu
5290# else
5291# error unknown platform triplet
5292# endif
5293#elif defined(__gnu_hurd__)
5294 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005295#elif defined(__APPLE__)
5296 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005297#elif defined(__VXWORKS__)
5298 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299#else
5300# error unknown platform triplet
5301#endif
5302
5303EOF
5304
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005305if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005306 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5308$as_echo "$PLATFORM_TRIPLET" >&6; }
5309else
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5311$as_echo "none" >&6; }
5312fi
5313rm -f conftest.c conftest.out
5314
5315if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5316 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5317 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5318 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005319elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5320 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005321fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005322
doko@ubuntu.com55532312016-06-14 08:55:19 +02005323if test x$MULTIARCH != x; then
5324 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5325fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005326
5327
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5329$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5330save_LDFLAGS="$LDFLAGS"
5331LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005332
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5334/* end confdefs.h. */
5335
5336int
5337main ()
5338{
5339
5340 ;
5341 return 0;
5342}
5343_ACEOF
5344if ac_fn_c_try_link "$LINENO"; then :
5345 NO_AS_NEEDED="-Wl,--no-as-needed"
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5347$as_echo "yes" >&6; }
5348else
5349 NO_AS_NEEDED=""
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353rm -f core conftest.err conftest.$ac_objext \
5354 conftest$ac_exeext conftest.$ac_ext
5355LDFLAGS="$save_LDFLAGS"
5356
5357
5358
5359# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005360
Matthias Kloseb9621712010-04-24 17:59:49 +00005361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5362$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005363if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005365else
5366 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5367 then ac_cv_path_EGREP="$GREP -E"
5368 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005371 # Loop through the user's path and test for each of PROGNAME-LIST
5372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5374do
5375 IFS=$as_save_IFS
5376 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 for ac_prog in egrep; do
5378 for ac_exec_ext in '' $ac_executable_extensions; do
5379 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005380 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005381# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 # Check for GNU $ac_path_EGREP
5383case `"$ac_path_EGREP" --version 2>&1` in
5384*GNU*)
5385 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5386*)
5387 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 while :
5390 do
5391 cat "conftest.in" "conftest.in" >"conftest.tmp"
5392 mv "conftest.tmp" "conftest.in"
5393 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005394 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5396 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005397 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005398 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5399 # Best one so far, save it but keep looking for a better one
5400 ac_cv_path_EGREP="$ac_path_EGREP"
5401 ac_path_EGREP_max=$ac_count
5402 fi
5403 # 10*(2^10) chars as input seems more than enough
5404 test $ac_count -gt 10 && break
5405 done
5406 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5407esac
5408
Matthias Kloseb9621712010-04-24 17:59:49 +00005409 $ac_path_EGREP_found && break 3
5410 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005411 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005412 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005413IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005414 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005415 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 +00005416 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005417else
5418 ac_cv_path_EGREP=$EGREP
5419fi
5420
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 fi
5422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5424$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005425 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005426
5427
Matthias Kloseb9621712010-04-24 17:59:49 +00005428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5429$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005430if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 $as_echo_n "(cached) " >&6
5432else
5433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005434/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005435#include <stdlib.h>
5436#include <stdarg.h>
5437#include <string.h>
5438#include <float.h>
5439
5440int
5441main ()
5442{
5443
5444 ;
5445 return 0;
5446}
5447_ACEOF
5448if ac_fn_c_try_compile "$LINENO"; then :
5449 ac_cv_header_stdc=yes
5450else
5451 ac_cv_header_stdc=no
5452fi
5453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5454
5455if test $ac_cv_header_stdc = yes; then
5456 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5458/* end confdefs.h. */
5459#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005461_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005462if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005463 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005464
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005465else
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005467fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005468rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005469
Matthias Kloseb9621712010-04-24 17:59:49 +00005470fi
5471
5472if test $ac_cv_header_stdc = yes; then
5473 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5475/* end confdefs.h. */
5476#include <stdlib.h>
5477
5478_ACEOF
5479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5480 $EGREP "free" >/dev/null 2>&1; then :
5481
5482else
5483 ac_cv_header_stdc=no
5484fi
5485rm -f conftest*
5486
5487fi
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5491 if test "$cross_compiling" = yes; then :
5492 :
5493else
5494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5495/* end confdefs.h. */
5496#include <ctype.h>
5497#include <stdlib.h>
5498#if ((' ' & 0x0FF) == 0x020)
5499# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5500# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5501#else
5502# define ISLOWER(c) \
5503 (('a' <= (c) && (c) <= 'i') \
5504 || ('j' <= (c) && (c) <= 'r') \
5505 || ('s' <= (c) && (c) <= 'z'))
5506# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5507#endif
5508
5509#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5510int
5511main ()
5512{
5513 int i;
5514 for (i = 0; i < 256; i++)
5515 if (XOR (islower (i), ISLOWER (i))
5516 || toupper (i) != TOUPPER (i))
5517 return 2;
5518 return 0;
5519}
5520_ACEOF
5521if ac_fn_c_try_run "$LINENO"; then :
5522
5523else
5524 ac_cv_header_stdc=no
5525fi
5526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5527 conftest.$ac_objext conftest.beam conftest.$ac_ext
5528fi
5529
5530fi
5531fi
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5533$as_echo "$ac_cv_header_stdc" >&6; }
5534if test $ac_cv_header_stdc = yes; then
5535
5536$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5537
5538fi
5539
5540# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5541for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5542 inttypes.h stdint.h unistd.h
5543do :
5544 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5545ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5546"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005547if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005548 cat >>confdefs.h <<_ACEOF
5549#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5550_ACEOF
5551
5552fi
5553
5554done
5555
5556
5557
5558 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 +02005559if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005560 MINIX=yes
5561else
5562 MINIX=
5563fi
5564
5565
5566 if test "$MINIX" = yes; then
5567
5568$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5569
5570
5571$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5572
5573
5574$as_echo "#define _MINIX 1" >>confdefs.h
5575
5576 fi
5577
5578
5579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5580$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005581if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 $as_echo_n "(cached) " >&6
5583else
5584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5585/* end confdefs.h. */
5586
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005587# define __EXTENSIONS__ 1
5588 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005589int
5590main ()
5591{
5592
5593 ;
5594 return 0;
5595}
5596_ACEOF
5597if ac_fn_c_try_compile "$LINENO"; then :
5598 ac_cv_safe_to_define___extensions__=yes
5599else
5600 ac_cv_safe_to_define___extensions__=no
5601fi
5602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5603fi
5604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5605$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5606 test $ac_cv_safe_to_define___extensions__ = yes &&
5607 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5608
5609 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5610
5611 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5612
5613 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5614
5615 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5616
5617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005618
Xavier de Gaye95750b12016-07-09 11:05:42 +02005619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5620$as_echo_n "checking for the Android API level... " >&6; }
5621cat >> conftest.c <<EOF
5622#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005623android_api = __ANDROID_API__
5624arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005625#else
5626#error not Android
5627#endif
5628EOF
5629
5630if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005631 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5632 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5634$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005635 if test -z "$ANDROID_API_LEVEL"; then
5636 echo 'Fatal: you must define __ANDROID_API__'
5637 exit 1
5638 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005639
5640cat >>confdefs.h <<_ACEOF
5641#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5642_ACEOF
5643
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005644
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5646$as_echo_n "checking for the Android arm ABI... " >&6; }
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5648$as_echo "$_arm_arch" >&6; }
5649 if test "$_arm_arch" = 7; then
5650 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5651 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5652 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5655$as_echo "not Android" >&6; }
5656fi
5657rm -f conftest.c conftest.out
5658
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659# Check for unsupported systems
5660case $ac_sys_system/$ac_sys_release in
5661atheos*|Linux*/1*)
5662 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5663 echo See README for details.
5664 exit 1;;
5665esac
5666
5667
Matthias Kloseb9621712010-04-24 17:59:49 +00005668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5669$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670
5671# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005672if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005673 withval=$with_suffix;
5674 case $withval in
5675 no) EXEEXT=;;
5676 yes) EXEEXT=.exe;;
5677 *) EXEEXT=$withval;;
5678 esac
5679fi
5680
Matthias Kloseb9621712010-04-24 17:59:49 +00005681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5682$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683
5684# Test whether we're running on a non-case-sensitive system, in which
5685# case we give a warning if no ext is given
5686
Matthias Kloseb9621712010-04-24 17:59:49 +00005687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5688$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689if test ! -d CaseSensitiveTestDir; then
5690mkdir CaseSensitiveTestDir
5691fi
5692
5693if test -d casesensitivetestdir
5694then
Matthias Kloseb9621712010-04-24 17:59:49 +00005695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5696$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005697 BUILDEXEEXT=.exe
5698else
Matthias Kloseb9621712010-04-24 17:59:49 +00005699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701 BUILDEXEEXT=$EXEEXT
5702fi
5703rmdir CaseSensitiveTestDir
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705case $ac_sys_system in
5706hp*|HP*)
5707 case $CC in
5708 cc|*/cc) CC="$CC -Ae";;
5709 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710esac
5711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
Matthias Kloseb9621712010-04-24 17:59:49 +00005713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5714$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715if test -z "$LIBRARY"
5716then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005717 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5720$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721
5722# LDLIBRARY is the name of the library to link against (as opposed to the
5723# name of the library into which to insert object files). BLDLIBRARY is also
5724# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5725# is blank as the main program is not linked directly against LDLIBRARY.
5726# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5727# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5728# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5729# DLLLIBRARY is the shared (i.e., DLL) library.
5730#
5731# RUNSHARED is used to run shared python without installed libraries
5732#
5733# INSTSONAME is the name of the shared library that will be use to install
5734# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005735#
5736# LDVERSION is the shared library version number, normally the Python version
5737# with the ABI build flags appended.
5738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740
5741
5742
5743
5744
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746LDLIBRARY="$LIBRARY"
5747BLDLIBRARY='$(LDLIBRARY)'
5748INSTSONAME='$(LDLIBRARY)'
5749DLLLIBRARY=''
5750LDLIBRARYDIR=''
5751RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005752LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753
5754# LINKCC is the command that links the python executable -- default is $(CC).
5755# If CXX is set, and if it is needed to link a main function that was
5756# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5757# python might then depend on the C++ runtime
5758# This is altered for AIX in order to build the export list before
5759# linking.
5760
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5762$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763if test -z "$LINKCC"
5764then
5765 LINKCC='$(PURIFY) $(MAINCC)'
5766 case $ac_sys_system in
5767 AIX*)
5768 exp_extra="\"\""
5769 if test $ac_sys_release -ge 5 -o \
5770 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5771 exp_extra="."
5772 fi
5773 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 QNX*)
5775 # qcc must be used because the other compilers do not
5776 # support -N.
5777 LINKCC=qcc;;
5778 esac
5779fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5781$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782
5783# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5784# make sure we default having it set to "no": this is used by
5785# distutils.unixccompiler to know if it should add --enable-new-dtags
5786# to linker command lines, and failing to detect GNU ld simply results
5787# in the same bahaviour as before.
5788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5790$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791ac_prog=ld
5792if test "$GCC" = yes; then
5793 ac_prog=`$CC -print-prog-name=ld`
5794fi
5795case `"$ac_prog" -V 2>&1 < /dev/null` in
5796 *GNU*)
5797 GNULD=yes;;
5798 *)
5799 GNULD=no;;
5800esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5802$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005803
Matthias Kloseb9621712010-04-24 17:59:49 +00005804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5805$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005806# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005807if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005808 enableval=$enable_shared;
5809fi
5810
5811
5812if test -z "$enable_shared"
5813then
5814 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005815 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 enable_shared="yes";;
5817 *)
5818 enable_shared="no";;
5819 esac
5820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5822$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823
Matthias Kloseb9621712010-04-24 17:59:49 +00005824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5825$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005827if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005828 enableval=$enable_profiling;
5829fi
5830
5831if test "x$enable_profiling" = xyes; then
5832 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005833 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835/* end confdefs.h. */
5836int main() { return 0; }
5837_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838if ac_fn_c_try_link "$LINENO"; then :
5839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843rm -f core conftest.err conftest.$ac_objext \
5844 conftest$ac_exeext conftest.$ac_ext
5845 CC="$ac_save_cc"
5846else
5847 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5850$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
doko@ubuntu.comba015832012-06-30 16:52:05 +02005852if test "x$enable_profiling" = xyes; then
5853 BASECFLAGS="-pg $BASECFLAGS"
5854 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855fi
5856
Matthias Kloseb9621712010-04-24 17:59:49 +00005857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5858$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859
5860# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5861# library that we build, but we do not want to link against it (we
5862# will find it with a -framework option). For this reason there is an
5863# extra variable BLDLIBRARY against which Python and the extension
5864# modules are linked, BLDLIBRARY. This is normally the same as
5865# LDLIBRARY, but empty for MacOSX framework builds.
5866if test "$enable_framework"
5867then
5868 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005869 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870 BLDLIBRARY=''
5871else
5872 BLDLIBRARY='$(LDLIBRARY)'
5873fi
5874
5875# Other platforms follow
5876if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005877 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
Matthias Kloseb9621712010-04-24 17:59:49 +00005879$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880
5881 case $ac_sys_system in
5882 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005883 LDLIBRARY='libpython$(LDVERSION).dll.a'
5884 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 ;;
5886 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005887 LDLIBRARY='libpython$(LDVERSION).so'
5888 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005889 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005890 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005891 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005892 then
5893 PY3LIBRARY=libpython3.so
5894 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005896 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005897 LDLIBRARY='libpython$(LDVERSION).so'
5898 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005899 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005901 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005902 then
5903 PY3LIBRARY=libpython3.so
5904 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 ;;
5906 hp*|HP*)
5907 case `uname -m` in
5908 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005909 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
5911 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
5914 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005919 LDLIBRARY='libpython$(LDVERSION).dylib'
5920 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005921 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005923 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005925 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005926 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927
5928 esac
5929else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005930 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 case $ac_sys_system in
5932 CYGWIN*)
5933 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935 ;;
5936 esac
5937fi
5938
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005939if test "$cross_compiling" = yes; then
5940 RUNSHARED=
5941fi
5942
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5944$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005947if test -n "$ac_tool_prefix"; then
5948 for ac_prog in ar aal
5949 do
5950 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5951set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005954if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005955 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956else
5957 if test -n "$AR"; then
5958 ac_cv_prog_AR="$AR" # Let the user override the test.
5959else
5960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5961for as_dir in $PATH
5962do
5963 IFS=$as_save_IFS
5964 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005967 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 break 2
5970 fi
5971done
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973IFS=$as_save_IFS
5974
5975fi
5976fi
5977AR=$ac_cv_prog_AR
5978if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5980$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981else
Matthias Kloseb9621712010-04-24 17:59:49 +00005982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5983$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005984fi
5985
5986
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005987 test -n "$AR" && break
5988 done
5989fi
5990if test -z "$AR"; then
5991 ac_ct_AR=$AR
5992 for ac_prog in ar aal
5993do
5994 # Extract the first word of "$ac_prog", so it can be a program name with args.
5995set dummy $ac_prog; ac_word=$2
5996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5997$as_echo_n "checking for $ac_word... " >&6; }
5998if ${ac_cv_prog_ac_ct_AR+:} false; then :
5999 $as_echo_n "(cached) " >&6
6000else
6001 if test -n "$ac_ct_AR"; then
6002 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6003else
6004as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007 IFS=$as_save_IFS
6008 test -z "$as_dir" && as_dir=.
6009 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006010 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006011 ac_cv_prog_ac_ct_AR="$ac_prog"
6012 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013 break 2
6014 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006016 done
6017IFS=$as_save_IFS
6018
6019fi
6020fi
6021ac_ct_AR=$ac_cv_prog_ac_ct_AR
6022if test -n "$ac_ct_AR"; then
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6024$as_echo "$ac_ct_AR" >&6; }
6025else
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6027$as_echo "no" >&6; }
6028fi
6029
6030
6031 test -n "$ac_ct_AR" && break
6032done
6033
6034 if test "x$ac_ct_AR" = x; then
6035 AR="ar"
6036 else
6037 case $cross_compiling:$ac_tool_warned in
6038yes:)
6039{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6040$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6041ac_tool_warned=yes ;;
6042esac
6043 AR=$ac_ct_AR
6044 fi
6045fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046
6047
6048# tweak ARFLAGS only if the user didn't set it on the command line
6049
6050if test -z "$ARFLAGS"
6051then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006052 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053fi
6054
doko@ubuntu.com58844492012-06-30 18:25:32 +02006055if test -n "$ac_tool_prefix"; then
6056 for ac_prog in readelf
6057 do
6058 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6059set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6061$as_echo_n "checking for $ac_word... " >&6; }
6062if ${ac_cv_prog_READELF+:} false; then :
6063 $as_echo_n "(cached) " >&6
6064else
6065 if test -n "$READELF"; then
6066 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6067else
6068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6069for as_dir in $PATH
6070do
6071 IFS=$as_save_IFS
6072 test -z "$as_dir" && as_dir=.
6073 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006075 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6077 break 2
6078 fi
6079done
6080 done
6081IFS=$as_save_IFS
6082
6083fi
6084fi
6085READELF=$ac_cv_prog_READELF
6086if test -n "$READELF"; then
6087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6088$as_echo "$READELF" >&6; }
6089else
6090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091$as_echo "no" >&6; }
6092fi
6093
6094
6095 test -n "$READELF" && break
6096 done
6097fi
6098if test -z "$READELF"; then
6099 ac_ct_READELF=$READELF
6100 for ac_prog in readelf
6101do
6102 # Extract the first word of "$ac_prog", so it can be a program name with args.
6103set dummy $ac_prog; ac_word=$2
6104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
6106if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6107 $as_echo_n "(cached) " >&6
6108else
6109 if test -n "$ac_ct_READELF"; then
6110 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6111else
6112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115 IFS=$as_save_IFS
6116 test -z "$as_dir" && as_dir=.
6117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006119 ac_cv_prog_ac_ct_READELF="$ac_prog"
6120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6121 break 2
6122 fi
6123done
6124 done
6125IFS=$as_save_IFS
6126
6127fi
6128fi
6129ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6130if test -n "$ac_ct_READELF"; then
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6132$as_echo "$ac_ct_READELF" >&6; }
6133else
6134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
6136fi
6137
6138
6139 test -n "$ac_ct_READELF" && break
6140done
6141
6142 if test "x$ac_ct_READELF" = x; then
6143 READELF=":"
6144 else
6145 case $cross_compiling:$ac_tool_warned in
6146yes:)
6147{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6148$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6149ac_tool_warned=yes ;;
6150esac
6151 READELF=$ac_ct_READELF
6152 fi
6153fi
6154
6155if test "$cross_compiling" = yes; then
6156 case "$READELF" in
6157 readelf|:)
6158 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6159 ;;
6160 esac
6161fi
6162
6163
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006166hp*|HP*)
6167 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006168 if test -z "$INSTALL"
6169 then
6170 INSTALL="${srcdir}/install-sh -c"
6171 fi
6172esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173# Find a good install program. We prefer a C program (faster),
6174# so one script is as good as another. But avoid the broken or
6175# incompatible versions:
6176# SysV /etc/install, /usr/sbin/install
6177# SunOS /usr/etc/install
6178# IRIX /sbin/install
6179# AIX /bin/install
6180# AmigaOS /C/install, which installs bootblocks on floppy discs
6181# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6182# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6183# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6184# OS/2's system install, which has a completely different semantic
6185# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186# Reject install programs that cannot install multiple files.
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6188$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006189if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006190if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192else
6193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6194for as_dir in $PATH
6195do
6196 IFS=$as_save_IFS
6197 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006198 # Account for people who put trailing slashes in PATH elements.
6199case $as_dir/ in #((
6200 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006201 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006202 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203 /usr/ucb/* ) ;;
6204 *)
6205 # OSF1 and SCO ODT 3.0 have their own names for install.
6206 # Don't use installbsd from OSF since it installs stuff as root
6207 # by default.
6208 for ac_prog in ginstall scoinst install; do
6209 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006210 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211 if test $ac_prog = install &&
6212 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6213 # AIX install. It has an incompatible calling convention.
6214 :
6215 elif test $ac_prog = install &&
6216 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6217 # program-specific install script used by HP pwplus--don't use.
6218 :
6219 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006220 rm -rf conftest.one conftest.two conftest.dir
6221 echo one > conftest.one
6222 echo two > conftest.two
6223 mkdir conftest.dir
6224 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6225 test -s conftest.one && test -s conftest.two &&
6226 test -s conftest.dir/conftest.one &&
6227 test -s conftest.dir/conftest.two
6228 then
6229 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6230 break 3
6231 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232 fi
6233 fi
6234 done
6235 done
6236 ;;
6237esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006238
6239 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240IFS=$as_save_IFS
6241
Matthias Kloseb9621712010-04-24 17:59:49 +00006242rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006243
6244fi
6245 if test "${ac_cv_path_install+set}" = set; then
6246 INSTALL=$ac_cv_path_install
6247 else
6248 # As a last resort, use the slow shell script. Don't cache a
6249 # value for INSTALL within a source directory, because that will
6250 # break other packages using the cache if that directory is
6251 # removed, or if the value is a relative name.
6252 INSTALL=$ac_install_sh
6253 fi
6254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6256$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257
6258# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6259# It thinks the first close brace ends the variable substitution.
6260test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6261
6262test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6263
6264test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6265
Matthias Klose93a0ef12012-03-15 18:08:34 +01006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6267$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6268if test -z "$MKDIR_P"; then
6269 if ${ac_cv_path_mkdir+:} false; then :
6270 $as_echo_n "(cached) " >&6
6271else
6272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6273for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6274do
6275 IFS=$as_save_IFS
6276 test -z "$as_dir" && as_dir=.
6277 for ac_prog in mkdir gmkdir; do
6278 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006279 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006280 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6281 'mkdir (GNU coreutils) '* | \
6282 'mkdir (coreutils) '* | \
6283 'mkdir (fileutils) '4.1*)
6284 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6285 break 3;;
6286 esac
6287 done
6288 done
6289 done
6290IFS=$as_save_IFS
6291
6292fi
6293
6294 test -d ./--version && rmdir ./--version
6295 if test "${ac_cv_path_mkdir+set}" = set; then
6296 MKDIR_P="$ac_cv_path_mkdir -p"
6297 else
6298 # As a last resort, use the slow shell script. Don't cache a
6299 # value for MKDIR_P within a source directory, because that will
6300 # break other packages using the cache if that directory is
6301 # removed, or if the value is a relative name.
6302 MKDIR_P="$ac_install_sh -d"
6303 fi
6304fi
6305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6306$as_echo "$MKDIR_P" >&6; }
6307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308
6309# Not every filesystem supports hard links
6310
6311if test -z "$LN" ; then
6312 case $ac_sys_system in
6313 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314 *) LN=ln;;
6315 esac
6316fi
6317
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006318# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006319
6320ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006321
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6324$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325
6326# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006327if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328 withval=$with_pydebug;
6329if test "$withval" != no
6330then
6331
Matthias Kloseb9621712010-04-24 17:59:49 +00006332$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6335$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006336 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006337 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006338else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006340fi
6341else
Matthias Kloseb9621712010-04-24 17:59:49 +00006342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6343$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006344fi
6345
6346
T. Woutersddbfa2c2017-05-23 01:30:49 +02006347# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6348# the ABI. This allows enabling assertions without changing the ABI.
6349assertions='false'
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6351$as_echo_n "checking for --with-assertions... " >&6; }
6352
6353# Check whether --with-assertions was given.
6354if test "${with_assertions+set}" = set; then :
6355 withval=$with_assertions;
6356if test "$withval" != no
6357then
6358 assertions='true'
6359fi
6360fi
6361
6362if test "$assertions" = 'true'; then
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6364$as_echo "yes" >&6; }
6365elif test "$Py_DEBUG" = 'true'; then
6366 assertions='true'
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6368$as_echo "implied by --with-pydebug" >&6; }
6369else
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372fi
6373
Brett Cannon63d98bc2016-09-06 17:12:40 -07006374# Enable optimization flags
6375
6376
6377Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6379$as_echo_n "checking for --enable-optimizations... " >&6; }
6380# Check whether --enable-optimizations was given.
6381if test "${enable_optimizations+set}" = set; then :
6382 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006383if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006384then
6385 Py_OPT='true'
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6387$as_echo "yes" >&6; };
6388else
6389 Py_OPT='false'
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6391$as_echo "no" >&6; };
6392fi
6393else
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6395$as_echo "no" >&6; }
6396fi
6397
6398if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006399 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6400 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006401 # 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 +00006402 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006403 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006404 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006405 DEF_MAKE_RULE="build_all"
6406else
6407 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006408 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006409 DEF_MAKE_RULE="all"
6410fi
6411
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006412# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6413# normal names in the default $PATH (ie: Ubuntu). They exist under the
6414# non-suffixed name in their versioned llvm directory.
6415
6416llvm_bin_dir=''
6417llvm_path="${PATH}"
6418if test "${CC}" = "clang"
6419then
6420 clang_bin=`which clang`
6421 # Some systems install clang elsewhere as a symlink to the real path
6422 # which is where the related llvm tools are located.
6423 if test -L "${clang_bin}"
6424 then
6425 clang_dir=`dirname "${clang_bin}"`
6426 clang_bin=`readlink "${clang_bin}"`
6427 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6428 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6429 fi
6430fi
6431
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006432# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6434$as_echo_n "checking for --with-lto... " >&6; }
6435
6436# Check whether --with-lto was given.
6437if test "${with_lto+set}" = set; then :
6438 withval=$with_lto;
6439if test "$withval" != no
6440then
6441 Py_LTO='true'
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6443$as_echo "yes" >&6; };
6444else
6445 Py_LTO='false'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6447$as_echo "no" >&6; };
6448fi
6449else
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454if test "$Py_LTO" = 'true' ; then
6455 case $CC in
6456 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006457
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006459$as_echo_n "checking target system type... " >&6; }
6460if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006461 $as_echo_n "(cached) " >&6
6462else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006463 if test "x$target_alias" = x; then
6464 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006465else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006466 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6467 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6468fi
6469
6470fi
6471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6472$as_echo "$ac_cv_target" >&6; }
6473case $ac_cv_target in
6474*-*-*) ;;
6475*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6476esac
6477target=$ac_cv_target
6478ac_save_IFS=$IFS; IFS='-'
6479set x $ac_cv_target
6480shift
6481target_cpu=$1
6482target_vendor=$2
6483shift; shift
6484# Remember, the first character of IFS is used to create $*,
6485# except with old shells:
6486target_os=$*
6487IFS=$ac_save_IFS
6488case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6489
6490
6491# The aliases save the names the user supplied, while $host etc.
6492# will get canonicalized.
6493test -n "$target_alias" &&
6494 test "$program_prefix$program_suffix$program_transform_name" = \
6495 NONENONEs,x,x, &&
6496 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006497# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6498set dummy $target_alias-llvm-ar; ac_word=$2
6499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6500$as_echo_n "checking for $ac_word... " >&6; }
6501if ${ac_cv_path_LLVM_AR+:} false; then :
6502 $as_echo_n "(cached) " >&6
6503else
6504 case $LLVM_AR in
6505 [\\/]* | ?:[\\/]*)
6506 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6507 ;;
6508 *)
6509 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6510for as_dir in ${llvm_path}
6511do
6512 IFS=$as_save_IFS
6513 test -z "$as_dir" && as_dir=.
6514 for ac_exec_ext in '' $ac_executable_extensions; do
6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6516 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6518 break 2
6519 fi
6520done
6521 done
6522IFS=$as_save_IFS
6523
6524 ;;
6525esac
6526fi
6527LLVM_AR=$ac_cv_path_LLVM_AR
6528if test -n "$LLVM_AR"; then
6529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6530$as_echo "$LLVM_AR" >&6; }
6531else
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
6534fi
6535
6536
6537if test -z "$ac_cv_path_LLVM_AR"; then
6538 if test "$build" = "$target"; then
6539 ac_pt_LLVM_AR=$LLVM_AR
6540 # Extract the first word of "llvm-ar", so it can be a program name with args.
6541set dummy llvm-ar; ac_word=$2
6542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6543$as_echo_n "checking for $ac_word... " >&6; }
6544if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6545 $as_echo_n "(cached) " >&6
6546else
6547 case $ac_pt_LLVM_AR in
6548 [\\/]* | ?:[\\/]*)
6549 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6550 ;;
6551 *)
6552 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6553for as_dir in ${llvm_path}
6554do
6555 IFS=$as_save_IFS
6556 test -z "$as_dir" && as_dir=.
6557 for ac_exec_ext in '' $ac_executable_extensions; do
6558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6559 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6561 break 2
6562 fi
6563done
6564 done
6565IFS=$as_save_IFS
6566
6567 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6568 ;;
6569esac
6570fi
6571ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6572if test -n "$ac_pt_LLVM_AR"; then
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6574$as_echo "$ac_pt_LLVM_AR" >&6; }
6575else
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6577$as_echo "no" >&6; }
6578fi
6579
6580 LLVM_AR=$ac_pt_LLVM_AR
6581 else
6582 LLVM_AR="''"
6583 fi
6584else
6585 LLVM_AR="$ac_cv_path_LLVM_AR"
6586fi
6587
6588
6589 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6590 then
6591 LLVM_AR_FOUND="found"
6592 else
6593 LLVM_AR_FOUND="not-found"
6594 fi
6595 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6596 then
6597 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6598 if test -n "${found_llvm_ar}"
6599 then
6600 LLVM_AR='/usr/bin/xcrun llvm-ar'
6601 LLVM_AR_FOUND=found
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6603$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6604 fi
6605 fi
6606 if test $LLVM_AR_FOUND = not-found
6607 then
6608 LLVM_PROFR_ERR=yes
6609 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6610 else
6611 LLVM_AR_ERR=no
6612 fi
6613 AR="${LLVM_AR}"
6614 case $ac_sys_system in
6615 Darwin*)
6616 # Any changes made here should be reflected in the GCC+Darwin case below
6617 LTOFLAGS="-flto -Wl,-export_dynamic"
6618 ;;
6619 *)
6620 LTOFLAGS="-flto"
6621 ;;
6622 esac
6623 ;;
6624 *gcc*)
6625 case $ac_sys_system in
6626 Darwin*)
6627 LTOFLAGS="-flto -Wl,-export_dynamic"
6628 ;;
6629 *)
6630 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6631 ;;
6632 esac
6633 ;;
6634 esac
6635
6636 if test "$ac_cv_prog_cc_g" = "yes"
6637 then
6638 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6639 # to get debug symbols.
6640 LTOFLAGS="$LTOFLAGS -g"
6641 fi
6642
stratakisf92c7aa2018-12-04 15:54:01 +01006643 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006644 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006645fi
6646
6647# Enable PGO flags.
6648
6649
6650
6651
6652
6653
Gregory P. Smith799520c2016-09-07 16:10:00 -07006654# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6655set dummy $target_alias-llvm-profdata; ac_word=$2
6656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6657$as_echo_n "checking for $ac_word... " >&6; }
6658if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6659 $as_echo_n "(cached) " >&6
6660else
6661 case $LLVM_PROFDATA in
6662 [\\/]* | ?:[\\/]*)
6663 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6664 ;;
6665 *)
6666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6667for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006668do
6669 IFS=$as_save_IFS
6670 test -z "$as_dir" && as_dir=.
6671 for ac_exec_ext in '' $ac_executable_extensions; do
6672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6675 break 2
6676 fi
6677done
6678 done
6679IFS=$as_save_IFS
6680
Gregory P. Smith799520c2016-09-07 16:10:00 -07006681 ;;
6682esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006684LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6685if test -n "$LLVM_PROFDATA"; then
6686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6687$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006688else
6689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6690$as_echo "no" >&6; }
6691fi
6692
6693
Gregory P. Smith799520c2016-09-07 16:10:00 -07006694if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6695 if test "$build" = "$target"; then
6696 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6697 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6698set dummy llvm-profdata; ac_word=$2
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6700$as_echo_n "checking for $ac_word... " >&6; }
6701if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6702 $as_echo_n "(cached) " >&6
6703else
6704 case $ac_pt_LLVM_PROFDATA in
6705 [\\/]* | ?:[\\/]*)
6706 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6707 ;;
6708 *)
6709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6710for as_dir in ${llvm_path}
6711do
6712 IFS=$as_save_IFS
6713 test -z "$as_dir" && as_dir=.
6714 for ac_exec_ext in '' $ac_executable_extensions; do
6715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6716 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6718 break 2
6719 fi
6720done
6721 done
6722IFS=$as_save_IFS
6723
6724 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6725 ;;
6726esac
6727fi
6728ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6729if test -n "$ac_pt_LLVM_PROFDATA"; then
6730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6731$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6732else
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6734$as_echo "no" >&6; }
6735fi
6736
6737 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6738 else
6739 LLVM_PROFDATA="''"
6740 fi
6741else
6742 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6743fi
6744
6745
6746if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6747then
6748 LLVM_PROF_FOUND="found"
6749else
6750 LLVM_PROF_FOUND="not-found"
6751fi
6752if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6753then
6754 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6755 if test -n "${found_llvm_profdata}"
6756 then
6757 # llvm-profdata isn't directly in $PATH in some cases.
6758 # https://apple.stackexchange.com/questions/197053/
6759 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6760 LLVM_PROF_FOUND=found
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6762$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6763 fi
6764fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006765LLVM_PROF_ERR=no
6766case $CC in
6767 *clang*)
6768 # Any changes made here should be reflected in the GCC+Darwin case below
6769 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6770 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006771 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006772 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6773 if test $LLVM_PROF_FOUND = not-found
6774 then
6775 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 if test "${REQUIRE_PGO}" = "yes"
6777 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006778 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 -07006779 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780 fi
6781 ;;
6782 *gcc*)
6783 case $ac_sys_system in
6784 Darwin*)
6785 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6786 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006787 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006788 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006790 then
6791 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006792 if test "${REQUIRE_PGO}" = "yes"
6793 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006794 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 -07006795 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006796 fi
6797 ;;
6798 *)
6799 PGO_PROF_GEN_FLAG="-fprofile-generate"
6800 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6801 LLVM_PROF_MERGER="true"
6802 LLVM_PROF_FILE=""
6803 ;;
6804 esac
6805 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006806 *icc*)
6807 PGO_PROF_GEN_FLAG="-prof-gen"
6808 PGO_PROF_USE_FLAG="-prof-use"
6809 LLVM_PROF_MERGER="true"
6810 LLVM_PROF_FILE=""
6811 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006812esac
6813
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006814# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6815# merged with this chunk of code?
6816
6817# Optimizer/debugger flags
6818# ------------------------
6819# (The following bit of code is complicated enough - please keep things
6820# indented properly. Just pretend you're editing Python code. ;-)
6821
6822# There are two parallel sets of case statements below, one that checks to
6823# see if OPT was set and one that does BASECFLAGS setting based upon
6824# compiler and platform. BASECFLAGS tweaks need to be made even if the
6825# user set OPT.
6826
6827# tweak OPT based on compiler and platform, only if the user didn't set
6828# it on the command line
6829
Victor Stinner9ed34a82017-05-02 22:35:58 +02006830
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006831if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832then
6833 case $GCC in
6834 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6836 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6837 WRAP="-fwrapv"
6838 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006839
Stefan Krahaf04ff22011-12-08 22:20:31 +01006840 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006841 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006842 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006843 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006851 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006852
Victor Stinner35f3d242017-04-21 12:35:24 +02006853 if test -n "${cc_is_clang}"
6854 then
6855 # Clang also needs -fwrapv
6856 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006857 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6858 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006859 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006860 fi
6861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006862 case $ac_cv_prog_cc_g in
6863 yes)
6864 if test "$Py_DEBUG" = 'true' ; then
6865 # Optimization messes up debuggers, so turn it off for
6866 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006867 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006868 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006869 else
Victor Stinner28205b22017-04-21 11:24:34 +02006870 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006871 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872 else
Victor Stinner28205b22017-04-21 11:24:34 +02006873 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874 fi
6875 ;;
6876 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006877 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006878 ;;
6879 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881 case $ac_sys_system in
6882 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6883 ;;
6884 esac
6885 ;;
6886
6887 *)
6888 OPT="-O"
6889 ;;
6890 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891fi
6892
6893
6894
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006895
stratakiscf10a752018-12-19 18:19:01 +01006896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897# The -arch flags for universal builds on OSX
6898UNIVERSAL_ARCH_FLAGS=
6899
6900
6901# tweak BASECFLAGS based on compiler and platform
6902case $GCC in
6903yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006904 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006905
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6907$as_echo_n "checking for -Wextra... " >&6; }
6908 ac_save_cc="$CC"
6909 CC="$CC -Wextra -Werror"
6910 if ${ac_cv_extra_warnings+:} false; then :
6911 $as_echo_n "(cached) " >&6
6912else
6913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6914/* end confdefs.h. */
6915
6916
6917int
6918main ()
6919{
6920
6921 ;
6922 return 0;
6923}
6924
6925_ACEOF
6926if ac_fn_c_try_compile "$LINENO"; then :
6927
6928 ac_cv_extra_warnings=yes
6929
6930else
6931
6932 ac_cv_extra_warnings=no
6933
6934fi
6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936fi
6937
6938 CC="$ac_save_cc"
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6940$as_echo "$ac_cv_extra_warnings" >&6; }
6941
6942 if test $ac_cv_extra_warnings = yes
6943 then
6944 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6945 fi
6946
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006947 # Python doesn't violate C99 aliasing rules, but older versions of
6948 # GCC produce warnings for legal Python code. Enable
6949 # -fno-strict-aliasing on versions of GCC that support but produce
6950 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6952$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953 ac_save_cc="$CC"
6954 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006956 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006957 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006958else
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006960/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006961
Matthias Kloseb159a552010-04-25 21:00:44 +00006962
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006963int
6964main ()
6965{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006966
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006967 ;
6968 return 0;
6969}
Matthias Kloseb159a552010-04-25 21:00:44 +00006970
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006972if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006973
6974 CC="$ac_save_cc -fstrict-aliasing"
6975 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006977/* end confdefs.h. */
6978
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006979 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980int
6981main ()
6982{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006983double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984 ;
6985 return 0;
6986}
Matthias Kloseb159a552010-04-25 21:00:44 +00006987
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006989if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006990
6991 ac_cv_no_strict_aliasing=no
6992
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993else
Matthias Kloseb159a552010-04-25 21:00:44 +00006994
6995 ac_cv_no_strict_aliasing=yes
6996
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006997fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006999
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007000else
Matthias Kloseb159a552010-04-25 21:00:44 +00007001
7002 ac_cv_no_strict_aliasing=no
7003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007006fi
7007
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007008 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007009 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7011$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013 then
7014 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7015 fi
7016
Zachary Ware5af85642015-12-21 12:09:17 -06007017 # ICC doesn't recognize the option, but only emits a warning
7018 ## XXX does it emit an unused result warning and can it be disabled?
7019 case "$CC" in
7020 *icc*)
7021 ac_cv_disable_unused_result_warning=no
7022 ;;
7023 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7025$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7026 ac_save_cc="$CC"
7027 CC="$CC -Wunused-result -Werror"
7028 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007029 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007030 $as_echo_n "(cached) " >&6
7031else
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033/* end confdefs.h. */
7034
7035
7036int
7037main ()
7038{
7039
7040 ;
7041 return 0;
7042}
7043
7044_ACEOF
7045if ac_fn_c_try_compile "$LINENO"; then :
7046
7047 ac_cv_disable_unused_result_warning=yes
7048
7049else
7050
7051 ac_cv_disable_unused_result_warning=no
7052
7053fi
7054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055fi
7056
7057 CFLAGS="$save_CFLAGS"
7058 CC="$ac_save_cc"
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7060$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007061 ;;
7062 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007063
7064 if test $ac_cv_disable_unused_result_warning = yes
7065 then
7066 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007067 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7068 fi
7069
7070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7071$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7072 ac_save_cc="$CC"
7073 CC="$CC -Wunused-parameter -Werror"
7074 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7075 $as_echo_n "(cached) " >&6
7076else
7077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7078/* end confdefs.h. */
7079
7080
7081int
7082main ()
7083{
7084
7085 ;
7086 return 0;
7087}
7088
7089_ACEOF
7090if ac_fn_c_try_compile "$LINENO"; then :
7091
7092 ac_cv_disable_unused_parameter_warning=yes
7093
7094else
7095
7096 ac_cv_disable_unused_parameter_warning=no
7097
7098fi
7099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7100fi
7101
7102 CC="$ac_save_cc"
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7104$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7105
7106 if test $ac_cv_disable_unused_parameter_warning = yes
7107 then
7108 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7109 fi
7110
7111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7112$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7113 ac_save_cc="$CC"
7114 CC="$CC -Wmissing-field-initializers -Werror"
7115 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7116 $as_echo_n "(cached) " >&6
7117else
7118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7119/* end confdefs.h. */
7120
7121
7122int
7123main ()
7124{
7125
7126 ;
7127 return 0;
7128}
7129
7130_ACEOF
7131if ac_fn_c_try_compile "$LINENO"; then :
7132
7133 ac_cv_disable_missing_field_initializers=yes
7134
7135else
7136
7137 ac_cv_disable_missing_field_initializers=no
7138
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141fi
7142
7143 CC="$ac_save_cc"
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7145$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7146
7147 if test $ac_cv_disable_missing_field_initializers = yes
7148 then
7149 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007150 fi
7151
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7153$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7154 ac_save_cc="$CC"
7155 CC="$CC -Wsign-compare"
7156 save_CFLAGS="$CFLAGS"
7157 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7158 $as_echo_n "(cached) " >&6
7159else
7160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7161/* end confdefs.h. */
7162
7163
7164int
7165main ()
7166{
7167
7168 ;
7169 return 0;
7170}
7171
7172_ACEOF
7173if ac_fn_c_try_compile "$LINENO"; then :
7174
7175 ac_cv_enable_sign_compare_warning=yes
7176
7177else
7178
7179 ac_cv_enable_sign_compare_warning=no
7180
7181fi
7182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7183fi
7184
7185 CFLAGS="$save_CFLAGS"
7186 CC="$ac_save_cc"
7187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7188$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7189
7190 if test $ac_cv_enable_sign_compare_warning = yes
7191 then
7192 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7193 fi
7194
7195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7196$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7197 ac_save_cc="$CC"
7198 CC="$CC -Wunreachable-code"
7199 save_CFLAGS="$CFLAGS"
7200 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7201 $as_echo_n "(cached) " >&6
7202else
7203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204/* end confdefs.h. */
7205
7206
7207int
7208main ()
7209{
7210
7211 ;
7212 return 0;
7213}
7214
7215_ACEOF
7216if ac_fn_c_try_compile "$LINENO"; then :
7217
7218 ac_cv_enable_unreachable_code_warning=yes
7219
7220else
7221
7222 ac_cv_enable_unreachable_code_warning=no
7223
7224fi
7225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7226fi
7227
7228 CFLAGS="$save_CFLAGS"
7229 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007230
7231 # Don't enable unreachable code warning in debug mode, since it usually
7232 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007233 # Issue #24324: Unfortunately, the unreachable code warning does not work
7234 # correctly on gcc and has been silently removed from the compiler.
7235 # It is supported on clang but on OS X systems gcc may be an alias
7236 # for clang. Try to determine if the compiler is not really gcc and,
7237 # if so, only then enable the warning.
7238 if test $ac_cv_enable_unreachable_code_warning = yes && \
7239 test "$Py_DEBUG" != "true" && \
7240 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007241 then
7242 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007243 else
7244 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007245 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7247$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007248
INADA Naokie3364842018-06-05 20:40:53 +09007249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7250$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7251 ac_save_cc="$CC"
7252 CC="$CC -Werror -Wstrict-prototypes"
7253 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7254 $as_echo_n "(cached) " >&6
7255else
7256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7257/* end confdefs.h. */
7258
7259
7260int
7261main ()
7262{
7263
7264 ;
7265 return 0;
7266}
7267
7268_ACEOF
7269if ac_fn_c_try_compile "$LINENO"; then :
7270
7271 ac_cv_enable_strict_prototypes_warning=yes
7272
7273else
7274
7275 ac_cv_enable_strict_prototypes_warning=no
7276
7277fi
7278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7279fi
7280
7281 CC="$ac_save_cc"
7282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7283$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7284
7285 if test $ac_cv_enable_strict_prototypes_warning = yes
7286 then
7287 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7288 fi
7289
Victor Stinner193ee0a2017-02-06 14:24:00 +01007290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7291$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7292 ac_save_cc="$CC"
7293 CC="$CC -Werror=implicit-function-declaration"
7294 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7295 $as_echo_n "(cached) " >&6
7296else
7297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7298/* end confdefs.h. */
7299
7300
7301int
7302main ()
7303{
7304
7305 ;
7306 return 0;
7307}
7308
7309_ACEOF
7310if ac_fn_c_try_compile "$LINENO"; then :
7311
7312 ac_cv_enable_implicit_function_declaration_error=yes
7313
7314else
7315
7316 ac_cv_enable_implicit_function_declaration_error=no
7317
7318fi
7319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7320fi
7321
7322 CC="$ac_save_cc"
7323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7324$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7325
7326 if test $ac_cv_enable_implicit_function_declaration_error = yes
7327 then
7328 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7329 fi
7330
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007331 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7332 # support. Without this, treatment of subnormals doesn't follow
7333 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007334 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335 alpha*)
7336 BASECFLAGS="$BASECFLAGS -mieee"
7337 ;;
7338 esac
7339
7340 case $ac_sys_system in
7341 SCO_SV*)
7342 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7343 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007344
Ned Deily87adb6e2013-10-18 21:09:56 -07007345 Darwin*)
7346 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7347 # used to be here, but non-Apple gcc doesn't accept them.
7348 if test "${CC}" = gcc
7349 then
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007351$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007352 case "${UNIVERSALSDK}" in
7353 */MacOSX10.4u.sdk)
7354 # Build using 10.4 SDK, force usage of gcc when the
7355 # compiler is gcc, otherwise the user will get very
7356 # confusing error messages when building on OSX 10.6
7357 CC=gcc-4.0
7358 CPP=cpp-4.0
7359 ;;
7360 esac
7361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007362$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007363 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364
Ned Deily87adb6e2013-10-18 21:09:56 -07007365 if test "${enable_universalsdk}"
7366 then
7367 case "$UNIVERSAL_ARCHS" in
7368 32-bit)
7369 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7370 LIPO_32BIT_FLAGS=""
7371 ARCH_RUN_32BIT=""
7372 ;;
7373 64-bit)
7374 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7375 LIPO_32BIT_FLAGS=""
7376 ARCH_RUN_32BIT="true"
7377 ;;
7378 all)
7379 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7380 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7381 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7382 ;;
7383 intel)
7384 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7385 LIPO_32BIT_FLAGS="-extract i386"
7386 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7387 ;;
7388 intel-32)
7389 UNIVERSAL_ARCH_FLAGS="-arch i386"
7390 LIPO_32BIT_FLAGS=""
7391 ARCH_RUN_32BIT=""
7392 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007393 intel-64)
7394 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7395 LIPO_32BIT_FLAGS=""
7396 ARCH_RUN_32BIT="true"
7397 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007398 3-way)
7399 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7400 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7401 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7402 ;;
7403 *)
7404 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7405 ;;
7406 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007407
Ned Deily87adb6e2013-10-18 21:09:56 -07007408 if test "${UNIVERSALSDK}" != "/"
7409 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007410 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7411 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007412 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007413 else
7414 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7415 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007416 fi
7417 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007418
Ned Deily87adb6e2013-10-18 21:09:56 -07007419 # Calculate an appropriate deployment target for this build:
7420 # The deployment target value is used explicitly to enable certain
7421 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007422 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 # component of the string returned by distutils.get_platform().
7424 #
7425 # Use the value from:
7426 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7427 # 2. the operating system version of the build machine if >= 10.6
7428 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7429 # below to pick either 10.3, 10.4, or 10.5 as the target.
7430 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431
Ned Deily87adb6e2013-10-18 21:09:56 -07007432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7433$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007434 cur_target_major=`sw_vers -productVersion | \
7435 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7436 cur_target_minor=`sw_vers -productVersion | \
7437 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7438 cur_target="${cur_target_major}.${cur_target_minor}"
7439 if test ${cur_target_major} -eq 10 && \
7440 test ${cur_target_minor} -ge 3 && \
7441 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007442 then
Ned Deily36820b62014-06-25 13:44:22 -07007443 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007444 cur_target=10.3
7445 if test ${enable_universalsdk}
7446 then
7447 case "$UNIVERSAL_ARCHS" in
7448 all|3-way|intel|64-bit)
7449 # These configurations were first supported in 10.5
7450 cur_target='10.5'
7451 ;;
7452 esac
7453 else
7454 if test `/usr/bin/arch` = "i386"
7455 then
7456 # 10.4 was the first release to support Intel archs
7457 cur_target="10.4"
7458 fi
7459 fi
7460 fi
7461 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007462
Ned Deily87adb6e2013-10-18 21:09:56 -07007463 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7464 # environment with a value that is the same as what we'll use
7465 # in the Makefile to ensure that we'll get the same compiler
7466 # environment during configure and build time.
7467 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7468 export MACOSX_DEPLOYMENT_TARGET
7469 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7471$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007472
Ned Deily87adb6e2013-10-18 21:09:56 -07007473 # end of Darwin* tests
7474 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475 esac
7476 ;;
7477
7478*)
7479 case $ac_sys_system in
7480 OpenUNIX*|UnixWare*)
7481 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7482 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483 SCO_SV*)
7484 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7485 ;;
7486 esac
7487 ;;
7488esac
7489
Zachary Ware5af85642015-12-21 12:09:17 -06007490# ICC needs -fp-model strict or floats behave badly
7491case "$CC" in
7492*icc*)
7493 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7494 ;;
7495esac
7496
T. Woutersddbfa2c2017-05-23 01:30:49 +02007497if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 :
7499else
7500 OPT="-DNDEBUG $OPT"
7501fi
7502
7503if test "$ac_arch_flags"
7504then
7505 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7506fi
7507
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508# On some compilers, pthreads are available without further options
7509# (e.g. MacOS X). On some of these systems, the compiler will not
7510# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7511# So we have to see first whether pthreads are available without
7512# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7514$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007515if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007516 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007517else
Matthias Kloseb9621712010-04-24 17:59:49 +00007518 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007519 ac_cv_pthread_is_default=no
7520else
Matthias Kloseb9621712010-04-24 17:59:49 +00007521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522/* end confdefs.h. */
7523
Stefan Krah7dba5942012-11-22 22:49:11 +01007524#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525#include <pthread.h>
7526
7527void* routine(void* p){return NULL;}
7528
7529int main(){
7530 pthread_t p;
7531 if(pthread_create(&p,NULL,routine,NULL)!=0)
7532 return 1;
7533 (void)pthread_detach(p);
7534 return 0;
7535}
7536
7537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007538if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539
7540 ac_cv_pthread_is_default=yes
7541 ac_cv_kthread=no
7542 ac_cv_pthread=no
7543
7544else
Matthias Kloseb9621712010-04-24 17:59:49 +00007545 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007549fi
7550
7551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552fi
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7555$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556
7557
7558if test $ac_cv_pthread_is_default = yes
7559then
7560 ac_cv_kpthread=no
7561else
7562# -Kpthread, if available, provides the right #defines
7563# and linker options to make pthread_create available
7564# Some compilers won't report that they do not support -Kpthread,
7565# so we need to run a program to see whether it really made the
7566# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7568$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007569if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007570 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571else
7572 ac_save_cc="$CC"
7573CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007574if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575 ac_cv_kpthread=no
7576else
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578/* end confdefs.h. */
7579
Stefan Krah7dba5942012-11-22 22:49:11 +01007580#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007581#include <pthread.h>
7582
7583void* routine(void* p){return NULL;}
7584
7585int main(){
7586 pthread_t p;
7587 if(pthread_create(&p,NULL,routine,NULL)!=0)
7588 return 1;
7589 (void)pthread_detach(p);
7590 return 0;
7591}
7592
7593_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007594if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007595 ac_cv_kpthread=yes
7596else
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007601fi
7602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007603CC="$ac_save_cc"
7604fi
7605
Matthias Kloseb9621712010-04-24 17:59:49 +00007606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7607$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608fi
7609
7610if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7611then
7612# -Kthread, if available, provides the right #defines
7613# and linker options to make pthread_create available
7614# Some compilers won't report that they do not support -Kthread,
7615# so we need to run a program to see whether it really made the
7616# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7618$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007619if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007620 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621else
7622 ac_save_cc="$CC"
7623CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625 ac_cv_kthread=no
7626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628/* end confdefs.h. */
7629
Stefan Krah7dba5942012-11-22 22:49:11 +01007630#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631#include <pthread.h>
7632
7633void* routine(void* p){return NULL;}
7634
7635int main(){
7636 pthread_t p;
7637 if(pthread_create(&p,NULL,routine,NULL)!=0)
7638 return 1;
7639 (void)pthread_detach(p);
7640 return 0;
7641}
7642
7643_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007644if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007645 ac_cv_kthread=yes
7646else
Matthias Kloseb9621712010-04-24 17:59:49 +00007647 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7650 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007651fi
7652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007653CC="$ac_save_cc"
7654fi
7655
Matthias Kloseb9621712010-04-24 17:59:49 +00007656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7657$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658fi
7659
7660if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7661then
7662# -pthread, if available, provides the right #defines
7663# and linker options to make pthread_create available
7664# Some compilers won't report that they do not support -pthread,
7665# so we need to run a program to see whether it really made the
7666# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7668$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007669if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007671else
7672 ac_save_cc="$CC"
7673CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007674if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675 ac_cv_pthread=no
7676else
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678/* end confdefs.h. */
7679
Stefan Krah7dba5942012-11-22 22:49:11 +01007680#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681#include <pthread.h>
7682
7683void* routine(void* p){return NULL;}
7684
7685int main(){
7686 pthread_t p;
7687 if(pthread_create(&p,NULL,routine,NULL)!=0)
7688 return 1;
7689 (void)pthread_detach(p);
7690 return 0;
7691}
7692
7693_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007694if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007695 ac_cv_pthread=yes
7696else
Matthias Kloseb9621712010-04-24 17:59:49 +00007697 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007699rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7700 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701fi
7702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007703CC="$ac_save_cc"
7704fi
7705
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7707$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708fi
7709
7710# If we have set a CC compiler flag for thread support then
7711# check if it works for CXX, too.
7712ac_cv_cxx_thread=no
7713if test ! -z "$CXX"
7714then
Matthias Kloseb9621712010-04-24 17:59:49 +00007715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7716$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717ac_save_cxx="$CXX"
7718
7719if test "$ac_cv_kpthread" = "yes"
7720then
7721 CXX="$CXX -Kpthread"
7722 ac_cv_cxx_thread=yes
7723elif test "$ac_cv_kthread" = "yes"
7724then
7725 CXX="$CXX -Kthread"
7726 ac_cv_cxx_thread=yes
7727elif test "$ac_cv_pthread" = "yes"
7728then
7729 CXX="$CXX -pthread"
7730 ac_cv_cxx_thread=yes
7731fi
7732
7733if test $ac_cv_cxx_thread = yes
7734then
7735 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7736 $CXX -c conftest.$ac_ext 2>&5
7737 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7738 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7739 then
7740 ac_cv_cxx_thread=yes
7741 else
7742 ac_cv_cxx_thread=no
7743 fi
7744 rm -fr conftest*
7745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7747$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748fi
7749CXX="$ac_save_cxx"
7750
7751
7752# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7754$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007759/* end confdefs.h. */
7760#include <stdlib.h>
7761#include <stdarg.h>
7762#include <string.h>
7763#include <float.h>
7764
7765int
7766main ()
7767{
7768
7769 ;
7770 return 0;
7771}
7772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007773if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774 ac_cv_header_stdc=yes
7775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7779
7780if test $ac_cv_header_stdc = yes; then
7781 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007783/* end confdefs.h. */
7784#include <string.h>
7785
7786_ACEOF
7787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007788 $EGREP "memchr" >/dev/null 2>&1; then :
7789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790else
7791 ac_cv_header_stdc=no
7792fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007793rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794
7795fi
7796
7797if test $ac_cv_header_stdc = yes; then
7798 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007800/* end confdefs.h. */
7801#include <stdlib.h>
7802
7803_ACEOF
7804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 $EGREP "free" >/dev/null 2>&1; then :
7806
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807else
7808 ac_cv_header_stdc=no
7809fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007810rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811
7812fi
7813
7814if test $ac_cv_header_stdc = yes; then
7815 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007816 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007817 :
7818else
Matthias Kloseb9621712010-04-24 17:59:49 +00007819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007820/* end confdefs.h. */
7821#include <ctype.h>
7822#include <stdlib.h>
7823#if ((' ' & 0x0FF) == 0x020)
7824# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7825# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7826#else
7827# define ISLOWER(c) \
7828 (('a' <= (c) && (c) <= 'i') \
7829 || ('j' <= (c) && (c) <= 'r') \
7830 || ('s' <= (c) && (c) <= 'z'))
7831# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7832#endif
7833
7834#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7835int
7836main ()
7837{
7838 int i;
7839 for (i = 0; i < 256; i++)
7840 if (XOR (islower (i), ISLOWER (i))
7841 || toupper (i) != TOUPPER (i))
7842 return 2;
7843 return 0;
7844}
7845_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007846if ac_fn_c_try_run "$LINENO"; then :
7847
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007848else
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007853fi
7854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007855fi
7856fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7858$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859if test $ac_cv_header_stdc = yes; then
7860
Matthias Kloseb9621712010-04-24 17:59:49 +00007861$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007862
7863fi
7864
stratakise768c862018-01-23 16:11:24 +01007865for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007866fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007867ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007868sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007869utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007870poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007871sys/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 +01007872sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007873sys/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 +01007874sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007875sys/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 -07007876libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007877linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007878sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007879do :
7880 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7881ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007882if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007883 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007884#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007885_ACEOF
7886
7887fi
7888
Guido van Rossum627b2d71993-12-24 10:39:16 +00007889done
7890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007892for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7895$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007896if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007900/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007901#include <sys/types.h>
7902#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904int
7905main ()
7906{
7907if ((DIR *) 0)
7908return 0;
7909 ;
7910 return 0;
7911}
7912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007913if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007914 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007915else
Matthias Kloseb9621712010-04-24 17:59:49 +00007916 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007920eval ac_res=\$$as_ac_Header
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7922$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007923if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007924 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007925#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007926_ACEOF
7927
7928ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007929fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007930
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007931done
7932# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7933if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7935$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007936if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007937 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007938else
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007943/* Override any GCC internal prototype to avoid an error.
7944 Use char because int might match the return type of a GCC
7945 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946#ifdef __cplusplus
7947extern "C"
7948#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007949char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007950int
7951main ()
7952{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007953return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ;
7955 return 0;
7956}
7957_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958for ac_lib in '' dir; do
7959 if test -z "$ac_lib"; then
7960 ac_res="none required"
7961 else
7962 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007964 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007966 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968rm -f core conftest.err conftest.$ac_objext \
7969 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007970 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007971 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973done
Victor Stinnere0be4232011-10-25 13:06:09 +02007974if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976else
7977 ac_cv_search_opendir=no
7978fi
7979rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007980LIBS=$ac_func_search_save_LIBS
7981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7983$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007984ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007985if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007988fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
Michael W. Hudson54241132001-12-07 15:38:26 +00007990else
Matthias Kloseb9621712010-04-24 17:59:49 +00007991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7992$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007993if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007994 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007995else
7996 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008000/* Override any GCC internal prototype to avoid an error.
8001 Use char because int might match the return type of a GCC
8002 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003#ifdef __cplusplus
8004extern "C"
8005#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008006char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008007int
8008main ()
8009{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008010return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ;
8012 return 0;
8013}
8014_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015for ac_lib in '' x; do
8016 if test -z "$ac_lib"; then
8017 ac_res="none required"
8018 else
8019 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008020 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008021 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008025rm -f core conftest.err conftest.$ac_objext \
8026 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008027 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008028 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030done
Victor Stinnere0be4232011-10-25 13:06:09 +02008031if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033else
8034 ac_cv_search_opendir=no
8035fi
8036rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008037LIBS=$ac_func_search_save_LIBS
8038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8040$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008042if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008045fi
8046
8047fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8050$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008051if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008052 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008053else
Matthias Kloseb9621712010-04-24 17:59:49 +00008054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008055/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008056#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008057int
8058main ()
8059{
8060return makedev(0, 0);
8061 ;
8062 return 0;
8063}
8064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008066 ac_cv_header_sys_types_h_makedev=yes
8067else
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070rm -f core conftest.err conftest.$ac_objext \
8071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008072
8073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8075$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008076
8077if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008078ac_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 +02008079if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008080
Matthias Kloseb9621712010-04-24 17:59:49 +00008081$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008082
8083fi
8084
8085
8086
8087 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008088 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 +02008089if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008092
8093fi
8094
8095
8096 fi
8097fi
8098
Michael W. Hudson54241132001-12-07 15:38:26 +00008099
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008100# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8101# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8102SAVE_CFLAGS=$CFLAGS
8103CFLAGS="-std=c99 $CFLAGS"
8104for ac_header in bluetooth/bluetooth.h
8105do :
8106 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8107if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8108 cat >>confdefs.h <<_ACEOF
8109#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8110_ACEOF
8111
8112fi
8113
8114done
8115
8116CFLAGS=$SAVE_CFLAGS
8117
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008118# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8119for ac_header in net/if.h
8120do :
8121 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8122#ifdef STDC_HEADERS
8123# include <stdlib.h>
8124# include <stddef.h>
8125#else
8126# ifdef HAVE_STDLIB_H
8127# include <stdlib.h>
8128# endif
8129#endif
8130#ifdef HAVE_SYS_SOCKET_H
8131# include <sys/socket.h>
8132#endif
8133
8134"
Victor Stinnere0be4232011-10-25 13:06:09 +02008135if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008136 cat >>confdefs.h <<_ACEOF
8137#define HAVE_NET_IF_H 1
8138_ACEOF
8139
8140fi
8141
8142done
8143
8144
Martin v. Löwis11017b12006-01-14 18:12:57 +00008145# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008146for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008147do :
8148 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 +00008149#ifdef HAVE_ASM_TYPES_H
8150#include <asm/types.h>
8151#endif
8152#ifdef HAVE_SYS_SOCKET_H
8153#include <sys/socket.h>
8154#endif
8155
Matthias Kloseb9621712010-04-24 17:59:49 +00008156"
Victor Stinnere0be4232011-10-25 13:06:09 +02008157if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008158 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008159#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008160_ACEOF
8161
8162fi
8163
8164done
8165
8166
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008167# On Linux, qrtr.h requires asm/types.h
8168for ac_header in linux/qrtr.h
8169do :
8170 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8171#ifdef HAVE_ASM_TYPES_H
8172#include <asm/types.h>
8173#endif
8174#ifdef HAVE_SYS_SOCKET_H
8175#include <sys/socket.h>
8176#endif
8177
8178"
8179if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8180 cat >>confdefs.h <<_ACEOF
8181#define HAVE_LINUX_QRTR_H 1
8182_ACEOF
8183
8184fi
8185
8186done
8187
8188
caaveryeffc12f2017-09-06 18:18:10 -04008189for ac_header in linux/vm_sockets.h
8190do :
8191 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8192#ifdef HAVE_SYS_SOCKET_H
8193#include <sys/socket.h>
8194#endif
8195
8196"
8197if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8198 cat >>confdefs.h <<_ACEOF
8199#define HAVE_LINUX_VM_SOCKETS_H 1
8200_ACEOF
8201
8202fi
8203
8204done
8205
8206
Charles-François Natali47413c12011-10-06 19:47:44 +02008207# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008208for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008209do :
8210 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8211ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8212#ifdef HAVE_SYS_SOCKET_H
8213#include <sys/socket.h>
8214#endif
8215
8216"
8217if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8218 cat >>confdefs.h <<_ACEOF
8219#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8220_ACEOF
8221
8222fi
8223
8224done
8225
8226
Guido van Rossum627b2d71993-12-24 10:39:16 +00008227# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008228was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8230$as_echo_n "checking for clock_t in time.h... " >&6; }
8231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008233#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008234
8235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008238 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008239else
Martin v. Löwis11437992002-04-12 09:54:03 +00008240
8241
Matthias Kloseb9621712010-04-24 17:59:49 +00008242$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008243
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008244
Guido van Rossum627b2d71993-12-24 10:39:16 +00008245fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008246rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008247
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8249$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008250
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8252$as_echo_n "checking for makedev... " >&6; }
8253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008254/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008255
Jesus Cea740f53a2010-04-28 11:35:30 +00008256#if defined(MAJOR_IN_MKDEV)
8257#include <sys/mkdev.h>
8258#elif defined(MAJOR_IN_SYSMACROS)
8259#include <sys/sysmacros.h>
8260#else
8261#include <sys/types.h>
8262#endif
8263
Neal Norwitz11690112002-07-30 01:08:28 +00008264int
8265main ()
8266{
Jesus Cea740f53a2010-04-28 11:35:30 +00008267
8268 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008269 ;
8270 return 0;
8271}
Matthias Kloseb159a552010-04-25 21:00:44 +00008272
Neal Norwitz11690112002-07-30 01:08:28 +00008273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008274if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008275 ac_cv_has_makedev=yes
8276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279rm -f core conftest.err conftest.$ac_objext \
8280 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8282$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008283if test "$ac_cv_has_makedev" = "yes"; then
8284
Matthias Kloseb9621712010-04-24 17:59:49 +00008285$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008286
8287fi
8288
Christian Heimes985ecdc2013-11-20 11:46:18 +01008289# byte swapping
8290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8291$as_echo_n "checking for le64toh... " >&6; }
8292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8293/* end confdefs.h. */
8294
8295#ifdef HAVE_ENDIAN_H
8296#include <endian.h>
8297#elif defined(HAVE_SYS_ENDIAN_H)
8298#include <sys/endian.h>
8299#endif
8300
8301int
8302main ()
8303{
8304
8305 le64toh(1)
8306 ;
8307 return 0;
8308}
8309
8310_ACEOF
8311if ac_fn_c_try_link "$LINENO"; then :
8312 ac_cv_has_le64toh=yes
8313else
8314 ac_cv_has_le64toh=no
8315fi
8316rm -f core conftest.err conftest.$ac_objext \
8317 conftest$ac_exeext conftest.$ac_ext
8318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8319$as_echo "$ac_cv_has_le64toh" >&6; }
8320if test "$ac_cv_has_le64toh" = "yes"; then
8321
8322$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8323
8324fi
8325
Martin v. Löwis399a6892002-10-04 10:22:02 +00008326use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008327# Don't use largefile support for GNU/Hurd
8328case $ac_sys_system in GNU*)
8329 use_lfs=no
8330esac
8331
Martin v. Löwis399a6892002-10-04 10:22:02 +00008332if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008333# Two defines needed to enable largefile support on various platforms
8334# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008335case $ac_sys_system/$ac_sys_release in
8336AIX*)
8337
8338$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8339
8340 ;;
8341esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008342
Matthias Kloseb9621712010-04-24 17:59:49 +00008343$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008344
8345
Matthias Kloseb9621712010-04-24 17:59:49 +00008346$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008347
Martin v. Löwis399a6892002-10-04 10:22:02 +00008348fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008349
Guido van Rossum84e7b241996-08-19 21:59:00 +00008350# Add some code to confdefs.h so that the test for off_t works on SCO
8351cat >> confdefs.h <<\EOF
8352#if defined(SCO_DS)
8353#undef _OFF_T
8354#endif
8355EOF
8356
Guido van Rossumef2255b2000-03-10 22:30:29 +00008357# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008358ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008359if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008360
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008361else
Martin v. Löwis11437992002-04-12 09:54:03 +00008362
8363cat >>confdefs.h <<_ACEOF
8364#define mode_t int
8365_ACEOF
8366
8367fi
8368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008370if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008371
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008372else
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
8374cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008376_ACEOF
8377
8378fi
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008381if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008382
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008383else
Martin v. Löwis11437992002-04-12 09:54:03 +00008384
8385cat >>confdefs.h <<_ACEOF
8386#define pid_t int
8387_ACEOF
8388
8389fi
8390
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008391
Martin v. Löwis11437992002-04-12 09:54:03 +00008392cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008393#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008394_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008397if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008399else
Martin v. Löwis11437992002-04-12 09:54:03 +00008400
8401cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008402#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008403_ACEOF
8404
8405fi
8406
Matthias Kloseb9621712010-04-24 17:59:49 +00008407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8408$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008409if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008410 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008413/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008419 ac_cv_type_uid_t=yes
8420else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008421 ac_cv_type_uid_t=no
8422fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008423rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008424
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8427$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008428if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008429
Matthias Kloseb9621712010-04-24 17:59:49 +00008430$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008431
8432
Matthias Kloseb9621712010-04-24 17:59:49 +00008433$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434
8435fi
8436
Mark Dickinson983bc162012-12-02 12:11:38 +00008437
Matthias Kloseb9621712010-04-24 17:59:49 +00008438ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008442
8443fi
8444
Stefan Krah1919b7e2012-03-21 18:25:23 +01008445ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8446if test "x$ac_cv_type___uint128_t" = xyes; then :
8447
8448$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8449
8450fi
8451
Jack Jansendd19cf82001-12-06 22:36:17 +00008452
Michael W. Hudson54241132001-12-07 15:38:26 +00008453# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008454# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455# The cast to long int works around a bug in the HP C Compiler
8456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8458# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8460$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008461if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008463else
Matthias Kloseb9621712010-04-24 17:59:49 +00008464 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 +00008465
Martin v. Löwis11437992002-04-12 09:54:03 +00008466else
Matthias Kloseb9621712010-04-24 17:59:49 +00008467 if test "$ac_cv_type_int" = yes; then
8468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008470as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008471See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008472 else
8473 ac_cv_sizeof_int=0
8474 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008475fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008476
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8479$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008480
8481
8482
Martin v. Löwis11437992002-04-12 09:54:03 +00008483cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008484#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008485_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008486
8487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8493$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 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 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_long" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 else
8506 ac_cv_sizeof_long=0
8507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8512$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514
8515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008517#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008519
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521# The cast to long int works around a bug in the HP C Compiler
8522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8524# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8526$as_echo_n "checking size of long long... " >&6; }
8527if ${ac_cv_sizeof_long_long+:} false; then :
8528 $as_echo_n "(cached) " >&6
8529else
8530 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8531
8532else
8533 if test "$ac_cv_type_long_long" = yes; then
8534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8536as_fn_error 77 "cannot compute sizeof (long long)
8537See \`config.log' for more details" "$LINENO" 5; }
8538 else
8539 ac_cv_sizeof_long_long=0
8540 fi
8541fi
8542
8543fi
8544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8545$as_echo "$ac_cv_sizeof_long_long" >&6; }
8546
8547
8548
8549cat >>confdefs.h <<_ACEOF
8550#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8551_ACEOF
8552
8553
8554# The cast to long int works around a bug in the HP C Compiler
8555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8559$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008560if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008562else
Matthias Kloseb9621712010-04-24 17:59:49 +00008563 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 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565else
Matthias Kloseb9621712010-04-24 17:59:49 +00008566 if test "$ac_cv_type_void_p" = yes; then
8567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008569as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008570See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008571 else
8572 ac_cv_sizeof_void_p=0
8573 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575
Martin v. Löwis11437992002-04-12 09:54:03 +00008576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8578$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008579
8580
8581
Martin v. Löwis11437992002-04-12 09:54:03 +00008582cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008583#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008584_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008585
8586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8592$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 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 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_short" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 else
8605 ac_cv_sizeof_short=0
8606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8611$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612
8613
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008616#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008618
8619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620# The cast to long int works around a bug in the HP C Compiler
8621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8625$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008626if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008628else
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 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 +00008630
Martin v. Löwis11437992002-04-12 09:54:03 +00008631else
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 if test "$ac_cv_type_float" = yes; then
8633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008635as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637 else
8638 ac_cv_sizeof_float=0
8639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8644$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645
8646
8647
Martin v. Löwis11437992002-04-12 09:54:03 +00008648cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008649#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008650_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008651
8652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653# The cast to long int works around a bug in the HP C Compiler
8654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8658$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008659if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 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 +00008663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664else
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 if test "$ac_cv_type_double" = yes; then
8666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008668as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 else
8671 ac_cv_sizeof_double=0
8672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8677$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678
8679
8680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008682#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008683_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008684
8685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8691$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 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 +00008696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type_fpos_t" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 else
8704 ac_cv_sizeof_fpos_t=0
8705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8710$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711
8712
8713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008715#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008716_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008717
Michael W. Hudson54241132001-12-07 15:38:26 +00008718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8724$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008725if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 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 +00008729
Martin v. Löwis18e16552006-02-15 17:27:45 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 if test "$ac_cv_type_size_t" = yes; then
8732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008734as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736 else
8737 ac_cv_sizeof_size_t=0
8738 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740
Martin v. Löwis18e16552006-02-15 17:27:45 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8743$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744
8745
8746
Martin v. Löwis18e16552006-02-15 17:27:45 +00008747cat >>confdefs.h <<_ACEOF
8748#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8749_ACEOF
8750
8751
Christian Heimes400adb02008-02-01 08:12:03 +00008752# The cast to long int works around a bug in the HP C Compiler
8753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8757$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 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 +00008762
Christian Heimes400adb02008-02-01 08:12:03 +00008763else
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 if test "$ac_cv_type_pid_t" = yes; then
8765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008767as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008768See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008769 else
8770 ac_cv_sizeof_pid_t=0
8771 fi
8772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773
Christian Heimes400adb02008-02-01 08:12:03 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8776$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008777
8778
8779
8780cat >>confdefs.h <<_ACEOF
8781#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8782_ACEOF
8783
8784
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008785# The cast to long int works around a bug in the HP C Compiler
8786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8788# This bug is HP SR number 8606223364.
8789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8790$as_echo_n "checking size of uintptr_t... " >&6; }
8791if ${ac_cv_sizeof_uintptr_t+:} false; then :
8792 $as_echo_n "(cached) " >&6
8793else
8794 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8795
8796else
8797 if test "$ac_cv_type_uintptr_t" = yes; then
8798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8800as_fn_error 77 "cannot compute sizeof (uintptr_t)
8801See \`config.log' for more details" "$LINENO" 5; }
8802 else
8803 ac_cv_sizeof_uintptr_t=0
8804 fi
8805fi
8806
8807fi
8808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8809$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8810
8811
8812
8813cat >>confdefs.h <<_ACEOF
8814#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8815_ACEOF
8816
8817
Michael W. Hudson54241132001-12-07 15:38:26 +00008818
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008819
Eitan Adler3055c942018-05-15 22:58:09 -07008820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8821$as_echo_n "checking for long double... " >&6; }
8822if ${ac_cv_type_long_double+:} false; then :
8823 $as_echo_n "(cached) " >&6
8824else
8825 if test "$GCC" = yes; then
8826 ac_cv_type_long_double=yes
8827 else
8828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8829/* end confdefs.h. */
8830/* The Stardent Vistra knows sizeof (long double), but does
8831 not support it. */
8832 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008833int
8834main ()
8835{
Eitan Adler3055c942018-05-15 22:58:09 -07008836static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8837 sizeof (double) <= sizeof (long double))];
8838test_array [0] = 0;
8839return test_array [0];
8840
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008841 ;
8842 return 0;
8843}
8844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008845if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008846 ac_cv_type_long_double=yes
8847else
8848 ac_cv_type_long_double=no
8849fi
8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8851 fi
8852fi
8853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8854$as_echo "$ac_cv_type_long_double" >&6; }
8855 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008856
Matthias Kloseb9621712010-04-24 17:59:49 +00008857$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008858
Eitan Adler3055c942018-05-15 22:58:09 -07008859 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008860
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008861# The cast to long int works around a bug in the HP C Compiler
8862# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8863# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8864# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8866$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008867if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008868 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008869else
Matthias Kloseb9621712010-04-24 17:59:49 +00008870 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 +00008871
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008872else
Matthias Kloseb9621712010-04-24 17:59:49 +00008873 if test "$ac_cv_type_long_double" = yes; then
8874 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008876as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008877See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008878 else
8879 ac_cv_sizeof_long_double=0
8880 fi
8881fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008882
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8885$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008886
8887
8888
8889cat >>confdefs.h <<_ACEOF
8890#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8891_ACEOF
8892
8893
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895# The cast to long int works around a bug in the HP C Compiler
8896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8900$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008901if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008902 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008903else
Matthias Kloseb9621712010-04-24 17:59:49 +00008904 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 +00008905
Thomas Woutersb2137042007-02-01 18:02:27 +00008906else
Matthias Kloseb9621712010-04-24 17:59:49 +00008907 if test "$ac_cv_type__Bool" = yes; then
8908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008910as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008911See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 else
8913 ac_cv_sizeof__Bool=0
8914 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916
Thomas Woutersb2137042007-02-01 18:02:27 +00008917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8919$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920
8921
8922
Thomas Woutersb2137042007-02-01 18:02:27 +00008923cat >>confdefs.h <<_ACEOF
8924#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8925_ACEOF
8926
8927
Thomas Woutersb2137042007-02-01 18:02:27 +00008928
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008929# The cast to long int works around a bug in the HP C Compiler
8930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8932# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8934$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008935if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008939#ifdef HAVE_SYS_TYPES_H
8940#include <sys/types.h>
8941#endif
8942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008945else
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 if test "$ac_cv_type_off_t" = yes; then
8947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008949as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008950See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008951 else
8952 ac_cv_sizeof_off_t=0
8953 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008954fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008955
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8958$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008963#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008964_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008965
Michael W. Hudson54241132001-12-07 15:38:26 +00008966
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008967
Matthias Kloseb9621712010-04-24 17:59:49 +00008968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8969$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008970if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008971 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008972
Matthias Kloseb9621712010-04-24 17:59:49 +00008973$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008974
Matthias Kloseb9621712010-04-24 17:59:49 +00008975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8976$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008977else
Matthias Kloseb9621712010-04-24 17:59:49 +00008978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8979$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008980fi
8981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982# The cast to long int works around a bug in the HP C Compiler
8983# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8984# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8985# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8987$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008988if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008992#ifdef HAVE_SYS_TYPES_H
8993#include <sys/types.h>
8994#endif
8995#ifdef HAVE_TIME_H
8996#include <time.h>
8997#endif
8998
Matthias Kloseb9621712010-04-24 17:59:49 +00008999"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009000
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009001else
Matthias Kloseb9621712010-04-24 17:59:49 +00009002 if test "$ac_cv_type_time_t" = yes; then
9003 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9004$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009005as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009006See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007 else
9008 ac_cv_sizeof_time_t=0
9009 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009012fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9014$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009015
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016
9017
Martin v. Löwis11437992002-04-12 09:54:03 +00009018cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009019#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009021
Michael W. Hudson54241132001-12-07 15:38:26 +00009022
9023
Trent Mick635f6fb2000-08-23 21:33:05 +00009024# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009025ac_save_cc="$CC"
9026if test "$ac_cv_kpthread" = "yes"
9027then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009028elif test "$ac_cv_kthread" = "yes"
9029then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009030elif test "$ac_cv_pthread" = "yes"
9031then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009032fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033
Matthias Kloseb9621712010-04-24 17:59:49 +00009034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9035$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009036have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009038/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009039
9040 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Guido van Rossum12580492000-09-24 16:47:19 +00009044pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009045 ;
9046 return 0;
9047}
Matthias Kloseb159a552010-04-25 21:00:44 +00009048
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009050if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009051 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009052fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9055$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009056if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009057 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9060# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9062$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009063if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009064 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009065else
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009067#ifdef HAVE_PTHREAD_H
9068#include <pthread.h>
9069#endif
9070
Matthias Kloseb9621712010-04-24 17:59:49 +00009071"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009072
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073else
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 if test "$ac_cv_type_pthread_t" = yes; then
9075 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9076$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009077as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009078See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009079 else
9080 ac_cv_sizeof_pthread_t=0
9081 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009083
Trent Mick635f6fb2000-08-23 21:33:05 +00009084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9086$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009088
9089
Martin v. Löwis11437992002-04-12 09:54:03 +00009090cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009091#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009092_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009093
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094
Trent Mick635f6fb2000-08-23 21:33:05 +00009095fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009096
9097# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9098# This checking will be unnecessary after removing deprecated TLS API.
9099# The cast to long int works around a bug in the HP C Compiler
9100# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9101# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9102# This bug is HP SR number 8606223364.
9103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9104$as_echo_n "checking size of pthread_key_t... " >&6; }
9105if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9106 $as_echo_n "(cached) " >&6
9107else
9108 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9109"; then :
9110
9111else
9112 if test "$ac_cv_type_pthread_key_t" = yes; then
9113 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9114$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9115as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9116See \`config.log' for more details" "$LINENO" 5; }
9117 else
9118 ac_cv_sizeof_pthread_key_t=0
9119 fi
9120fi
9121
9122fi
9123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9124$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9125
9126
9127
9128cat >>confdefs.h <<_ACEOF
9129#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9130_ACEOF
9131
9132
9133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9134$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9135if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9137/* end confdefs.h. */
9138#include <pthread.h>
9139int
9140main ()
9141{
9142pthread_key_t k; k * 1;
9143 ;
9144 return 0;
9145}
9146_ACEOF
9147if ac_fn_c_try_compile "$LINENO"; then :
9148 ac_pthread_key_t_is_arithmetic_type=yes
9149else
9150 ac_pthread_key_t_is_arithmetic_type=no
9151
9152fi
9153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9155$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9156 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9157
9158$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9159
9160 fi
9161else
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
9164fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009165CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009166
Michael W. Hudson54241132001-12-07 15:38:26 +00009167
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009168case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009169 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009170 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9171 ;;
9172 Darwin/*)
9173 OTHER_LIBTOOL_OPT=""
9174 ;;
9175esac
9176
9177
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009178
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009179case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009180 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009181 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9182 if test "${enable_universalsdk}"; then
9183 :
9184 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009185 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009186 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009187 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009188 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009189 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009190 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009191 if test ${gcc_version} '<' 4.0
9192 then
9193 LIBTOOL_CRUFT="-lcc_dynamic"
9194 else
9195 LIBTOOL_CRUFT=""
9196 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009197 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009198 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009199else
Matthias Kloseb9621712010-04-24 17:59:49 +00009200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009201/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009202
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009203 #include <unistd.h>
9204 int main(int argc, char*argv[])
9205 {
9206 if (sizeof(long) == 4) {
9207 return 0;
9208 } else {
9209 return 1;
9210 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009211 }
9212
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009214if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009215 ac_osx_32bit=yes
9216else
Matthias Kloseb9621712010-04-24 17:59:49 +00009217 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009218fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009221fi
9222
9223
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009224 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009225 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009226 i386)
9227 MACOSX_DEFAULT_ARCH="i386"
9228 ;;
9229 ppc)
9230 MACOSX_DEFAULT_ARCH="ppc"
9231 ;;
9232 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009233 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234 ;;
9235 esac
9236 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009237 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238 i386)
9239 MACOSX_DEFAULT_ARCH="x86_64"
9240 ;;
9241 ppc)
9242 MACOSX_DEFAULT_ARCH="ppc64"
9243 ;;
9244 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009245 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009246 ;;
9247 esac
9248
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249 fi
9250
9251 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009252 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009253 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009254esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9256$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009257if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009258then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009259 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009261 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009264
Matthias Kloseb9621712010-04-24 17:59:49 +00009265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9266$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009267 if test $enable_shared = "yes"
9268 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009269 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 +00009270 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009271else
Matthias Kloseb9621712010-04-24 17:59:49 +00009272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9273$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009274fi
9275
Matthias Kloseb9621712010-04-24 17:59:49 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9277$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009278case $ac_sys_system/$ac_sys_release in
9279 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009280
Matthias Kloseb9621712010-04-24 17:59:49 +00009281$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009282
Matthias Kloseb9621712010-04-24 17:59:49 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9284$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009285 ;;
9286 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009289 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009290esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291
Guido van Rossum0a516c91994-09-12 10:58:40 +00009292# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009293
Michael W. Hudson54241132001-12-07 15:38:26 +00009294
9295
9296
9297
Benjamin Peterson99f03762010-04-11 22:15:28 +00009298
Thomas Wouters477c8d52006-05-27 19:21:47 +00009299
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009300# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9301# -- usually .so, .sl on HP-UX, .dll on Cygwin
9302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9303$as_echo_n "checking the extension of shared libraries... " >&6; }
9304if test -z "$SHLIB_SUFFIX"; then
9305 case $ac_sys_system in
9306 hp*|HP*)
9307 case `uname -m` in
9308 ia64) SHLIB_SUFFIX=.so;;
9309 *) SHLIB_SUFFIX=.sl;;
9310 esac
9311 ;;
9312 CYGWIN*) SHLIB_SUFFIX=.dll;;
9313 *) SHLIB_SUFFIX=.so;;
9314 esac
9315fi
9316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9317$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009318
Guido van Rossum0a516c91994-09-12 10:58:40 +00009319# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009320# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009321# (Shared libraries in this instance are shared modules to be loaded into
9322# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9324$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325if test -z "$LDSHARED"
9326then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009327 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009328 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009329 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009330 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009331 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009332 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009333 if test "$GCC" = "yes" ; then
9334 LDSHARED='$(CC) -shared'
9335 LDCXXSHARED='$(CXX) -shared'
9336 else
9337 LDSHARED='$(CC) -G'
9338 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009339 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009340 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009341 if test "$GCC" = "yes" ; then
9342 LDSHARED='$(CC) -shared'
9343 LDCXXSHARED='$(CXX) -shared'
9344 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009345 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009346 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009347 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009348 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009349 LDSHARED='$(CC) -bundle'
9350 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +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 Jansena3891ea2001-09-07 14:25:12 +00009356 else
9357 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009358 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009359 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009360 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009361 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009362 LDSHARED='$(CC) -bundle'
9363 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009364 if test "$enable_framework" ; then
9365 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009366 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9367 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009368 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009369 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009370 # No framework, use the Python app as bundle-loader
9371 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009372 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009373 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009374 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009375 Darwin/*)
9376 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9377 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009378
Ned Deily36820b62014-06-25 13:44:22 -07009379 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9380 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9381 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9382 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9383 if test ${dep_target_major} -eq 10 && \
9384 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009385 then
Ned Deily36820b62014-06-25 13:44:22 -07009386 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009387 LDSHARED='$(CC) -bundle'
9388 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009389 if test "$enable_framework" ; then
9390 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009391 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9392 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009393 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009394 else
9395 # No framework, use the Python app as bundle-loader
9396 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9397 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009398 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009399 fi
Ned Deily36820b62014-06-25 13:44:22 -07009400 else
9401 # building for OS X 10.3 and later
9402 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9403 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9404 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009405 fi
9406 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009407 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009408 LDSHARED='$(CC) -shared'
9409 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009410 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009411 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009412 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009413 LDSHARED='$(CC) -shared'
9414 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009415 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009416 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009417 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009418 OpenBSD*)
9419 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9420 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009421 LDSHARED='$(CC) -shared $(CCSHARED)'
9422 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009423 else
9424 case `uname -r` in
9425 [01].* | 2.[0-7] | 2.[0-7].*)
9426 LDSHARED="ld -Bshareable ${LDFLAGS}"
9427 ;;
9428 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009429 LDSHARED='$(CC) -shared $(CCSHARED)'
9430 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009431 ;;
9432 esac
9433 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009434 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009435 LDSHARED='$(CC) -shared'
9436 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009437 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009438 if test "$GCC" = "yes" ; then
9439 LDSHARED='$(CC) -shared'
9440 LDCXXSHARED='$(CXX) -shared'
9441 else
9442 LDSHARED='$(CC) -G'
9443 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009444 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009445 SCO_SV*)
9446 LDSHARED='$(CC) -Wl,-G,-Bexport'
9447 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9448 CYGWIN*)
9449 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9450 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009451 *) LDSHARED="ld";;
9452 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9455$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009456LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009457BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009458# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009459# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9461$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009462if test -z "$CCSHARED"
9463then
Guido van Rossum07397971997-04-29 21:49:50 +00009464 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009465 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009466 then CCSHARED="-fPIC";
9467 elif test `uname -p` = sparc;
9468 then CCSHARED="-xcode=pic32";
9469 else CCSHARED="-Kpic";
9470 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009471 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009472 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009473 else CCSHARED="+z";
9474 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009475 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009476 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009477 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009478 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009479 if test "$GCC" = "yes"
9480 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009481 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009482 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009483 SCO_SV*)
9484 if test "$GCC" = "yes"
9485 then CCSHARED="-fPIC"
9486 else CCSHARED="-Kpic -belf"
9487 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009488 VxWorks*)
9489 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009490 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009492{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9493$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009494# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009495# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9497$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009498if test -z "$LINKFORSHARED"
9499then
Guido van Rossum07397971997-04-29 21:49:50 +00009500 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009501 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009502 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009503 LINKFORSHARED="-Wl,-E -Wl,+s";;
9504# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009505 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009506 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009507 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009508 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009509 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009510
9511 # Issue #18075: the default maximum stack size (8MBytes) is too
9512 # small for the default recursion limit. Increase the stack size
9513 # to ensure that tests don't crash
9514 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9515
Jack Jansene578a632001-08-15 01:27:14 +00009516 if test "$enable_framework"
9517 then
Jack Jansenda49e192005-01-07 13:08:22 +00009518 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009519 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009520 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009521 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009522 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009523 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009524 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009525 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9526 then
9527 LINKFORSHARED="-Wl,--export-dynamic"
9528 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009529 SunOS/5*) case $CC in
9530 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009531 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009532 then
9533 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009534 fi;;
9535 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009536 CYGWIN*)
9537 if test $enable_shared = "no"
9538 then
9539 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9540 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009541 QNX*)
9542 # -Wl,-E causes the symbols to be added to the dynamic
9543 # symbol table so that they can be found when a module
9544 # is loaded. -N 2048K causes the stack size to be set
9545 # to 2048 kilobytes so that the stack doesn't overflow
9546 # when running test_compile.py.
9547 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009548 VxWorks*)
9549 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009550 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009551fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9553$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554
Michael W. Hudson54241132001-12-07 15:38:26 +00009555
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009556
Matthias Kloseb9621712010-04-24 17:59:49 +00009557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9558$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009559if test ! "$LIBRARY" = "$LDLIBRARY"
9560then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009561 case $ac_sys_system in
9562 CYGWIN*)
9563 # Cygwin needs CCSHARED when building extension DLLs
9564 # but not when building the interpreter DLL.
9565 CFLAGSFORSHARED='';;
9566 *)
9567 CFLAGSFORSHARED='$(CCSHARED)'
9568 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9571$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009572
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009573# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9574# library (with --enable-shared).
9575# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009576# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9577# if it is not required, since it creates a dependency of the shared library
9578# to LIBS. This, in turn, means that applications linking the shared libpython
9579# don't need to link LIBS explicitly. The default should be only changed
9580# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009581
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9583$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009584case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009585 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009586 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009587esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9589$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590
9591
Guido van Rossum627b2d71993-12-24 10:39:16 +00009592# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9594$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009595if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009596 $as_echo_n "(cached) " >&6
9597else
9598 ac_check_lib_save_LIBS=$LIBS
9599LIBS="-lsendfile $LIBS"
9600cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9601/* end confdefs.h. */
9602
9603/* Override any GCC internal prototype to avoid an error.
9604 Use char because int might match the return type of a GCC
9605 builtin and then its argument prototype would still apply. */
9606#ifdef __cplusplus
9607extern "C"
9608#endif
9609char sendfile ();
9610int
9611main ()
9612{
9613return sendfile ();
9614 ;
9615 return 0;
9616}
9617_ACEOF
9618if ac_fn_c_try_link "$LINENO"; then :
9619 ac_cv_lib_sendfile_sendfile=yes
9620else
9621 ac_cv_lib_sendfile_sendfile=no
9622fi
9623rm -f core conftest.err conftest.$ac_objext \
9624 conftest$ac_exeext conftest.$ac_ext
9625LIBS=$ac_check_lib_save_LIBS
9626fi
9627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9628$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009629if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009630 cat >>confdefs.h <<_ACEOF
9631#define HAVE_LIBSENDFILE 1
9632_ACEOF
9633
9634 LIBS="-lsendfile $LIBS"
9635
9636fi
9637
Matthias Kloseb9621712010-04-24 17:59:49 +00009638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9639$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009640if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009641 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009642else
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009644LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648/* Override any GCC internal prototype to avoid an error.
9649 Use char because int might match the return type of a GCC
9650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651#ifdef __cplusplus
9652extern "C"
9653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009654char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009655int
9656main ()
9657{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ;
9660 return 0;
9661}
9662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009663if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009665else
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009668rm -f core conftest.err conftest.$ac_objext \
9669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009670LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9673$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009674if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 cat >>confdefs.h <<_ACEOF
9676#define HAVE_LIBDL 1
9677_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009678
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009679 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009680
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009681fi
9682 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9684$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9718$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 cat >>confdefs.h <<_ACEOF
9721#define HAVE_LIBDLD 1
9722_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009723
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009724 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009725
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009726fi
9727 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009728
Michael Felt0d3ccb42017-12-30 22:39:20 +01009729# checks for uuid.h location
9730for ac_header in uuid/uuid.h uuid.h
9731do :
9732 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9733ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9734if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9735 cat >>confdefs.h <<_ACEOF
9736#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9737_ACEOF
9738
9739fi
9740
9741done
9742
9743
Berker Peksag9a10ff42017-11-08 23:09:16 +03009744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9745$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9747/* end confdefs.h. */
9748#include <uuid/uuid.h>
9749int
9750main ()
9751{
9752
9753#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009754void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009755#endif
9756
9757 ;
9758 return 0;
9759}
9760_ACEOF
9761if ac_fn_c_try_compile "$LINENO"; then :
9762
9763$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9764
9765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9766$as_echo "yes" >&6; }
9767else
9768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9769$as_echo "no" >&6; }
9770
9771fi
9772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9773
Michael Felt0d3ccb42017-12-30 22:39:20 +01009774# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009775# FreeBSD and OpenBSD provides support as well
9776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9777$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9779/* end confdefs.h. */
9780#include <uuid.h>
9781int
9782main ()
9783{
9784
9785#ifndef uuid_create
9786void *x = uuid_create
9787#endif
9788
9789 ;
9790 return 0;
9791}
9792_ACEOF
9793if ac_fn_c_try_compile "$LINENO"; then :
9794
9795$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9796
9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9798$as_echo "yes" >&6; }
9799else
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
9802
9803fi
9804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9805
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009806# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9807# stream in big-endian byte-order
9808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9809$as_echo_n "checking for uuid_enc_be... " >&6; }
9810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9811/* end confdefs.h. */
9812#include <uuid.h>
9813int
9814main ()
9815{
9816
9817#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009818void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009819#endif
9820
9821 ;
9822 return 0;
9823}
9824_ACEOF
9825if ac_fn_c_try_compile "$LINENO"; then :
9826
9827$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9828
9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9830$as_echo "yes" >&6; }
9831else
9832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9833$as_echo "no" >&6; }
9834
9835fi
9836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9837
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009838# 'Real Time' functions on Solaris
9839# posix4 on Solaris 2.6
9840# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009842$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009843if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009844 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009845else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009846 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009850/* Override any GCC internal prototype to avoid an error.
9851 Use char because int might match the return type of a GCC
9852 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009853#ifdef __cplusplus
9854extern "C"
9855#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009856char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009857int
9858main ()
9859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ;
9862 return 0;
9863}
9864_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865for ac_lib in '' pthread rt posix4; do
9866 if test -z "$ac_lib"; then
9867 ac_res="none required"
9868 else
9869 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009870 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009872 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009873 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009874fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009875rm -f core conftest.err conftest.$ac_objext \
9876 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009877 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880done
Victor Stinnere0be4232011-10-25 13:06:09 +02009881if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883else
9884 ac_cv_search_sem_init=no
9885fi
9886rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009887LIBS=$ac_func_search_save_LIBS
9888fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9890$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009891ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009892if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009894
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009895fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009896
Martin v. Löwis519adae2003-09-20 10:47:47 +00009897
Martin v. Löwis19d17342003-06-14 21:03:05 +00009898# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9900$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009901if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009903else
9904 ac_check_lib_save_LIBS=$LIBS
9905LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009908
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009909/* Override any GCC internal prototype to avoid an error.
9910 Use char because int might match the return type of a GCC
9911 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912#ifdef __cplusplus
9913extern "C"
9914#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009915char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009916int
9917main ()
9918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009920 ;
9921 return 0;
9922}
9923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009924if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009925 ac_cv_lib_intl_textdomain=yes
9926else
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009929rm -f core conftest.err conftest.$ac_objext \
9930 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931LIBS=$ac_check_lib_save_LIBS
9932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9934$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009935if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009936
Matthias Kloseb9621712010-04-24 17:59:49 +00009937$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009938
Brett Cannonc6d936e2009-06-07 20:09:53 +00009939 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940fi
9941
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009942
9943# checks for system dependent C++ extensions support
9944case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009945 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9946$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009949
Georg Brandl59e87bd2011-02-15 19:48:59 +00009950 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009951int
9952main ()
9953{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009954loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ;
9956 return 0;
9957}
Matthias Kloseb159a552010-04-25 21:00:44 +00009958
Martin v. Löwis11437992002-04-12 09:54:03 +00009959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009960if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009961
Matthias Kloseb159a552010-04-25 21:00:44 +00009962
Matthias Kloseb9621712010-04-24 17:59:49 +00009963$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009964
Matthias Kloseb159a552010-04-25 21:00:44 +00009965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009966$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009967
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009968else
Matthias Kloseb159a552010-04-25 21:00:44 +00009969
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009971$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009972
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009974rm -f core conftest.err conftest.$ac_objext \
9975 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009976 *) ;;
9977esac
9978
Christian Heimes985ecdc2013-11-20 11:46:18 +01009979# check for systems that require aligned memory access
9980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9981$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009982if ${ac_cv_aligned_required+:} false; then :
9983 $as_echo_n "(cached) " >&6
9984else
9985 if test "$cross_compiling" = yes; then :
9986 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009987else
9988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9989/* end confdefs.h. */
9990
9991int main()
9992{
9993 char s[16];
9994 int i, *p1, *p2;
9995 for (i=0; i < 16; i++)
9996 s[i] = i;
9997 p1 = (int*)(s+1);
9998 p2 = (int*)(s+2);
9999 if (*p1 == *p2)
10000 return 1;
10001 return 0;
10002}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010003_ACEOF
10004if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010005 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010006else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010007 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010008fi
10009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10010 conftest.$ac_objext conftest.beam conftest.$ac_ext
10011fi
10012
10013
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010014fi
10015
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10017$as_echo "$ac_cv_aligned_required" >&6; }
10018if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010019
10020$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10021
10022fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023
10024# str, bytes and memoryview hash algorithm
10025
10026
10027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10028$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10029
10030# Check whether --with-hash_algorithm was given.
10031if test "${with_hash_algorithm+set}" = set; then :
10032 withval=$with_hash_algorithm;
10033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10034$as_echo "$withval" >&6; }
10035case "$withval" in
10036 siphash24)
10037 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10038
10039 ;;
10040 fnv)
10041 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10042
10043 ;;
10044 *)
10045 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10046 ;;
10047esac
10048
10049else
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10051$as_echo "default" >&6; }
10052fi
10053
10054
Charles-François Natalid30b0222014-05-08 23:08:51 +010010055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10056$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10057
10058# Check whether --with-address_sanitizer was given.
10059if test "${with_address_sanitizer+set}" = set; then :
10060 withval=$with_address_sanitizer;
10061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10062$as_echo "$withval" >&6; }
10063BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10064LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010065# ASan works by controlling memory allocation, our own malloc interferes.
10066with_pymalloc="no"
10067
10068else
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070$as_echo "no" >&6; }
10071fi
10072
10073
10074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10075$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10076
10077# Check whether --with-memory_sanitizer was given.
10078if test "${with_memory_sanitizer+set}" = set; then :
10079 withval=$with_memory_sanitizer;
10080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10081$as_echo "$withval" >&6; }
10082BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10083LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10084# MSan works by controlling memory allocation, our own malloc interferes.
10085with_pymalloc="no"
10086
10087else
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10089$as_echo "no" >&6; }
10090fi
10091
10092
10093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10094$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10095
10096# Check whether --with-undefined_behavior_sanitizer was given.
10097if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10098 withval=$with_undefined_behavior_sanitizer;
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10100$as_echo "$withval" >&6; }
10101BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10102LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010103
10104else
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
Guido van Rossum70c7f481998-03-26 18:44:10 +000010110# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10112$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010113if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010115else
Martin v. Löwis11437992002-04-12 09:54:03 +000010116 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010117LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010119/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010120
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010121/* Override any GCC internal prototype to avoid an error.
10122 Use char because int might match the return type of a GCC
10123 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124#ifdef __cplusplus
10125extern "C"
10126#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010127char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010128int
10129main ()
10130{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ;
10133 return 0;
10134}
10135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010138else
Matthias Kloseb9621712010-04-24 17:59:49 +000010139 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010141rm -f core conftest.err conftest.$ac_objext \
10142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010143LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10146$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010147if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010148 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010149fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010150 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10152$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010153if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010155else
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010157LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161/* Override any GCC internal prototype to avoid an error.
10162 Use char because int might match the return type of a GCC
10163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010164#ifdef __cplusplus
10165extern "C"
10166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010167char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010168int
10169main ()
10170{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ;
10173 return 0;
10174}
10175_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010176if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010180fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010181rm -f core conftest.err conftest.$ac_objext \
10182 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010183LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10186$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010187if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010188 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010189fi
10190 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010191
Matthias Kloseb9621712010-04-24 17:59:49 +000010192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10193$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010196if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010197 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10199$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010200LIBS="$withval $LIBS"
10201
10202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205fi
10206
Guido van Rossum7f43da71994-08-01 12:15:30 +000010207
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010208
10209
10210
10211
10212
10213
10214
10215if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10216 if test -n "$ac_tool_prefix"; then
10217 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10218set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10220$as_echo_n "checking for $ac_word... " >&6; }
10221if ${ac_cv_path_PKG_CONFIG+:} false; then :
10222 $as_echo_n "(cached) " >&6
10223else
10224 case $PKG_CONFIG in
10225 [\\/]* | ?:[\\/]*)
10226 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10227 ;;
10228 *)
10229 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232 IFS=$as_save_IFS
10233 test -z "$as_dir" && as_dir=.
10234 for ac_exec_ext in '' $ac_executable_extensions; do
10235 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10237 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10238 break 2
10239 fi
10240done
10241 done
10242IFS=$as_save_IFS
10243
10244 ;;
10245esac
10246fi
10247PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10248if test -n "$PKG_CONFIG"; then
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10250$as_echo "$PKG_CONFIG" >&6; }
10251else
10252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254fi
10255
10256
10257fi
10258if test -z "$ac_cv_path_PKG_CONFIG"; then
10259 ac_pt_PKG_CONFIG=$PKG_CONFIG
10260 # Extract the first word of "pkg-config", so it can be a program name with args.
10261set dummy pkg-config; ac_word=$2
10262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10263$as_echo_n "checking for $ac_word... " >&6; }
10264if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10265 $as_echo_n "(cached) " >&6
10266else
10267 case $ac_pt_PKG_CONFIG in
10268 [\\/]* | ?:[\\/]*)
10269 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10270 ;;
10271 *)
10272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10273for as_dir in $PATH
10274do
10275 IFS=$as_save_IFS
10276 test -z "$as_dir" && as_dir=.
10277 for ac_exec_ext in '' $ac_executable_extensions; do
10278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10279 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10281 break 2
10282 fi
10283done
10284 done
10285IFS=$as_save_IFS
10286
10287 ;;
10288esac
10289fi
10290ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10291if test -n "$ac_pt_PKG_CONFIG"; then
10292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10293$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10294else
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10296$as_echo "no" >&6; }
10297fi
10298
10299 if test "x$ac_pt_PKG_CONFIG" = x; then
10300 PKG_CONFIG=""
10301 else
10302 case $cross_compiling:$ac_tool_warned in
10303yes:)
10304{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10305$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10306ac_tool_warned=yes ;;
10307esac
10308 PKG_CONFIG=$ac_pt_PKG_CONFIG
10309 fi
10310else
10311 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10312fi
10313
10314fi
10315if test -n "$PKG_CONFIG"; then
10316 _pkg_min_version=0.9.0
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10318$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10319 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10321$as_echo "yes" >&6; }
10322 else
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10324$as_echo "no" >&6; }
10325 PKG_CONFIG=""
10326 fi
10327fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010328
10329# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10331$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010332
10333# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010334if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010335 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010336else
10337 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010338fi
10339
10340
Matthias Kloseb9621712010-04-24 17:59:49 +000010341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10342$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010343
10344# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10346$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347
10348# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010349if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010350 withval=$with_system_ffi;
10351fi
10352
10353
Zachary Waref40d4dd2016-09-17 01:25:24 -050010354if test "$ac_sys_system" = "Darwin"
10355then
10356 case "$with_system_ffi" in
10357 "")
10358 with_system_ffi="no"
10359 ;;
10360 yes|no)
10361 ;;
10362 *)
10363 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10364 ;;
10365 esac
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10367$as_echo "$with_system_ffi" >&6; }
10368else
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10370$as_echo "yes" >&6; }
10371 if test "$with_system_ffi" != ""
10372 then
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10374$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10375 fi
10376 with_system_ffi="yes"
10377fi
Zachary Ware935043d2016-09-09 17:01:21 -070010378
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010379if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010380 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10381else
10382 LIBFFI_INCLUDEDIR=""
10383fi
10384
10385
Stefan Krah60187b52012-03-23 19:06:27 +010010386# Check for use of the system libmpdec library
10387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10388$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10389
10390# Check whether --with-system_libmpdec was given.
10391if test "${with_system_libmpdec+set}" = set; then :
10392 withval=$with_system_libmpdec;
10393else
10394 with_system_libmpdec="no"
10395fi
10396
10397
10398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10399$as_echo "$with_system_libmpdec" >&6; }
10400
Benjamin Peterson076ed002010-10-31 17:11:02 +000010401# Check for support for loadable sqlite extensions
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10403$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10404# Check whether --enable-loadable-sqlite-extensions was given.
10405if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10406 enableval=$enable_loadable_sqlite_extensions;
10407else
10408 enable_loadable_sqlite_extensions="no"
10409fi
10410
10411
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10413$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10414
Ned Deilyd819b932013-09-06 01:07:05 -070010415# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10416
10417
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10419$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10420
10421# Check whether --with-tcltk-includes was given.
10422if test "${with_tcltk_includes+set}" = set; then :
10423 withval=$with_tcltk_includes;
10424else
10425 with_tcltk_includes="default"
10426fi
10427
10428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10429$as_echo "$with_tcltk_includes" >&6; }
10430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10431$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10432
10433# Check whether --with-tcltk-libs was given.
10434if test "${with_tcltk_libs+set}" = set; then :
10435 withval=$with_tcltk_libs;
10436else
10437 with_tcltk_libs="default"
10438fi
10439
10440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10441$as_echo "$with_tcltk_libs" >&6; }
10442if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10443then
10444 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10445 then
10446 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10447 fi
10448 TCLTK_INCLUDES=""
10449 TCLTK_LIBS=""
10450else
10451 TCLTK_INCLUDES="$with_tcltk_includes"
10452 TCLTK_LIBS="$with_tcltk_libs"
10453fi
10454
Matthias Klose55708cc2009-04-30 08:06:49 +000010455# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10457$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010458
10459# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010461 withval=$with_dbmliborder;
10462if test x$with_dbmliborder = xyes
10463then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010464as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010465else
10466 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10467 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10468 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010469 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010470 fi
10471 done
10472fi
10473fi
10474
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10476$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010477
Martin v. Löwis11437992002-04-12 09:54:03 +000010478# Templates for things AC_DEFINEd more than once.
10479# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010480
10481
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010482if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010483then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010484 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010485 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010486
10487 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010488elif test "$ac_cv_kpthread" = "yes"
10489then
10490 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010491 if test "$ac_cv_cxx_thread" = "yes"; then
10492 CXX="$CXX -Kpthread"
10493 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010494 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010495elif test "$ac_cv_kthread" = "yes"
10496then
10497 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010498 if test "$ac_cv_cxx_thread" = "yes"; then
10499 CXX="$CXX -Kthread"
10500 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010501 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010502elif test "$ac_cv_pthread" = "yes"
10503then
10504 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010505 if test "$ac_cv_cxx_thread" = "yes"; then
10506 CXX="$CXX -pthread"
10507 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010508 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010509else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010510 if test ! -z "$withval" -a -d "$withval"
10511 then LDFLAGS="$LDFLAGS -L$withval"
10512 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010513
10514 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010515 # define _POSIX_THREADS in unistd.h. Some apparently don't
10516 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10518$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010521
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010522#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010523#ifdef _POSIX_THREADS
10524yes
10525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010526
10527_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010528if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010529 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010530 unistd_defines_pthreads=yes
10531else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010532 unistd_defines_pthreads=no
10533fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010534rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10537$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010538
Matthias Kloseb9621712010-04-24 17:59:49 +000010539 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010540
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010541 # Just looking for pthread_create in libpthread is not enough:
10542 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10543 # So we really have to include pthread.h, and then link.
10544 _libs=$LIBS
10545 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10547$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010550
10551#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010552#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010553
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010554void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010555int
10556main ()
10557{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010558
10559pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010560 ;
10561 return 0;
10562}
10563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010564if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010565
Matthias Kloseb9621712010-04-24 17:59:49 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10567$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010569
Guido van Rossum02a1c402000-02-25 19:26:31 +000010570else
Martin v. Löwis11437992002-04-12 09:54:03 +000010571
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010572 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010574if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010575
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010576 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010577
Guido van Rossumad678af1998-10-02 14:42:15 +000010578else
Guido van Rossumad678af1998-10-02 14:42:15 +000010579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10581$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010582if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010583 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010584else
Martin v. Löwis11437992002-04-12 09:54:03 +000010585 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010586LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010587cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010589
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590/* Override any GCC internal prototype to avoid an error.
10591 Use char because int might match the return type of a GCC
10592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593#ifdef __cplusplus
10594extern "C"
10595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010596char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010597int
10598main ()
10599{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010600return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010607else
Matthias Kloseb9621712010-04-24 17:59:49 +000010608 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010609fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010610rm -f core conftest.err conftest.$ac_objext \
10611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010612LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10615$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010616if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010618 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010619 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010620
Greg Steinadf63d62000-07-05 10:38:09 +000010621else
Greg Steinadf63d62000-07-05 10:38:09 +000010622
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10624$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010625if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010627else
Martin v. Löwis11437992002-04-12 09:54:03 +000010628 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010629LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633/* Override any GCC internal prototype to avoid an error.
10634 Use char because int might match the return type of a GCC
10635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010636#ifdef __cplusplus
10637extern "C"
10638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010639char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010640int
10641main ()
10642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010643return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010644 ;
10645 return 0;
10646}
10647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010648if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010650else
Matthias Kloseb9621712010-04-24 17:59:49 +000010651 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010652fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010653rm -f core conftest.err conftest.$ac_objext \
10654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010655LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10658$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010659if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010660
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010661 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010662 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010663
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010664else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010665
Matthias Kloseb9621712010-04-24 17:59:49 +000010666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10667$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010668if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010669 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010672LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676/* Override any GCC internal prototype to avoid an error.
10677 Use char because int might match the return type of a GCC
10678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010679#ifdef __cplusplus
10680extern "C"
10681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010682char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010683int
10684main ()
10685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010687 ;
10688 return 0;
10689}
10690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010693else
Matthias Kloseb9621712010-04-24 17:59:49 +000010694 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010695fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010696rm -f core conftest.err conftest.$ac_objext \
10697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10701$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010702if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010703
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010704 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010705 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010706
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010707else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10710$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010711if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010712 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010713else
Martin v. Löwis11437992002-04-12 09:54:03 +000010714 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010715LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010716cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719/* Override any GCC internal prototype to avoid an error.
10720 Use char because int might match the return type of a GCC
10721 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010722#ifdef __cplusplus
10723extern "C"
10724#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010725char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010726int
10727main ()
10728{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ;
10731 return 0;
10732}
10733_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010734if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010736else
Matthias Kloseb9621712010-04-24 17:59:49 +000010737 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010739rm -f core conftest.err conftest.$ac_objext \
10740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010741LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10744$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010745if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010747 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010748 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010749
Guido van Rossumb93a8621998-05-07 13:27:32 +000010750else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010751
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010752 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10753
Guido van Rossum2d38f911996-06-26 19:47:01 +000010754fi
10755
Guido van Rossum627b2d71993-12-24 10:39:16 +000010756
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010757fi
10758
Guido van Rossum0be3e491997-05-22 20:33:33 +000010759fi
10760
Guido van Rossum49545951997-12-02 19:28:29 +000010761fi
10762
Guido van Rossumb93a8621998-05-07 13:27:32 +000010763fi
10764
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010765fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010766rm -f core conftest.err conftest.$ac_objext \
10767 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010768
Matthias Kloseb9621712010-04-24 17:59:49 +000010769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10770$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010771if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010772 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010773else
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010775LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010779/* Override any GCC internal prototype to avoid an error.
10780 Use char because int might match the return type of a GCC
10781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010782#ifdef __cplusplus
10783extern "C"
10784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010785char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010786int
10787main ()
10788{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010789return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 ;
10791 return 0;
10792}
10793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010801LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10804$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010805if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010806
Martin v. Löwis130fb172001-07-19 11:00:41 +000010807 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010808
Guido van Rossum627b2d71993-12-24 10:39:16 +000010809fi
10810
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010811
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010813
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010814if test "$posix_threads" = "yes"; then
10815 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010816
Matthias Kloseb9621712010-04-24 17:59:49 +000010817$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818
10819 fi
10820
10821 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10822 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010823 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010824$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010825
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010826 ;;
10827 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010829
10830 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010831 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010833
10834 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835 esac
10836
Matthias Kloseb9621712010-04-24 17:59:49 +000010837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10838$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010839 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841else
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843 ac_cv_pthread_system_supported=no
10844else
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010846/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010847
10848 #include <stdio.h>
10849 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010850 void *foo(void *parm) {
10851 return NULL;
10852 }
10853 main() {
10854 pthread_attr_t attr;
10855 pthread_t id;
10856 if (pthread_attr_init(&attr)) exit(-1);
10857 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10858 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10859 exit(0);
10860 }
10861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010862if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010863 ac_cv_pthread_system_supported=yes
10864else
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10868 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010869fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871
Guido van Rossum627b2d71993-12-24 10:39:16 +000010872fi
10873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10875$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876 if test "$ac_cv_pthread_system_supported" = "yes"; then
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010879
10880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010881 for ac_func in pthread_sigmask
10882do :
10883 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010884if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010887_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010888 case $ac_sys_system in
10889 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010890
Matthias Kloseb9621712010-04-24 17:59:49 +000010891$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010892
10893 ;;
10894 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010895fi
10896done
10897
pdoxe14679c2017-10-05 00:01:56 -070010898 for ac_func in pthread_getcpuclockid
10899do :
10900 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10901if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10902 cat >>confdefs.h <<_ACEOF
10903#define HAVE_PTHREAD_GETCPUCLOCKID 1
10904_ACEOF
10905
10906fi
10907done
10908
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909fi
10910
10911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010912# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010913
Matthias Kloseb9621712010-04-24 17:59:49 +000010914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10915$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010917if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010918 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10921$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010922 ipv6=no
10923 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10925$as_echo "yes" >&6; }
10926 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010927
10928 ipv6=yes
10929 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010930 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931else
Martin v. Löwis11437992002-04-12 09:54:03 +000010932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010934/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935 /* AF_INET6 available check */
10936#include <sys/types.h>
10937#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010938int
10939main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010941int domain = AF_INET6;
10942 ;
10943 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944}
Martin v. Löwis11437992002-04-12 09:54:03 +000010945_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010946if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010947
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10949$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010950 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952else
Matthias Kloseb159a552010-04-25 21:00:44 +000010953
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010957
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010958fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010961if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10963$as_echo_n "checking if RFC2553 API is available... " >&6; }
10964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
10967 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010968#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010969int
10970main ()
10971{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010972struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010973 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 ;
10975 return 0;
10976}
Matthias Kloseb159a552010-04-25 21:00:44 +000010977
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010979if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
10981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010982$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010983 ipv6=yes
10984
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010985else
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
10987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010988$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010989 ipv6=no
10990
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010993fi
10994
10995if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010997
10998fi
10999
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000fi
11001
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011002
11003ipv6type=unknown
11004ipv6lib=none
11005ipv6trylibc=no
11006
11007if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11009$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011010 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11011 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011012 case $i in
11013 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011017#include <netinet/in.h>
11018#ifdef IPV6_INRIA_VERSION
11019yes
11020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011021_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011024 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011025fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011026rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011027
11028 ;;
11029 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011033#include <netinet/in.h>
11034#ifdef __KAME__
11035yes
11036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011040 ipv6type=$i;
11041 ipv6lib=inet6
11042 ipv6libdir=/usr/local/v6/lib
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-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011052#include <features.h>
11053#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11054yes
11055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 $EGREP "yes" >/dev/null 2>&1; 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 +000011061fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063
11064 ;;
11065 linux-inet6)
11066 if test -d /usr/inet6; then
11067 ipv6type=$i
11068 ipv6lib=inet6
11069 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011070 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071 fi
11072 ;;
11073 solaris)
11074 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011075 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011076 ipv6type=$i
11077 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011078 fi
11079 fi
11080 ;;
11081 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085#include <sys/param.h>
11086#ifdef _TOSHIBA_INET6
11087yes
11088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 ipv6type=$i;
11093 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011094 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011095fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011096rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011097
11098 ;;
11099 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011102
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011103#include </usr/local/v6/include/sys/v6config.h>
11104#ifdef __V6D__
11105yes
11106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011107_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011108if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011110 ipv6type=$i;
11111 ipv6lib=v6;
11112 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011113 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011115rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011116
11117 ;;
11118 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011120/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011121
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011122#include <sys/param.h>
11123#ifdef _ZETA_MINAMI_INET6
11124yes
11125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011126_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011129 ipv6type=$i;
11130 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011131 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011132fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011133rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011134
11135 ;;
11136 esac
11137 if test "$ipv6type" != "unknown"; then
11138 break
11139 fi
11140 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11142$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143fi
11144
11145if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11146 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11147 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11148 echo "using lib$ipv6lib"
11149 else
11150 if test $ipv6trylibc = "yes"; then
11151 echo "using libc"
11152 else
11153 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11154 echo "You need to fetch lib$ipv6lib.a from appropriate"
11155 echo 'ipv6 kit and compile beforehand.'
11156 exit 1
11157 fi
11158 fi
11159fi
11160
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11162$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11164/* end confdefs.h. */
11165 /* CAN_RAW_FD_FRAMES available check */
11166#include <linux/can/raw.h>
11167int
11168main ()
11169{
11170int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11171 ;
11172 return 0;
11173}
11174_ACEOF
11175if ac_fn_c_try_compile "$LINENO"; then :
11176
11177
11178$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11179
11180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11181$as_echo "yes" >&6; }
11182
11183else
11184
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11186$as_echo "no" >&6; }
11187
11188fi
11189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11190
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011191# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11193$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011195# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011196if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011197 withval=$with_doc_strings;
11198fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011199
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011200
11201if test -z "$with_doc_strings"
11202then with_doc_strings="yes"
11203fi
11204if test "$with_doc_strings" != "no"
11205then
11206
Matthias Kloseb9621712010-04-24 17:59:49 +000011207$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011208
11209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11211$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011212
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011213# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11215$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011216
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011217# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011218if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219 withval=$with_pymalloc;
11220fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011221
Neil Schemenauera35c6882001-02-27 04:45:05 +000011222
Neil Schemenauer16c22972002-03-22 15:34:49 +000011223if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011224then
11225 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011226fi
11227if test "$with_pymalloc" != "no"
11228then
Martin v. Löwis11437992002-04-12 09:54:03 +000011229
Matthias Kloseb9621712010-04-24 17:59:49 +000011230$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011231
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011232 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11235$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011236
Nick Coghlan6ea41862017-06-11 13:16:15 +100011237# Check for --with-c-locale-coercion
11238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11239$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11240
11241# Check whether --with-c-locale-coercion was given.
11242if test "${with_c_locale_coercion+set}" = set; then :
11243 withval=$with_c_locale_coercion;
11244fi
11245
11246
11247if test -z "$with_c_locale_coercion"
11248then
11249 with_c_locale_coercion="yes"
11250fi
11251if test "$with_c_locale_coercion" != "no"
11252then
11253
11254$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11255
11256fi
11257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11258$as_echo "$with_c_locale_coercion" >&6; }
11259
Benjamin Peterson05159c42009-12-03 03:01:27 +000011260# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11262$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011263
11264# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011265if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011266 withval=$with_valgrind;
11267else
11268 with_valgrind=no
11269fi
11270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11272$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011273if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011274 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 +020011275if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011276
Matthias Kloseb9621712010-04-24 17:59:49 +000011277$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011278
11279else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011280 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011281
11282fi
11283
11284
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011285 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011286fi
11287
Łukasz Langaa785c872016-09-09 17:37:37 -070011288# Check for DTrace support
11289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11290$as_echo_n "checking for --with-dtrace... " >&6; }
11291
11292# Check whether --with-dtrace was given.
11293if test "${with_dtrace+set}" = set; then :
11294 withval=$with_dtrace;
11295else
11296 with_dtrace=no
11297fi
11298
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11300$as_echo "$with_dtrace" >&6; }
11301
11302
11303
11304
11305
11306DTRACE=
11307DFLAGS=
11308DTRACE_HEADERS=
11309DTRACE_OBJS=
11310
11311if test "$with_dtrace" = "yes"
11312then
11313 # Extract the first word of "dtrace", so it can be a program name with args.
11314set dummy dtrace; ac_word=$2
11315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11316$as_echo_n "checking for $ac_word... " >&6; }
11317if ${ac_cv_path_DTRACE+:} false; then :
11318 $as_echo_n "(cached) " >&6
11319else
11320 case $DTRACE in
11321 [\\/]* | ?:[\\/]*)
11322 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11323 ;;
11324 *)
11325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11326for as_dir in $PATH
11327do
11328 IFS=$as_save_IFS
11329 test -z "$as_dir" && as_dir=.
11330 for ac_exec_ext in '' $ac_executable_extensions; do
11331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11332 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11334 break 2
11335 fi
11336done
11337 done
11338IFS=$as_save_IFS
11339
11340 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11341 ;;
11342esac
11343fi
11344DTRACE=$ac_cv_path_DTRACE
11345if test -n "$DTRACE"; then
11346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11347$as_echo "$DTRACE" >&6; }
11348else
11349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11350$as_echo "no" >&6; }
11351fi
11352
11353
11354 if test "$DTRACE" = "not found"; then
11355 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11356 fi
11357
11358$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11359
11360 DTRACE_HEADERS="Include/pydtrace_probes.h"
11361
11362 # On OS X, DTrace providers do not need to be explicitly compiled and
11363 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11364 # generation flag '-G'. We check for presence of this flag, rather than
11365 # hardcoding support by OS, in the interest of robustness.
11366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11367$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11368if ${ac_cv_dtrace_link+:} false; then :
11369 $as_echo_n "(cached) " >&6
11370else
11371 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011372 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011373 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11374 ac_cv_dtrace_link=yes
11375
11376fi
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11378$as_echo "$ac_cv_dtrace_link" >&6; }
11379 if test "$ac_cv_dtrace_link" = "yes"; then
11380 DTRACE_OBJS="Python/pydtrace.o"
11381 fi
11382fi
11383
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011384# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011385
Guido van Rossum98935bf2001-09-05 19:13:16 +000011386DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011387
Guido van Rossume97ee181999-12-20 21:27:22 +000011388# the dlopen() function means we might want to use dynload_shlib.o. some
11389# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011390for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011391do :
11392 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011393if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011396_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011397
Guido van Rossume97ee181999-12-20 21:27:22 +000011398fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011399done
Guido van Rossume97ee181999-12-20 21:27:22 +000011400
Michael W. Hudson54241132001-12-07 15:38:26 +000011401
Guido van Rossume97ee181999-12-20 21:27:22 +000011402# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11403# loading of modules.
11404
Matthias Kloseb9621712010-04-24 17:59:49 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11406$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011407if test -z "$DYNLOADFILE"
11408then
11409 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011410 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11411 if test "$ac_cv_func_dlopen" = yes
11412 then DYNLOADFILE="dynload_shlib.o"
11413 else DYNLOADFILE="dynload_aix.o"
11414 fi
11415 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011416 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011417 *)
11418 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11419 # out any dynamic loading
11420 if test "$ac_cv_func_dlopen" = yes
11421 then DYNLOADFILE="dynload_shlib.o"
11422 else DYNLOADFILE="dynload_stub.o"
11423 fi
11424 ;;
11425 esac
11426fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11428$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011429if test "$DYNLOADFILE" != "dynload_stub.o"
11430then
Martin v. Löwis11437992002-04-12 09:54:03 +000011431
Matthias Kloseb9621712010-04-24 17:59:49 +000011432$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011433
11434fi
11435
Neil Schemenauer4e425612001-06-19 15:44:15 +000011436# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11437
Michael W. Hudson54241132001-12-07 15:38:26 +000011438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11440$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011441if test -z "$MACHDEP_OBJS"
11442then
Jack Jansene578a632001-08-15 01:27:14 +000011443 MACHDEP_OBJS=$extra_machdep_objs
11444else
11445 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011446fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011447if test -z "$MACHDEP_OBJS"; then
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11449$as_echo "none" >&6; }
11450else
11451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11452$as_echo "$MACHDEP_OBJS" >&6; }
11453fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011454
Guido van Rossum627b2d71993-12-24 10:39:16 +000011455# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011456for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011457 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011458 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011459 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011460 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011461 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011462 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011463 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011464 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011465 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011466 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011467 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011468 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11469 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011470 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011471 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011472 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011473 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11474 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011475 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011476 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011477 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011478 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011479 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011480do :
11481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011486_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011487
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011488fi
11489done
11490
Michael W. Hudson54241132001-12-07 15:38:26 +000011491
Benjamin Peterson40caa052018-09-12 15:52:40 -070011492# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11493# links. Some libc implementations have a stub lchmod implementation that always
11494# returns an error.
11495if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011496 for ac_func in lchmod
11497do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011498 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11499if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011500 cat >>confdefs.h <<_ACEOF
11501#define HAVE_LCHMOD 1
11502_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011503
11504fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011505done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011506
11507fi
11508
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011509ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11510 #include <dirent.h>
11511"
11512if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11513
11514$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11515
11516fi
11517
11518
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011519# For some functions, having a definition is not sufficient, since
11520# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11522$as_echo_n "checking for chroot... " >&6; }
11523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011524/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011525#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011526int
11527main ()
11528{
11529void *x=chroot
11530 ;
11531 return 0;
11532}
11533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011537
Matthias Kloseb159a552010-04-25 21:00:44 +000011538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011539$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011540else
Matthias Kloseb9621712010-04-24 17:59:49 +000011541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11542$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543
11544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11547$as_echo_n "checking for link... " >&6; }
11548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011549/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011550#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551int
11552main ()
11553{
11554void *x=link
11555 ;
11556 return 0;
11557}
11558_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011560
Matthias Kloseb9621712010-04-24 17:59:49 +000011561$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011562
Matthias Kloseb159a552010-04-25 21:00:44 +000011563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011564$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011565else
Matthias Kloseb9621712010-04-24 17:59:49 +000011566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
11569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11572$as_echo_n "checking for symlink... " >&6; }
11573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011574/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576int
11577main ()
11578{
11579void *x=symlink
11580 ;
11581 return 0;
11582}
11583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011585
Matthias Kloseb9621712010-04-24 17:59:49 +000011586$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011587
Matthias Kloseb159a552010-04-25 21:00:44 +000011588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011589$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011590else
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11592$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
11594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11597$as_echo_n "checking for fchdir... " >&6; }
11598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011600#include <unistd.h>
11601int
11602main ()
11603{
11604void *x=fchdir
11605 ;
11606 return 0;
11607}
11608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011610
Matthias Kloseb9621712010-04-24 17:59:49 +000011611$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011612
Matthias Kloseb159a552010-04-25 21:00:44 +000011613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011614$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011615else
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11617$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618
11619fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11622$as_echo_n "checking for fsync... " >&6; }
11623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011624/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011625#include <unistd.h>
11626int
11627main ()
11628{
11629void *x=fsync
11630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011637
Matthias Kloseb159a552010-04-25 21:00:44 +000011638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011639$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011640else
Matthias Kloseb9621712010-04-24 17:59:49 +000011641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11642$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
11644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11647$as_echo_n "checking for fdatasync... " >&6; }
11648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011649/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650#include <unistd.h>
11651int
11652main ()
11653{
11654void *x=fdatasync
11655 ;
11656 return 0;
11657}
11658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011659if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011660
Matthias Kloseb9621712010-04-24 17:59:49 +000011661$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011662
Matthias Kloseb159a552010-04-25 21:00:44 +000011663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011664$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11667$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
11669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11672$as_echo_n "checking for epoll... " >&6; }
11673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011674/* end confdefs.h. */
11675#include <sys/epoll.h>
11676int
11677main ()
11678{
11679void *x=epoll_create
11680 ;
11681 return 0;
11682}
11683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011684if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011685
Matthias Kloseb9621712010-04-24 17:59:49 +000011686$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011687
Matthias Kloseb159a552010-04-25 21:00:44 +000011688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011689$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011690else
Matthias Kloseb9621712010-04-24 17:59:49 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11692$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011693
11694fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11697$as_echo_n "checking for epoll_create1... " >&6; }
11698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11699/* end confdefs.h. */
11700#include <sys/epoll.h>
11701int
11702main ()
11703{
11704void *x=epoll_create1
11705 ;
11706 return 0;
11707}
11708_ACEOF
11709if ac_fn_c_try_compile "$LINENO"; then :
11710
11711$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11712
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11714$as_echo "yes" >&6; }
11715else
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11717$as_echo "no" >&6; }
11718
11719fi
11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11722$as_echo_n "checking for kqueue... " >&6; }
11723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011724/* end confdefs.h. */
11725
11726#include <sys/types.h>
11727#include <sys/event.h>
11728
11729int
11730main ()
11731{
11732int x=kqueue()
11733 ;
11734 return 0;
11735}
11736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011737if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011738
Matthias Kloseb9621712010-04-24 17:59:49 +000011739$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011740
Matthias Kloseb159a552010-04-25 21:00:44 +000011741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011742$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011743else
Matthias Kloseb9621712010-04-24 17:59:49 +000011744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746
11747fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11750$as_echo_n "checking for prlimit... " >&6; }
11751cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11752/* end confdefs.h. */
11753
11754#include <sys/time.h>
11755#include <sys/resource.h>
11756
11757int
11758main ()
11759{
11760void *x=prlimit
11761 ;
11762 return 0;
11763}
11764_ACEOF
11765if ac_fn_c_try_compile "$LINENO"; then :
11766
11767$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11768
11769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11770$as_echo "yes" >&6; }
11771else
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11773$as_echo "no" >&6; }
11774
11775fi
11776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11777
Martin v. Löwisd5843682002-11-21 20:41:28 +000011778# On some systems (eg. FreeBSD 5), we would find a definition of the
11779# functions ctermid_r, setgroups in the library, but no prototype
11780# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11781# address to avoid compiler warnings and potential miscompilations
11782# because of the missing prototypes.
11783
Matthias Kloseb9621712010-04-24 17:59:49 +000011784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11785$as_echo_n "checking for ctermid_r... " >&6; }
11786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011787/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011788
Martin v. Löwisd5843682002-11-21 20:41:28 +000011789#include <stdio.h>
11790
Martin v. Löwisd5843682002-11-21 20:41:28 +000011791int
11792main ()
11793{
11794void* p = ctermid_r
11795 ;
11796 return 0;
11797}
11798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011800
Matthias Kloseb9621712010-04-24 17:59:49 +000011801$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011802
Matthias Kloseb159a552010-04-25 21:00:44 +000011803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011804$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011805else
Matthias Kloseb9621712010-04-24 17:59:49 +000011806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11807$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011808
11809fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11811
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11813$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011814if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011815 $as_echo_n "(cached) " >&6
11816else
11817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011818/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011819#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011820int
11821main ()
11822{
11823void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011824
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011825 ;
11826 return 0;
11827}
11828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011829if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011830 ac_cv_flock_decl=yes
11831else
11832 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011833
11834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011836
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011837fi
11838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11839$as_echo "$ac_cv_flock_decl" >&6; }
11840if test "x${ac_cv_flock_decl}" = xyes; then
11841 for ac_func in flock
11842do :
11843 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011844if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011845 cat >>confdefs.h <<_ACEOF
11846#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011847_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011848
Antoine Pitroua3000072010-09-07 14:52:42 +000011849else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011851$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011853 $as_echo_n "(cached) " >&6
11854else
11855 ac_check_lib_save_LIBS=$LIBS
11856LIBS="-lbsd $LIBS"
11857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11858/* end confdefs.h. */
11859
11860/* Override any GCC internal prototype to avoid an error.
11861 Use char because int might match the return type of a GCC
11862 builtin and then its argument prototype would still apply. */
11863#ifdef __cplusplus
11864extern "C"
11865#endif
11866char flock ();
11867int
11868main ()
11869{
11870return flock ();
11871 ;
11872 return 0;
11873}
11874_ACEOF
11875if ac_fn_c_try_link "$LINENO"; then :
11876 ac_cv_lib_bsd_flock=yes
11877else
11878 ac_cv_lib_bsd_flock=no
11879fi
11880rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext conftest.$ac_ext
11882LIBS=$ac_check_lib_save_LIBS
11883fi
11884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11885$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011886if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011887 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011888
11889
11890$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11891
11892
11893fi
11894
11895
11896fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011897done
11898
Antoine Pitroua3000072010-09-07 14:52:42 +000011899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11902$as_echo_n "checking for getpagesize... " >&6; }
11903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011904/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011905
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011906#include <unistd.h>
11907
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011908int
11909main ()
11910{
11911void* p = getpagesize
11912 ;
11913 return 0;
11914}
11915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011916if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011919
Matthias Kloseb159a552010-04-25 21:00:44 +000011920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011921$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011922else
Matthias Kloseb9621712010-04-24 17:59:49 +000011923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11924$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011925
11926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011928
Victor Stinner984890f2011-11-24 13:53:38 +010011929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11930$as_echo_n "checking for broken unsetenv... " >&6; }
11931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11932/* end confdefs.h. */
11933
11934#include <stdlib.h>
11935
11936int
11937main ()
11938{
11939int res = unsetenv("DUMMY")
11940 ;
11941 return 0;
11942}
11943_ACEOF
11944if ac_fn_c_try_compile "$LINENO"; then :
11945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11946$as_echo "no" >&6; }
11947else
11948
11949$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11950
11951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11952$as_echo "yes" >&6; }
11953
11954fi
11955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11956
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011957for ac_prog in true
11958do
11959 # Extract the first word of "$ac_prog", so it can be a program name with args.
11960set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11962$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011963if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011965else
11966 if test -n "$TRUE"; then
11967 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11968else
11969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11970for as_dir in $PATH
11971do
11972 IFS=$as_save_IFS
11973 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011976 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 $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 +000011978 break 2
11979 fi
11980done
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011983
11984fi
11985fi
11986TRUE=$ac_cv_prog_TRUE
11987if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11989$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011990else
Matthias Kloseb9621712010-04-24 17:59:49 +000011991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011993fi
11994
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011995
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011996 test -n "$TRUE" && break
11997done
11998test -n "$TRUE" || TRUE="/bin/true"
11999
12000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12002$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012003if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012004 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012005else
12006 ac_check_lib_save_LIBS=$LIBS
12007LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012008cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012009/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011/* Override any GCC internal prototype to avoid an error.
12012 Use char because int might match the return type of a GCC
12013 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014#ifdef __cplusplus
12015extern "C"
12016#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012017char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012018int
12019main ()
12020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012021return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012022 ;
12023 return 0;
12024}
12025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012026if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012027 ac_cv_lib_c_inet_aton=yes
12028else
Matthias Kloseb9621712010-04-24 17:59:49 +000012029 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012031rm -f core conftest.err conftest.$ac_objext \
12032 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012033LIBS=$ac_check_lib_save_LIBS
12034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12036$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012038 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12041$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012043 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012044else
12045 ac_check_lib_save_LIBS=$LIBS
12046LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012048/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012050/* Override any GCC internal prototype to avoid an error.
12051 Use char because int might match the return type of a GCC
12052 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053#ifdef __cplusplus
12054extern "C"
12055#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012056char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057int
12058main ()
12059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012060return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061 ;
12062 return 0;
12063}
12064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012065if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012066 ac_cv_lib_resolv_inet_aton=yes
12067else
Matthias Kloseb9621712010-04-24 17:59:49 +000012068 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012070rm -f core conftest.err conftest.$ac_objext \
12071 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012072LIBS=$ac_check_lib_save_LIBS
12073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12075$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012076if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077 cat >>confdefs.h <<_ACEOF
12078#define HAVE_LIBRESOLV 1
12079_ACEOF
12080
12081 LIBS="-lresolv $LIBS"
12082
12083fi
12084
12085
12086fi
12087
12088
Christian Heimesd0764e22007-12-04 15:00:33 +000012089# On Tru64, chflags seems to be present, but calling it will
12090# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12092$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012097 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012100/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012101
Christian Heimesd0764e22007-12-04 15:00:33 +000012102#include <sys/stat.h>
12103#include <unistd.h>
12104int main(int argc, char*argv[])
12105{
12106 if(chflags(argv[0], 0) != 0)
12107 return 1;
12108 return 0;
12109}
Ned Deily3eb67d52011-06-28 00:00:28 -070012110
Christian Heimesd0764e22007-12-04 15:00:33 +000012111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012112if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012113 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012117rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12118 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012119fi
12120
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12124$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012125if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012127if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012128 ac_cv_have_chflags="yes"
12129else
12130 ac_cv_have_chflags="no"
12131fi
12132
12133fi
12134if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012135
Matthias Kloseb9621712010-04-24 17:59:49 +000012136$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012137
12138fi
12139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12141$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012142if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012146 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012149/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012150
Christian Heimesd0764e22007-12-04 15:00:33 +000012151#include <sys/stat.h>
12152#include <unistd.h>
12153int main(int argc, char*argv[])
12154{
12155 if(lchflags(argv[0], 0) != 0)
12156 return 1;
12157 return 0;
12158}
Ned Deily3eb67d52011-06-28 00:00:28 -070012159
Christian Heimesd0764e22007-12-04 15:00:33 +000012160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012161if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012162 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012165fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12167 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012168fi
12169
12170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012171fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12173$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012174if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012176if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012177 ac_cv_have_lchflags="yes"
12178else
12179 ac_cv_have_lchflags="no"
12180fi
12181
12182fi
12183if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012184
Matthias Kloseb9621712010-04-24 17:59:49 +000012185$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012186
12187fi
12188
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012189case $ac_sys_system/$ac_sys_release in
12190Darwin/*)
12191 _CUR_CFLAGS="${CFLAGS}"
12192 _CUR_LDFLAGS="${LDFLAGS}"
12193 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12194 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12195 ;;
12196esac
12197
Matthias Kloseb9621712010-04-24 17:59:49 +000012198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12199$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012200if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012201 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012202else
12203 ac_check_lib_save_LIBS=$LIBS
12204LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012206/* end confdefs.h. */
12207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208/* Override any GCC internal prototype to avoid an error.
12209 Use char because int might match the return type of a GCC
12210 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012211#ifdef __cplusplus
12212extern "C"
12213#endif
12214char inflateCopy ();
12215int
12216main ()
12217{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012219 ;
12220 return 0;
12221}
12222_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012223if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012224 ac_cv_lib_z_inflateCopy=yes
12225else
Matthias Kloseb9621712010-04-24 17:59:49 +000012226 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228rm -f core conftest.err conftest.$ac_objext \
12229 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012230LIBS=$ac_check_lib_save_LIBS
12231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12233$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012237
12238fi
12239
12240
12241case $ac_sys_system/$ac_sys_release in
12242Darwin/*)
12243 CFLAGS="${_CUR_CFLAGS}"
12244 LDFLAGS="${_CUR_LDFLAGS}"
12245 ;;
12246esac
12247
Matthias Kloseb9621712010-04-24 17:59:49 +000012248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12249$as_echo_n "checking for hstrerror... " >&6; }
12250cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012251/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012252
Martin v. Löwise9416172003-05-03 10:12:45 +000012253#include <netdb.h>
12254
Martin v. Löwise9416172003-05-03 10:12:45 +000012255int
12256main ()
12257{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012258void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012259 ;
12260 return 0;
12261}
12262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012264
Matthias Kloseb9621712010-04-24 17:59:49 +000012265$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012266
Matthias Kloseb159a552010-04-25 21:00:44 +000012267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12271$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012272
12273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012274rm -f core conftest.err conftest.$ac_objext \
12275 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276
Matthias Kloseb9621712010-04-24 17:59:49 +000012277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12278$as_echo_n "checking for inet_aton... " >&6; }
12279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012280/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012281
Martin v. Löwis86d66262006-02-17 08:40:11 +000012282#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012283#include <sys/socket.h>
12284#include <netinet/in.h>
12285#include <arpa/inet.h>
12286
Martin v. Löwise9416172003-05-03 10:12:45 +000012287int
12288main ()
12289{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012290void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012298
Matthias Kloseb159a552010-04-25 21:00:44 +000012299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012304
12305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12310$as_echo_n "checking for inet_pton... " >&6; }
12311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012312/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012313
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012314#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012315#include <sys/socket.h>
12316#include <netinet/in.h>
12317#include <arpa/inet.h>
12318
Martin v. Löwise9416172003-05-03 10:12:45 +000012319int
12320main ()
12321{
12322void* p = inet_pton
12323 ;
12324 return 0;
12325}
12326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb159a552010-04-25 21:00:44 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
12337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012339
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012340# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12342$as_echo_n "checking for setgroups... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012345
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012346#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012347#ifdef HAVE_GRP_H
12348#include <grp.h>
12349#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012350
Martin v. Löwisd5843682002-11-21 20:41:28 +000012351int
12352main ()
12353{
12354void* p = setgroups
12355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012362
Matthias Kloseb159a552010-04-25 21:00:44 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12367$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012368
12369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012371
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012372# check for openpty and forkpty
12373
12374for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012375do :
12376 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012377if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012379#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012380_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012381
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012382else
Matthias Kloseb9621712010-04-24 17:59:49 +000012383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12384$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012386 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012387else
Martin v. Löwis11437992002-04-12 09:54:03 +000012388 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012389LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012392
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012393/* Override any GCC internal prototype to avoid an error.
12394 Use char because int might match the return type of a GCC
12395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012396#ifdef __cplusplus
12397extern "C"
12398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012399char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012400int
12401main ()
12402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012404 ;
12405 return 0;
12406}
12407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012408if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012409 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012410else
Matthias Kloseb9621712010-04-24 17:59:49 +000012411 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012413rm -f core conftest.err conftest.$ac_objext \
12414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012415LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12418$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012419if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012422else
Matthias Kloseb9621712010-04-24 17:59:49 +000012423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12424$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012425if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012426 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012427else
12428 ac_check_lib_save_LIBS=$LIBS
12429LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012431/* end confdefs.h. */
12432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012433/* Override any GCC internal prototype to avoid an error.
12434 Use char because int might match the return type of a GCC
12435 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012436#ifdef __cplusplus
12437extern "C"
12438#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012439char openpty ();
12440int
12441main ()
12442{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012444 ;
12445 return 0;
12446}
12447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012449 ac_cv_lib_bsd_openpty=yes
12450else
Matthias Kloseb9621712010-04-24 17:59:49 +000012451 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012452fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012453rm -f core conftest.err conftest.$ac_objext \
12454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012455LIBS=$ac_check_lib_save_LIBS
12456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12458$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012459if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012461 LIBS="$LIBS -lbsd"
12462fi
12463
12464
12465fi
12466
Fred Drake8cef4cf2000-06-28 16:40:38 +000012467
12468fi
12469done
12470
12471for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012472do :
12473 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012474if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012475 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012476#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012477_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012478
Fred Drake8cef4cf2000-06-28 16:40:38 +000012479else
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12481$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012482if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012484else
Martin v. Löwis11437992002-04-12 09:54:03 +000012485 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012486LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012487cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012490/* Override any GCC internal prototype to avoid an error.
12491 Use char because int might match the return type of a GCC
12492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012493#ifdef __cplusplus
12494extern "C"
12495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012496char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012501 ;
12502 return 0;
12503}
12504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012505if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012506 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012507else
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510rm -f core conftest.err conftest.$ac_objext \
12511 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012512LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12515$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012516if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012519else
Matthias Kloseb9621712010-04-24 17:59:49 +000012520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12521$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012522if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012524else
12525 ac_check_lib_save_LIBS=$LIBS
12526LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528/* end confdefs.h. */
12529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530/* Override any GCC internal prototype to avoid an error.
12531 Use char because int might match the return type of a GCC
12532 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012533#ifdef __cplusplus
12534extern "C"
12535#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012536char forkpty ();
12537int
12538main ()
12539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541 ;
12542 return 0;
12543}
12544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012546 ac_cv_lib_bsd_forkpty=yes
12547else
Matthias Kloseb9621712010-04-24 17:59:49 +000012548 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012549fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012550rm -f core conftest.err conftest.$ac_objext \
12551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012552LIBS=$ac_check_lib_save_LIBS
12553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12555$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012556if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012557 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012558 LIBS="$LIBS -lbsd"
12559fi
12560
12561
12562fi
12563
Fred Drake8cef4cf2000-06-28 16:40:38 +000012564
12565fi
12566done
12567
Jack Jansendd19cf82001-12-06 22:36:17 +000012568
Michael W. Hudson54241132001-12-07 15:38:26 +000012569# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012570for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012571do :
12572 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12573ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012574if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012575 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012576#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012577_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012578
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012579fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012580done
12581
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012583ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012584if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012585 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012586
Martin v. Löwis1142de32002-03-29 16:28:31 +000012587else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012588 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012589 *" dup2.$ac_objext "* ) ;;
12590 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012592esac
12593
Martin v. Löwis1142de32002-03-29 16:28:31 +000012594fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012595
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012596ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012597if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012598 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12599
12600else
12601 case " $LIBOBJS " in
12602 *" strdup.$ac_objext "* ) ;;
12603 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12604 ;;
12605esac
12606
12607fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012608
12609
12610for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012611do :
12612 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012613if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012614 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012615#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012618/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012619#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 ;
12625 return 0;
12626}
12627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012631
Guido van Rossum627b2d71993-12-24 10:39:16 +000012632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012634
Guido van Rossum627b2d71993-12-24 10:39:16 +000012635fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012636done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012637
Jack Jansen150753c2003-03-29 22:07:47 +000012638for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012639do :
12640 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012641if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012642 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012643#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012646/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012647#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012648int
12649main ()
12650{
12651setpgrp(0,0);
12652 ;
12653 return 0;
12654}
12655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012656if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012657
Matthias Kloseb9621712010-04-24 17:59:49 +000012658$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012659
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012662
12663fi
12664done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012665
Thomas Wouters3a584202000-08-05 23:28:51 +000012666for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012667do :
12668 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012669if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012674/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012675#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012676int
12677main ()
12678{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012679gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012680 ;
12681 return 0;
12682}
12683_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012684if ac_fn_c_try_compile "$LINENO"; then :
12685
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686else
Skip Montanaro6dead952003-09-25 14:50:04 +000012687
Matthias Kloseb9621712010-04-24 17:59:49 +000012688$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012689
Martin v. Löwis11437992002-04-12 09:54:03 +000012690
Guido van Rossum627b2d71993-12-24 10:39:16 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012695done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696
Michael W. Hudson54241132001-12-07 15:38:26 +000012697
Gregory P. Smith387512c2018-12-30 15:42:32 -080012698# We search for both crypt and crypt_r as one or the other may be defined
12699# This gets us our -lcrypt in LIBS when required on the target platform.
12700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12701$as_echo_n "checking for library containing crypt... " >&6; }
12702if ${ac_cv_search_crypt+:} false; then :
12703 $as_echo_n "(cached) " >&6
12704else
12705 ac_func_search_save_LIBS=$LIBS
12706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12707/* end confdefs.h. */
12708
12709/* Override any GCC internal prototype to avoid an error.
12710 Use char because int might match the return type of a GCC
12711 builtin and then its argument prototype would still apply. */
12712#ifdef __cplusplus
12713extern "C"
12714#endif
12715char crypt ();
12716int
12717main ()
12718{
12719return crypt ();
12720 ;
12721 return 0;
12722}
12723_ACEOF
12724for ac_lib in '' crypt; do
12725 if test -z "$ac_lib"; then
12726 ac_res="none required"
12727 else
12728 ac_res=-l$ac_lib
12729 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12730 fi
12731 if ac_fn_c_try_link "$LINENO"; then :
12732 ac_cv_search_crypt=$ac_res
12733fi
12734rm -f core conftest.err conftest.$ac_objext \
12735 conftest$ac_exeext
12736 if ${ac_cv_search_crypt+:} false; then :
12737 break
12738fi
12739done
12740if ${ac_cv_search_crypt+:} false; then :
12741
12742else
12743 ac_cv_search_crypt=no
12744fi
12745rm conftest.$ac_ext
12746LIBS=$ac_func_search_save_LIBS
12747fi
12748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12749$as_echo "$ac_cv_search_crypt" >&6; }
12750ac_res=$ac_cv_search_crypt
12751if test "$ac_res" != no; then :
12752 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12753
12754fi
12755
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12757$as_echo_n "checking for library containing crypt_r... " >&6; }
12758if ${ac_cv_search_crypt_r+:} false; then :
12759 $as_echo_n "(cached) " >&6
12760else
12761 ac_func_search_save_LIBS=$LIBS
12762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12763/* end confdefs.h. */
12764
12765/* Override any GCC internal prototype to avoid an error.
12766 Use char because int might match the return type of a GCC
12767 builtin and then its argument prototype would still apply. */
12768#ifdef __cplusplus
12769extern "C"
12770#endif
12771char crypt_r ();
12772int
12773main ()
12774{
12775return crypt_r ();
12776 ;
12777 return 0;
12778}
12779_ACEOF
12780for ac_lib in '' crypt; do
12781 if test -z "$ac_lib"; then
12782 ac_res="none required"
12783 else
12784 ac_res=-l$ac_lib
12785 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12786 fi
12787 if ac_fn_c_try_link "$LINENO"; then :
12788 ac_cv_search_crypt_r=$ac_res
12789fi
12790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext
12792 if ${ac_cv_search_crypt_r+:} false; then :
12793 break
12794fi
12795done
12796if ${ac_cv_search_crypt_r+:} false; then :
12797
12798else
12799 ac_cv_search_crypt_r=no
12800fi
12801rm conftest.$ac_ext
12802LIBS=$ac_func_search_save_LIBS
12803fi
12804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12805$as_echo "$ac_cv_search_crypt_r" >&6; }
12806ac_res=$ac_cv_search_crypt_r
12807if test "$ac_res" != no; then :
12808 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12809
12810fi
12811
12812
12813ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12814if test "x$ac_cv_func_crypt_r" = xyes; then :
12815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12816/* end confdefs.h. */
12817
12818#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12819#include <crypt.h>
12820
12821int
12822main ()
12823{
12824
12825struct crypt_data d;
12826char *r = crypt_r("", "", &d);
12827
12828 ;
12829 return 0;
12830}
12831_ACEOF
12832if ac_fn_c_try_compile "$LINENO"; then :
12833
12834$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12835
12836fi
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12838
12839fi
12840
12841
Victor Stinnere0be4232011-10-25 13:06:09 +020012842for ac_func in clock_gettime
12843do :
12844 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12845if test "x$ac_cv_func_clock_gettime" = xyes; then :
12846 cat >>confdefs.h <<_ACEOF
12847#define HAVE_CLOCK_GETTIME 1
12848_ACEOF
12849
12850else
12851
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12853$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12854if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12855 $as_echo_n "(cached) " >&6
12856else
12857 ac_check_lib_save_LIBS=$LIBS
12858LIBS="-lrt $LIBS"
12859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12860/* end confdefs.h. */
12861
12862/* Override any GCC internal prototype to avoid an error.
12863 Use char because int might match the return type of a GCC
12864 builtin and then its argument prototype would still apply. */
12865#ifdef __cplusplus
12866extern "C"
12867#endif
12868char clock_gettime ();
12869int
12870main ()
12871{
12872return clock_gettime ();
12873 ;
12874 return 0;
12875}
12876_ACEOF
12877if ac_fn_c_try_link "$LINENO"; then :
12878 ac_cv_lib_rt_clock_gettime=yes
12879else
12880 ac_cv_lib_rt_clock_gettime=no
12881fi
12882rm -f core conftest.err conftest.$ac_objext \
12883 conftest$ac_exeext conftest.$ac_ext
12884LIBS=$ac_check_lib_save_LIBS
12885fi
12886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12887$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12888if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12889
Victor Stinner7efb8332014-08-29 15:41:08 +020012890 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012891 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12892
12893
12894$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12895
12896
12897fi
12898
12899
12900fi
12901done
12902
12903
12904for ac_func in clock_getres
12905do :
12906 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12907if test "x$ac_cv_func_clock_getres" = xyes; then :
12908 cat >>confdefs.h <<_ACEOF
12909#define HAVE_CLOCK_GETRES 1
12910_ACEOF
12911
12912else
12913
12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12915$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12916if ${ac_cv_lib_rt_clock_getres+:} false; then :
12917 $as_echo_n "(cached) " >&6
12918else
12919 ac_check_lib_save_LIBS=$LIBS
12920LIBS="-lrt $LIBS"
12921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12922/* end confdefs.h. */
12923
12924/* Override any GCC internal prototype to avoid an error.
12925 Use char because int might match the return type of a GCC
12926 builtin and then its argument prototype would still apply. */
12927#ifdef __cplusplus
12928extern "C"
12929#endif
12930char clock_getres ();
12931int
12932main ()
12933{
12934return clock_getres ();
12935 ;
12936 return 0;
12937}
12938_ACEOF
12939if ac_fn_c_try_link "$LINENO"; then :
12940 ac_cv_lib_rt_clock_getres=yes
12941else
12942 ac_cv_lib_rt_clock_getres=no
12943fi
12944rm -f core conftest.err conftest.$ac_objext \
12945 conftest$ac_exeext conftest.$ac_ext
12946LIBS=$ac_check_lib_save_LIBS
12947fi
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12949$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12950if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12951
12952 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12953
12954
12955fi
12956
12957
12958fi
12959done
12960
12961
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012962for ac_func in clock_settime
12963do :
12964 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12965if test "x$ac_cv_func_clock_settime" = xyes; then :
12966 cat >>confdefs.h <<_ACEOF
12967#define HAVE_CLOCK_SETTIME 1
12968_ACEOF
12969
12970else
12971
12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12973$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12974if ${ac_cv_lib_rt_clock_settime+:} false; then :
12975 $as_echo_n "(cached) " >&6
12976else
12977 ac_check_lib_save_LIBS=$LIBS
12978LIBS="-lrt $LIBS"
12979cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980/* end confdefs.h. */
12981
12982/* Override any GCC internal prototype to avoid an error.
12983 Use char because int might match the return type of a GCC
12984 builtin and then its argument prototype would still apply. */
12985#ifdef __cplusplus
12986extern "C"
12987#endif
12988char clock_settime ();
12989int
12990main ()
12991{
12992return clock_settime ();
12993 ;
12994 return 0;
12995}
12996_ACEOF
12997if ac_fn_c_try_link "$LINENO"; then :
12998 ac_cv_lib_rt_clock_settime=yes
12999else
13000 ac_cv_lib_rt_clock_settime=no
13001fi
13002rm -f core conftest.err conftest.$ac_objext \
13003 conftest$ac_exeext conftest.$ac_ext
13004LIBS=$ac_check_lib_save_LIBS
13005fi
13006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13007$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13008if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13009
13010 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13011
13012
13013fi
13014
13015
13016fi
13017done
13018
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13021$as_echo_n "checking for major... " >&6; }
13022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013024
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013025#if defined(MAJOR_IN_MKDEV)
13026#include <sys/mkdev.h>
13027#elif defined(MAJOR_IN_SYSMACROS)
13028#include <sys/sysmacros.h>
13029#else
13030#include <sys/types.h>
13031#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013032
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013033int
13034main ()
13035{
13036
13037 makedev(major(0),minor(0));
13038
13039 ;
13040 return 0;
13041}
13042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013044
13045
Matthias Kloseb9621712010-04-24 17:59:49 +000013046$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013047
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13049$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013050
13051else
Skip Montanaro6dead952003-09-25 14:50:04 +000013052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13054$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013055
13056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013057rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013059
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013060# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013061# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13063$as_echo_n "checking for getaddrinfo... " >&6; }
13064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013065/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013066
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013067#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013068#include <sys/socket.h>
13069#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013070#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013071
Martin v. Löwis11437992002-04-12 09:54:03 +000013072int
13073main ()
13074{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013075getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 ;
13077 return 0;
13078}
13079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013080if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013081 have_getaddrinfo=yes
13082else
Matthias Kloseb9621712010-04-24 17:59:49 +000013083 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013085rm -f core conftest.err conftest.$ac_objext \
13086 conftest$ac_exeext conftest.$ac_ext
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13088$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089if test $have_getaddrinfo = yes
13090then
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13092$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013093 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013095else
Matthias Kloseb9621712010-04-24 17:59:49 +000013096 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013097
13098if test "${enable_ipv6+set}" = set; then
13099 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13100else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013101 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013102fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103else
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013106
Stefan Krah19c21392012-11-22 23:47:32 +010013107#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013108#include <sys/types.h>
13109#include <netdb.h>
13110#include <string.h>
13111#include <sys/socket.h>
13112#include <netinet/in.h>
13113
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013114int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013115{
13116 int passive, gaierr, inet4 = 0, inet6 = 0;
13117 struct addrinfo hints, *ai, *aitop;
13118 char straddr[INET6_ADDRSTRLEN], strport[16];
13119
13120 for (passive = 0; passive <= 1; passive++) {
13121 memset(&hints, 0, sizeof(hints));
13122 hints.ai_family = AF_UNSPEC;
13123 hints.ai_flags = passive ? AI_PASSIVE : 0;
13124 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013125 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13127 (void)gai_strerror(gaierr);
13128 goto bad;
13129 }
13130 for (ai = aitop; ai; ai = ai->ai_next) {
13131 if (ai->ai_addr == NULL ||
13132 ai->ai_addrlen == 0 ||
13133 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13134 straddr, sizeof(straddr), strport, sizeof(strport),
13135 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13136 goto bad;
13137 }
13138 switch (ai->ai_family) {
13139 case AF_INET:
13140 if (strcmp(strport, "54321") != 0) {
13141 goto bad;
13142 }
13143 if (passive) {
13144 if (strcmp(straddr, "0.0.0.0") != 0) {
13145 goto bad;
13146 }
13147 } else {
13148 if (strcmp(straddr, "127.0.0.1") != 0) {
13149 goto bad;
13150 }
13151 }
13152 inet4++;
13153 break;
13154 case AF_INET6:
13155 if (strcmp(strport, "54321") != 0) {
13156 goto bad;
13157 }
13158 if (passive) {
13159 if (strcmp(straddr, "::") != 0) {
13160 goto bad;
13161 }
13162 } else {
13163 if (strcmp(straddr, "::1") != 0) {
13164 goto bad;
13165 }
13166 }
13167 inet6++;
13168 break;
13169 case AF_UNSPEC:
13170 goto bad;
13171 break;
13172 default:
13173 /* another family support? */
13174 break;
13175 }
13176 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013177 freeaddrinfo(aitop);
13178 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013179 }
13180
13181 if (!(inet4 == 0 || inet4 == 2))
13182 goto bad;
13183 if (!(inet6 == 0 || inet6 == 2))
13184 goto bad;
13185
13186 if (aitop)
13187 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013188 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013189
13190 bad:
13191 if (aitop)
13192 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013193 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013194}
13195
Martin v. Löwis11437992002-04-12 09:54:03 +000013196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013197if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013198 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013199else
Matthias Kloseb9621712010-04-24 17:59:49 +000013200 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13211$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13212
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013213if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013214then
13215 if test $ipv6 = yes
13216 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013217 echo 'Fatal: You must get working getaddrinfo() function.'
13218 echo ' or you can specify "--disable-ipv6"'.
13219 exit 1
13220 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013221else
Martin v. Löwis11437992002-04-12 09:54:03 +000013222
Matthias Kloseb9621712010-04-24 17:59:49 +000013223$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013224
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013226
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013227for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013228do :
13229 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013230if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013232#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013233_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013234
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013235fi
13236done
13237
Michael W. Hudson54241132001-12-07 15:38:26 +000013238
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013239# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13241$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013242if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013243 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013244else
Matthias Kloseb9621712010-04-24 17:59:49 +000013245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013246/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013247#include <sys/types.h>
13248#include <sys/time.h>
13249#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Martin v. Löwis11437992002-04-12 09:54:03 +000013251int
13252main ()
13253{
13254if ((struct tm *) 0)
13255return 0;
13256 ;
13257 return 0;
13258}
13259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013260if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013261 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013262else
Matthias Kloseb9621712010-04-24 17:59:49 +000013263 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13268$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013269if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013272
13273fi
13274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13276$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013277if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279else
Matthias Kloseb9621712010-04-24 17:59:49 +000013280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013281/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013282#include <sys/types.h>
13283#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013284
Martin v. Löwis11437992002-04-12 09:54:03 +000013285int
13286main ()
13287{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013288struct tm tm;
13289 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013290 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013291 ;
13292 return 0;
13293}
13294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013295if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013296 ac_cv_struct_tm=time.h
13297else
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13303$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013304if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013305
Matthias Kloseb9621712010-04-24 17:59:49 +000013306$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307
13308fi
13309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310ac_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 +000013311#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Matthias Kloseb9621712010-04-24 17:59:49 +000013313"
Victor Stinnere0be4232011-10-25 13:06:09 +020013314if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013315
13316cat >>confdefs.h <<_ACEOF
13317#define HAVE_STRUCT_TM_TM_ZONE 1
13318_ACEOF
13319
13320
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013322
Martin v. Löwis11437992002-04-12 09:54:03 +000013323if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13324
Matthias Kloseb9621712010-04-24 17:59:49 +000013325$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013326
13327else
Matthias Kloseb9621712010-04-24 17:59:49 +000013328 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13329"
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334fi
13335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013337#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338_ACEOF
13339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13341$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013342if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013343 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344else
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013346/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348#if !HAVE_DECL_TZNAME
13349extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Martin v. Löwis11437992002-04-12 09:54:03 +000013352int
13353main ()
13354{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013355return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 ;
13357 return 0;
13358}
13359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013361 ac_cv_var_tzname=yes
13362else
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013365rm -f core conftest.err conftest.$ac_objext \
13366 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13369$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013370 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013374 fi
13375fi
13376
Matthias Kloseb9621712010-04-24 17:59:49 +000013377ac_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 +020013378if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
13380cat >>confdefs.h <<_ACEOF
13381#define HAVE_STRUCT_STAT_ST_RDEV 1
13382_ACEOF
13383
13384
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013385fi
13386
Matthias Kloseb9621712010-04-24 17:59:49 +000013387ac_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 +020013388if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390cat >>confdefs.h <<_ACEOF
13391#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13392_ACEOF
13393
13394
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013395fi
13396
Matthias Kloseb9621712010-04-24 17:59:49 +000013397ac_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 +020013398if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013399
13400cat >>confdefs.h <<_ACEOF
13401#define HAVE_STRUCT_STAT_ST_FLAGS 1
13402_ACEOF
13403
13404
13405fi
13406
Matthias Kloseb9621712010-04-24 17:59:49 +000013407ac_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 +020013408if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013409
13410cat >>confdefs.h <<_ACEOF
13411#define HAVE_STRUCT_STAT_ST_GEN 1
13412_ACEOF
13413
13414
13415fi
13416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417ac_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 +020013418if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013419
13420cat >>confdefs.h <<_ACEOF
13421#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13422_ACEOF
13423
13424
13425fi
13426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427ac_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 +020013428if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013429
Martin v. Löwis11437992002-04-12 09:54:03 +000013430cat >>confdefs.h <<_ACEOF
13431#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13432_ACEOF
13433
13434
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013435fi
13436
Stefan Krah267b6392016-04-26 01:09:18 +020013437ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13438 #include <sys/types.h>
13439 #include <pwd.h>
13440
13441"
13442if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13443
13444cat >>confdefs.h <<_ACEOF
13445#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13446_ACEOF
13447
13448
13449fi
13450ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13451 #include <sys/types.h>
13452 #include <pwd.h>
13453
13454"
13455if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13456
13457cat >>confdefs.h <<_ACEOF
13458#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13459_ACEOF
13460
13461
13462fi
13463
Zachary Ware6a6967e2016-10-01 00:47:27 -050013464# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13465ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13466"
13467if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13468
13469cat >>confdefs.h <<_ACEOF
13470#define HAVE_SIGINFO_T_SI_BAND 1
13471_ACEOF
13472
13473
13474fi
13475
Michael W. Hudson54241132001-12-07 15:38:26 +000013476
Matthias Kloseb9621712010-04-24 17:59:49 +000013477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13478$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013479if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013481else
Matthias Kloseb159a552010-04-25 21:00:44 +000013482
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013485#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013486int
13487main ()
13488{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ;
13491 return 0;
13492}
13493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013495 ac_cv_header_time_altzone=yes
13496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013501fi
13502
Matthias Kloseb9621712010-04-24 17:59:49 +000013503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13504$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013508
13509fi
13510
Guido van Rossumda88dad1995-01-26 00:46:29 +000013511was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13513$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013515/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013516
13517#include <sys/types.h>
13518#include <sys/select.h>
13519#include <sys/time.h>
13520
Martin v. Löwis11437992002-04-12 09:54:03 +000013521int
13522main ()
13523{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013524;
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 ;
13526 return 0;
13527}
13528_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013529if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
13531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013534 was_it_defined=yes
13535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13539$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13542$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013543if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013544 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013545else
Matthias Kloseb9621712010-04-24 17:59:49 +000013546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013548#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013549int
13550main ()
13551{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013552struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013553 ;
13554 return 0;
13555}
13556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013558 ac_cv_struct_addrinfo=yes
13559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563fi
13564
Matthias Kloseb9621712010-04-24 17:59:49 +000013565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13566$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013567if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013570
13571fi
13572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13574$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013580
13581# include <sys/types.h>
13582# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013583int
13584main ()
13585{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013586struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013587 ;
13588 return 0;
13589}
13590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013592 ac_cv_struct_sockaddr_storage=yes
13593else
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13597fi
13598
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13600$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013601if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013604
13605fi
13606
Christian Heimesdffa3942016-09-05 23:54:41 +020013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13608$as_echo_n "checking for sockaddr_alg... " >&6; }
13609if ${ac_cv_struct_sockaddr_alg+:} false; then :
13610 $as_echo_n "(cached) " >&6
13611else
13612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13613/* end confdefs.h. */
13614
13615# include <sys/types.h>
13616# include <sys/socket.h>
13617# include <linux/if_alg.h>
13618int
13619main ()
13620{
13621struct sockaddr_alg s
13622 ;
13623 return 0;
13624}
13625_ACEOF
13626if ac_fn_c_try_compile "$LINENO"; then :
13627 ac_cv_struct_sockaddr_alg=yes
13628else
13629 ac_cv_struct_sockaddr_alg=no
13630fi
13631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13632fi
13633
13634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13635$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13636if test $ac_cv_struct_sockaddr_alg = yes; then
13637
13638$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13639
13640fi
13641
Guido van Rossum627b2d71993-12-24 10:39:16 +000013642# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13645$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013646if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013648else
Matthias Kloseb9621712010-04-24 17:59:49 +000013649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013651$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
13655static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013656test_array [0] = 0;
13657return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013658
13659 ;
13660 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013661}
Martin v. Löwis11437992002-04-12 09:54:03 +000013662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013663if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013664 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013665else
Matthias Kloseb9621712010-04-24 17:59:49 +000013666 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13671$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013672if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013673 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013674
13675fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013676
Matthias Kloseb9621712010-04-24 17:59:49 +000013677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13678$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013679if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013683/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013684
Martin v. Löwis11437992002-04-12 09:54:03 +000013685int
13686main ()
13687{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013690 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013692 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013693 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694 char const *const *pcpcc;
13695 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013696 /* NEC SVR4.0.2 mips cc rejects this. */
13697 struct point {int x, y;};
13698 static struct point const zero = {0,0};
13699 /* AIX XL C 1.02.0.0 rejects this.
13700 It does not let you subtract one const X* pointer from another in
13701 an arm of an if-expression whose if-part is not a constant
13702 expression */
13703 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013704 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013705 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013706 ++pcpcc;
13707 ppc = (char**) pcpcc;
13708 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013709 { /* SCO 3.2v4 cc rejects this sort of thing. */
13710 char tx;
13711 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013715 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 }
13717 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13718 int x[] = {25, 17};
13719 const int *foo = &x[0];
13720 ++foo;
13721 }
13722 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13723 typedef const int *iptr;
13724 iptr p = 0;
13725 ++p;
13726 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013727 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013729 struct s { int j; const int *ap[3]; } bx;
13730 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013731 }
13732 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13733 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013734 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013737#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013738
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ;
13740 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013741}
Martin v. Löwis11437992002-04-12 09:54:03 +000013742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013744 ac_cv_c_const=yes
13745else
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13751$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013753
Matthias Kloseb9621712010-04-24 17:59:49 +000013754$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755
13756fi
13757
Michael W. Hudson54241132001-12-07 15:38:26 +000013758
Guido van Rossumda88dad1995-01-26 00:46:29 +000013759works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13761$as_echo_n "checking for working signed char... " >&6; }
13762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013763/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013764
Martin v. Löwis11437992002-04-12 09:54:03 +000013765int
13766main ()
13767{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013768signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013769 ;
13770 return 0;
13771}
13772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013773if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013774 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013775else
Skip Montanaro6dead952003-09-25 14:50:04 +000013776
Matthias Kloseb9621712010-04-24 17:59:49 +000013777$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013778
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013779
Guido van Rossum7f43da71994-08-01 12:15:30 +000013780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13783$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013784
Guido van Rossumda88dad1995-01-26 00:46:29 +000013785have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13787$as_echo_n "checking for prototypes... " >&6; }
13788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013789/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013790int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013791int
13792main ()
13793{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013794return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013795 ;
13796 return 0;
13797}
13798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013799if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013800
Matthias Kloseb9621712010-04-24 17:59:49 +000013801$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013802
Matthias Kloseb159a552010-04-25 21:00:44 +000013803 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13807$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013808
Guido van Rossumda88dad1995-01-26 00:46:29 +000013809works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13811$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013813/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013814
13815#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013816int foo(int x, ...) {
13817 va_list va;
13818 va_start(va, x);
13819 va_arg(va, int);
13820 va_arg(va, char *);
13821 va_arg(va, double);
13822 return 0;
13823}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013824
Martin v. Löwis11437992002-04-12 09:54:03 +000013825int
13826main ()
13827{
Guido van Rossum90eea071996-08-30 20:58:57 +000013828return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013829 ;
13830 return 0;
13831}
13832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013837
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013838 works=yes
13839
Guido van Rossum627b2d71993-12-24 10:39:16 +000013840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13843$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013844
Martin v. Löwisd6320502004-08-12 13:45:08 +000013845# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13847$as_echo_n "checking for socketpair... " >&6; }
13848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013849/* end confdefs.h. */
13850
13851#include <sys/types.h>
13852#include <sys/socket.h>
13853
13854int
13855main ()
13856{
13857void *x=socketpair
13858 ;
13859 return 0;
13860}
13861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013862if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013865
Matthias Kloseb159a552010-04-25 21:00:44 +000013866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013867$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013868else
Matthias Kloseb9621712010-04-24 17:59:49 +000013869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13870$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013871
13872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013874
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013875# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13877$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013879/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013880#include <sys/types.h>
13881#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013882int
13883main ()
13884{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013885struct sockaddr x;
13886x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ;
13888 return 0;
13889}
13890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013891if ac_fn_c_try_compile "$LINENO"; then :
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13893$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013894
Matthias Kloseb9621712010-04-24 17:59:49 +000013895$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013896
13897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13899$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013900
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013903
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013904# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013905
13906
Matthias Kloseb9621712010-04-24 17:59:49 +000013907ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013908if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013909
Matthias Kloseb9621712010-04-24 17:59:49 +000013910 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013911
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13913$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013914 OLD_CFLAGS=$CFLAGS
13915 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013917/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918
13919# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Martin v. Löwis11437992002-04-12 09:54:03 +000013921int
13922main ()
13923{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013924
13925 char *name;
13926 struct hostent *he, *res;
13927 char buffer[2048];
13928 int buflen = 2048;
13929 int h_errnop;
13930
13931 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013932
13933 ;
13934 return 0;
13935}
13936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013937if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013940
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13945$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013947else
Skip Montanaro6dead952003-09-25 14:50:04 +000013948
Matthias Kloseb9621712010-04-24 17:59:49 +000013949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13950$as_echo "no" >&6; }
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13952$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013954/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013955
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013957
Martin v. Löwis11437992002-04-12 09:54:03 +000013958int
13959main ()
13960{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013961
13962 char *name;
13963 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013964 char buffer[2048];
13965 int buflen = 2048;
13966 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013967
Matthias Kloseb159a552010-04-25 21:00:44 +000013968 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013969
13970 ;
13971 return 0;
13972}
13973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013977
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Matthias Kloseb159a552010-04-25 21:00:44 +000013979$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13982$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984else
Skip Montanaro6dead952003-09-25 14:50:04 +000013985
Matthias Kloseb9621712010-04-24 17:59:49 +000013986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13987$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13989$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13991/* end confdefs.h. */
13992
13993# include <netdb.h>
13994
13995int
13996main ()
13997{
13998
13999 char *name;
14000 struct hostent *he;
14001 struct hostent_data data;
14002
14003 (void) gethostbyname_r(name, he, &data);
14004
14005 ;
14006 return 0;
14007}
14008_ACEOF
14009if ac_fn_c_try_compile "$LINENO"; then :
14010
14011 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14012
14013
14014$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14015
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14017$as_echo "yes" >&6; }
14018
14019else
14020
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14022$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032 CFLAGS=$OLD_CFLAGS
14033
14034else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035
Matthias Kloseb9621712010-04-24 17:59:49 +000014036 for ac_func in gethostbyname
14037do :
14038 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014039if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014041#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014042_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014044fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014045done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014046
Michael W. Hudson54241132001-12-07 15:38:26 +000014047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048fi
14049
Michael W. Hudson54241132001-12-07 15:38:26 +000014050
14051
14052
14053
14054
14055
Guido van Rossum627b2d71993-12-24 10:39:16 +000014056# checks for system services
14057# (none yet)
14058
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014059# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014060ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014061if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014062
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014063else
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14065$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014066if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014067 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014068else
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014070LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074/* Override any GCC internal prototype to avoid an error.
14075 Use char because int might match the return type of a GCC
14076 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077#ifdef __cplusplus
14078extern "C"
14079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014080char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014081int
14082main ()
14083{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014084return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 ;
14086 return 0;
14087}
14088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014091else
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014093fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014094rm -f core conftest.err conftest.$ac_objext \
14095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014096LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14099$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014100if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 cat >>confdefs.h <<_ACEOF
14102#define HAVE_LIBIEEE 1
14103_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014104
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014105 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014106
Guido van Rossum627b2d71993-12-24 10:39:16 +000014107fi
14108
Michael W. Hudson54241132001-12-07 15:38:26 +000014109
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014110fi
14111
Michael W. Hudson54241132001-12-07 15:38:26 +000014112
Guido van Rossum7f43da71994-08-01 12:15:30 +000014113# check for --with-libm=...
14114
Guido van Rossum563e7081996-09-10 18:20:48 +000014115case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014116Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014117*) LIBM=-lm
14118esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14120$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014121
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014122# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014123if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014124 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014125if test "$withval" = no
14126then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14128$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014129elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014130then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14132$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014133else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014134fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014135else
Matthias Kloseb9621712010-04-24 17:59:49 +000014136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14137$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014138fi
14139
Guido van Rossum7f43da71994-08-01 12:15:30 +000014140
14141# check for --with-libc=...
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14144$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014147if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014149if test "$withval" = no
14150then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14152$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014153elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014154then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14156$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014157else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014158fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014159else
Matthias Kloseb9621712010-04-24 17:59:49 +000014160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14161$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014162fi
14163
Guido van Rossum7f43da71994-08-01 12:15:30 +000014164
Stefan Krah1919b7e2012-03-21 18:25:23 +010014165# **************************************
14166# * Check for gcc x64 inline assembler *
14167# **************************************
14168
14169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14170$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14172/* end confdefs.h. */
14173
14174int
14175main ()
14176{
14177
14178 __asm__ __volatile__ ("movq %rcx, %rax");
14179
14180 ;
14181 return 0;
14182}
14183_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014184if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014185 have_gcc_asm_for_x64=yes
14186else
14187 have_gcc_asm_for_x64=no
14188fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014189rm -f core conftest.err conftest.$ac_objext \
14190 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14192$as_echo "$have_gcc_asm_for_x64" >&6; }
14193if test "$have_gcc_asm_for_x64" = yes
14194then
14195
14196$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14197
14198fi
14199
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014200# **************************************************
14201# * Check for various properties of floating point *
14202# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014203
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14205$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14206if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014207 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014208else
14209
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014210
14211ax_cv_c_float_words_bigendian=unknown
14212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014213/* end confdefs.h. */
14214
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014215
14216double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14217
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014218
14219_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014220if ac_fn_c_try_compile "$LINENO"; then :
14221
14222
14223if grep noonsees conftest.$ac_objext >/dev/null ; then
14224 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014225fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014226if grep seesnoon conftest.$ac_objext >/dev/null ; then
14227 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14228 ax_cv_c_float_words_bigendian=no
14229 else
14230 ax_cv_c_float_words_bigendian=unknown
14231 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014232fi
14233
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014234
14235fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014237fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14239$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014240
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014241case $ax_cv_c_float_words_bigendian in
14242 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014243
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014244$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14245 ;;
14246 no)
14247 ;;
14248 *)
14249 as_fn_error $? "
14250
14251Unknown float word ordering. You need to manually preset
14252ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14253
14254 " "$LINENO" 5 ;;
14255esac
14256
14257
14258if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014259then
14260
Matthias Kloseb9621712010-04-24 17:59:49 +000014261$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014262
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014263elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014264then
14265
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014266$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14267
14268else
14269 # Some ARM platforms use a mixed-endian representation for doubles.
14270 # While Python doesn't currently have full support for these platforms
14271 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14272 # conversions work.
14273 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14274 # or little, then it must be this?
14275
Matthias Kloseb9621712010-04-24 17:59:49 +000014276$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014277
14278fi
14279
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014280# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014281# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014282# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014283# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014284# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014285# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014286
14287# This inline assembler syntax may also work for suncc and icc,
14288# so we try it on all platforms.
14289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14291$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014293/* end confdefs.h. */
14294
14295int
14296main ()
14297{
14298
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014299 unsigned short cw;
14300 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14301 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014302
14303 ;
14304 return 0;
14305}
14306_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014307if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014308 have_gcc_asm_for_x87=yes
14309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014311fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014312rm -f core conftest.err conftest.$ac_objext \
14313 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14315$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014316if test "$have_gcc_asm_for_x87" = yes
14317then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014318
Matthias Kloseb9621712010-04-24 17:59:49 +000014319$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014320
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014321fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14324$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326/* end confdefs.h. */
14327
14328int
14329main ()
14330{
14331
14332 unsigned int fpcr;
14333 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14334 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14335
14336 ;
14337 return 0;
14338}
14339_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014340if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014341 have_gcc_asm_for_mc68881=yes
14342else
14343 have_gcc_asm_for_mc68881=no
14344fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014345rm -f core conftest.err conftest.$ac_objext \
14346 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14348$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14349if test "$have_gcc_asm_for_mc68881" = yes
14350then
14351
14352$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14353
14354fi
14355
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014356# Detect whether system arithmetic is subject to x87-style double
14357# rounding issues. The result of this test has little meaning on non
14358# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14359# mode is round-to-nearest and double rounding issues are present, and
14360# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14362$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014363# $BASECFLAGS may affect the result
14364ac_save_cc="$CC"
14365CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014366if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014367 ac_cv_x87_double_rounding=no
14368else
Matthias Kloseb9621712010-04-24 17:59:49 +000014369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014370/* end confdefs.h. */
14371
14372#include <stdlib.h>
14373#include <math.h>
14374int main() {
14375 volatile double x, y, z;
14376 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14377 x = 0.99999999999999989; /* 1-2**-53 */
14378 y = 1./x;
14379 if (y != 1.)
14380 exit(0);
14381 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14382 x = 1e16;
14383 y = 2.99999;
14384 z = x + y;
14385 if (z != 1e16+4.)
14386 exit(0);
14387 /* both tests show evidence of double rounding */
14388 exit(1);
14389}
14390
14391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014392if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014393 ac_cv_x87_double_rounding=no
14394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014397rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14398 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014399fi
14400
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014401CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14403$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014404if test "$ac_cv_x87_double_rounding" = yes
14405then
14406
Matthias Kloseb9621712010-04-24 17:59:49 +000014407$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014408
14409fi
14410
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014411# ************************************
14412# * Check for mathematical functions *
14413# ************************************
14414
14415LIBS_SAVE=$LIBS
14416LIBS="$LIBS $LIBM"
14417
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014418for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14419do :
14420 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14421ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014422if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014423 cat >>confdefs.h <<_ACEOF
14424#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14425_ACEOF
14426
14427fi
14428done
14429
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014430for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014431do :
14432 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14433ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014434if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014435 cat >>confdefs.h <<_ACEOF
14436#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14437_ACEOF
14438
14439fi
14440done
14441
14442ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14443"
Victor Stinnere0be4232011-10-25 13:06:09 +020014444if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014445 ac_have_decl=1
14446else
14447 ac_have_decl=0
14448fi
14449
14450cat >>confdefs.h <<_ACEOF
14451#define HAVE_DECL_ISINF $ac_have_decl
14452_ACEOF
14453ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14454"
Victor Stinnere0be4232011-10-25 13:06:09 +020014455if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014456 ac_have_decl=1
14457else
14458 ac_have_decl=0
14459fi
14460
14461cat >>confdefs.h <<_ACEOF
14462#define HAVE_DECL_ISNAN $ac_have_decl
14463_ACEOF
14464ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14465"
Victor Stinnere0be4232011-10-25 13:06:09 +020014466if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014467 ac_have_decl=1
14468else
14469 ac_have_decl=0
14470fi
14471
14472cat >>confdefs.h <<_ACEOF
14473#define HAVE_DECL_ISFINITE $ac_have_decl
14474_ACEOF
14475
14476
Mark Dickinsona614f042009-11-28 12:48:43 +000014477# For multiprocessing module, check that sem_open
14478# actually works. For FreeBSD versions <= 7.2,
14479# the kernel module that provides POSIX semaphores
14480# isn't loaded by default, so an attempt to call
14481# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14483$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014484if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014485 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014486else
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014488 ac_cv_posix_semaphores_enabled=yes
14489else
Matthias Kloseb9621712010-04-24 17:59:49 +000014490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014491/* end confdefs.h. */
14492
14493#include <unistd.h>
14494#include <fcntl.h>
14495#include <stdio.h>
14496#include <semaphore.h>
14497#include <sys/stat.h>
14498
14499int main(void) {
14500 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14501 if (a == SEM_FAILED) {
14502 perror("sem_open");
14503 return 1;
14504 }
14505 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014506 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014507 return 0;
14508}
14509
14510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014511if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014512 ac_cv_posix_semaphores_enabled=yes
14513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014515fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14517 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014518fi
14519
14520
Mark Dickinsona614f042009-11-28 12:48:43 +000014521fi
14522
Matthias Kloseb9621712010-04-24 17:59:49 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14524$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014525if test $ac_cv_posix_semaphores_enabled = no
14526then
14527
Matthias Kloseb9621712010-04-24 17:59:49 +000014528$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014529
14530fi
14531
Mark Dickinson10683072009-04-18 21:18:19 +000014532# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14534$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014535if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014539 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014540else
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014542/* end confdefs.h. */
14543
14544#include <unistd.h>
14545#include <fcntl.h>
14546#include <stdio.h>
14547#include <semaphore.h>
14548#include <sys/stat.h>
14549
14550int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014551 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014552 int count;
14553 int res;
14554 if(a==SEM_FAILED){
14555 perror("sem_open");
14556 return 1;
14557
14558 }
14559 res = sem_getvalue(a, &count);
14560 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014561 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014562 return res==-1 ? 1 : 0;
14563}
14564
Mark Dickinson10683072009-04-18 21:18:19 +000014565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014566if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014567 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014568else
Matthias Kloseb9621712010-04-24 17:59:49 +000014569 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014573fi
14574
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014575
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014576fi
14577
Matthias Kloseb9621712010-04-24 17:59:49 +000014578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14579$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014580if test $ac_cv_broken_sem_getvalue = yes
14581then
14582
Matthias Kloseb9621712010-04-24 17:59:49 +000014583$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014584
14585fi
14586
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014587ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14588"
14589if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14590 ac_have_decl=1
14591else
14592 ac_have_decl=0
14593fi
14594
14595cat >>confdefs.h <<_ACEOF
14596#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14597_ACEOF
14598ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14599"
14600if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14601 ac_have_decl=1
14602else
14603 ac_have_decl=0
14604fi
14605
14606cat >>confdefs.h <<_ACEOF
14607#define HAVE_DECL_RTLD_NOW $ac_have_decl
14608_ACEOF
14609ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14610"
14611if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14612 ac_have_decl=1
14613else
14614 ac_have_decl=0
14615fi
14616
14617cat >>confdefs.h <<_ACEOF
14618#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14619_ACEOF
14620ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14621"
14622if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14623 ac_have_decl=1
14624else
14625 ac_have_decl=0
14626fi
14627
14628cat >>confdefs.h <<_ACEOF
14629#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14630_ACEOF
14631ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14632"
14633if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14634 ac_have_decl=1
14635else
14636 ac_have_decl=0
14637fi
14638
14639cat >>confdefs.h <<_ACEOF
14640#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14641_ACEOF
14642ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14643"
14644if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14645 ac_have_decl=1
14646else
14647 ac_have_decl=0
14648fi
14649
14650cat >>confdefs.h <<_ACEOF
14651#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14652_ACEOF
14653ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14654"
14655if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14656 ac_have_decl=1
14657else
14658 ac_have_decl=0
14659fi
14660
14661cat >>confdefs.h <<_ACEOF
14662#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14663_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014664ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14665"
14666if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14667 ac_have_decl=1
14668else
14669 ac_have_decl=0
14670fi
14671
14672cat >>confdefs.h <<_ACEOF
14673#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14674_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014675
14676
Mark Dickinsonbd792642009-03-18 20:06:12 +000014677# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14679$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014680# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014681if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014682 enableval=$enable_big_digits; case $enable_big_digits in
14683yes)
14684 enable_big_digits=30 ;;
14685no)
14686 enable_big_digits=15 ;;
1468715|30)
14688 ;;
14689*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014690 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 +000014691esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14693$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014694
14695cat >>confdefs.h <<_ACEOF
14696#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14697_ACEOF
14698
14699
14700else
Matthias Kloseb9621712010-04-24 17:59:49 +000014701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14702$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014703fi
14704
14705
Guido van Rossumef2255b2000-03-10 22:30:29 +000014706# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014707ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014708if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014709
14710
Matthias Kloseb9621712010-04-24 17:59:49 +000014711$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014712
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014713 wchar_h="yes"
14714
Guido van Rossumef2255b2000-03-10 22:30:29 +000014715else
Martin v. Löwis11437992002-04-12 09:54:03 +000014716 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014717
14718fi
14719
Michael W. Hudson54241132001-12-07 15:38:26 +000014720
Martin v. Löwis11437992002-04-12 09:54:03 +000014721
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014722# determine wchar_t size
14723if test "$wchar_h" = yes
14724then
Matthias Kloseb9621712010-04-24 17:59:49 +000014725 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014726# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14727# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14728# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14730$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014731if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014733else
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14735"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014736
Martin v. Löwis11437992002-04-12 09:54:03 +000014737else
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 if test "$ac_cv_type_wchar_t" = yes; then
14739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014741as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014742See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743 else
14744 ac_cv_sizeof_wchar_t=0
14745 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014747
Martin v. Löwis11437992002-04-12 09:54:03 +000014748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14750$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751
14752
14753
Martin v. Löwis11437992002-04-12 09:54:03 +000014754cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014755#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014756_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014757
Michael W. Hudson54241132001-12-07 15:38:26 +000014758
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014759fi
14760
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14762$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014763have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014765/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014766
14767#include <tcl.h>
14768#if TCL_UTF_MAX != 6
14769# error "NOT UCS4_TCL"
14770#endif
14771int
14772main ()
14773{
14774
14775 ;
14776 return 0;
14777}
14778_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014779if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014780
14781
Matthias Kloseb9621712010-04-24 17:59:49 +000014782$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014783
14784 have_ucs4_tcl=yes
14785
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14789$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014790
Skip Montanaro6dead952003-09-25 14:50:04 +000014791# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014792if test "$wchar_h" = yes
14793then
14794 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14796$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014797 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014798 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014799else
14800
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014802 ac_cv_wchar_t_signed=yes
14803else
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014805/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014806
14807 #include <wchar.h>
14808 int main()
14809 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014810 /* Success: exit code 0 */
14811 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014812 }
14813
14814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014815if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014816 ac_cv_wchar_t_signed=yes
14817else
Matthias Kloseb9621712010-04-24 17:59:49 +000014818 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014819fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14821 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014822fi
14823
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014824fi
14825
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14827$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828fi
14829
Michael Osipov3738fad2018-08-24 18:17:19 +020014830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14831$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014832# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014833if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014834 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014835then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014838
Michael Osipov3738fad2018-08-24 18:17:19 +020014839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14840$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014841else
Michael Osipov3738fad2018-08-24 18:17:19 +020014842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14843$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014844fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014845
14846# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14848$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014849if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014851else
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ac_cv_c_bigendian=unknown
14853 # See if we're dealing with a universal compiler.
14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855/* end confdefs.h. */
14856#ifndef __APPLE_CC__
14857 not a universal capable compiler
14858 #endif
14859 typedef int dummy;
14860
Skip Montanaro6dead952003-09-25 14:50:04 +000014861_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014862if ac_fn_c_try_compile "$LINENO"; then :
14863
14864 # Check for potential -arch flags. It is not universal unless
14865 # there are at least two -arch flags with different values.
14866 ac_arch=
14867 ac_prev=
14868 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14869 if test -n "$ac_prev"; then
14870 case $ac_word in
14871 i?86 | x86_64 | ppc | ppc64)
14872 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14873 ac_arch=$ac_word
14874 else
14875 ac_cv_c_bigendian=universal
14876 break
14877 fi
14878 ;;
14879 esac
14880 ac_prev=
14881 elif test "x$ac_word" = "x-arch"; then
14882 ac_prev=arch
14883 fi
14884 done
14885fi
14886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14887 if test $ac_cv_c_bigendian = unknown; then
14888 # See if sys/param.h defines the BYTE_ORDER macro.
14889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014890/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014891#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014893
Martin v. Löwis11437992002-04-12 09:54:03 +000014894int
14895main ()
14896{
Matthias Kloseb9621712010-04-24 17:59:49 +000014897#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14898 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14899 && LITTLE_ENDIAN)
14900 bogus endian macros
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 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014910/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014911#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014912 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014913
Martin v. Löwis11437992002-04-12 09:54:03 +000014914int
14915main ()
14916{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014918 not big endian
14919 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014920
14921 ;
14922 return 0;
14923}
14924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014925if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014926 ac_cv_c_bigendian=yes
14927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014931fi
14932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14933 fi
14934 if test $ac_cv_c_bigendian = unknown; then
14935 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014937/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014938#include <limits.h>
14939
Martin v. Löwis11437992002-04-12 09:54:03 +000014940int
14941main ()
14942{
Matthias Kloseb9621712010-04-24 17:59:49 +000014943#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14944 bogus endian macros
14945 #endif
14946
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 ;
14948 return 0;
14949}
14950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014951if ac_fn_c_try_compile "$LINENO"; then :
14952 # It does; now see whether it defined to _BIG_ENDIAN or not.
14953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14954/* end confdefs.h. */
14955#include <limits.h>
14956
14957int
14958main ()
14959{
14960#ifndef _BIG_ENDIAN
14961 not big endian
14962 #endif
14963
14964 ;
14965 return 0;
14966}
14967_ACEOF
14968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014970else
Matthias Kloseb9621712010-04-24 17:59:49 +000014971 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014972fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974fi
14975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14976 fi
14977 if test $ac_cv_c_bigendian = unknown; then
14978 # Compile a test program.
14979 if test "$cross_compiling" = yes; then :
14980 # Try to guess by grepping values from an object file.
14981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982/* end confdefs.h. */
14983short int ascii_mm[] =
14984 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14985 short int ascii_ii[] =
14986 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14987 int use_ascii (int i) {
14988 return ascii_mm[i] + ascii_ii[i];
14989 }
14990 short int ebcdic_ii[] =
14991 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14992 short int ebcdic_mm[] =
14993 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14994 int use_ebcdic (int i) {
14995 return ebcdic_mm[i] + ebcdic_ii[i];
14996 }
14997 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014998
Matthias Kloseb9621712010-04-24 17:59:49 +000014999int
15000main ()
15001{
15002return use_ascii (foo) == use_ebcdic (foo);
15003 ;
15004 return 0;
15005}
15006_ACEOF
15007if ac_fn_c_try_compile "$LINENO"; then :
15008 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15009 ac_cv_c_bigendian=yes
15010 fi
15011 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15012 if test "$ac_cv_c_bigendian" = unknown; then
15013 ac_cv_c_bigendian=no
15014 else
15015 # finding both strings is unlikely to happen, but who knows?
15016 ac_cv_c_bigendian=unknown
15017 fi
15018 fi
15019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015023/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015025int
15026main ()
15027{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028
Matthias Kloseb9621712010-04-24 17:59:49 +000015029 /* Are we little or big endian? From Harbison&Steele. */
15030 union
15031 {
15032 long int l;
15033 char c[sizeof (long int)];
15034 } u;
15035 u.l = 1;
15036 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037
15038 ;
15039 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015040}
Martin v. Löwis11437992002-04-12 09:54:03 +000015041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015042if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015043 ac_cv_c_bigendian=no
15044else
Matthias Kloseb9621712010-04-24 17:59:49 +000015045 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15048 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15054$as_echo "$ac_cv_c_bigendian" >&6; }
15055 case $ac_cv_c_bigendian in #(
15056 yes)
15057 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15058;; #(
15059 no)
15060 ;; #(
15061 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015062
Matthias Kloseb9621712010-04-24 17:59:49 +000015063$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015064
Matthias Kloseb9621712010-04-24 17:59:49 +000015065 ;; #(
15066 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015067 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015068 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015070
Michael W. Hudson54241132001-12-07 15:38:26 +000015071
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015072# ABI version string for Python extension modules. This appears between the
15073# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15074# from the following attributes which affect the ABI of this Python build (in
15075# this order):
15076#
15077# * The Python implementation (always 'cpython-' for us)
15078# * The major and minor version numbers
15079# * --with-pydebug (adds a 'd')
15080# * --with-pymalloc (adds a 'm')
15081# * --with-wide-unicode (adds a 'u')
15082#
15083# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015084# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15085# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015086
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15088$as_echo_n "checking ABIFLAGS... " >&6; }
15089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15090$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15092$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015093SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15095$as_echo "$SOABI" >&6; }
15096
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015097
15098case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015099 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015100 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15101 *)
15102 EXT_SUFFIX=${SHLIB_SUFFIX};;
15103esac
15104
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15106$as_echo_n "checking LDVERSION... " >&6; }
15107LDVERSION='$(VERSION)$(ABIFLAGS)'
15108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15109$as_echo "$LDVERSION" >&6; }
15110
doko@python.org87421192013-01-26 11:39:31 +010015111
doko@ubuntu.com55532312016-06-14 08:55:19 +020015112if test x$PLATFORM_TRIPLET = x; then
15113 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15114else
15115 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15116fi
doko@python.org87421192013-01-26 11:39:31 +010015117
15118
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015119# Check whether right shifting a negative integer extends the sign bit
15120# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15122$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015123if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015124 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015125else
Martin v. Löwis11437992002-04-12 09:54:03 +000015126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015128 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015129else
Matthias Kloseb9621712010-04-24 17:59:49 +000015130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015131/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015132
15133int main()
15134{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015135 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015136}
15137
Martin v. Löwis11437992002-04-12 09:54:03 +000015138_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015139if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015140 ac_cv_rshift_extends_sign=yes
15141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015143fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015146fi
15147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148fi
15149
Matthias Kloseb9621712010-04-24 17:59:49 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15151$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015152if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015153then
Martin v. Löwis11437992002-04-12 09:54:03 +000015154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015156
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015157fi
15158
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015159# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15161$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015162if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015164else
Martin v. Löwis11437992002-04-12 09:54:03 +000015165
Matthias Kloseb9621712010-04-24 17:59:49 +000015166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015167/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015168#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015169int
15170main ()
15171{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015172
15173 FILE *f = fopen("/dev/null", "r");
15174 flockfile(f);
15175 getc_unlocked(f);
15176 funlockfile(f);
15177
Martin v. Löwis11437992002-04-12 09:54:03 +000015178 ;
15179 return 0;
15180}
15181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015182if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015183 ac_cv_have_getc_unlocked=yes
15184else
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 ac_cv_have_getc_unlocked=no
15186fi
15187rm -f core conftest.err conftest.$ac_objext \
15188 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190
Matthias Kloseb9621712010-04-24 17:59:49 +000015191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15192$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015193if test "$ac_cv_have_getc_unlocked" = yes
15194then
Martin v. Löwis11437992002-04-12 09:54:03 +000015195
Matthias Kloseb9621712010-04-24 17:59:49 +000015196$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015197
15198fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015199
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015200# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015201# save the value of LIBS so we don't actually link Python with readline
15202LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015203
Gregory P. Smith18820942008-09-07 06:24:49 +000015204# On some systems we need to link readline to a termcap compatible
15205# library. NOTE: Keep the precedence of listed libraries synchronised
15206# with setup.py.
15207py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15209$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015210for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015211 if test -z "$py_libtermcap"; then
15212 READLINE_LIBS="-lreadline"
15213 else
15214 READLINE_LIBS="-lreadline -l$py_libtermcap"
15215 fi
15216 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015218/* end confdefs.h. */
15219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220/* Override any GCC internal prototype to avoid an error.
15221 Use char because int might match the return type of a GCC
15222 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015223#ifdef __cplusplus
15224extern "C"
15225#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015226char readline ();
15227int
15228main ()
15229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015230return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015231 ;
15232 return 0;
15233}
15234_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015235if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015236 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015238rm -f core conftest.err conftest.$ac_objext \
15239 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015240 if test $py_cv_lib_readline = yes; then
15241 break
15242 fi
15243done
15244# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15245#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015246if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15248$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015249else
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15251$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015254
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015255fi
15256
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015257# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015259/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015260#include <readline/readline.h>
15261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015262if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015263 have_readline=yes
15264else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015265 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015266
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015267fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015268rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015269if test $have_readline = yes
15270then
Matthias Kloseb9621712010-04-24 17:59:49 +000015271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015272/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015273#include <readline/readline.h>
15274
15275_ACEOF
15276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015277 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015278
Matthias Kloseb9621712010-04-24 17:59:49 +000015279$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015280
15281fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015282rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015283
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015285/* end confdefs.h. */
15286#include <readline/readline.h>
15287
15288_ACEOF
15289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015291
Matthias Kloseb9621712010-04-24 17:59:49 +000015292$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015293
15294fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015295rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015296
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015297fi
15298
Martin v. Löwis0daad592001-09-30 21:09:59 +000015299# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15301$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015302if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015303 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015306LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015308/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015310/* Override any GCC internal prototype to avoid an error.
15311 Use char because int might match the return type of a GCC
15312 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313#ifdef __cplusplus
15314extern "C"
15315#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015316char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015317int
15318main ()
15319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015321 ;
15322 return 0;
15323}
15324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015325if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015326 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015327else
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015329fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015330rm -f core conftest.err conftest.$ac_objext \
15331 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015332LIBS=$ac_check_lib_save_LIBS
15333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15335$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015336if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015339
Martin v. Löwis0daad592001-09-30 21:09:59 +000015340fi
15341
Michael W. Hudson54241132001-12-07 15:38:26 +000015342
Thomas Wouters89d996e2007-09-08 17:39:28 +000015343# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15345$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015346if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015347 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015348else
15349 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015350LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352/* end confdefs.h. */
15353
15354/* Override any GCC internal prototype to avoid an error.
15355 Use char because int might match the return type of a GCC
15356 builtin and then its argument prototype would still apply. */
15357#ifdef __cplusplus
15358extern "C"
15359#endif
15360char rl_completion_display_matches_hook ();
15361int
15362main ()
15363{
15364return rl_completion_display_matches_hook ();
15365 ;
15366 return 0;
15367}
15368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015369if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015370 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15371else
Matthias Kloseb9621712010-04-24 17:59:49 +000015372 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015373fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015374rm -f core conftest.err conftest.$ac_objext \
15375 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015376LIBS=$ac_check_lib_save_LIBS
15377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15379$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015380if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015381
Matthias Kloseb9621712010-04-24 17:59:49 +000015382$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015383
15384fi
15385
15386
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015387# also in 4.0, but not in editline
15388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15389$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15390if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15391 $as_echo_n "(cached) " >&6
15392else
15393 ac_check_lib_save_LIBS=$LIBS
15394LIBS="-lreadline $READLINE_LIBS $LIBS"
15395cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15396/* end confdefs.h. */
15397
15398/* Override any GCC internal prototype to avoid an error.
15399 Use char because int might match the return type of a GCC
15400 builtin and then its argument prototype would still apply. */
15401#ifdef __cplusplus
15402extern "C"
15403#endif
15404char rl_resize_terminal ();
15405int
15406main ()
15407{
15408return rl_resize_terminal ();
15409 ;
15410 return 0;
15411}
15412_ACEOF
15413if ac_fn_c_try_link "$LINENO"; then :
15414 ac_cv_lib_readline_rl_resize_terminal=yes
15415else
15416 ac_cv_lib_readline_rl_resize_terminal=no
15417fi
15418rm -f core conftest.err conftest.$ac_objext \
15419 conftest$ac_exeext conftest.$ac_ext
15420LIBS=$ac_check_lib_save_LIBS
15421fi
15422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15423$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15424if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15425
15426$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15427
15428fi
15429
15430
Martin v. Löwis0daad592001-09-30 21:09:59 +000015431# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15433$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015434if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015435 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015436else
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015438LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442/* Override any GCC internal prototype to avoid an error.
15443 Use char because int might match the return type of a GCC
15444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015445#ifdef __cplusplus
15446extern "C"
15447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015448char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015449int
15450main ()
15451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ;
15454 return 0;
15455}
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015461fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015462rm -f core conftest.err conftest.$ac_objext \
15463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015464LIBS=$ac_check_lib_save_LIBS
15465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15467$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015468if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015471
Guido van Rossum353ae582001-07-10 16:45:32 +000015472fi
15473
Jack Jansendd19cf82001-12-06 22:36:17 +000015474
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015475# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015477/* end confdefs.h. */
15478#include <readline/readline.h>
15479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015480if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015481 have_readline=yes
15482else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015483 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015484
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015485fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015486rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015487if test $have_readline = yes
15488then
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015490/* end confdefs.h. */
15491#include <readline/readline.h>
15492
15493_ACEOF
15494if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015496
Matthias Kloseb9621712010-04-24 17:59:49 +000015497$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015498
15499fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015500rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015501
15502fi
15503
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15505$as_echo_n "checking for append_history in -lreadline... " >&6; }
15506if ${ac_cv_lib_readline_append_history+:} false; then :
15507 $as_echo_n "(cached) " >&6
15508else
15509 ac_check_lib_save_LIBS=$LIBS
15510LIBS="-lreadline $READLINE_LIBS $LIBS"
15511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512/* end confdefs.h. */
15513
15514/* Override any GCC internal prototype to avoid an error.
15515 Use char because int might match the return type of a GCC
15516 builtin and then its argument prototype would still apply. */
15517#ifdef __cplusplus
15518extern "C"
15519#endif
15520char append_history ();
15521int
15522main ()
15523{
15524return append_history ();
15525 ;
15526 return 0;
15527}
15528_ACEOF
15529if ac_fn_c_try_link "$LINENO"; then :
15530 ac_cv_lib_readline_append_history=yes
15531else
15532 ac_cv_lib_readline_append_history=no
15533fi
15534rm -f core conftest.err conftest.$ac_objext \
15535 conftest$ac_exeext conftest.$ac_ext
15536LIBS=$ac_check_lib_save_LIBS
15537fi
15538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15539$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15540if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15541
15542$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15543
15544fi
15545
15546
Martin v. Löwis82bca632006-02-10 20:49:30 +000015547# End of readline checks: restore LIBS
15548LIBS=$LIBS_no_readline
15549
Matthias Kloseb9621712010-04-24 17:59:49 +000015550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15551$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015552if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015553 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015554else
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015557 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015558else
Matthias Kloseb9621712010-04-24 17:59:49 +000015559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015560/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015561
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015562#include <stdlib.h>
15563#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015564int main()
15565{
15566 int val1 = nice(1);
15567 if (val1 != -1 && val1 == nice(2))
15568 exit(0);
15569 exit(1);
15570}
15571
Martin v. Löwis11437992002-04-12 09:54:03 +000015572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015573if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015574 ac_cv_broken_nice=yes
15575else
Matthias Kloseb9621712010-04-24 17:59:49 +000015576 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015577fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015578rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015580fi
15581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015582fi
15583
Matthias Kloseb9621712010-04-24 17:59:49 +000015584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15585$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015586if test "$ac_cv_broken_nice" = yes
15587then
Martin v. Löwis11437992002-04-12 09:54:03 +000015588
Matthias Kloseb9621712010-04-24 17:59:49 +000015589$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015590
15591fi
15592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15594$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015595if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015596 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015599 ac_cv_broken_poll=no
15600else
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015602/* end confdefs.h. */
15603
15604#include <poll.h>
15605
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015606int main()
15607{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015608 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015609 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015610
15611 close (42);
15612
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015613 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015614 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015615 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015616 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015617 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015618 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015619 return 1;
15620}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015621
15622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015623if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015624 ac_cv_broken_poll=yes
15625else
Matthias Kloseb9621712010-04-24 17:59:49 +000015626 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015627fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015628rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15629 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015631
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015632fi
15633
Matthias Kloseb9621712010-04-24 17:59:49 +000015634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15635$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015636if test "$ac_cv_broken_poll" = yes
15637then
15638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640
15641fi
15642
Martin v. Löwis1d459062005-03-14 21:23:33 +000015643# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15645$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015646if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015647 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015648else
15649
Matthias Kloseb9621712010-04-24 17:59:49 +000015650if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015651 ac_cv_working_tzset=no
15652else
Matthias Kloseb9621712010-04-24 17:59:49 +000015653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015654/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015655
15656#include <stdlib.h>
15657#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015658#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015659
15660#if HAVE_TZNAME
15661extern char *tzname[];
15662#endif
15663
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015664int main()
15665{
Brett Cannon18367812003-09-19 00:59:16 +000015666 /* Note that we need to ensure that not only does tzset(3)
15667 do 'something' with localtime, but it works as documented
15668 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015669 This includes making sure that tzname is set properly if
15670 tm->tm_zone does not exist since it is the alternative way
15671 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015672
15673 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015674 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015675 */
15676
Martin v. Löwis1d459062005-03-14 21:23:33 +000015677 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015678 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15679
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015680 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015682 if (localtime(&groundhogday)->tm_hour != 0)
15683 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015684#if HAVE_TZNAME
15685 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15686 if (strcmp(tzname[0], "UTC") ||
15687 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15688 exit(1);
15689#endif
Brett Cannon18367812003-09-19 00:59:16 +000015690
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015691 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015692 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015693 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015694 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015695#if HAVE_TZNAME
15696 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15697 exit(1);
15698#endif
Brett Cannon18367812003-09-19 00:59:16 +000015699
15700 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15701 tzset();
15702 if (localtime(&groundhogday)->tm_hour != 11)
15703 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015704#if HAVE_TZNAME
15705 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15706 exit(1);
15707#endif
15708
15709#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015710 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15711 exit(1);
15712 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15713 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015714#endif
Brett Cannon18367812003-09-19 00:59:16 +000015715
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015716 exit(0);
15717}
15718
15719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015720if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721 ac_cv_working_tzset=yes
15722else
Matthias Kloseb9621712010-04-24 17:59:49 +000015723 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15726 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015727fi
15728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015729fi
15730
Matthias Kloseb9621712010-04-24 17:59:49 +000015731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15732$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015733if test "$ac_cv_working_tzset" = yes
15734then
15735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015737
15738fi
15739
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015740# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15742$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015743if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015745else
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015748#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015749int
15750main ()
15751{
15752
15753struct stat st;
15754st.st_mtim.tv_nsec = 1;
15755
15756 ;
15757 return 0;
15758}
15759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015761 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015762else
Matthias Kloseb9621712010-04-24 17:59:49 +000015763 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15766fi
15767
Matthias Kloseb9621712010-04-24 17:59:49 +000015768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15769$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015770if test "$ac_cv_stat_tv_nsec" = yes
15771then
15772
Matthias Kloseb9621712010-04-24 17:59:49 +000015773$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015774
15775fi
15776
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015777# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15779$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015780if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015781 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015782else
Matthias Kloseb9621712010-04-24 17:59:49 +000015783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015784/* end confdefs.h. */
15785#include <sys/stat.h>
15786int
15787main ()
15788{
15789
15790struct stat st;
15791st.st_mtimespec.tv_nsec = 1;
15792
15793 ;
15794 return 0;
15795}
15796_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015797if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015798 ac_cv_stat_tv_nsec2=yes
15799else
Matthias Kloseb9621712010-04-24 17:59:49 +000015800 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15803fi
15804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15806$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015807if test "$ac_cv_stat_tv_nsec2" = yes
15808then
15809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015811
15812fi
15813
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015814# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015815ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015816if test "$cross_compiling" = no; then
15817 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15818fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015819
15820for ac_header in curses.h ncurses.h
15821do :
15822 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15823ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15824if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15825 cat >>confdefs.h <<_ACEOF
15826#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15827_ACEOF
15828
15829fi
15830
15831done
15832
15833
15834# On Solaris, term.h requires curses.h
15835for ac_header in term.h
15836do :
15837 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15838#ifdef HAVE_CURSES_H
15839#include <curses.h>
15840#endif
15841
15842"
15843if test "x$ac_cv_header_term_h" = xyes; then :
15844 cat >>confdefs.h <<_ACEOF
15845#define HAVE_TERM_H 1
15846_ACEOF
15847
15848fi
15849
15850done
15851
15852
Jack Jansen666b1e72001-10-31 12:11:48 +000015853# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15855$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015856if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015858else
Matthias Kloseb9621712010-04-24 17:59:49 +000015859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015860/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015861#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015862int
15863main ()
15864{
Jack Jansen666b1e72001-10-31 12:11:48 +000015865
15866 int rtn;
15867 rtn = mvwdelch(0,0,0);
15868
Martin v. Löwis11437992002-04-12 09:54:03 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015873if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015874 ac_cv_mvwdelch_is_expression=yes
15875else
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15879fi
15880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15882$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015883
15884if test "$ac_cv_mvwdelch_is_expression" = yes
15885then
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
Matthias Kloseb9621712010-04-24 17:59:49 +000015887$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015888
15889fi
15890
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015891# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15892# structs since version 5.7. If the macro is defined as zero before including
15893# [n]curses.h, ncurses will expose fields of the structs regardless of the
15894# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15896$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015897if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015898 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015899else
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015901/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015902
15903 #define NCURSES_OPAQUE 0
15904 #include <curses.h>
15905
Martin v. Löwis11437992002-04-12 09:54:03 +000015906int
15907main ()
15908{
Jack Jansen666b1e72001-10-31 12:11:48 +000015909
15910 WINDOW *w;
15911 w->_flags = 0;
15912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 ;
15914 return 0;
15915}
15916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015917if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015918 ac_cv_window_has_flags=yes
15919else
Matthias Kloseb9621712010-04-24 17:59:49 +000015920 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15923fi
15924
Matthias Kloseb9621712010-04-24 17:59:49 +000015925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15926$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015927
Jack Jansen666b1e72001-10-31 12:11:48 +000015928
15929if test "$ac_cv_window_has_flags" = yes
15930then
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
Matthias Kloseb9621712010-04-24 17:59:49 +000015932$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015933
15934fi
15935
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15937$as_echo_n "checking for is_pad... " >&6; }
15938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15939/* end confdefs.h. */
15940#include <curses.h>
15941int
15942main ()
15943{
15944
15945#ifndef is_pad
15946void *x=is_pad
15947#endif
15948
15949 ;
15950 return 0;
15951}
15952_ACEOF
15953if ac_fn_c_try_compile "$LINENO"; then :
15954
15955$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15956
15957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15958$as_echo "yes" >&6; }
15959else
15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15961$as_echo "no" >&6; }
15962
15963fi
15964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15965
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15967$as_echo_n "checking for is_term_resized... " >&6; }
15968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015969/* end confdefs.h. */
15970#include <curses.h>
15971int
15972main ()
15973{
15974void *x=is_term_resized
15975 ;
15976 return 0;
15977}
15978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015979if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015982
Matthias Kloseb159a552010-04-25 21:00:44 +000015983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015984$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015985else
Matthias Kloseb9621712010-04-24 17:59:49 +000015986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15987$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015988
15989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15993$as_echo_n "checking for resize_term... " >&6; }
15994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015995/* end confdefs.h. */
15996#include <curses.h>
15997int
15998main ()
15999{
16000void *x=resize_term
16001 ;
16002 return 0;
16003}
16004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016005if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016006
Matthias Kloseb9621712010-04-24 17:59:49 +000016007$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016008
Matthias Kloseb159a552010-04-25 21:00:44 +000016009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016010$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016011else
Matthias Kloseb9621712010-04-24 17:59:49 +000016012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16013$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014
16015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16019$as_echo_n "checking for resizeterm... " >&6; }
16020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016021/* end confdefs.h. */
16022#include <curses.h>
16023int
16024main ()
16025{
16026void *x=resizeterm
16027 ;
16028 return 0;
16029}
16030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016031if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016032
Matthias Kloseb9621712010-04-24 17:59:49 +000016033$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016034
Matthias Kloseb159a552010-04-25 21:00:44 +000016035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016037else
Matthias Kloseb9621712010-04-24 17:59:49 +000016038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16039$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040
16041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016043
16044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16045$as_echo_n "checking for immedok... " >&6; }
16046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16047/* end confdefs.h. */
16048#include <curses.h>
16049int
16050main ()
16051{
16052
16053#ifndef immedok
16054void *x=immedok
16055#endif
16056
16057 ;
16058 return 0;
16059}
16060_ACEOF
16061if ac_fn_c_try_compile "$LINENO"; then :
16062
16063$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16064
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16066$as_echo "yes" >&6; }
16067else
16068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16069$as_echo "no" >&6; }
16070
16071fi
16072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16073
16074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16075$as_echo_n "checking for syncok... " >&6; }
16076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16077/* end confdefs.h. */
16078#include <curses.h>
16079int
16080main ()
16081{
16082
16083#ifndef syncok
16084void *x=syncok
16085#endif
16086
16087 ;
16088 return 0;
16089}
16090_ACEOF
16091if ac_fn_c_try_compile "$LINENO"; then :
16092
16093$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16094
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16096$as_echo "yes" >&6; }
16097else
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16099$as_echo "no" >&6; }
16100
16101fi
16102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16103
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16105$as_echo_n "checking for wchgat... " >&6; }
16106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16107/* end confdefs.h. */
16108#include <curses.h>
16109int
16110main ()
16111{
16112
16113#ifndef wchgat
16114void *x=wchgat
16115#endif
16116
16117 ;
16118 return 0;
16119}
16120_ACEOF
16121if ac_fn_c_try_compile "$LINENO"; then :
16122
16123$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16124
16125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16126$as_echo "yes" >&6; }
16127else
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16129$as_echo "no" >&6; }
16130
16131fi
16132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16133
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16135$as_echo_n "checking for filter... " >&6; }
16136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137/* end confdefs.h. */
16138#include <curses.h>
16139int
16140main ()
16141{
16142
16143#ifndef filter
16144void *x=filter
16145#endif
16146
16147 ;
16148 return 0;
16149}
16150_ACEOF
16151if ac_fn_c_try_compile "$LINENO"; then :
16152
16153$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16154
16155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16156$as_echo "yes" >&6; }
16157else
16158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16159$as_echo "no" >&6; }
16160
16161fi
16162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16163
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16165$as_echo_n "checking for has_key... " >&6; }
16166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16167/* end confdefs.h. */
16168#include <curses.h>
16169int
16170main ()
16171{
16172
16173#ifndef has_key
16174void *x=has_key
16175#endif
16176
16177 ;
16178 return 0;
16179}
16180_ACEOF
16181if ac_fn_c_try_compile "$LINENO"; then :
16182
16183$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16184
16185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16186$as_echo "yes" >&6; }
16187else
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16189$as_echo "no" >&6; }
16190
16191fi
16192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193
16194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16195$as_echo_n "checking for typeahead... " >&6; }
16196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16197/* end confdefs.h. */
16198#include <curses.h>
16199int
16200main ()
16201{
16202
16203#ifndef typeahead
16204void *x=typeahead
16205#endif
16206
16207 ;
16208 return 0;
16209}
16210_ACEOF
16211if ac_fn_c_try_compile "$LINENO"; then :
16212
16213$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16214
16215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16216$as_echo "yes" >&6; }
16217else
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16219$as_echo "no" >&6; }
16220
16221fi
16222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16223
16224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16225$as_echo_n "checking for use_env... " >&6; }
16226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16227/* end confdefs.h. */
16228#include <curses.h>
16229int
16230main ()
16231{
16232
16233#ifndef use_env
16234void *x=use_env
16235#endif
16236
16237 ;
16238 return 0;
16239}
16240_ACEOF
16241if ac_fn_c_try_compile "$LINENO"; then :
16242
16243$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16244
16245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16246$as_echo "yes" >&6; }
16247else
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16249$as_echo "no" >&6; }
16250
16251fi
16252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016253# last curses configure check
16254CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016255
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16257$as_echo "$as_me: checking for device files" >&6;}
16258
16259if test "x$cross_compiling" = xyes; then
16260 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16262$as_echo_n "checking for /dev/ptmx... " >&6; }
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16264$as_echo "not set" >&6; }
16265 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16266 fi
16267 if test "${ac_cv_file__dev_ptc+set}" != set; then
16268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16269$as_echo_n "checking for /dev/ptc... " >&6; }
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16271$as_echo "not set" >&6; }
16272 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16273 fi
16274fi
16275
Matthias Kloseb9621712010-04-24 17:59:49 +000016276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16277$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016278if ${ac_cv_file__dev_ptmx+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280else
16281 test "$cross_compiling" = yes &&
16282 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16283if test -r "/dev/ptmx"; then
16284 ac_cv_file__dev_ptmx=yes
16285else
16286 ac_cv_file__dev_ptmx=no
16287fi
16288fi
16289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16290$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16291if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016292
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016293fi
16294
16295if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016296
Matthias Kloseb9621712010-04-24 17:59:49 +000016297$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016298
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16301$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016302if ${ac_cv_file__dev_ptc+:} false; then :
16303 $as_echo_n "(cached) " >&6
16304else
16305 test "$cross_compiling" = yes &&
16306 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16307if test -r "/dev/ptc"; then
16308 ac_cv_file__dev_ptc=yes
16309else
16310 ac_cv_file__dev_ptc=no
16311fi
16312fi
16313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16314$as_echo "$ac_cv_file__dev_ptc" >&6; }
16315if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016316
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016317fi
16318
16319if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016320
Matthias Kloseb9621712010-04-24 17:59:49 +000016321$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016322
Neal Norwitz865400f2003-03-21 01:42:58 +000016323fi
16324
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016325if test $ac_sys_system = Darwin
16326then
16327 LIBS="$LIBS -framework CoreFoundation"
16328fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016329
Matthias Kloseb9621712010-04-24 17:59:49 +000016330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16331$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016332if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016333 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016334else
Matthias Kloseb9621712010-04-24 17:59:49 +000016335 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016336 ac_cv_have_size_t_format="cross -- assuming yes"
16337
Thomas Wouters477c8d52006-05-27 19:21:47 +000016338else
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016340/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016341
Thomas Wouters477c8d52006-05-27 19:21:47 +000016342#include <stdio.h>
16343#include <stddef.h>
16344#include <string.h>
16345
Christian Heimes2c181612007-12-17 20:04:13 +000016346#ifdef HAVE_SYS_TYPES_H
16347#include <sys/types.h>
16348#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016349
16350#ifdef HAVE_SSIZE_T
16351typedef ssize_t Py_ssize_t;
16352#elif SIZEOF_VOID_P == SIZEOF_LONG
16353typedef long Py_ssize_t;
16354#else
16355typedef int Py_ssize_t;
16356#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016357
Christian Heimes2c181612007-12-17 20:04:13 +000016358int main()
16359{
16360 char buffer[256];
16361
Thomas Wouters477c8d52006-05-27 19:21:47 +000016362 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16363 return 1;
16364
Thomas Wouters89f507f2006-12-13 04:49:30 +000016365 if (strcmp(buffer, "123"))
16366 return 1;
16367
16368 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16369 return 1;
16370
16371 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016372 return 1;
16373
16374 return 0;
16375}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016376
Thomas Wouters477c8d52006-05-27 19:21:47 +000016377_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016378if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016379 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016380else
Matthias Kloseb9621712010-04-24 17:59:49 +000016381 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016382fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016383rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16384 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016385fi
16386
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016387fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16389$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016390if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016391
Matthias Kloseb9621712010-04-24 17:59:49 +000016392$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016393
16394fi
16395
Matthias Kloseb9621712010-04-24 17:59:49 +000016396ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016397#ifdef HAVE_SYS_TYPES_H
16398#include <sys/types.h>
16399#endif
16400#ifdef HAVE_SYS_SOCKET_H
16401#include <sys/socket.h>
16402#endif
16403
Matthias Kloseb9621712010-04-24 17:59:49 +000016404"
Victor Stinnere0be4232011-10-25 13:06:09 +020016405if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016406
Martin v. Löwis11437992002-04-12 09:54:03 +000016407else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016408
Matthias Kloseb9621712010-04-24 17:59:49 +000016409$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016410
16411fi
16412
Michael W. Hudson54241132001-12-07 15:38:26 +000016413
Matthias Kloseb9621712010-04-24 17:59:49 +000016414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16415$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016416if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016417 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016418else
Matthias Kloseb9621712010-04-24 17:59:49 +000016419 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016420 ac_cv_broken_mbstowcs=no
16421else
Matthias Kloseb9621712010-04-24 17:59:49 +000016422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016423/* end confdefs.h. */
16424
Stefan Krah19c21392012-11-22 23:47:32 +010016425#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016426#include<stdlib.h>
16427int main() {
16428 size_t len = -1;
16429 const char *str = "text";
16430 len = mbstowcs(NULL, str, 0);
16431 return (len != 4);
16432}
16433
16434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016435if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016436 ac_cv_broken_mbstowcs=no
16437else
Matthias Kloseb9621712010-04-24 17:59:49 +000016438 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016442fi
16443
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016444fi
16445
Matthias Kloseb9621712010-04-24 17:59:49 +000016446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16447$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016448if test "$ac_cv_broken_mbstowcs" = yes
16449then
16450
Matthias Kloseb9621712010-04-24 17:59:49 +000016451$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016452
16453fi
16454
Antoine Pitroub52ec782009-01-25 16:34:23 +000016455# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16457$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016458
16459# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016460if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016461 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016462if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016463then
16464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016466
Matthias Kloseb9621712010-04-24 17:59:49 +000016467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16468$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016469fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016470if test "$withval" = no
16471then
16472
16473$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16474
Matthias Kloseb9621712010-04-24 17:59:49 +000016475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16476$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016477fi
16478
Antoine Pitrou042b1282010-08-13 21:15:58 +000016479else
16480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16481$as_echo "no value specified" >&6; }
16482fi
16483
Antoine Pitroub52ec782009-01-25 16:34:23 +000016484
Matthias Kloseb17289e2012-03-15 19:51:34 +010016485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16486$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16487if ${ac_cv_computed_gotos+:} false; then :
16488 $as_echo_n "(cached) " >&6
16489else
16490 if test "$cross_compiling" = yes; then :
16491 if test "${with_computed_gotos+set}" = set; then
16492 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16493 else
16494 ac_cv_computed_gotos=no
16495 fi
16496else
16497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498/* end confdefs.h. */
16499
16500int main(int argc, char **argv)
16501{
16502 static void *targets[1] = { &&LABEL1 };
16503 goto LABEL2;
16504LABEL1:
16505 return 0;
16506LABEL2:
16507 goto *targets[0];
16508 return 1;
16509}
16510
16511_ACEOF
16512if ac_fn_c_try_run "$LINENO"; then :
16513 ac_cv_computed_gotos=yes
16514else
16515 ac_cv_computed_gotos=no
16516fi
16517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16518 conftest.$ac_objext conftest.beam conftest.$ac_ext
16519fi
16520
16521fi
16522
16523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16524$as_echo "$ac_cv_computed_gotos" >&6; }
16525case "$ac_cv_computed_gotos" in yes*)
16526
16527$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16528
16529esac
16530
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016531case $ac_sys_system in
16532AIX*)
16533
16534$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16535 ;;
16536esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016537
Michael W. Hudson54241132001-12-07 15:38:26 +000016538
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016539
16540
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016541for h in `(cd $srcdir;echo Python/thread_*.h)`
16542do
16543 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16544done
16545
Michael W. Hudson54241132001-12-07 15:38:26 +000016546
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016547SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16549$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016550for dir in $SRCDIRS; do
16551 if test ! -d $dir; then
16552 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016553 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016554done
Matthias Kloseb9621712010-04-24 17:59:49 +000016555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16556$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016557
Stefan Krah1919b7e2012-03-21 18:25:23 +010016558# Availability of -O2:
16559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16560$as_echo_n "checking for -O2... " >&6; }
16561saved_cflags="$CFLAGS"
16562CFLAGS="-O2"
16563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16564/* end confdefs.h. */
16565
16566int
16567main ()
16568{
16569
16570
16571 ;
16572 return 0;
16573}
16574_ACEOF
16575if ac_fn_c_try_compile "$LINENO"; then :
16576 have_O2=yes
16577else
16578 have_O2=no
16579fi
16580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16582$as_echo "$have_O2" >&6; }
16583CFLAGS="$saved_cflags"
16584
16585# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16586# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16588$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16589saved_cflags="$CFLAGS"
16590CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16591if test "$have_O2" = no; then
16592 CFLAGS=""
16593fi
16594if test "$cross_compiling" = yes; then :
16595 have_glibc_memmove_bug=undefined
16596else
16597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598/* end confdefs.h. */
16599
16600#include <stdio.h>
16601#include <stdlib.h>
16602#include <string.h>
16603void foo(void *p, void *q) { memmove(p, q, 19); }
16604int main() {
16605 char a[32] = "123456789000000000";
16606 foo(&a[9], a);
16607 if (strcmp(a, "123456789123456789000000000") != 0)
16608 return 1;
16609 foo(a, &a[9]);
16610 if (strcmp(a, "123456789000000000") != 0)
16611 return 1;
16612 return 0;
16613}
16614
16615_ACEOF
16616if ac_fn_c_try_run "$LINENO"; then :
16617 have_glibc_memmove_bug=no
16618else
16619 have_glibc_memmove_bug=yes
16620fi
16621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16622 conftest.$ac_objext conftest.beam conftest.$ac_ext
16623fi
16624
16625CFLAGS="$saved_cflags"
16626{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16627$as_echo "$have_glibc_memmove_bug" >&6; }
16628if test "$have_glibc_memmove_bug" = yes; then
16629
16630$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16631
16632fi
16633
16634if test "$have_gcc_asm_for_x87" = yes; then
16635 # Some versions of gcc miscompile inline asm:
16636 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16637 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16638 case $CC in
16639 *gcc*)
16640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16641$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16642 saved_cflags="$CFLAGS"
16643 CFLAGS="-O2"
16644 if test "$cross_compiling" = yes; then :
16645 have_ipa_pure_const_bug=undefined
16646else
16647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16648/* end confdefs.h. */
16649
16650 __attribute__((noinline)) int
16651 foo(int *p) {
16652 int r;
16653 asm ( "movl \$6, (%1)\n\t"
16654 "xorl %0, %0\n\t"
16655 : "=r" (r) : "r" (p) : "memory"
16656 );
16657 return r;
16658 }
16659 int main() {
16660 int p = 8;
16661 if ((foo(&p) ? : p) != 6)
16662 return 1;
16663 return 0;
16664 }
16665
16666_ACEOF
16667if ac_fn_c_try_run "$LINENO"; then :
16668 have_ipa_pure_const_bug=no
16669else
16670 have_ipa_pure_const_bug=yes
16671fi
16672rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16673 conftest.$ac_objext conftest.beam conftest.$ac_ext
16674fi
16675
16676 CFLAGS="$saved_cflags"
16677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16678$as_echo "$have_ipa_pure_const_bug" >&6; }
16679 if test "$have_ipa_pure_const_bug" = yes; then
16680
16681$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16682
16683 fi
16684 ;;
16685 esac
16686fi
16687
Victor Stinner4f5366e2015-01-09 02:13:19 +010016688# Check for stdatomic.h
16689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16690$as_echo_n "checking for stdatomic.h... " >&6; }
16691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16692/* end confdefs.h. */
16693
16694
16695 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016696 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016697 int main() {
16698 int loaded_value = atomic_load(&value);
16699 return 0;
16700 }
16701
16702
16703_ACEOF
16704if ac_fn_c_try_link "$LINENO"; then :
16705 have_stdatomic_h=yes
16706else
16707 have_stdatomic_h=no
16708fi
16709rm -f core conftest.err conftest.$ac_objext \
16710 conftest$ac_exeext conftest.$ac_ext
16711
16712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16713$as_echo "$have_stdatomic_h" >&6; }
16714
16715if test "$have_stdatomic_h" = yes; then
16716
16717$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16718
16719fi
16720
16721# Check for GCC >= 4.7 __atomic builtins
16722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16723$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16725/* end confdefs.h. */
16726
16727
16728 volatile int val = 1;
16729 int main() {
16730 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16731 return 0;
16732 }
16733
16734
16735_ACEOF
16736if ac_fn_c_try_link "$LINENO"; then :
16737 have_builtin_atomic=yes
16738else
16739 have_builtin_atomic=no
16740fi
16741rm -f core conftest.err conftest.$ac_objext \
16742 conftest$ac_exeext conftest.$ac_ext
16743
16744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16745$as_echo "$have_builtin_atomic" >&6; }
16746
16747if test "$have_builtin_atomic" = yes; then
16748
16749$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16750
16751fi
16752
Ned Deily322f5ba2013-11-21 23:01:59 -080016753# ensurepip option
16754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16755$as_echo_n "checking for ensurepip... " >&6; }
16756
16757# Check whether --with-ensurepip was given.
16758if test "${with_ensurepip+set}" = set; then :
16759 withval=$with_ensurepip;
16760else
16761 with_ensurepip=upgrade
16762fi
16763
16764case $with_ensurepip in #(
16765 yes|upgrade) :
16766 ENSUREPIP=upgrade ;; #(
16767 install) :
16768 ENSUREPIP=install ;; #(
16769 no) :
16770 ENSUREPIP=no ;; #(
16771 *) :
16772 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16773esac
16774{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16775$as_echo "$ENSUREPIP" >&6; }
16776
16777
Victor Stinner35a97c02015-03-08 02:59:09 +010016778# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16780$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16782/* end confdefs.h. */
16783
16784
16785 #include <dirent.h>
16786
16787 int main() {
16788 struct dirent entry;
16789 return entry.d_type == DT_UNKNOWN;
16790 }
16791
16792
16793_ACEOF
16794if ac_fn_c_try_link "$LINENO"; then :
16795 have_dirent_d_type=yes
16796else
16797 have_dirent_d_type=no
16798fi
16799rm -f core conftest.err conftest.$ac_objext \
16800 conftest$ac_exeext conftest.$ac_ext
16801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16802$as_echo "$have_dirent_d_type" >&6; }
16803
16804if test "$have_dirent_d_type" = yes; then
16805
16806$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16807
16808fi
16809
Victor Stinner9eb57c52015-03-19 22:21:49 +010016810# check if the Linux getrandom() syscall is available
16811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16812$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16814/* end confdefs.h. */
16815
16816
Victor Stinner1b80b242016-04-12 22:34:58 +020016817 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016818 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016819 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016820
16821 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016822 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016823 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016824 const int flags = GRND_NONBLOCK;
16825 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016826 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016827 return 0;
16828 }
16829
16830
16831_ACEOF
16832if ac_fn_c_try_link "$LINENO"; then :
16833 have_getrandom_syscall=yes
16834else
16835 have_getrandom_syscall=no
16836fi
16837rm -f core conftest.err conftest.$ac_objext \
16838 conftest$ac_exeext conftest.$ac_ext
16839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16840$as_echo "$have_getrandom_syscall" >&6; }
16841
16842if test "$have_getrandom_syscall" = yes; then
16843
16844$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16845
16846fi
16847
Victor Stinner3abf44e2015-09-18 15:38:37 +020016848# check if the getrandom() function is available
16849# the test was written for the Solaris function of <sys/random.h>
16850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16851$as_echo_n "checking for the getrandom() function... " >&6; }
16852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16853/* end confdefs.h. */
16854
16855
16856 #include <sys/random.h>
16857
16858 int main() {
16859 char buffer[1];
16860 const size_t buflen = sizeof(buffer);
16861 const int flags = 0;
16862 /* ignore the result, Python checks for ENOSYS at runtime */
16863 (void)getrandom(buffer, buflen, flags);
16864 return 0;
16865 }
16866
16867
16868_ACEOF
16869if ac_fn_c_try_link "$LINENO"; then :
16870 have_getrandom=yes
16871else
16872 have_getrandom=no
16873fi
16874rm -f core conftest.err conftest.$ac_objext \
16875 conftest$ac_exeext conftest.$ac_ext
16876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16877$as_echo "$have_getrandom" >&6; }
16878
16879if test "$have_getrandom" = yes; then
16880
16881$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16882
16883fi
16884
Neil Schemenauer5741c452019-02-08 10:48:46 -080016885# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16886# shm_* may only be available if linking against librt
16887save_LIBS="$LIBS"
16888save_includes_default="$ac_includes_default"
16889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16890$as_echo_n "checking for library containing shm_open... " >&6; }
16891if ${ac_cv_search_shm_open+:} false; then :
16892 $as_echo_n "(cached) " >&6
16893else
16894 ac_func_search_save_LIBS=$LIBS
16895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16896/* end confdefs.h. */
16897
16898/* Override any GCC internal prototype to avoid an error.
16899 Use char because int might match the return type of a GCC
16900 builtin and then its argument prototype would still apply. */
16901#ifdef __cplusplus
16902extern "C"
16903#endif
16904char shm_open ();
16905int
16906main ()
16907{
16908return shm_open ();
16909 ;
16910 return 0;
16911}
16912_ACEOF
16913for ac_lib in '' rt; do
16914 if test -z "$ac_lib"; then
16915 ac_res="none required"
16916 else
16917 ac_res=-l$ac_lib
16918 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16919 fi
16920 if ac_fn_c_try_link "$LINENO"; then :
16921 ac_cv_search_shm_open=$ac_res
16922fi
16923rm -f core conftest.err conftest.$ac_objext \
16924 conftest$ac_exeext
16925 if ${ac_cv_search_shm_open+:} false; then :
16926 break
16927fi
16928done
16929if ${ac_cv_search_shm_open+:} false; then :
16930
16931else
16932 ac_cv_search_shm_open=no
16933fi
16934rm conftest.$ac_ext
16935LIBS=$ac_func_search_save_LIBS
16936fi
16937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16938$as_echo "$ac_cv_search_shm_open" >&6; }
16939ac_res=$ac_cv_search_shm_open
16940if test "$ac_res" != no; then :
16941 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16942
16943fi
16944
16945if test "$ac_cv_search_shm_open" = "-lrt"; then
16946
16947$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16948
16949fi
16950for ac_header in sys/mman.h
16951do :
16952 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16953if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16954 cat >>confdefs.h <<_ACEOF
16955#define HAVE_SYS_MMAN_H 1
16956_ACEOF
16957
16958fi
16959
16960done
16961
16962# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16963ac_includes_default="\
16964${ac_includes_default}
16965#ifndef __cplusplus
16966# ifdef HAVE_SYS_MMAN_H
16967# include <sys/mman.h>
16968# endif
16969#endif
16970"
16971for ac_func in shm_open shm_unlink
16972do :
16973 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16974ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16975if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16976 cat >>confdefs.h <<_ACEOF
16977#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16978_ACEOF
16979
16980fi
16981done
16982
16983# we don't want to link with librt always, restore LIBS
16984LIBS="$save_LIBS"
16985ac_includes_default="$save_includes_default"
16986
Christian Heimesff5be6e2018-01-20 13:19:21 +010016987# Check for usable OpenSSL
16988
16989 found=false
16990
16991# Check whether --with-openssl was given.
16992if test "${with_openssl+set}" = set; then :
16993 withval=$with_openssl;
16994 case "$withval" in
16995 "" | y | ye | yes | n | no)
16996 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
16997 ;;
16998 *) ssldirs="$withval"
16999 ;;
17000 esac
17001
17002else
17003
17004 # if pkg-config is installed and openssl has installed a .pc file,
17005 # then use that information and don't search ssldirs
17006 if test -n "$ac_tool_prefix"; then
17007 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17008set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17010$as_echo_n "checking for $ac_word... " >&6; }
17011if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17012 $as_echo_n "(cached) " >&6
17013else
17014 if test -n "$PKG_CONFIG"; then
17015 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17016else
17017as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17018for as_dir in $PATH
17019do
17020 IFS=$as_save_IFS
17021 test -z "$as_dir" && as_dir=.
17022 for ac_exec_ext in '' $ac_executable_extensions; do
17023 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17024 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17025 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17026 break 2
17027 fi
17028done
17029 done
17030IFS=$as_save_IFS
17031
17032fi
17033fi
17034PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17035if test -n "$PKG_CONFIG"; then
17036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17037$as_echo "$PKG_CONFIG" >&6; }
17038else
17039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17040$as_echo "no" >&6; }
17041fi
17042
17043
17044fi
17045if test -z "$ac_cv_prog_PKG_CONFIG"; then
17046 ac_ct_PKG_CONFIG=$PKG_CONFIG
17047 # Extract the first word of "pkg-config", so it can be a program name with args.
17048set dummy pkg-config; ac_word=$2
17049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17050$as_echo_n "checking for $ac_word... " >&6; }
17051if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17052 $as_echo_n "(cached) " >&6
17053else
17054 if test -n "$ac_ct_PKG_CONFIG"; then
17055 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17056else
17057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17058for as_dir in $PATH
17059do
17060 IFS=$as_save_IFS
17061 test -z "$as_dir" && as_dir=.
17062 for ac_exec_ext in '' $ac_executable_extensions; do
17063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17064 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17066 break 2
17067 fi
17068done
17069 done
17070IFS=$as_save_IFS
17071
17072fi
17073fi
17074ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17075if test -n "$ac_ct_PKG_CONFIG"; then
17076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17077$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17078else
17079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17080$as_echo "no" >&6; }
17081fi
17082
17083 if test "x$ac_ct_PKG_CONFIG" = x; then
17084 PKG_CONFIG=""
17085 else
17086 case $cross_compiling:$ac_tool_warned in
17087yes:)
17088{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17089$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17090ac_tool_warned=yes ;;
17091esac
17092 PKG_CONFIG=$ac_ct_PKG_CONFIG
17093 fi
17094else
17095 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17096fi
17097
17098 if test x"$PKG_CONFIG" != x""; then
17099 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17100 if test $? = 0; then
17101 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17102 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17103 found=true
17104 fi
17105 fi
17106
17107 # no such luck; use some default ssldirs
17108 if ! $found; then
17109 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17110 fi
17111
17112
17113fi
17114
17115
17116
17117 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17118 # an 'openssl' subdirectory
17119
17120 if ! $found; then
17121 OPENSSL_INCLUDES=
17122 for ssldir in $ssldirs; do
17123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17124$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17125 if test -f "$ssldir/include/openssl/ssl.h"; then
17126 OPENSSL_INCLUDES="-I$ssldir/include"
17127 OPENSSL_LDFLAGS="-L$ssldir/lib"
17128 OPENSSL_LIBS="-lssl -lcrypto"
17129 found=true
17130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17131$as_echo "yes" >&6; }
17132 break
17133 else
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17135$as_echo "no" >&6; }
17136 fi
17137 done
17138
17139 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17140 # it will just work!
17141 fi
17142
17143 # try the preprocessor and linker with our new flags,
17144 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17145
17146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17147$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17148 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17149 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17150
17151 save_LIBS="$LIBS"
17152 save_LDFLAGS="$LDFLAGS"
17153 save_CPPFLAGS="$CPPFLAGS"
17154 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17155 LIBS="$OPENSSL_LIBS $LIBS"
17156 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17158/* end confdefs.h. */
17159#include <openssl/ssl.h>
17160int
17161main ()
17162{
17163SSL_new(NULL)
17164 ;
17165 return 0;
17166}
17167_ACEOF
17168if ac_fn_c_try_link "$LINENO"; then :
17169
17170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17171$as_echo "yes" >&6; }
17172 have_openssl=yes
17173
17174else
17175
17176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17177$as_echo "no" >&6; }
17178 have_openssl=no
17179
17180fi
17181rm -f core conftest.err conftest.$ac_objext \
17182 conftest$ac_exeext conftest.$ac_ext
17183 CPPFLAGS="$save_CPPFLAGS"
17184 LDFLAGS="$save_LDFLAGS"
17185 LIBS="$save_LIBS"
17186
17187
17188
17189
17190
17191
17192if test "$have_openssl" = yes; then
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17194$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17195
17196 save_LIBS="$LIBS"
17197 save_LDFLAGS="$LDFLAGS"
17198 save_CPPFLAGS="$CPPFLAGS"
17199 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17200 LIBS="$OPENSSL_LIBS $LIBS"
17201 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17202
17203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17204/* end confdefs.h. */
17205
17206 #include <openssl/x509_vfy.h>
17207
17208int
17209main ()
17210{
17211
17212 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17213 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17214 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17215 X509_VERIFY_PARAM_set_hostflags(p, 0);
17216
17217 ;
17218 return 0;
17219}
17220
17221_ACEOF
17222if ac_fn_c_try_link "$LINENO"; then :
17223
17224 ac_cv_has_x509_verify_param_set1_host=yes
17225
17226else
17227
17228 ac_cv_has_x509_verify_param_set1_host=no
17229
17230fi
17231rm -f core conftest.err conftest.$ac_objext \
17232 conftest$ac_exeext conftest.$ac_ext
17233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17234$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17235 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17236
17237$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17238
17239 fi
17240
17241 CPPFLAGS="$save_CPPFLAGS"
17242 LDFLAGS="$save_LDFLAGS"
17243 LIBS="$save_LIBS"
17244fi
17245
Christian Heimes892d66e2018-01-29 14:10:18 +010017246# ssl module default cipher suite string
17247
17248
17249
17250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17251$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17252
17253# Check whether --with-ssl-default-suites was given.
17254if test "${with_ssl_default_suites+set}" = set; then :
17255 withval=$with_ssl_default_suites;
17256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17257$as_echo "$withval" >&6; }
17258case "$withval" in
17259 python)
17260 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17261
17262 ;;
17263 openssl)
17264 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17265
17266 ;;
17267 *)
17268 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17269
17270 cat >>confdefs.h <<_ACEOF
17271#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17272_ACEOF
17273
17274 ;;
17275esac
17276
17277else
17278
17279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17280$as_echo "python" >&6; }
17281$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17282
17283
17284fi
17285
17286
17287
Guido van Rossum627b2d71993-12-24 10:39:16 +000017288# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017289ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017290
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017291ac_config_files="$ac_config_files Modules/ld_so_aix"
17292
Martin v. Löwis11437992002-04-12 09:54:03 +000017293cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017294# This file is a shell script that caches the results of configure
17295# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017296# scripts and configure runs, see configure's option --config-cache.
17297# It is not useful on other systems. If it contains results you don't
17298# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017299#
Martin v. Löwis11437992002-04-12 09:54:03 +000017300# config.status only pays attention to the cache file if you give it
17301# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017302#
Skip Montanaro6dead952003-09-25 14:50:04 +000017303# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017304# loading this file, other *unset* `ac_cv_foo' will be assigned the
17305# following values.
17306
17307_ACEOF
17308
Guido van Rossumf78abae1997-01-21 22:02:36 +000017309# The following way of writing the cache mishandles newlines in values,
17310# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017311# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017312# Ultrix sh set writes to stderr and can't be redirected directly,
17313# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314(
17315 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17316 eval ac_val=\$$ac_var
17317 case $ac_val in #(
17318 *${as_nl}*)
17319 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17321$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322 esac
17323 case $ac_var in #(
17324 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017325 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17326 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327 esac ;;
17328 esac
17329 done
17330
Martin v. Löwis11437992002-04-12 09:54:03 +000017331 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017332 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17333 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 # `set' does not quote correctly, so add quotes: double-quote
17335 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017336 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017337 "s/'/'\\\\''/g;
17338 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 *)
17341 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017342 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017343 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344 esac |
17345 sort
17346) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017349 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017350 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017351 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17352 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17354 :end' >>confcache
17355if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17356 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017357 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17359$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017360 if test ! -f "$cache_file" || test -h "$cache_file"; then
17361 cat confcache >"$cache_file"
17362 else
17363 case $cache_file in #(
17364 */* | ?:*)
17365 mv -f confcache "$cache_file"$$ &&
17366 mv -f "$cache_file"$$ "$cache_file" ;; #(
17367 *)
17368 mv -f confcache "$cache_file" ;;
17369 esac
17370 fi
17371 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017372 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017373 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17374$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017375 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017376fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017377rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017378
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017379test "x$prefix" = xNONE && prefix=$ac_default_prefix
17380# Let make expand exec_prefix.
17381test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017383DEFS=-DHAVE_CONFIG_H
17384
Skip Montanaro6dead952003-09-25 14:50:04 +000017385ac_libobjs=
17386ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017387U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017388for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17389 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17393 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017394 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17395 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017396done
17397LIBOBJS=$ac_libobjs
17398
17399LTLIBOBJS=$ac_ltlibobjs
17400
17401
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
Matthias Kloseb9621712010-04-24 17:59:49 +000017403
Victor Stinnere0be4232011-10-25 13:06:09 +020017404: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017405ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017406ac_clean_files_save=$ac_clean_files
17407ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017408{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17409$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17410as_write_fail=0
17411cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017412#! $SHELL
17413# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017414# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017415# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017416# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017417
Martin v. Löwis11437992002-04-12 09:54:03 +000017418debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017419ac_cs_recheck=false
17420ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017421
Matthias Kloseb9621712010-04-24 17:59:49 +000017422SHELL=\${CONFIG_SHELL-$SHELL}
17423export SHELL
17424_ASEOF
17425cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17426## -------------------- ##
17427## M4sh Initialization. ##
17428## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017430# Be more Bourne compatible
17431DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017432if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017433 emulate sh
17434 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017435 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017436 # is contrary to our usage. Disable this feature.
17437 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017438 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017439else
Matthias Kloseb9621712010-04-24 17:59:49 +000017440 case `(set -o) 2>/dev/null` in #(
17441 *posix*) :
17442 set -o posix ;; #(
17443 *) :
17444 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017446fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017447
17448
Matthias Kloseb9621712010-04-24 17:59:49 +000017449as_nl='
17450'
17451export as_nl
17452# Printing a long string crashes Solaris 7 /usr/bin/printf.
17453as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17454as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17455as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17456# Prefer a ksh shell builtin over an external printf program on Solaris,
17457# but without wasting forks for bash or zsh.
17458if test -z "$BASH_VERSION$ZSH_VERSION" \
17459 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17460 as_echo='print -r --'
17461 as_echo_n='print -rn --'
17462elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17463 as_echo='printf %s\n'
17464 as_echo_n='printf %s'
17465else
17466 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17467 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17468 as_echo_n='/usr/ucb/echo -n'
17469 else
17470 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17471 as_echo_n_body='eval
17472 arg=$1;
17473 case $arg in #(
17474 *"$as_nl"*)
17475 expr "X$arg" : "X\\(.*\\)$as_nl";
17476 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17477 esac;
17478 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17479 '
17480 export as_echo_n_body
17481 as_echo_n='sh -c $as_echo_n_body as_echo'
17482 fi
17483 export as_echo_body
17484 as_echo='sh -c $as_echo_body as_echo'
17485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017486
17487# The user is always right.
17488if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017489 PATH_SEPARATOR=:
17490 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17491 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17492 PATH_SEPARATOR=';'
17493 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496
17497# IFS
17498# We need space, tab and new line, in precisely that order. Quoting is
17499# there to prevent editors from complaining about space-tab.
17500# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17501# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017502IFS=" "" $as_nl"
17503
17504# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017505as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017506case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 *[\\/]* ) as_myself=$0 ;;
17508 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017509for as_dir in $PATH
17510do
17511 IFS=$as_save_IFS
17512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017513 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17514 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017516
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517 ;;
17518esac
17519# We did not find ourselves, most probably we were run as `sh COMMAND'
17520# in which case we are not to be found in the path.
17521if test "x$as_myself" = x; then
17522 as_myself=$0
17523fi
17524if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17526 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527fi
17528
Matthias Kloseb9621712010-04-24 17:59:49 +000017529# Unset variables that we do not need and which cause bugs (e.g. in
17530# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17531# suppresses any "Segmentation fault" message there. '((' could
17532# trigger a bug in pdksh 5.2.14.
17533for as_var in BASH_ENV ENV MAIL MAILPATH
17534do eval test x\${$as_var+set} = xset \
17535 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536done
17537PS1='$ '
17538PS2='> '
17539PS4='+ '
17540
17541# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017542LC_ALL=C
17543export LC_ALL
17544LANGUAGE=C
17545export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017546
Matthias Kloseb9621712010-04-24 17:59:49 +000017547# CDPATH.
17548(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17549
17550
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017551# as_fn_error STATUS ERROR [LINENO LOG_FD]
17552# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017553# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17554# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017556as_fn_error ()
17557{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017558 as_status=$1; test $as_status -eq 0 && as_status=1
17559 if test "$4"; then
17560 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17561 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017562 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017563 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017564 as_fn_exit $as_status
17565} # as_fn_error
17566
17567
17568# as_fn_set_status STATUS
17569# -----------------------
17570# Set $? to STATUS, without forking.
17571as_fn_set_status ()
17572{
17573 return $1
17574} # as_fn_set_status
17575
17576# as_fn_exit STATUS
17577# -----------------
17578# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17579as_fn_exit ()
17580{
17581 set +e
17582 as_fn_set_status $1
17583 exit $1
17584} # as_fn_exit
17585
17586# as_fn_unset VAR
17587# ---------------
17588# Portably unset VAR.
17589as_fn_unset ()
17590{
17591 { eval $1=; unset $1;}
17592}
17593as_unset=as_fn_unset
17594# as_fn_append VAR VALUE
17595# ----------------------
17596# Append the text in VALUE to the end of the definition contained in VAR. Take
17597# advantage of any shell optimizations that allow amortized linear growth over
17598# repeated appends, instead of the typical quadratic growth present in naive
17599# implementations.
17600if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17601 eval 'as_fn_append ()
17602 {
17603 eval $1+=\$2
17604 }'
17605else
17606 as_fn_append ()
17607 {
17608 eval $1=\$$1\$2
17609 }
17610fi # as_fn_append
17611
17612# as_fn_arith ARG...
17613# ------------------
17614# Perform arithmetic evaluation on the ARGs, and store the result in the
17615# global $as_val. Take advantage of shells that can avoid forks. The arguments
17616# must be portable across $(()) and expr.
17617if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17618 eval 'as_fn_arith ()
17619 {
17620 as_val=$(( $* ))
17621 }'
17622else
17623 as_fn_arith ()
17624 {
17625 as_val=`expr "$@" || test $? -eq 1`
17626 }
17627fi # as_fn_arith
17628
17629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017630if expr a : '\(a\)' >/dev/null 2>&1 &&
17631 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17632 as_expr=expr
17633else
17634 as_expr=false
17635fi
17636
17637if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17638 as_basename=basename
17639else
17640 as_basename=false
17641fi
17642
Matthias Kloseb9621712010-04-24 17:59:49 +000017643if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17644 as_dirname=dirname
17645else
17646 as_dirname=false
17647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017649as_me=`$as_basename -- "$0" ||
17650$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17651 X"$0" : 'X\(//\)$' \| \
17652 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017653$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017654 sed '/^.*\/\([^/][^/]*\)\/*$/{
17655 s//\1/
17656 q
17657 }
17658 /^X\/\(\/\/\)$/{
17659 s//\1/
17660 q
17661 }
17662 /^X\/\(\/\).*/{
17663 s//\1/
17664 q
17665 }
17666 s/.*/./; q'`
17667
Matthias Kloseb9621712010-04-24 17:59:49 +000017668# Avoid depending upon Character Ranges.
17669as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17670as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17671as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17672as_cr_digits='0123456789'
17673as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017674
17675ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017676case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017678 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017679 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017680 xy) ECHO_C='\c';;
17681 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17682 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 esac;;
17684*)
17685 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017686esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017687
Martin v. Löwis11437992002-04-12 09:54:03 +000017688rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689if test -d conf$$.dir; then
17690 rm -f conf$$.dir/conf$$.file
17691else
17692 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017694fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017695if (echo >conf$$.file) 2>/dev/null; then
17696 if ln -s conf$$.file conf$$ 2>/dev/null; then
17697 as_ln_s='ln -s'
17698 # ... but there are two gotchas:
17699 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17700 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017701 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017703 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 elif ln conf$$.file conf$$ 2>/dev/null; then
17705 as_ln_s=ln
17706 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017707 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017709else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017710 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17713rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017714
Matthias Kloseb9621712010-04-24 17:59:49 +000017715
17716# as_fn_mkdir_p
17717# -------------
17718# Create "$as_dir" as a directory, including parents if necessary.
17719as_fn_mkdir_p ()
17720{
17721
17722 case $as_dir in #(
17723 -*) as_dir=./$as_dir;;
17724 esac
17725 test -d "$as_dir" || eval $as_mkdir_p || {
17726 as_dirs=
17727 while :; do
17728 case $as_dir in #(
17729 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17730 *) as_qdir=$as_dir;;
17731 esac
17732 as_dirs="'$as_qdir' $as_dirs"
17733 as_dir=`$as_dirname -- "$as_dir" ||
17734$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17735 X"$as_dir" : 'X\(//\)[^/]' \| \
17736 X"$as_dir" : 'X\(//\)$' \| \
17737 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17738$as_echo X"$as_dir" |
17739 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17740 s//\1/
17741 q
17742 }
17743 /^X\(\/\/\)[^/].*/{
17744 s//\1/
17745 q
17746 }
17747 /^X\(\/\/\)$/{
17748 s//\1/
17749 q
17750 }
17751 /^X\(\/\).*/{
17752 s//\1/
17753 q
17754 }
17755 s/.*/./; q'`
17756 test -d "$as_dir" && break
17757 done
17758 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017759 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017760
17761
17762} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017763if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017764 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017765else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017766 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017767 as_mkdir_p=false
17768fi
17769
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017770
17771# as_fn_executable_p FILE
17772# -----------------------
17773# Test if FILE is an executable regular file.
17774as_fn_executable_p ()
17775{
17776 test -f "$1" && test -x "$1"
17777} # as_fn_executable_p
17778as_test_x='test -x'
17779as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017780
17781# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017782as_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 +000017783
17784# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017785as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017786
17787
Martin v. Löwis11437992002-04-12 09:54:03 +000017788exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017789## ----------------------------------- ##
17790## Main body of $CONFIG_STATUS script. ##
17791## ----------------------------------- ##
17792_ASEOF
17793test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
Matthias Kloseb9621712010-04-24 17:59:49 +000017795cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17796# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017797# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017798# values after options handling.
17799ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017800This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017801generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017802
17803 CONFIG_FILES = $CONFIG_FILES
17804 CONFIG_HEADERS = $CONFIG_HEADERS
17805 CONFIG_LINKS = $CONFIG_LINKS
17806 CONFIG_COMMANDS = $CONFIG_COMMANDS
17807 $ $0 $@
17808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017809on `(hostname || uname -n) 2>/dev/null | sed 1q`
17810"
17811
Martin v. Löwis11437992002-04-12 09:54:03 +000017812_ACEOF
17813
Matthias Kloseb9621712010-04-24 17:59:49 +000017814case $ac_config_files in *"
17815"*) set x $ac_config_files; shift; ac_config_files=$*;;
17816esac
17817
17818case $ac_config_headers in *"
17819"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17820esac
17821
17822
17823cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017824# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017825config_files="$ac_config_files"
17826config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017828_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017829
Matthias Kloseb9621712010-04-24 17:59:49 +000017830cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017831ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017832\`$as_me' instantiates files and other configuration actions
17833from templates according to the current configuration. Unless the files
17834and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017835
Matthias Kloseb9621712010-04-24 17:59:49 +000017836Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017837
17838 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017840 --config print configuration, then exit
17841 -q, --quiet, --silent
17842 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017843 -d, --debug don't remove temporary files
17844 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017845 --file=FILE[:TEMPLATE]
17846 instantiate the configuration file FILE
17847 --header=FILE[:TEMPLATE]
17848 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017849
17850Configuration files:
17851$config_files
17852
17853Configuration headers:
17854$config_headers
17855
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017856Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017857
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17860ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017861ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017862python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017863configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017864 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017866Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017867This config.status script is free software; the Free Software Foundation
17868gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017869
17870ac_pwd='$ac_pwd'
17871srcdir='$srcdir'
17872INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017873MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017874test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017875_ACEOF
17876
Matthias Kloseb9621712010-04-24 17:59:49 +000017877cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17878# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017879ac_need_defaults=:
17880while test $# != 0
17881do
17882 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017883 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17885 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017886 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017888 --*=)
17889 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17890 ac_optarg=
17891 ac_shift=:
17892 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017894 ac_option=$1
17895 ac_optarg=$2
17896 ac_shift=shift
17897 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017898 esac
17899
Skip Montanaro6dead952003-09-25 14:50:04 +000017900 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017902 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17903 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017905 $as_echo "$ac_cs_version"; exit ;;
17906 --config | --confi | --conf | --con | --co | --c )
17907 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017909 debug=: ;;
17910 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017911 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017912 case $ac_optarg in
17913 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017914 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017915 esac
17916 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 ac_need_defaults=false;;
17918 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017919 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017920 case $ac_optarg in
17921 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17922 esac
17923 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925 --he | --h)
17926 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017927 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017928Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017930 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017931 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17932 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17933 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017934
17935 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017936 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017937Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
Matthias Kloseb9621712010-04-24 17:59:49 +000017939 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017941
17942 esac
17943 shift
17944done
17945
Skip Montanaro6dead952003-09-25 14:50:04 +000017946ac_configure_extra_args=
17947
17948if $ac_cs_silent; then
17949 exec 6>/dev/null
17950 ac_configure_extra_args="$ac_configure_extra_args --silent"
17951fi
17952
17953_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017955if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017956 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017957 shift
17958 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17959 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017960 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017962fi
17963
Martin v. Löwis11437992002-04-12 09:54:03 +000017964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017965cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017966exec 5>>config.log
17967{
17968 echo
17969 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17970## Running $as_me. ##
17971_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017972 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017976cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017978
Matthias Kloseb9621712010-04-24 17:59:49 +000017979cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017980
17981# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017982for ac_config_target in $ac_config_targets
17983do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 case $ac_config_target in
17985 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17986 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17987 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017988 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17989 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017991 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017992 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017993 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994
Victor Stinnere0be4232011-10-25 13:06:09 +020017995 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017996 esac
17997done
17998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999
Martin v. Löwis11437992002-04-12 09:54:03 +000018000# If the user did not use the arguments to specify the items to instantiate,
18001# then the envvar interface is used. Set only those that are not.
18002# We use the long form for the default assignment because of an extremely
18003# bizarre bug on SunOS 4.1.3.
18004if $ac_need_defaults; then
18005 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18006 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18007fi
18008
Skip Montanaro6dead952003-09-25 14:50:04 +000018009# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018011# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012# Hook for its removal unless debugging.
18013# Note that there is a small window in which the directory will not be cleaned:
18014# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018015$debug ||
18016{
Victor Stinnere0be4232011-10-25 13:06:09 +020018017 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018018 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018019 : "${ac_tmp:=$tmp}"
18020 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018021' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018022 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018023}
Martin v. Löwis11437992002-04-12 09:54:03 +000018024# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018025
Martin v. Löwis11437992002-04-12 09:54:03 +000018026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018028 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018029} ||
18030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031 tmp=./conf$$-$RANDOM
18032 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018033} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018034ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018035
Matthias Kloseb9621712010-04-24 17:59:49 +000018036# Set up the scripts for CONFIG_FILES section.
18037# No need to generate them if there are no CONFIG_FILES.
18038# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018039if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018040
Matthias Kloseb9621712010-04-24 17:59:49 +000018041
18042ac_cr=`echo X | tr X '\015'`
18043# On cygwin, bash can eat \r inside `` if the user requested igncr.
18044# But we know of no other shell where ac_cr would be empty at this
18045# point, so we can use a bashism as a fallback.
18046if test "x$ac_cr" = x; then
18047 eval ac_cr=\$\'\\r\'
18048fi
18049ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18050if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018051 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018052else
18053 ac_cs_awk_cr=$ac_cr
18054fi
18055
Victor Stinnere0be4232011-10-25 13:06:09 +020018056echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018057_ACEOF
18058
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018059
Matthias Kloseb9621712010-04-24 17:59:49 +000018060{
18061 echo "cat >conf$$subs.awk <<_ACEOF" &&
18062 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18063 echo "_ACEOF"
18064} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018065 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18066ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067ac_delim='%!_!# '
18068for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018069 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018070 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071
Matthias Kloseb9621712010-04-24 17:59:49 +000018072 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18073 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074 break
18075 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018076 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018077 else
18078 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018079 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018080done
Matthias Kloseb9621712010-04-24 17:59:49 +000018081rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018082
Matthias Kloseb9621712010-04-24 17:59:49 +000018083cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018084cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018086sed -n '
18087h
18088s/^/S["/; s/!.*/"]=/
18089p
18090g
18091s/^[^!]*!//
18092:repl
18093t repl
18094s/'"$ac_delim"'$//
18095t delim
18096:nl
18097h
18098s/\(.\{148\}\)..*/\1/
18099t more1
18100s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18101p
18102n
18103b repl
18104:more1
18105s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18106p
18107g
18108s/.\{148\}//
18109t nl
18110:delim
18111h
18112s/\(.\{148\}\)..*/\1/
18113t more2
18114s/["\\]/\\&/g; s/^/"/; s/$/"/
18115p
18116b
18117:more2
18118s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18119p
18120g
18121s/.\{148\}//
18122t delim
18123' <conf$$subs.awk | sed '
18124/^[^""]/{
18125 N
18126 s/\n//
18127}
18128' >>$CONFIG_STATUS || ac_write_fail=1
18129rm -f conf$$subs.awk
18130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18131_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018132cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018133 for (key in S) S_is_set[key] = 1
18134 FS = ""
18135
18136}
18137{
18138 line = $ 0
18139 nfields = split(line, field, "@")
18140 substed = 0
18141 len = length(field[1])
18142 for (i = 2; i < nfields; i++) {
18143 key = field[i]
18144 keylen = length(key)
18145 if (S_is_set[key]) {
18146 value = S[key]
18147 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18148 len += length(value) + length(field[++i])
18149 substed = 1
18150 } else
18151 len += 1 + keylen
18152 }
18153
18154 print line
18155}
18156
18157_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18160if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18161 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18162else
18163 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018164fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018165 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018166_ACEOF
18167
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018168# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18169# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018170# trailing colons and then remove the whole line if VPATH becomes empty
18171# (actually we leave an empty line to preserve line numbers).
18172if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018173 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18174h
18175s///
18176s/^/:/
18177s/[ ]*$/:/
18178s/:\$(srcdir):/:/g
18179s/:\${srcdir}:/:/g
18180s/:@srcdir@:/:/g
18181s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018182s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018183x
18184s/\(=[ ]*\).*/\1/
18185G
18186s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018187s/^[^=]*=[ ]*$//
18188}'
18189fi
18190
Matthias Kloseb9621712010-04-24 17:59:49 +000018191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018192fi # test -n "$CONFIG_FILES"
18193
Matthias Kloseb9621712010-04-24 17:59:49 +000018194# Set up the scripts for CONFIG_HEADERS section.
18195# No need to generate them if there are no CONFIG_HEADERS.
18196# This happens for instance with `./config.status Makefile'.
18197if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018198cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018199BEGIN {
18200_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018201
Matthias Kloseb9621712010-04-24 17:59:49 +000018202# Transform confdefs.h into an awk script `defines.awk', embedded as
18203# here-document in config.status, that substitutes the proper values into
18204# config.h.in to produce config.h.
18205
18206# Create a delimiter string that does not exist in confdefs.h, to ease
18207# handling of long lines.
18208ac_delim='%!_!# '
18209for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018210 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18211 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018212 break
18213 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018214 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018215 else
18216 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18217 fi
18218done
18219
18220# For the awk script, D is an array of macro values keyed by name,
18221# likewise P contains macro parameters if any. Preserve backslash
18222# newline sequences.
18223
18224ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18225sed -n '
18226s/.\{148\}/&'"$ac_delim"'/g
18227t rset
18228:rset
18229s/^[ ]*#[ ]*define[ ][ ]*/ /
18230t def
18231d
18232:def
18233s/\\$//
18234t bsnl
18235s/["\\]/\\&/g
18236s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18237D["\1"]=" \3"/p
18238s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18239d
18240:bsnl
18241s/["\\]/\\&/g
18242s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18243D["\1"]=" \3\\\\\\n"\\/p
18244t cont
18245s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18246t cont
18247d
18248:cont
18249n
18250s/.\{148\}/&'"$ac_delim"'/g
18251t clear
18252:clear
18253s/\\$//
18254t bsnlc
18255s/["\\]/\\&/g; s/^/"/; s/$/"/p
18256d
18257:bsnlc
18258s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18259b cont
18260' <confdefs.h | sed '
18261s/'"$ac_delim"'/"\\\
18262"/g' >>$CONFIG_STATUS || ac_write_fail=1
18263
18264cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18265 for (key in D) D_is_set[key] = 1
18266 FS = ""
18267}
18268/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18269 line = \$ 0
18270 split(line, arg, " ")
18271 if (arg[1] == "#") {
18272 defundef = arg[2]
18273 mac1 = arg[3]
18274 } else {
18275 defundef = substr(arg[1], 2)
18276 mac1 = arg[2]
18277 }
18278 split(mac1, mac2, "(") #)
18279 macro = mac2[1]
18280 prefix = substr(line, 1, index(line, defundef) - 1)
18281 if (D_is_set[macro]) {
18282 # Preserve the white space surrounding the "#".
18283 print prefix "define", macro P[macro] D[macro]
18284 next
18285 } else {
18286 # Replace #undef with comments. This is necessary, for example,
18287 # in the case of _POSIX_SOURCE, which is predefined and required
18288 # on some systems where configure will not decide to define it.
18289 if (defundef == "undef") {
18290 print "/*", prefix defundef, macro, "*/"
18291 next
18292 }
18293 }
18294}
18295{ print }
18296_ACAWK
18297_ACEOF
18298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018299 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018300fi # test -n "$CONFIG_HEADERS"
18301
18302
18303eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18304shift
18305for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018306do
18307 case $ac_tag in
18308 :[FHLC]) ac_mode=$ac_tag; continue;;
18309 esac
18310 case $ac_mode$ac_tag in
18311 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018312 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018313 :[FH]-) ac_tag=-:-;;
18314 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18315 esac
18316 ac_save_IFS=$IFS
18317 IFS=:
18318 set x $ac_tag
18319 IFS=$ac_save_IFS
18320 shift
18321 ac_file=$1
18322 shift
18323
18324 case $ac_mode in
18325 :L) ac_source=$1;;
18326 :[FH])
18327 ac_file_inputs=
18328 for ac_f
18329 do
18330 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018331 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018332 *) # Look for the file first in the build tree, then in the source tree
18333 # (if the path is not absolute). The absolute path cannot be DOS-style,
18334 # because $ac_f cannot contain `:'.
18335 test -f "$ac_f" ||
18336 case $ac_f in
18337 [\\/$]*) false;;
18338 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18339 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018340 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018341 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018342 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18343 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018344 done
18345
18346 # Let's still pretend it is `configure' which instantiates (i.e., don't
18347 # use $as_me), people would be surprised to read:
18348 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018349 configure_input='Generated from '`
18350 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18351 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018352 if test x"$ac_file" != x-; then
18353 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018354 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18355$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018356 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018357 # Neutralize special characters interpreted by sed in replacement strings.
18358 case $configure_input in #(
18359 *\&* | *\|* | *\\* )
18360 ac_sed_conf_input=`$as_echo "$configure_input" |
18361 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18362 *) ac_sed_conf_input=$configure_input;;
18363 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018364
18365 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018366 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18367 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368 esac
18369 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018370 esac
18371
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018373$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374 X"$ac_file" : 'X\(//\)[^/]' \| \
18375 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018377$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18379 s//\1/
18380 q
18381 }
18382 /^X\(\/\/\)[^/].*/{
18383 s//\1/
18384 q
18385 }
18386 /^X\(\/\/\)$/{
18387 s//\1/
18388 q
18389 }
18390 /^X\(\/\).*/{
18391 s//\1/
18392 q
18393 }
18394 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018395 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 ac_builddir=.
18397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398case "$ac_dir" in
18399.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18400*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018401 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018403 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 case $ac_top_builddir_sub in
18405 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18406 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18407 esac ;;
18408esac
18409ac_abs_top_builddir=$ac_pwd
18410ac_abs_builddir=$ac_pwd$ac_dir_suffix
18411# for backward compatibility:
18412ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018413
18414case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018416 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018417 ac_top_srcdir=$ac_top_builddir_sub
18418 ac_abs_top_srcdir=$ac_pwd ;;
18419 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018420 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 ac_top_srcdir=$srcdir
18422 ac_abs_top_srcdir=$srcdir ;;
18423 *) # Relative name.
18424 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18425 ac_top_srcdir=$ac_top_build_prefix$srcdir
18426 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018427esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018429
Martin v. Löwis11437992002-04-12 09:54:03 +000018430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431 case $ac_mode in
18432 :F)
18433 #
18434 # CONFIG_FILE
18435 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018436
18437 case $INSTALL in
18438 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018439 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018440 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018441 ac_MKDIR_P=$MKDIR_P
18442 case $MKDIR_P in
18443 [\\/$]* | ?:[\\/]* ) ;;
18444 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18445 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018446_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447
Matthias Kloseb9621712010-04-24 17:59:49 +000018448cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018449# If the template does not know about datarootdir, expand it.
18450# FIXME: This hack should be removed a few years after 2.60.
18451ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018452ac_sed_dataroot='
18453/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 p
18455 q
18456}
18457/@datadir@/p
18458/@docdir@/p
18459/@infodir@/p
18460/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018461/@mandir@/p'
18462case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463*datarootdir*) ac_datarootdir_seen=yes;;
18464*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18466$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018468cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469 ac_datarootdir_hack='
18470 s&@datadir@&$datadir&g
18471 s&@docdir@&$docdir&g
18472 s&@infodir@&$infodir&g
18473 s&@localedir@&$localedir&g
18474 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018475 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476esac
18477_ACEOF
18478
18479# Neutralize VPATH when `$srcdir' = `.'.
18480# Shell code in configure.ac might set extrasub.
18481# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018482cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18483ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018484$extrasub
18485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018486cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018487:t
18488/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018489s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018490s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018491s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492s&@srcdir@&$ac_srcdir&;t t
18493s&@abs_srcdir@&$ac_abs_srcdir&;t t
18494s&@top_srcdir@&$ac_top_srcdir&;t t
18495s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18496s&@builddir@&$ac_builddir&;t t
18497s&@abs_builddir@&$ac_abs_builddir&;t t
18498s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18499s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018500s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018501$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018502"
Victor Stinnere0be4232011-10-25 13:06:09 +020018503eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18504 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018505
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018507 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18508 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18509 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018510 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018511which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018512$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018513which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018514
Victor Stinnere0be4232011-10-25 13:06:09 +020018515 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018516 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018517 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18518 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018519 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018520 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018521 ;;
18522 :H)
18523 #
18524 # CONFIG_HEADER
18525 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018526 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018527 {
18528 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018529 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18530 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018531 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018532 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018533 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18534$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018536 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018537 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018538 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018539 fi
18540 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018541 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018542 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018543 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018544 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018545 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018546
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018547
18548 esac
18549
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018550
18551 case $ac_file$ac_mode in
18552 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18553
18554 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555done # for ac_tag
18556
Guido van Rossum627b2d71993-12-24 10:39:16 +000018557
Matthias Kloseb9621712010-04-24 17:59:49 +000018558as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018559_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018560ac_clean_files=$ac_clean_files_save
18561
Matthias Kloseb9621712010-04-24 17:59:49 +000018562test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018563 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018564
Martin v. Löwis11437992002-04-12 09:54:03 +000018565
18566# configure is writing to config.log, and then calls config.status.
18567# config.status does its own redirection, appending to config.log.
18568# Unfortunately, on DOS this fails, as config.log is still kept open
18569# by configure, so config.status won't be able to write to it; its
18570# output is simply discarded. So we exec the FD to /dev/null,
18571# effectively closing config.log, so it can be properly (re)opened and
18572# appended to by config.status. When coming back to configure, we
18573# need to make the FD available again.
18574if test "$no_create" != yes; then
18575 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018576 ac_config_status_args=
18577 test "$silent" = yes &&
18578 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018579 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018580 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018581 exec 5>>config.log
18582 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18583 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018584 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018585fi
18586if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18588$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018589fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018590
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018591
Christian Heimes75ed8902013-11-20 01:11:18 +010018592echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018593if test ! -f Modules/Setup.local
18594then
18595 echo "# Edit this file for local setup changes" >Modules/Setup.local
18596fi
18597
Christian Heimes75ed8902013-11-20 01:11:18 +010018598echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018599$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018600 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018601 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018602mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018603
18604if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18605 echo "" >&6
18606 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018607 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 +000018608 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018609 echo "" >&6
18610 echo "" >&6
18611fi
18612