blob: ac1e66a96bb62b2e3dc72f579f45234fbd2cf0bf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ned Deily5489bda2018-01-31 17:44:09 -05003# Generated by GNU Autoconf 2.69 for python 3.8.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Ned Deily5489bda2018-01-31 17:44:09 -0500583PACKAGE_VERSION='3.8'
584PACKAGE_STRING='python 3.8'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Christian Heimesff5be6e2018-01-20 13:19:21 +0100626OPENSSL_LDFLAGS
627OPENSSL_LIBS
628OPENSSL_INCLUDES
Ned Deily322f5ba2013-11-21 23:01:59 -0800629ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000630SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000631THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100632LIBPL
633PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700634EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000635SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000636LIBC
637LIBM
638HAVE_GETHOSTBYNAME
639HAVE_GETHOSTBYNAME_R
640HAVE_GETHOSTBYNAME_R_3_ARG
641HAVE_GETHOSTBYNAME_R_5_ARG
642HAVE_GETHOSTBYNAME_R_6_ARG
643LIBOBJS
644TRUE
645MACHDEP_OBJS
646DYNLOADFILE
647DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700648DTRACE_OBJS
649DTRACE_HEADERS
650DFLAGS
651DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100669LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700670CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000671BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200672CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000673OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700674LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700675LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_ERR
677LLVM_PROF_FILE
678LLVM_PROF_MERGER
679PGO_PROF_USE_FLAG
680PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200681LLVM_AR_FOUND
682target_os
683target_vendor
684target_cpu
685target
686LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700687DEF_MAKE_RULE
688DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000689ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000690LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100691MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000692INSTALL_DATA
693INSTALL_SCRIPT
694INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200695ac_ct_READELF
696READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000697ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000699AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000700GNULD
701LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000702LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000703RUNSHARED
704INSTSONAME
705LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000706PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000707BLDLIBRARY
708DLLLIBRARY
709LDLIBRARY
710LIBRARY
711BUILDEXEEXT
712EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200713NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200714MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200715PLATFORM_TRIPLET
716MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200717ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000718MAINCC
719CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700720SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200721GREP
722CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000723OBJEXT
724EXEEXT
725ac_ct_CC
726CPPFLAGS
727LDFLAGS
728CFLAGS
729CC
730EXPORT_MACOSX_DEPLOYMENT_TARGET
731CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200752PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200753PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100754host_os
755host_vendor
756host_cpu
757host
758build_os
759build_vendor
760build_cpu
761build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500762HAS_GIT
763GITBRANCH
764GITTAG
765GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400766BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000767target_alias
768host_alias
769build_alias
770LIBS
771ECHO_T
772ECHO_N
773ECHO_C
774DEFS
775mandir
776localedir
777libdir
778psdir
779pdfdir
780dvidir
781htmldir
782infodir
783docdir
784oldincludedir
785includedir
786localstatedir
787sharedstatedir
788sysconfdir
789datadir
790datarootdir
791libexecdir
792sbindir
793bindir
794program_transform_name
795prefix
796exec_prefix
797PACKAGE_URL
798PACKAGE_BUGREPORT
799PACKAGE_STRING
800PACKAGE_VERSION
801PACKAGE_TARNAME
802PACKAGE_NAME
803PATH_SEPARATOR
804SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000805ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000806ac_user_opts='
807enable_option_checking
808enable_universalsdk
809with_universal_archs
810with_framework_name
811enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000812with_cxx_main
813with_suffix
814enable_shared
815enable_profiling
816with_pydebug
T. Woutersddbfa2c2017-05-23 01:30:49 +0200817with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000818enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700819with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100820with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100821with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800822with_memory_sanitizer
823with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_libs
825with_system_expat
826with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100827with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000828enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700829with_tcltk_includes
830with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000832enable_ipv6
833with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000835with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000836with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700837with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_libm
839with_libc
840enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800842with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100843with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100844with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000845'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000846 ac_precious_vars='build_alias
847host_alias
848target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100849MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850CC
851CFLAGS
852LDFLAGS
853LIBS
854CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800855CPP
856PKG_CONFIG
857PKG_CONFIG_PATH
858PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862ac_init_help=
863ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000864ac_unrecognized_opts=
865ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866# The variables have the same names as the options, with
867# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000868cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871no_recursion=
872prefix=NONE
873program_prefix=NONE
874program_suffix=NONE
875program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000877site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880x_includes=NONE
881x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000882
883# Installation directory options.
884# These are left unexpanded so users can "make install exec_prefix=/foo"
885# and all the variables that are supposed to be based on exec_prefix
886# by default will actually change.
887# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889bindir='${exec_prefix}/bin'
890sbindir='${exec_prefix}/sbin'
891libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892datarootdir='${prefix}/share'
893datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894sysconfdir='${prefix}/etc'
895sharedstatedir='${prefix}/com'
896localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897includedir='${prefix}/include'
898oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000899docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
900infodir='${datarootdir}/info'
901htmldir='${docdir}'
902dvidir='${docdir}'
903pdfdir='${docdir}'
904psdir='${docdir}'
905libdir='${exec_prefix}/lib'
906localedir='${datarootdir}/locale'
907mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000910ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913 # If the previous option needs an argument, assign it.
914 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 ac_prev=
917 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000918 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200921 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
922 *=) ac_optarg= ;;
923 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Accept the important Cygnus configure options, so we can diagnose typos.
927
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000928 case $ac_dashdash$ac_option in
929 --)
930 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -bindir | --bindir | --bindi | --bind | --bin | --bi)
933 ac_prev=bindir ;;
934 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000935 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936
937 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942 -cache-file | --cache-file | --cache-fil | --cache-fi \
943 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
944 ac_prev=cache_file ;;
945 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
946 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 cache_file=$ac_optarg ;;
948
949 --config-cache | -C)
950 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000952 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
958 | --dataroo | --dataro | --datar)
959 ac_prev=datarootdir ;;
960 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
961 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
962 datarootdir=$ac_optarg ;;
963
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000966 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200968 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 ac_useropt_orig=$ac_useropt
970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
971 case $ac_user_opts in
972 *"
973"enable_$ac_useropt"
974"*) ;;
975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
976 ac_unrecognized_sep=', ';;
977 esac
978 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000979
980 -docdir | --docdir | --docdi | --doc | --do)
981 ac_prev=docdir ;;
982 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
983 docdir=$ac_optarg ;;
984
985 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
986 ac_prev=dvidir ;;
987 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
988 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000992 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200994 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 ac_useropt_orig=$ac_useropt
996 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
997 case $ac_user_opts in
998 *"
999"enable_$ac_useropt"
1000"*) ;;
1001 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1002 ac_unrecognized_sep=', ';;
1003 esac
1004 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1007 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1008 | --exec | --exe | --ex)
1009 ac_prev=exec_prefix ;;
1010 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1011 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1012 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
1015 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 # Obsolete; use --with-gas.
1017 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 -help | --help | --hel | --he | -h)
1020 ac_init_help=long ;;
1021 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1022 ac_init_help=recursive ;;
1023 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1024 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001031 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1032 ac_prev=htmldir ;;
1033 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1034 | --ht=*)
1035 htmldir=$ac_optarg ;;
1036
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037 -includedir | --includedir | --includedi | --included | --include \
1038 | --includ | --inclu | --incl | --inc)
1039 ac_prev=includedir ;;
1040 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1041 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
1044 -infodir | --infodir | --infodi | --infod | --info | --inf)
1045 ac_prev=infodir ;;
1046 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
1049 -libdir | --libdir | --libdi | --libd)
1050 ac_prev=libdir ;;
1051 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
1054 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1055 | --libexe | --libex | --libe)
1056 ac_prev=libexecdir ;;
1057 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1058 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 -localedir | --localedir | --localedi | --localed | --locale)
1062 ac_prev=localedir ;;
1063 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1064 localedir=$ac_optarg ;;
1065
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001067 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 ac_prev=localstatedir ;;
1069 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001072
1073 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1074 ac_prev=mandir ;;
1075 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001077
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Obsolete; use --without-fp.
1080 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001083 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 no_create=yes ;;
1085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1087 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1088 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1091 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1092 | --oldin | --oldi | --old | --ol | --o)
1093 ac_prev=oldincludedir ;;
1094 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1095 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1096 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1100 ac_prev=prefix ;;
1101 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1105 | --program-pre | --program-pr | --program-p)
1106 ac_prev=program_prefix ;;
1107 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1108 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1112 | --program-suf | --program-su | --program-s)
1113 ac_prev=program_suffix ;;
1114 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1115 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
1118 -program-transform-name | --program-transform-name \
1119 | --program-transform-nam | --program-transform-na \
1120 | --program-transform-n | --program-transform- \
1121 | --program-transform | --program-transfor \
1122 | --program-transfo | --program-transf \
1123 | --program-trans | --program-tran \
1124 | --progr-tra | --program-tr | --program-t)
1125 ac_prev=program_transform_name ;;
1126 -program-transform-name=* | --program-transform-name=* \
1127 | --program-transform-nam=* | --program-transform-na=* \
1128 | --program-transform-n=* | --program-transform-=* \
1129 | --program-transform=* | --program-transfor=* \
1130 | --program-transfo=* | --program-transf=* \
1131 | --program-trans=* | --program-tran=* \
1132 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001133 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001135 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1136 ac_prev=pdfdir ;;
1137 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1138 pdfdir=$ac_optarg ;;
1139
1140 -psdir | --psdir | --psdi | --psd | --ps)
1141 ac_prev=psdir ;;
1142 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1143 psdir=$ac_optarg ;;
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1146 | -silent | --silent | --silen | --sile | --sil)
1147 silent=yes ;;
1148
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001149 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1150 ac_prev=sbindir ;;
1151 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1152 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154
1155 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1156 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1157 | --sharedst | --shareds | --shared | --share | --shar \
1158 | --sha | --sh)
1159 ac_prev=sharedstatedir ;;
1160 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1161 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1162 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1163 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001166 -site | --site | --sit)
1167 ac_prev=site ;;
1168 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001170
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1172 ac_prev=srcdir ;;
1173 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1177 | --syscon | --sysco | --sysc | --sys | --sy)
1178 ac_prev=sysconfdir ;;
1179 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1180 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001182
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1189 verbose=yes ;;
1190
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 -version | --version | --versio | --versi | --vers | -V)
1192 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
1194 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001195 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001196 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001198 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 ac_useropt_orig=$ac_useropt
1200 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1201 case $ac_user_opts in
1202 *"
1203"with_$ac_useropt"
1204"*) ;;
1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1206 ac_unrecognized_sep=', ';;
1207 esac
1208 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
1210 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001214 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 ac_useropt_orig=$ac_useropt
1216 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1217 case $ac_user_opts in
1218 *"
1219"with_$ac_useropt"
1220"*) ;;
1221 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1222 ac_unrecognized_sep=', ';;
1223 esac
1224 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001225
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001226 --x)
1227 # Obsolete; use --with-x.
1228 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229
1230 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1231 | --x-incl | --x-inc | --x-in | --x-i)
1232 ac_prev=x_includes ;;
1233 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1234 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001235 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
1237 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1238 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1239 ac_prev=x_libraries ;;
1240 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1241 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1245Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 ;;
1247
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 *=*)
1249 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1250 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 case $ac_envvar in #(
1252 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001253 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001255 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 export $ac_envvar ;;
1257
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001258 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001260 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001263 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264 ;;
1265
1266 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001267done
1268
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273
Matthias Kloseb9621712010-04-24 17:59:49 +00001274if test -n "$ac_unrecognized_opts"; then
1275 case $enable_option_checking in
1276 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001277 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001278 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1279 esac
1280fi
1281
1282# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001283for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1284 datadir sysconfdir sharedstatedir localstatedir includedir \
1285 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001286 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001287do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 # Remove trailing slashes.
1290 case $ac_val in
1291 */ )
1292 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1293 eval $ac_var=\$ac_val;;
1294 esac
1295 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 [\\/$]* | ?:[\\/]* ) continue;;
1298 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001300 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001301done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwis11437992002-04-12 09:54:03 +00001303# There might be people who depend on the old broken behavior: `$host'
1304# used to hold the argument of --host etc.
1305# FIXME: To remove some day.
1306build=$build_alias
1307host=$host_alias
1308target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
Martin v. Löwis11437992002-04-12 09:54:03 +00001310# FIXME: To remove some day.
1311if test "x$host_alias" != x; then
1312 if test "x$build_alias" = x; then
1313 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001314 elif test "x$build_alias" != "x$host_alias"; then
1315 cross_compiling=yes
1316 fi
1317fi
1318
1319ac_tool_prefix=
1320test -n "$host_alias" && ac_tool_prefix=$host_alias-
1321
1322test "$silent" = yes && exec 6>/dev/null
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325ac_pwd=`pwd` && test -n "$ac_pwd" &&
1326ac_ls_di=`ls -di .` &&
1327ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001328 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331
1332
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333# Find the source files, if location was not specified.
1334if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001335 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001337 ac_confdir=`$as_dirname -- "$as_myself" ||
1338$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1339 X"$as_myself" : 'X\(//\)[^/]' \| \
1340 X"$as_myself" : 'X\(//\)$' \| \
1341 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1342$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001343 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\/\)[^/].*/{
1348 s//\1/
1349 q
1350 }
1351 /^X\(\/\/\)$/{
1352 s//\1/
1353 q
1354 }
1355 /^X\(\/\).*/{
1356 s//\1/
1357 q
1358 }
1359 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001362 srcdir=..
1363 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001364else
1365 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001367if test ! -r "$srcdir/$ac_unique_file"; then
1368 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001369 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001371ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1372ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374 pwd)`
1375# When building in place, set srcdir=.
1376if test "$ac_abs_confdir" = "$ac_pwd"; then
1377 srcdir=.
1378fi
1379# Remove unnecessary trailing slashes from srcdir.
1380# Double slashes in file names in object file debugging info
1381# mess up M-x gdb in Emacs.
1382case $srcdir in
1383*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1384esac
1385for ac_var in $ac_precious_vars; do
1386 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1387 eval ac_env_${ac_var}_value=\$${ac_var}
1388 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1390done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001391
Martin v. Löwis11437992002-04-12 09:54:03 +00001392#
1393# Report the --help message.
1394#
1395if test "$ac_init_help" = "long"; then
1396 # Omit some internal or obsolete options to make the list less imposing.
1397 # This message is too long to be a string in the A/UX 3.1 sh.
1398 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001399\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
1401Usage: $0 [OPTION]... [VAR=VALUE]...
1402
1403To assign environment variables (e.g., CC, CFLAGS...), specify them as
1404VAR=VALUE. See below for descriptions of some of the useful variables.
1405
1406Defaults for the options are specified in brackets.
1407
1408Configuration:
1409 -h, --help display this help and exit
1410 --help=short display options specific to this package
1411 --help=recursive display the short help of all the included packages
1412 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001413 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --cache-file=FILE cache test results in FILE [disabled]
1415 -C, --config-cache alias for \`--cache-file=config.cache'
1416 -n, --no-create do not create output files
1417 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1418
Martin v. Löwis11437992002-04-12 09:54:03 +00001419Installation directories:
1420 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001421 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424
1425By default, \`make install' will install all the files in
1426\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1427an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1428for instance \`--prefix=\$HOME'.
1429
1430For better control, use the options below.
1431
1432Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001433 --bindir=DIR user executables [EPREFIX/bin]
1434 --sbindir=DIR system admin executables [EPREFIX/sbin]
1435 --libexecdir=DIR program executables [EPREFIX/libexec]
1436 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1437 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1438 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1439 --libdir=DIR object code libraries [EPREFIX/lib]
1440 --includedir=DIR C header files [PREFIX/include]
1441 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1442 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1443 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1444 --infodir=DIR info documentation [DATAROOTDIR/info]
1445 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1446 --mandir=DIR man documentation [DATAROOTDIR/man]
1447 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1448 --htmldir=DIR html documentation [DOCDIR]
1449 --dvidir=DIR dvi documentation [DOCDIR]
1450 --pdfdir=DIR pdf documentation [DOCDIR]
1451 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453
1454 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001455
1456System types:
1457 --build=BUILD configure for building on BUILD [guessed]
1458 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001459 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001460_ACEOF
1461fi
1462
1463if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001464 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001465 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001467 cat <<\_ACEOF
1468
1469Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001470 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001471 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1472 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001473 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001474 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --enable-framework[=INSTALLDIR]
1476 Build (MacOSX|Darwin) framework
1477 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001478 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001479 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1480 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001493 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1494 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001495 --with-framework-name=FRAMEWORK
1496 specify an alternate name of the framework built
1497 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001498 --with-cxx-main=<compiler>
1499 compile main() and link python executable with C++
1500 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-suffix=.exe set executable suffix
1502 --with-pydebug build with Py_DEBUG defined
T. Woutersddbfa2c2017-05-23 01:30:49 +02001503 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001504 --with-lto Enable Link Time Optimization in any build. Disabled
1505 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001509 enable AddressSanitizer (asan)
1510 --with-memory-sanitizer enable MemorySanitizer (msan)
1511 --with-undefined-behavior-sanitizer
1512 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001514 --with-system-expat build pyexpat module using an installed expat
1515 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001516 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001517 --with-system-libmpdec build _decimal module using an installed libmpdec
1518 library
Ned Deilyd819b932013-09-06 01:07:05 -07001519 --with-tcltk-includes='-I...'
1520 override search for Tcl and Tk include files
1521 --with-tcltk-libs='-L...'
1522 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001523 --with-dbmliborder=db1:db2:...
1524 order to check db backends for dbm. Valid value is a
1525 colon separated string with the backend names
1526 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001527 --with(out)-doc-strings disable/enable documentation strings
1528 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001529 --with(out)-c-locale-coercion
1530 disable/enable C locale coercion to a UTF-8 based
1531 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001533 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001541 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001542 --with-ssl-default-suites=[python|openssl|STRING]
1543 Override default cipher suites string, python: use
1544 Python's preferred selection (default), openssl:
1545 leave OpenSSL's defaults untouched, STRING: use a
1546 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001547
1548Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001549 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001550 CC C compiler command
1551 CFLAGS C compiler flags
1552 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1553 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001555 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001558 PKG_CONFIG path to pkg-config utility
1559 PKG_CONFIG_PATH
1560 directories to add to pkg-config's search path
1561 PKG_CONFIG_LIBDIR
1562 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
1564Use these variables to override the choices made by `configure' or to help
1565it to find libraries and programs with nonstandard names/locations.
1566
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001567Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
1571
1572if test "$ac_init_help" = "recursive"; then
1573 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001575 test -d "$ac_dir" ||
1576 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1577 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 ac_builddir=.
1579
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580case "$ac_dir" in
1581.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001583 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 case $ac_top_builddir_sub in
1587 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1588 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1589 esac ;;
1590esac
1591ac_abs_top_builddir=$ac_pwd
1592ac_abs_builddir=$ac_pwd$ac_dir_suffix
1593# for backward compatibility:
1594ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001595
1596case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001598 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 ac_top_srcdir=$ac_top_builddir_sub
1600 ac_abs_top_srcdir=$ac_pwd ;;
1601 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$srcdir
1604 ac_abs_top_srcdir=$srcdir ;;
1605 *) # Relative name.
1606 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1607 ac_top_srcdir=$ac_top_build_prefix$srcdir
1608 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001609esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612 cd "$ac_dir" || { ac_status=$?; continue; }
1613 # Check for guested configure.
1614 if test -f "$ac_srcdir/configure.gnu"; then
1615 echo &&
1616 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1617 elif test -f "$ac_srcdir/configure"; then
1618 echo &&
1619 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001620 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001622 fi || ac_status=$?
1623 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 done
1625fi
1626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001628if $ac_init_version; then
1629 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001630python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001631generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001632
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001634This configure script is free software; the Free Software Foundation
1635gives unlimited permission to copy, distribute and modify it.
1636_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001637 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001638fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001639
1640## ------------------------ ##
1641## Autoconf initialization. ##
1642## ------------------------ ##
1643
1644# ac_fn_c_try_compile LINENO
1645# --------------------------
1646# Try to compile conftest.$ac_ext, and return whether this succeeded.
1647ac_fn_c_try_compile ()
1648{
1649 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1650 rm -f conftest.$ac_objext
1651 if { { ac_try="$ac_compile"
1652case "(($ac_try" in
1653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1654 *) ac_try_echo=$ac_try;;
1655esac
1656eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1657$as_echo "$ac_try_echo"; } >&5
1658 (eval "$ac_compile") 2>conftest.err
1659 ac_status=$?
1660 if test -s conftest.err; then
1661 grep -v '^ *+' conftest.err >conftest.er1
1662 cat conftest.er1 >&5
1663 mv -f conftest.er1 conftest.err
1664 fi
1665 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666 test $ac_status = 0; } && {
1667 test -z "$ac_c_werror_flag" ||
1668 test ! -s conftest.err
1669 } && test -s conftest.$ac_objext; then :
1670 ac_retval=0
1671else
1672 $as_echo "$as_me: failed program was:" >&5
1673sed 's/^/| /' conftest.$ac_ext >&5
1674
1675 ac_retval=1
1676fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001677 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001678 as_fn_set_status $ac_retval
1679
1680} # ac_fn_c_try_compile
1681
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001682# ac_fn_c_try_cpp LINENO
1683# ----------------------
1684# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1685ac_fn_c_try_cpp ()
1686{
1687 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1688 if { { ac_try="$ac_cpp conftest.$ac_ext"
1689case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692esac
1693eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694$as_echo "$ac_try_echo"; } >&5
1695 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1696 ac_status=$?
1697 if test -s conftest.err; then
1698 grep -v '^ *+' conftest.err >conftest.er1
1699 cat conftest.er1 >&5
1700 mv -f conftest.er1 conftest.err
1701 fi
1702 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1703 test $ac_status = 0; } > conftest.i && {
1704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1705 test ! -s conftest.err
1706 }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: failed program was:" >&5
1710sed 's/^/| /' conftest.$ac_ext >&5
1711
1712 ac_retval=1
1713fi
1714 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715 as_fn_set_status $ac_retval
1716
1717} # ac_fn_c_try_cpp
1718
Matthias Kloseb9621712010-04-24 17:59:49 +00001719# ac_fn_c_try_link LINENO
1720# -----------------------
1721# Try to link conftest.$ac_ext, and return whether this succeeded.
1722ac_fn_c_try_link ()
1723{
1724 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725 rm -f conftest.$ac_objext conftest$ac_exeext
1726 if { { ac_try="$ac_link"
1727case "(($ac_try" in
1728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1729 *) ac_try_echo=$ac_try;;
1730esac
1731eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1732$as_echo "$ac_try_echo"; } >&5
1733 (eval "$ac_link") 2>conftest.err
1734 ac_status=$?
1735 if test -s conftest.err; then
1736 grep -v '^ *+' conftest.err >conftest.er1
1737 cat conftest.er1 >&5
1738 mv -f conftest.er1 conftest.err
1739 fi
1740 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1741 test $ac_status = 0; } && {
1742 test -z "$ac_c_werror_flag" ||
1743 test ! -s conftest.err
1744 } && test -s conftest$ac_exeext && {
1745 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001746 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001747 }; then :
1748 ac_retval=0
1749else
1750 $as_echo "$as_me: failed program was:" >&5
1751sed 's/^/| /' conftest.$ac_ext >&5
1752
1753 ac_retval=1
1754fi
1755 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1756 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1757 # interfere with the next link command; also delete a directory that is
1758 # left behind by Apple's compiler. We do this before executing the actions.
1759 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 as_fn_set_status $ac_retval
1762
1763} # ac_fn_c_try_link
1764
Matthias Kloseb9621712010-04-24 17:59:49 +00001765# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1766# -------------------------------------------------------
1767# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1768# the include files in INCLUDES and setting the cache variable VAR
1769# accordingly.
1770ac_fn_c_check_header_mongrel ()
1771{
1772 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001773 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1775$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001776if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001777 $as_echo_n "(cached) " >&6
1778fi
1779eval ac_res=\$$3
1780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1781$as_echo "$ac_res" >&6; }
1782else
1783 # Is the header compilable?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1785$as_echo_n "checking $2 usability... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788$4
1789#include <$2>
1790_ACEOF
1791if ac_fn_c_try_compile "$LINENO"; then :
1792 ac_header_compiler=yes
1793else
1794 ac_header_compiler=no
1795fi
1796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1798$as_echo "$ac_header_compiler" >&6; }
1799
1800# Is the header present?
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1802$as_echo_n "checking $2 presence... " >&6; }
1803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1804/* end confdefs.h. */
1805#include <$2>
1806_ACEOF
1807if ac_fn_c_try_cpp "$LINENO"; then :
1808 ac_header_preproc=yes
1809else
1810 ac_header_preproc=no
1811fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001812rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1814$as_echo "$ac_header_preproc" >&6; }
1815
1816# So? What about this header?
1817case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1818 yes:no: )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1820$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1822$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1823 ;;
1824 no:yes:* )
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1826$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1828$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1830$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1832$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1834$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001835( $as_echo "## --------------------------------------- ##
1836## Report this to https://bugs.python.org/ ##
1837## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 ) | sed "s/^/$as_me: WARNING: /" >&2
1839 ;;
1840esac
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001843if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 eval "$3=\$ac_header_compiler"
1847fi
1848eval ac_res=\$$3
1849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1850$as_echo "$ac_res" >&6; }
1851fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001852 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001853
1854} # ac_fn_c_check_header_mongrel
1855
1856# ac_fn_c_try_run LINENO
1857# ----------------------
1858# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1859# that executables *can* be run.
1860ac_fn_c_try_run ()
1861{
1862 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1863 if { { ac_try="$ac_link"
1864case "(($ac_try" in
1865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1866 *) ac_try_echo=$ac_try;;
1867esac
1868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1869$as_echo "$ac_try_echo"; } >&5
1870 (eval "$ac_link") 2>&5
1871 ac_status=$?
1872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1873 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1874 { { case "(($ac_try" in
1875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1876 *) ac_try_echo=$ac_try;;
1877esac
1878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1879$as_echo "$ac_try_echo"; } >&5
1880 (eval "$ac_try") 2>&5
1881 ac_status=$?
1882 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1883 test $ac_status = 0; }; }; then :
1884 ac_retval=0
1885else
1886 $as_echo "$as_me: program exited with status $ac_status" >&5
1887 $as_echo "$as_me: failed program was:" >&5
1888sed 's/^/| /' conftest.$ac_ext >&5
1889
1890 ac_retval=$ac_status
1891fi
1892 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001893 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001894 as_fn_set_status $ac_retval
1895
1896} # ac_fn_c_try_run
1897
1898# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1899# -------------------------------------------------------
1900# Tests whether HEADER exists and can be compiled using the include files in
1901# INCLUDES, setting the cache variable VAR accordingly.
1902ac_fn_c_check_header_compile ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912$4
1913#include <$2>
1914_ACEOF
1915if ac_fn_c_try_compile "$LINENO"; then :
1916 eval "$3=yes"
1917else
1918 eval "$3=no"
1919fi
1920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1921fi
1922eval ac_res=\$$3
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1924$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001926
1927} # ac_fn_c_check_header_compile
1928
Matthias Kloseb9621712010-04-24 17:59:49 +00001929# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1930# -------------------------------------------
1931# Tests whether TYPE exists after having included INCLUDES, setting cache
1932# variable VAR accordingly.
1933ac_fn_c_check_type ()
1934{
1935 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1937$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001938if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001939 $as_echo_n "(cached) " >&6
1940else
1941 eval "$3=no"
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof ($2))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956/* end confdefs.h. */
1957$4
1958int
1959main ()
1960{
1961if (sizeof (($2)))
1962 return 0;
1963 ;
1964 return 0;
1965}
1966_ACEOF
1967if ac_fn_c_try_compile "$LINENO"; then :
1968
1969else
1970 eval "$3=yes"
1971fi
1972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976eval ac_res=\$$3
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1978$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001979 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001980
1981} # ac_fn_c_check_type
1982
Matthias Kloseb9621712010-04-24 17:59:49 +00001983# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1984# --------------------------------------------
1985# Tries to find the compile-time value of EXPR in a program that includes
1986# INCLUDES, setting VAR accordingly. Returns whether the value could be
1987# computed
1988ac_fn_c_compute_int ()
1989{
1990 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1991 if test "$cross_compiling" = yes; then
1992 # Depending upon the size, compute the lo and hi bounds.
1993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1994/* end confdefs.h. */
1995$4
1996int
1997main ()
1998{
1999static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002000test_array [0] = 0;
2001return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002002
2003 ;
2004 return 0;
2005}
2006_ACEOF
2007if ac_fn_c_try_compile "$LINENO"; then :
2008 ac_lo=0 ac_mid=0
2009 while :; do
2010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2011/* end confdefs.h. */
2012$4
2013int
2014main ()
2015{
2016static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002017test_array [0] = 0;
2018return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002019
2020 ;
2021 return 0;
2022}
2023_ACEOF
2024if ac_fn_c_try_compile "$LINENO"; then :
2025 ac_hi=$ac_mid; break
2026else
2027 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2028 if test $ac_lo -le $ac_mid; then
2029 ac_lo= ac_hi=
2030 break
2031 fi
2032 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2033fi
2034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2035 done
2036else
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$4
2040int
2041main ()
2042{
2043static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 ac_hi=-1 ac_mid=-1
2053 while :; do
2054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2055/* end confdefs.h. */
2056$4
2057int
2058main ()
2059{
2060static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069 ac_lo=$ac_mid; break
2070else
2071 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072 if test $ac_mid -le $ac_hi; then
2073 ac_lo= ac_hi=
2074 break
2075 fi
2076 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079 done
2080else
2081 ac_lo= ac_hi=
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086# Binary search between lo and hi bounds.
2087while test "x$ac_lo" != "x$ac_hi"; do
2088 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090/* end confdefs.h. */
2091$4
2092int
2093main ()
2094{
2095static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002096test_array [0] = 0;
2097return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002098
2099 ;
2100 return 0;
2101}
2102_ACEOF
2103if ac_fn_c_try_compile "$LINENO"; then :
2104 ac_hi=$ac_mid
2105else
2106 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2107fi
2108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2109done
2110case $ac_lo in #((
2111?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2112'') ac_retval=1 ;;
2113esac
2114 else
2115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116/* end confdefs.h. */
2117$4
2118static long int longval () { return $2; }
2119static unsigned long int ulongval () { return $2; }
2120#include <stdio.h>
2121#include <stdlib.h>
2122int
2123main ()
2124{
2125
2126 FILE *f = fopen ("conftest.val", "w");
2127 if (! f)
2128 return 1;
2129 if (($2) < 0)
2130 {
2131 long int i = longval ();
2132 if (i != ($2))
2133 return 1;
2134 fprintf (f, "%ld", i);
2135 }
2136 else
2137 {
2138 unsigned long int i = ulongval ();
2139 if (i != ($2))
2140 return 1;
2141 fprintf (f, "%lu", i);
2142 }
2143 /* Do not output a trailing newline, as this causes \r\n confusion
2144 on some platforms. */
2145 return ferror (f) || fclose (f) != 0;
2146
2147 ;
2148 return 0;
2149}
2150_ACEOF
2151if ac_fn_c_try_run "$LINENO"; then :
2152 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2153else
2154 ac_retval=1
2155fi
2156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2157 conftest.$ac_objext conftest.beam conftest.$ac_ext
2158rm -f conftest.val
2159
2160 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002161 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 as_fn_set_status $ac_retval
2163
2164} # ac_fn_c_compute_int
2165
2166# ac_fn_c_check_func LINENO FUNC VAR
2167# ----------------------------------
2168# Tests whether FUNC exists, setting the cache variable VAR accordingly
2169ac_fn_c_check_func ()
2170{
2171 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2173$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002174if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002175 $as_echo_n "(cached) " >&6
2176else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2180 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2181#define $2 innocuous_$2
2182
2183/* System header to define __stub macros and hopefully few prototypes,
2184 which can conflict with char $2 (); below.
2185 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2186 <limits.h> exists even on freestanding compilers. */
2187
2188#ifdef __STDC__
2189# include <limits.h>
2190#else
2191# include <assert.h>
2192#endif
2193
2194#undef $2
2195
2196/* Override any GCC internal prototype to avoid an error.
2197 Use char because int might match the return type of a GCC
2198 builtin and then its argument prototype would still apply. */
2199#ifdef __cplusplus
2200extern "C"
2201#endif
2202char $2 ();
2203/* The GNU C library defines this for functions which it implements
2204 to always fail with ENOSYS. Some functions are actually named
2205 something starting with __ and the normal name is an alias. */
2206#if defined __stub_$2 || defined __stub___$2
2207choke me
2208#endif
2209
2210int
2211main ()
2212{
2213return $2 ();
2214 ;
2215 return 0;
2216}
2217_ACEOF
2218if ac_fn_c_try_link "$LINENO"; then :
2219 eval "$3=yes"
2220else
2221 eval "$3=no"
2222fi
2223rm -f core conftest.err conftest.$ac_objext \
2224 conftest$ac_exeext conftest.$ac_ext
2225fi
2226eval ac_res=\$$3
2227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2228$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002229 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002230
2231} # ac_fn_c_check_func
2232
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2234# ---------------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2236# accordingly.
2237ac_fn_c_check_decl ()
2238{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 as_decl_name=`echo $2|sed 's/ *(.*//'`
2241 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval \${$3+:} false; then :
2245 $as_echo_n "(cached) " >&6
2246else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2248/* end confdefs.h. */
2249$4
2250int
2251main ()
2252{
2253#ifndef $as_decl_name
2254#ifdef __cplusplus
2255 (void) $as_decl_use;
2256#else
2257 (void) $as_decl_name;
2258#endif
2259#endif
2260
2261 ;
2262 return 0;
2263}
2264_ACEOF
2265if ac_fn_c_try_compile "$LINENO"; then :
2266 eval "$3=yes"
2267else
2268 eval "$3=no"
2269fi
2270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2271fi
2272eval ac_res=\$$3
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2274$as_echo "$ac_res" >&6; }
2275 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2276
2277} # ac_fn_c_check_decl
2278
Matthias Kloseb9621712010-04-24 17:59:49 +00002279# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2280# ----------------------------------------------------
2281# Tries to find if the field MEMBER exists in type AGGR, after including
2282# INCLUDES, setting cache variable VAR accordingly.
2283ac_fn_c_check_member ()
2284{
2285 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2287$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002288if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002289 $as_echo_n "(cached) " >&6
2290else
2291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2292/* end confdefs.h. */
2293$5
2294int
2295main ()
2296{
2297static $2 ac_aggr;
2298if (ac_aggr.$3)
2299return 0;
2300 ;
2301 return 0;
2302}
2303_ACEOF
2304if ac_fn_c_try_compile "$LINENO"; then :
2305 eval "$4=yes"
2306else
2307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2308/* end confdefs.h. */
2309$5
2310int
2311main ()
2312{
2313static $2 ac_aggr;
2314if (sizeof ac_aggr.$3)
2315return 0;
2316 ;
2317 return 0;
2318}
2319_ACEOF
2320if ac_fn_c_try_compile "$LINENO"; then :
2321 eval "$4=yes"
2322else
2323 eval "$4=no"
2324fi
2325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329eval ac_res=\$$4
2330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2331$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002332 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002333
2334} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002335cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002336This file contains any messages produced by compilers while
2337running configure, to aid debugging if configure makes a mistake.
2338
Ned Deily5489bda2018-01-31 17:44:09 -05002339It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002340generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002341
2342 $ $0 $@
2343
2344_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002345exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002346{
2347cat <<_ASUNAME
2348## --------- ##
2349## Platform. ##
2350## --------- ##
2351
2352hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2353uname -m = `(uname -m) 2>/dev/null || echo unknown`
2354uname -r = `(uname -r) 2>/dev/null || echo unknown`
2355uname -s = `(uname -s) 2>/dev/null || echo unknown`
2356uname -v = `(uname -v) 2>/dev/null || echo unknown`
2357
2358/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2359/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2360
2361/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2362/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2363/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002364/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002365/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2366/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2367/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2368
2369_ASUNAME
2370
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002376 $as_echo "PATH: $as_dir"
2377 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002378IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002379
2380} >&5
2381
2382cat >&5 <<_ACEOF
2383
2384
2385## ----------- ##
2386## Core tests. ##
2387## ----------- ##
2388
2389_ACEOF
2390
2391
2392# Keep a trace of the command line.
2393# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002394# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002395# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002398ac_configure_args0=
2399ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_must_keep_next=false
2401for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002402do
Skip Montanaro6dead952003-09-25 14:50:04 +00002403 for ac_arg
2404 do
2405 case $ac_arg in
2406 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2408 | -silent | --silent | --silen | --sile | --sil)
2409 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002411 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 esac
2413 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002414 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002415 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002418 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 case $ac_arg in
2421 *=* | --config-cache | -C | -disable-* | --disable-* \
2422 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2423 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2424 | -with-* | --with-* | -without-* | --without-* | --x)
2425 case "$ac_configure_args0 " in
2426 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2427 esac
2428 ;;
2429 -* ) ac_must_keep_next=true ;;
2430 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002431 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002432 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 ;;
2434 esac
2435 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002436done
Matthias Kloseb9621712010-04-24 17:59:49 +00002437{ ac_configure_args0=; unset ac_configure_args0;}
2438{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002439
2440# When interrupted or exit'd, cleanup temporary files, and complete
2441# config.log. We remove comments because anyway the quotes in there
2442# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443# WARNING: Use '\'' to represent an apostrophe within the trap.
2444# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002445trap 'exit_status=$?
2446 # Save into config.log some information that might help in debugging.
2447 {
2448 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002449
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002450 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002451## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002453 echo
2454 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455(
2456 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2457 eval ac_val=\$$ac_var
2458 case $ac_val in #(
2459 *${as_nl}*)
2460 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002463 esac
2464 case $ac_var in #(
2465 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2467 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac ;;
2469 esac
2470 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2473 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002474 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 "s/'\''/'\''\\\\'\'''\''/g;
2476 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2477 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002478 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 esac |
2482 sort
2483)
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002485
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002486 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002487## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489 echo
2490 for ac_var in $ac_subst_vars
2491 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002492 eval ac_val=\$$ac_var
2493 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002495 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 done | sort
2498 echo
2499
2500 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002501 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 echo
2505 for ac_var in $ac_subst_files
2506 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507 eval ac_val=\$$ac_var
2508 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002509 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002510 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 done | sort
2513 echo
2514 fi
2515
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002518## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
2523 fi
2524 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002525 $as_echo "$as_me: caught signal $ac_signal"
2526 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 rm -f core *.core core.conftest.* &&
2529 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002531' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002532for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002533 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002534done
2535ac_signal=0
2536
2537# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002539
Matthias Kloseb9621712010-04-24 17:59:49 +00002540$as_echo "/* confdefs.h */" > confdefs.h
2541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542# Predefined preprocessor variables.
2543
2544cat >>confdefs.h <<_ACEOF
2545#define PACKAGE_NAME "$PACKAGE_NAME"
2546_ACEOF
2547
Martin v. Löwis11437992002-04-12 09:54:03 +00002548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_VERSION "$PACKAGE_VERSION"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_STRING "$PACKAGE_STRING"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2562_ACEOF
2563
Matthias Kloseb9621712010-04-24 17:59:49 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_URL "$PACKAGE_URL"
2566_ACEOF
2567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568
2569# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002570# Prefer an explicitly selected file to automatically selected ones.
2571ac_site_file1=NONE
2572ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002573if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 # We do not want a PATH search for config.site.
2575 case $CONFIG_SITE in #((
2576 -*) ac_site_file1=./$CONFIG_SITE;;
2577 */*) ac_site_file1=$CONFIG_SITE;;
2578 *) ac_site_file1=./$CONFIG_SITE;;
2579 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002581 ac_site_file1=$prefix/share/config.site
2582 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583else
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 ac_site_file1=$ac_default_prefix/share/config.site
2585 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002587for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588do
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 test "x$ac_site_file" = xNONE && continue
2590 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2591 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2592$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594 . "$ac_site_file" \
2595 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2597as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002598See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002599 fi
2600done
2601
2602if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002603 # Some versions of bash will fail to source /dev/null (special files
2604 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2605 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2606 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2607$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2610 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 esac
2612 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002613else
Matthias Kloseb9621712010-04-24 17:59:49 +00002614 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2615$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 >$cache_file
2617fi
2618
2619# Check that the precious variables saved in the cache have kept the same
2620# value.
2621ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002623 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2624 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2626 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 case $ac_old_set,$ac_new_set in
2628 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002629 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2630$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 ac_cache_corrupted=: ;;
2632 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2634$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 ac_cache_corrupted=: ;;
2636 ,);;
2637 *)
2638 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002639 # differences in whitespace do not lead to failure.
2640 ac_old_val_w=`echo x $ac_old_val`
2641 ac_new_val_w=`echo x $ac_new_val`
2642 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2644$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2645 ac_cache_corrupted=:
2646 else
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2648$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2649 eval $ac_var=\$ac_old_val
2650 fi
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2652$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2654$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 fi;;
2656 esac
2657 # Pass precious variables to config.status.
2658 if test "$ac_new_set" = set; then
2659 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002660 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 *) ac_arg=$ac_var=$ac_new_val ;;
2662 esac
2663 case " $ac_configure_args " in
2664 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 esac
2667 fi
2668done
2669if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2673$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002674 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002676## -------------------- ##
2677## Main body of script. ##
2678## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679
Guido van Rossum7f43da71994-08-01 12:15:30 +00002680ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Guido van Rossum627b2d71993-12-24 10:39:16 +00002686
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
Trent Nelson4d4ec652012-10-16 08:51:24 -04002688
Christian Heimesff5be6e2018-01-20 13:19:21 +01002689
2690
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002691if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692 # If we're building out-of-tree, we need to make sure the following
2693 # resources get picked up before their $srcdir counterparts.
2694 # Objects/ -> typeslots.inc
2695 # Include/ -> Python-ast.h, graminit.h
2696 # Python/ -> importlib.h
2697 # (A side effect of this is that these resources will automatically be
2698 # regenerated when building out-of-tree, regardless of whether or not
2699 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2700 # off.)
2701 BASECPPFLAGS="-IObjects -IInclude -IPython"
2702else
2703 BASECPPFLAGS=""
2704fi
2705
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002706
2707
2708
2709
Victor Stinner9ed34a82017-05-02 22:35:58 +02002710if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002711then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002712# Extract the first word of "git", so it can be a program name with args.
2713set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717 $as_echo_n "(cached) " >&6
2718else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719 if test -n "$HAS_GIT"; then
2720 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
2727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002729 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2731 break 2
2732 fi
2733done
2734 done
2735IFS=$as_save_IFS
2736
Ned Deily5c4b0d02017-03-04 00:19:55 -05002737 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002738fi
2739fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740HAS_GIT=$ac_cv_prog_HAS_GIT
2741if test -n "$HAS_GIT"; then
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2743$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002744else
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2746$as_echo "no" >&6; }
2747fi
2748
2749
2750else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002751HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002752fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754then
Xiang Zhang4c855572018-08-20 22:36:19 +08002755 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2756 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2757 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002759 GITVERSION=""
2760 GITTAG=""
2761 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762fi
2763
2764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002765ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002766
2767
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002768ac_aux_dir=
2769for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2770 if test -f "$ac_dir/install-sh"; then
2771 ac_aux_dir=$ac_dir
2772 ac_install_sh="$ac_aux_dir/install-sh -c"
2773 break
2774 elif test -f "$ac_dir/install.sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install.sh -c"
2777 break
2778 elif test -f "$ac_dir/shtool"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/shtool install -c"
2781 break
2782 fi
2783done
2784if test -z "$ac_aux_dir"; then
2785 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2786fi
2787
2788# These three variables are undocumented and unsupported,
2789# and are intended to be withdrawn in a future Autoconf release.
2790# They can cause serious problems if a builder's source tree is in a directory
2791# whose full name contains unusual characters.
2792ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2793ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2794ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2795
2796
2797# Make sure we can run config.sub.
2798$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2799 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2800
2801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2802$as_echo_n "checking build system type... " >&6; }
2803if ${ac_cv_build+:} false; then :
2804 $as_echo_n "(cached) " >&6
2805else
2806 ac_build_alias=$build_alias
2807test "x$ac_build_alias" = x &&
2808 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2809test "x$ac_build_alias" = x &&
2810 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2811ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2812 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2813
2814fi
2815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2816$as_echo "$ac_cv_build" >&6; }
2817case $ac_cv_build in
2818*-*-*) ;;
2819*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2820esac
2821build=$ac_cv_build
2822ac_save_IFS=$IFS; IFS='-'
2823set x $ac_cv_build
2824shift
2825build_cpu=$1
2826build_vendor=$2
2827shift; shift
2828# Remember, the first character of IFS is used to create $*,
2829# except with old shells:
2830build_os=$*
2831IFS=$ac_save_IFS
2832case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2833
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2836$as_echo_n "checking host system type... " >&6; }
2837if ${ac_cv_host+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 if test "x$host_alias" = x; then
2841 ac_cv_host=$ac_cv_build
2842else
2843 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2844 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2845fi
2846
2847fi
2848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2849$as_echo "$ac_cv_host" >&6; }
2850case $ac_cv_host in
2851*-*-*) ;;
2852*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2853esac
2854host=$ac_cv_host
2855ac_save_IFS=$IFS; IFS='-'
2856set x $ac_cv_host
2857shift
2858host_cpu=$1
2859host_vendor=$2
2860shift; shift
2861# Remember, the first character of IFS is used to create $*,
2862# except with old shells:
2863host_os=$*
2864IFS=$ac_save_IFS
2865case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2866
2867
2868
doko@python.orga10e4a92013-01-25 18:45:12 +01002869
2870
Ned Deilyfcbc2462014-08-22 13:32:49 -07002871# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2872rm -f pybuilddir.txt
2873
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002874for ac_prog in python$PACKAGE_VERSION python3 python
2875do
2876 # Extract the first word of "$ac_prog", so it can be a program name with args.
2877set dummy $ac_prog; ac_word=$2
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2879$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002880if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002881 $as_echo_n "(cached) " >&6
2882else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002883 if test -n "$PYTHON_FOR_REGEN"; then
2884 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885else
2886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2887for as_dir in $PATH
2888do
2889 IFS=$as_save_IFS
2890 test -z "$as_dir" && as_dir=.
2891 for ac_exec_ext in '' $ac_executable_extensions; do
2892 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002893 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002894 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2895 break 2
2896 fi
2897done
2898 done
2899IFS=$as_save_IFS
2900
2901fi
2902fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002903PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2904if test -n "$PYTHON_FOR_REGEN"; then
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2906$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002907else
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2909$as_echo "no" >&6; }
2910fi
2911
2912
Victor Stinnera5c62a82017-05-03 18:21:48 +02002913 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002914done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002917
2918
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002919if test "$cross_compiling" = yes; then
2920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2921$as_echo_n "checking for python interpreter for cross build... " >&6; }
2922 if test -z "$PYTHON_FOR_BUILD"; then
2923 for interp in python$PACKAGE_VERSION python3 python; do
2924 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002925 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002926 break
2927 fi
2928 interp=
2929 done
2930 if test x$interp = x; then
2931 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2932 fi
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2934$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002935 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002936 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002937elif test "$cross_compiling" = maybe; then
2938 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002939else
2940 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
Benjamin Petersond23f8222009-04-05 19:13:16 +00002945if test "$prefix" != "/"; then
2946 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2947fi
2948
2949
Martin v. Löwis11437992002-04-12 09:54:03 +00002950
2951
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002952# We don't use PACKAGE_ variables, and they cause conflicts
2953# with other autoconf-based packages that include Python.h
2954grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2955rm confdefs.h
2956mv confdefs.h.new confdefs.h
2957
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002958
Ned Deily5489bda2018-01-31 17:44:09 -05002959VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002960
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002961# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002962
2963SOVERSION=1.0
2964
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002965# The later defininition of _XOPEN_SOURCE disables certain features
2966# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2967
Matthias Kloseb9621712010-04-24 17:59:49 +00002968$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969
2970
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2973# them.
2974
Matthias Kloseb9621712010-04-24 17:59:49 +00002975$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002976
2977
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2980# them.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002983
2984
Martin v. Löwisd6320502004-08-12 13:45:08 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002986# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
2991
2992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002993define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002995# Arguments passed to configure.
2996
2997CONFIG_ARGS="$ac_configure_args"
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3000$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003002if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 case $enableval in
3005 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003006 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003007 # information
3008 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003009 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3012 if test ! -d "${enableval}"
3013 then
3014 enableval=/
3015 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
3019 case $enableval in
3020 no)
3021 UNIVERSALSDK=
3022 enable_universalsdk=
3023 ;;
3024 *)
3025 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 if test ! -d "${UNIVERSALSDK}"
3027 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003028 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034else
3035
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041if test -n "${UNIVERSALSDK}"
3042then
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3044$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045else
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deily87adb6e2013-10-18 21:09:56 -07003052ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054# For backward compatibility reasons we prefer to select '32-bit' if available,
3055# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057if test "`uname -s`" = "Darwin"
3058then
3059 if test -n "${UNIVERSALSDK}"
3060 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062 then
3063 UNIVERSAL_ARCHS="intel"
3064 fi
3065 fi
3066fi
3067
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3070$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071
3072# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 UNIVERSAL_ARCHS="$withval"
3076
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077fi
3078
Ned Deily87adb6e2013-10-18 21:09:56 -07003079if test -n "${UNIVERSALSDK}"
3080then
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3082$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3083else
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
3086fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088
3089# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091 withval=$with_framework_name;
3092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003121 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE" ; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
3146 case "${enableval}" in
3147 /System*)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 if test "${prefix}" = "NONE" ; then
3150 # See below
3151 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3152 fi
3153 ;;
3154
3155 /Library*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 ;;
3158
3159 */Library/Frameworks)
3160 MDIR="`dirname "${enableval}"`"
3161 MDIR="`dirname "${MDIR}"`"
3162 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3163
3164 if test "${prefix}" = "NONE"; then
3165 # User hasn't specified the
3166 # --prefix option, but wants to install
3167 # the framework in a non-default location,
3168 # ensure that the compatibility links get
3169 # installed relative to that prefix as well
3170 # instead of in /usr/local.
3171 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3172 fi
3173 ;;
3174
3175 *)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178 esac
3179
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003204 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213fi
3214
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222
3223
3224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Ned Deilyb8f944f2013-11-21 22:42:25 -08003227
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003228
3229cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003230#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003231_ACEOF
3232
3233
Jack Jansene578a632001-08-15 01:27:14 +00003234##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003235## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003236## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003237##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003238# Set name for machine-dependent library files
3239
Matthias Kloseb9621712010-04-24 17:59:49 +00003240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3241$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242if test -z "$MACHDEP"
3243then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003244 # avoid using uname for cross builds
3245 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003246 # ac_sys_system and ac_sys_release are used for setting
3247 # a lot of different things including 'define_xopen_source'
3248 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003249 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003250 *-*-linux-android*)
3251 ac_sys_system=Linux-android
3252 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 *-*-linux*)
3254 ac_sys_system=Linux
3255 ;;
3256 *-*-cygwin*)
3257 ac_sys_system=Cygwin
3258 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003259 *-*-vxworks*)
3260 ac_sys_system=VxWorks
3261 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003284 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003285 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003286 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003287 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003307 *-*-vxworks*)
3308 _host_cpu=$host_cpu
3309 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003310 *)
3311 # for now, limit cross builds to known configurations
3312 MACHDEP="unknown"
3313 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3314 esac
3315 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3316fi
3317
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003318# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3319# disable features if it is defined, without any means to access these
3320# features as extensions. For these systems, we skip the definition of
3321# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3322# some feature, make sure there is no alternative way to access this
3323# feature. Also, when using wildcards, make sure you have verified the
3324# need for not defining _XOPEN_SOURCE on all systems matching the
3325# wildcard, and that the wildcard does not include future systems
3326# (which may remove their limitations).
3327case $ac_sys_system/$ac_sys_release in
3328 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3329 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003330 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003331 # In addition, Stefan Krah confirms that issue #1244610 exists through
3332 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003333 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003334 define_xopen_source=no
3335 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3336 # also defined. This can be overridden by defining _BSD_SOURCE
3337 # As this has a different meaning on Linux, only define it on OpenBSD
3338
Matthias Kloseb9621712010-04-24 17:59:49 +00003339$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340
3341 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003342 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003343 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3344 # also defined. This can be overridden by defining _BSD_SOURCE
3345 # As this has a different meaning on Linux, only define it on OpenBSD
3346
Matthias Kloseb9621712010-04-24 17:59:49 +00003347$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003348
3349 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003350 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3351 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3352 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003353 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 +00003354 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003355 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3356 # request to enable features supported by the standard as a request
3357 # to disable features not supported by the standard. The best way
3358 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3359 # entirely and define __EXTENSIONS__ instead.
3360 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003361 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003362 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3363 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003364 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003365 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 define_xopen_source=no;;
3367 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003368 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003369 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003371 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3372 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3373 # identifies itself as Darwin/7.*
3374 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3375 # disables platform specific features beyond repair.
3376 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # has no effect, don't bother defining them
3378 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003379 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003380 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003381 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003382 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3383 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3384 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003385 AIX/4)
3386 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003387 AIX/5)
3388 if test `uname -r` -eq 1; then
3389 define_xopen_source=no
3390 fi
3391 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003392 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3393 # defining NI_NUMERICHOST.
3394 QNX/6.3.2)
3395 define_xopen_source=no
3396 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003397 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3398 # in network headers still using system V types.
3399 VxWorks/*)
3400 define_xopen_source=no
3401 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003402
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003403esac
3404
3405if test $define_xopen_source = yes
3406then
Victor Stinner14d098d2011-09-07 22:29:43 +02003407 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003408
Victor Stinner14d098d2011-09-07 22:29:43 +02003409$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003410
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003411
3412 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3413 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3414 # several APIs are not declared. Since this is also needed in some
3415 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
Matthias Kloseb9621712010-04-24 17:59:49 +00003417$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
3419
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003420
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003421$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003423fi
3424
Christian Heimes647cd872013-12-07 23:39:33 +01003425# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3426case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003427 hp*|HP*)
3428 define_stdc_a1=yes;;
3429 *)
3430 define_stdc_a1=no;;
3431esac
3432
3433if test $define_stdc_a1 = yes
3434then
Christian Heimes647cd872013-12-07 23:39:33 +01003435
3436$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3437
Christian Heimesb02bcae2013-12-08 15:21:08 +01003438fi
Christian Heimes647cd872013-12-07 23:39:33 +01003439
Jack Jansen6b08a402004-06-03 12:41:45 +00003440# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3441# it may influence the way we can build extensions, so distutils
3442# needs to check it
3443
Thomas Wouters477c8d52006-05-27 19:21:47 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003447
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003449
3450# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3451# for debug/optimization stuff. BASECFLAGS is for flags that are required
3452# just to get things to compile and link. Users are free to override OPT
3453# when running configure or make. The build should not break if they do.
3454# BASECFLAGS should generally not be messed with, however.
3455
Guido van Rossum8b131c51995-03-09 14:10:13 +00003456# If the user switches compilers, we can't believe the cache
3457if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3458then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003459 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003460(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003461fi
3462
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003463# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3464# when the compiler supports them, but we don't always want -O2, and
3465# we set -g later.
3466if test -z "$CFLAGS"; then
3467 CFLAGS=
3468fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003469
3470if test "$ac_sys_system" = "Darwin"
3471then
3472 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003473 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003474 # information
3475 if test -z "${CC}"
3476 then
3477 found_gcc=
3478 found_clang=
3479 as_save_IFS=$IFS; IFS=:
3480 for as_dir in $PATH
3481 do
3482 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003483 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003484 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003485 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486 fi
3487 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003488 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003489 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 fi
3492 fi
3493 done
3494 IFS=$as_save_IFS
3495
3496 if test -n "$found_gcc" -a -n "$found_clang"
3497 then
3498 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3499 then
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3501$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3502 CC="$found_clang"
3503 CXX="$found_clang++"
3504 fi
3505
3506
3507 elif test -z "$found_gcc" -a -n "$found_clang"
3508 then
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3510$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3511 CC="$found_clang"
3512 CXX="$found_clang++"
3513
3514 elif test -z "$found_gcc" -a -z "$found_clang"
3515 then
3516 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3517 if test -n "${found_clang}"
3518 then
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3520$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3521 CC="${found_clang}"
3522 CXX="`/usr/bin/xcrun -find clang++`"
3523
3524 # else: use default behaviour
3525 fi
3526 fi
3527 fi
3528fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003529ac_ext=c
3530ac_cpp='$CPP $CPPFLAGS'
3531ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3532ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3533ac_compiler_gnu=$ac_cv_c_compiler_gnu
3534if test -n "$ac_tool_prefix"; then
3535 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3536set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003539if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003540 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003541else
3542 if test -n "$CC"; then
3543 ac_cv_prog_CC="$CC" # Let the user override the test.
3544else
Martin v. Löwis11437992002-04-12 09:54:03 +00003545as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3546for as_dir in $PATH
3547do
3548 IFS=$as_save_IFS
3549 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003550 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003551 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 break 2
3555 fi
3556done
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003558IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003559
Jack Jansendd19cf82001-12-06 22:36:17 +00003560fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003563if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3565$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003566else
Matthias Kloseb9621712010-04-24 17:59:49 +00003567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003569fi
3570
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003571
Martin v. Löwis11437992002-04-12 09:54:03 +00003572fi
3573if test -z "$ac_cv_prog_CC"; then
3574 ac_ct_CC=$CC
3575 # Extract the first word of "gcc", so it can be a program name with args.
3576set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3578$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003579if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003581else
3582 if test -n "$ac_ct_CC"; then
3583 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3584else
3585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586for as_dir in $PATH
3587do
3588 IFS=$as_save_IFS
3589 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003592 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 break 2
3595 fi
3596done
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003598IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003599
3600fi
3601fi
3602ac_ct_CC=$ac_cv_prog_ac_ct_CC
3603if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3605$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003606else
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003609fi
3610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 if test "x$ac_ct_CC" = x; then
3612 CC=""
3613 else
3614 case $cross_compiling:$ac_tool_warned in
3615yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003616{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3617$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003618ac_tool_warned=yes ;;
3619esac
3620 CC=$ac_ct_CC
3621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003624fi
3625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627 if test -n "$ac_tool_prefix"; then
3628 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003629set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3631$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003632if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003634else
3635 if test -n "$CC"; then
3636 ac_cv_prog_CC="$CC" # Let the user override the test.
3637else
Martin v. Löwis11437992002-04-12 09:54:03 +00003638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3639for as_dir in $PATH
3640do
3641 IFS=$as_save_IFS
3642 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003645 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 break 2
3648 fi
3649done
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003652
3653fi
3654fi
3655CC=$ac_cv_prog_CC
3656if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3658$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003659else
Matthias Kloseb9621712010-04-24 17:59:49 +00003660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3661$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003662fi
3663
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667if test -z "$CC"; then
3668 # Extract the first word of "cc", so it can be a program name with args.
3669set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3671$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003672if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003674else
3675 if test -n "$CC"; then
3676 ac_cv_prog_CC="$CC" # Let the user override the test.
3677else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003678 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3687 ac_prog_rejected=yes
3688 continue
3689 fi
3690 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003692 break 2
3693 fi
3694done
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003697
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003698if test $ac_prog_rejected = yes; then
3699 # We found a bogon in the path, so make sure we never use it.
3700 set dummy $ac_cv_prog_CC
3701 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003703 # We chose a different compiler from the bogus one.
3704 # However, it has the same basename, so the bogon will be chosen
3705 # first if we set CC to just the basename; use the full file name.
3706 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003707 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 fi
3709fi
3710fi
3711fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003712CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003713if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3715$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003716else
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3718$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719fi
3720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722fi
3723if test -z "$CC"; then
3724 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003726 do
3727 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3730$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003731if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003733else
3734 if test -n "$CC"; then
3735 ac_cv_prog_CC="$CC" # Let the user override the test.
3736else
Martin v. Löwis11437992002-04-12 09:54:03 +00003737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3738for as_dir in $PATH
3739do
3740 IFS=$as_save_IFS
3741 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003742 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003743 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
3752fi
3753fi
3754CC=$ac_cv_prog_CC
3755if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3757$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003758else
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3760$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003761fi
3762
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003763
Martin v. Löwis11437992002-04-12 09:54:03 +00003764 test -n "$CC" && break
3765 done
3766fi
3767if test -z "$CC"; then
3768 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770do
3771 # Extract the first word of "$ac_prog", so it can be a program name with args.
3772set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003775if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003777else
3778 if test -n "$ac_ct_CC"; then
3779 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3780else
3781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 break 2
3791 fi
3792done
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003795
Martin v. Löwis11437992002-04-12 09:54:03 +00003796fi
3797fi
3798ac_ct_CC=$ac_cv_prog_ac_ct_CC
3799if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3801$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003805fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003806
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$ac_ct_CC" && break
3809done
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811 if test "x$ac_ct_CC" = x; then
3812 CC=""
3813 else
3814 case $cross_compiling:$ac_tool_warned in
3815yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818ac_tool_warned=yes ;;
3819esac
3820 CC=$ac_ct_CC
3821 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003822fi
3823
3824fi
3825
3826
Matthias Kloseb9621712010-04-24 17:59:49 +00003827test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3828$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003829as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003830See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003831
3832# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003833$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3834set X $ac_compile
3835ac_compiler=$2
3836for ac_option in --version -v -V -qversion; do
3837 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838case "(($ac_try" in
3839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3840 *) ac_try_echo=$ac_try;;
3841esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003842eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3843$as_echo "$ac_try_echo"; } >&5
3844 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 if test -s conftest.err; then
3847 sed '10a\
3848... rest of stderr output deleted ...
3849 10q' conftest.err >conftest.er1
3850 cat conftest.er1 >&5
3851 fi
3852 rm -f conftest.er1 conftest.err
3853 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3854 test $ac_status = 0; }
3855done
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
Matthias Kloseb9621712010-04-24 17:59:49 +00003857cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003858/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003859
Martin v. Löwis11437992002-04-12 09:54:03 +00003860int
3861main ()
3862{
3863
3864 ;
3865 return 0;
3866}
3867_ACEOF
3868ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003869ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003870# Try to create an executable without -o first, disregard a.out.
3871# It will help us diagnose broken compilers, and finding out an intuition
3872# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3874$as_echo_n "checking whether the C compiler works... " >&6; }
3875ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3876
3877# The possible output files:
3878ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3879
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880ac_rmfiles=
3881for ac_file in $ac_files
3882do
3883 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003885 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3886 esac
3887done
3888rm -f $ac_rmfiles
3889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003891case "(($ac_try" in
3892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3893 *) ac_try_echo=$ac_try;;
3894esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003895eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3896$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003897 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003898 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3900 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3902# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3903# in a Makefile. We should not override ac_cv_exeext if it was cached,
3904# so that the user can short-circuit this test for compilers unknown to
3905# Autoconf.
3906for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003907do
3908 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003909 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003911 ;;
3912 [ab].out )
3913 # We found the default executable, but exeext='' is most
3914 # certainly right.
3915 break;;
3916 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 then :; else
3919 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3920 fi
3921 # We set ac_cv_exeext here because the later test for it is not
3922 # safe: cross compilers may not add the suffix if given an `-o'
3923 # argument, so we may need to know it at that point already.
3924 # Even if this section looks crufty: it has the advantage of
3925 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003926 break;;
3927 * )
3928 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 esac
3930done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931test "$ac_cv_exeext" = no && ac_cv_exeext=
3932
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003933else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 ac_file=''
3935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003936if test -z "$ac_file"; then :
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938$as_echo "no" >&6; }
3939$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003940sed 's/^/| /' conftest.$ac_ext >&5
3941
Matthias Kloseb9621712010-04-24 17:59:49 +00003942{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3943$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003944as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003945See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003946else
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3948$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003949fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3951$as_echo_n "checking for C compiler default output file name... " >&6; }
3952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3953$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3959$as_echo_n "checking for suffix of executables... " >&6; }
3960if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961case "(($ac_try" in
3962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3963 *) ac_try_echo=$ac_try;;
3964esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003965eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3966$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3970 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003971 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3972# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3973# work properly (i.e., refer to `conftest.exe'), while it won't with
3974# `rm'.
3975for ac_file in conftest.exe conftest conftest.*; do
3976 test -f "$ac_file" || continue
3977 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003978 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003979 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3980 break;;
3981 * ) break;;
3982 esac
3983done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003984else
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990rm -f conftest conftest$ac_cv_exeext
3991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3992$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003993
3994rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003995EXEEXT=$ac_cv_exeext
3996ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3998/* end confdefs.h. */
3999#include <stdio.h>
4000int
4001main ()
4002{
4003FILE *f = fopen ("conftest.out", "w");
4004 return ferror (f) || fclose (f) != 0;
4005
4006 ;
4007 return 0;
4008}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004010ac_clean_files="$ac_clean_files conftest.out"
4011# Check that the compiler produces executables we can run. If not, either
4012# the compiler is broken, or we cross compile.
4013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4014$as_echo_n "checking whether we are cross compiling... " >&6; }
4015if test "$cross_compiling" != yes; then
4016 { { ac_try="$ac_link"
4017case "(($ac_try" in
4018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4019 *) ac_try_echo=$ac_try;;
4020esac
4021eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4022$as_echo "$ac_try_echo"; } >&5
4023 (eval "$ac_link") 2>&5
4024 ac_status=$?
4025 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4026 test $ac_status = 0; }
4027 if { ac_try='./conftest$ac_cv_exeext'
4028 { { case "(($ac_try" in
4029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4030 *) ac_try_echo=$ac_try;;
4031esac
4032eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4033$as_echo "$ac_try_echo"; } >&5
4034 (eval "$ac_try") 2>&5
4035 ac_status=$?
4036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4037 test $ac_status = 0; }; }; then
4038 cross_compiling=no
4039 else
4040 if test "$cross_compiling" = maybe; then
4041 cross_compiling=yes
4042 else
4043 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4044$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004045as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004046If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004047See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004048 fi
4049 fi
4050fi
4051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4052$as_echo "$cross_compiling" >&6; }
4053
4054rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4055ac_clean_files=$ac_clean_files_save
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4057$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004058if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004059 $as_echo_n "(cached) " >&6
4060else
4061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004062/* end confdefs.h. */
4063
4064int
4065main ()
4066{
4067
4068 ;
4069 return 0;
4070}
4071_ACEOF
4072rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004073if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074case "(($ac_try" in
4075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4076 *) ac_try_echo=$ac_try;;
4077esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004078eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4079$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004080 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004081 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004082 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4083 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 for ac_file in conftest.o conftest.obj conftest.*; do
4085 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004086 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004087 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4089 break;;
4090 esac
4091done
4092else
Matthias Kloseb9621712010-04-24 17:59:49 +00004093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004094sed 's/^/| /' conftest.$ac_ext >&5
4095
Matthias Kloseb9621712010-04-24 17:59:49 +00004096{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4097$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004098as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004099See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004100fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004101rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4104$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004105OBJEXT=$ac_cv_objext
4106ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4108$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004109if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004111else
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004114
Martin v. Löwis11437992002-04-12 09:54:03 +00004115int
4116main ()
4117{
4118#ifndef __GNUC__
4119 choke me
4120#endif
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004126if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 ac_compiler_gnu=yes
4128else
Matthias Kloseb9621712010-04-24 17:59:49 +00004129 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004132ac_cv_c_compiler_gnu=$ac_compiler_gnu
4133
4134fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4136$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4137if test $ac_compiler_gnu = yes; then
4138 GCC=yes
4139else
4140 GCC=
4141fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004142ac_test_CFLAGS=${CFLAGS+set}
4143ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4145$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004146if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004148else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149 ac_save_c_werror_flag=$ac_c_werror_flag
4150 ac_c_werror_flag=yes
4151 ac_cv_prog_cc_g=no
4152 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159
4160 ;
4161 return 0;
4162}
4163_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004164if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004165 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004166else
Matthias Kloseb9621712010-04-24 17:59:49 +00004167 CFLAGS=""
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004169/* end confdefs.h. */
4170
4171int
4172main ()
4173{
4174
4175 ;
4176 return 0;
4177}
4178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004179if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004180
Matthias Kloseb9621712010-04-24 17:59:49 +00004181else
4182 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004183 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185/* end confdefs.h. */
4186
4187int
4188main ()
4189{
4190
4191 ;
4192 return 0;
4193}
4194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004195if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004196 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203 ac_c_werror_flag=$ac_save_c_werror_flag
4204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4206$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004207if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209elif test $ac_cv_prog_cc_g = yes; then
4210 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004211 CFLAGS="-g -O2"
4212 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214 fi
4215else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004216 if test "$GCC" = yes; then
4217 CFLAGS="-O2"
4218 else
4219 CFLAGS=
4220 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4223$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004224if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004226else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004227 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004228ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004230/* end confdefs.h. */
4231#include <stdarg.h>
4232#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004233struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4235struct buf { int x; };
4236FILE * (*rcsopen) (struct buf *, struct stat *, int);
4237static char *e (p, i)
4238 char **p;
4239 int i;
4240{
4241 return p[i];
4242}
4243static char *f (char * (*g) (char **, int), char **p, ...)
4244{
4245 char *s;
4246 va_list v;
4247 va_start (v,p);
4248 s = g (p, va_arg (v,int));
4249 va_end (v);
4250 return s;
4251}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004252
4253/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4254 function prototypes and stuff, but not '\xHH' hex character constants.
4255 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004257 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4258 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004259 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004260int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4261
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4263 inside strings and character constants. */
4264#define FOO(x) 'x'
4265int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4266
Skip Montanaro6dead952003-09-25 14:50:04 +00004267int test (int i, double x);
4268struct s1 {int (*f) (int a);};
4269struct s2 {int (*f) (double a);};
4270int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4271int argc;
4272char **argv;
4273int
4274main ()
4275{
4276return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4277 ;
4278 return 0;
4279}
4280_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4282 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004283do
4284 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004285 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288rm -f core conftest.err conftest.$ac_objext
4289 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004290done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004291rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004292CC=$ac_save_CC
4293
4294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295# AC_CACHE_VAL
4296case "x$ac_cv_prog_cc_c89" in
4297 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4299$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4302$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004303 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4306$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004308if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004309
Matthias Kloseb9621712010-04-24 17:59:49 +00004310fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_ext=c
4313ac_cpp='$CPP $CPPFLAGS'
4314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004317
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004318ac_ext=c
4319ac_cpp='$CPP $CPPFLAGS'
4320ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4321ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4322ac_compiler_gnu=$ac_cv_c_compiler_gnu
4323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4324$as_echo_n "checking how to run the C preprocessor... " >&6; }
4325# On Suns, sometimes $CPP names a directory.
4326if test -n "$CPP" && test -d "$CPP"; then
4327 CPP=
4328fi
4329if test -z "$CPP"; then
4330 if ${ac_cv_prog_CPP+:} false; then :
4331 $as_echo_n "(cached) " >&6
4332else
4333 # Double quotes because CPP needs to be expanded
4334 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4335 do
4336 ac_preproc_ok=false
4337for ac_c_preproc_warn_flag in '' yes
4338do
4339 # Use a header file that comes with gcc, so configuring glibc
4340 # with a fresh cross-compiler works.
4341 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4342 # <limits.h> exists even on freestanding compilers.
4343 # On the NeXT, cc -E runs the code through the compiler's parser,
4344 # not just through cpp. "Syntax error" is here to catch this case.
4345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4346/* end confdefs.h. */
4347#ifdef __STDC__
4348# include <limits.h>
4349#else
4350# include <assert.h>
4351#endif
4352 Syntax error
4353_ACEOF
4354if ac_fn_c_try_cpp "$LINENO"; then :
4355
4356else
4357 # Broken: fails on valid input.
4358continue
4359fi
4360rm -f conftest.err conftest.i conftest.$ac_ext
4361
4362 # OK, works on sane cases. Now check whether nonexistent headers
4363 # can be detected and how.
4364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4365/* end confdefs.h. */
4366#include <ac_nonexistent.h>
4367_ACEOF
4368if ac_fn_c_try_cpp "$LINENO"; then :
4369 # Broken: success on invalid input.
4370continue
4371else
4372 # Passes both tests.
4373ac_preproc_ok=:
4374break
4375fi
4376rm -f conftest.err conftest.i conftest.$ac_ext
4377
4378done
4379# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4380rm -f conftest.i conftest.err conftest.$ac_ext
4381if $ac_preproc_ok; then :
4382 break
4383fi
4384
4385 done
4386 ac_cv_prog_CPP=$CPP
4387
4388fi
4389 CPP=$ac_cv_prog_CPP
4390else
4391 ac_cv_prog_CPP=$CPP
4392fi
4393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4394$as_echo "$CPP" >&6; }
4395ac_preproc_ok=false
4396for ac_c_preproc_warn_flag in '' yes
4397do
4398 # Use a header file that comes with gcc, so configuring glibc
4399 # with a fresh cross-compiler works.
4400 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4401 # <limits.h> exists even on freestanding compilers.
4402 # On the NeXT, cc -E runs the code through the compiler's parser,
4403 # not just through cpp. "Syntax error" is here to catch this case.
4404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4405/* end confdefs.h. */
4406#ifdef __STDC__
4407# include <limits.h>
4408#else
4409# include <assert.h>
4410#endif
4411 Syntax error
4412_ACEOF
4413if ac_fn_c_try_cpp "$LINENO"; then :
4414
4415else
4416 # Broken: fails on valid input.
4417continue
4418fi
4419rm -f conftest.err conftest.i conftest.$ac_ext
4420
4421 # OK, works on sane cases. Now check whether nonexistent headers
4422 # can be detected and how.
4423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4424/* end confdefs.h. */
4425#include <ac_nonexistent.h>
4426_ACEOF
4427if ac_fn_c_try_cpp "$LINENO"; then :
4428 # Broken: success on invalid input.
4429continue
4430else
4431 # Passes both tests.
4432ac_preproc_ok=:
4433break
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437done
4438# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4439rm -f conftest.i conftest.err conftest.$ac_ext
4440if $ac_preproc_ok; then :
4441
4442else
4443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4444$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4445as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4446See \`config.log' for more details" "$LINENO" 5; }
4447fi
4448
4449ac_ext=c
4450ac_cpp='$CPP $CPPFLAGS'
4451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4453ac_compiler_gnu=$ac_cv_c_compiler_gnu
4454
4455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4456$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4457if ${ac_cv_path_GREP+:} false; then :
4458 $as_echo_n "(cached) " >&6
4459else
4460 if test -z "$GREP"; then
4461 ac_path_GREP_found=false
4462 # Loop through the user's path and test for each of PROGNAME-LIST
4463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4464for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4465do
4466 IFS=$as_save_IFS
4467 test -z "$as_dir" && as_dir=.
4468 for ac_prog in grep ggrep; do
4469 for ac_exec_ext in '' $ac_executable_extensions; do
4470 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4471 as_fn_executable_p "$ac_path_GREP" || continue
4472# Check for GNU ac_path_GREP and select it if it is found.
4473 # Check for GNU $ac_path_GREP
4474case `"$ac_path_GREP" --version 2>&1` in
4475*GNU*)
4476 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4477*)
4478 ac_count=0
4479 $as_echo_n 0123456789 >"conftest.in"
4480 while :
4481 do
4482 cat "conftest.in" "conftest.in" >"conftest.tmp"
4483 mv "conftest.tmp" "conftest.in"
4484 cp "conftest.in" "conftest.nl"
4485 $as_echo 'GREP' >> "conftest.nl"
4486 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4487 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4488 as_fn_arith $ac_count + 1 && ac_count=$as_val
4489 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4490 # Best one so far, save it but keep looking for a better one
4491 ac_cv_path_GREP="$ac_path_GREP"
4492 ac_path_GREP_max=$ac_count
4493 fi
4494 # 10*(2^10) chars as input seems more than enough
4495 test $ac_count -gt 10 && break
4496 done
4497 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4498esac
4499
4500 $ac_path_GREP_found && break 3
4501 done
4502 done
4503 done
4504IFS=$as_save_IFS
4505 if test -z "$ac_cv_path_GREP"; then
4506 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4507 fi
4508else
4509 ac_cv_path_GREP=$GREP
4510fi
4511
4512fi
4513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4514$as_echo "$ac_cv_path_GREP" >&6; }
4515 GREP="$ac_cv_path_GREP"
4516
4517
Łukasz Langaa785c872016-09-09 17:37:37 -07004518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4519$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4520if ${ac_cv_path_SED+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4524 for ac_i in 1 2 3 4 5 6 7; do
4525 ac_script="$ac_script$as_nl$ac_script"
4526 done
4527 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4528 { ac_script=; unset ac_script;}
4529 if test -z "$SED"; then
4530 ac_path_SED_found=false
4531 # Loop through the user's path and test for each of PROGNAME-LIST
4532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4533for as_dir in $PATH
4534do
4535 IFS=$as_save_IFS
4536 test -z "$as_dir" && as_dir=.
4537 for ac_prog in sed gsed; do
4538 for ac_exec_ext in '' $ac_executable_extensions; do
4539 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4540 as_fn_executable_p "$ac_path_SED" || continue
4541# Check for GNU ac_path_SED and select it if it is found.
4542 # Check for GNU $ac_path_SED
4543case `"$ac_path_SED" --version 2>&1` in
4544*GNU*)
4545 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4546*)
4547 ac_count=0
4548 $as_echo_n 0123456789 >"conftest.in"
4549 while :
4550 do
4551 cat "conftest.in" "conftest.in" >"conftest.tmp"
4552 mv "conftest.tmp" "conftest.in"
4553 cp "conftest.in" "conftest.nl"
4554 $as_echo '' >> "conftest.nl"
4555 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4557 as_fn_arith $ac_count + 1 && ac_count=$as_val
4558 if test $ac_count -gt ${ac_path_SED_max-0}; then
4559 # Best one so far, save it but keep looking for a better one
4560 ac_cv_path_SED="$ac_path_SED"
4561 ac_path_SED_max=$ac_count
4562 fi
4563 # 10*(2^10) chars as input seems more than enough
4564 test $ac_count -gt 10 && break
4565 done
4566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4567esac
4568
4569 $ac_path_SED_found && break 3
4570 done
4571 done
4572 done
4573IFS=$as_save_IFS
4574 if test -z "$ac_cv_path_SED"; then
4575 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4576 fi
4577else
4578 ac_cv_path_SED=$SED
4579fi
4580
4581fi
4582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4583$as_echo "$ac_cv_path_SED" >&6; }
4584 SED="$ac_cv_path_SED"
4585 rm -f conftest.sed
4586
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004587
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004588
4589
Matthias Kloseb9621712010-04-24 17:59:49 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4591$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004593# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004594if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
4597 case $withval in
4598 no) with_cxx_main=no
4599 MAINCC='$(CC)';;
4600 yes) with_cxx_main=yes
4601 MAINCC='$(CXX)';;
4602 *) with_cxx_main=yes
4603 MAINCC=$withval
4604 if test -z "$CXX"
4605 then
4606 CXX=$withval
4607 fi;;
4608 esac
4609else
4610
4611 with_cxx_main=no
4612 MAINCC='$(CC)'
4613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004614fi
4615
Matthias Kloseb9621712010-04-24 17:59:49 +00004616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4617$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004618
4619preset_cxx="$CXX"
4620if test -z "$CXX"
4621then
4622 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623 gcc) if test -n "$ac_tool_prefix"; then
4624 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4625set dummy ${ac_tool_prefix}g++; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_CXX+:} false; then :
4629 $as_echo_n "(cached) " >&6
4630else
4631 case $CXX in
4632 [\\/]* | ?:[\\/]*)
4633 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4634 ;;
4635 *)
4636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in notfound
4638do
4639 IFS=$as_save_IFS
4640 test -z "$as_dir" && as_dir=.
4641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004643 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645 break 2
4646 fi
4647done
4648 done
4649IFS=$as_save_IFS
4650
4651 ;;
4652esac
4653fi
4654CXX=$ac_cv_path_CXX
4655if test -n "$CXX"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4657$as_echo "$CXX" >&6; }
4658else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663
4664fi
4665if test -z "$ac_cv_path_CXX"; then
4666 ac_pt_CXX=$CXX
4667 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004668set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671if ${ac_cv_path_ac_pt_CXX+:} false; then :
4672 $as_echo_n "(cached) " >&6
4673else
4674 case $ac_pt_CXX in
4675 [\\/]* | ?:[\\/]*)
4676 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4677 ;;
4678 *)
4679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in notfound
4681do
4682 IFS=$as_save_IFS
4683 test -z "$as_dir" && as_dir=.
4684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688 break 2
4689 fi
4690done
4691 done
4692IFS=$as_save_IFS
4693
4694 ;;
4695esac
4696fi
4697ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4698if test -n "$ac_pt_CXX"; then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4700$as_echo "$ac_pt_CXX" >&6; }
4701else
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706 if test "x$ac_pt_CXX" = x; then
4707 CXX="g++"
4708 else
4709 case $cross_compiling:$ac_tool_warned in
4710yes:)
4711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4713ac_tool_warned=yes ;;
4714esac
4715 CXX=$ac_pt_CXX
4716 fi
4717else
4718 CXX="$ac_cv_path_CXX"
4719fi
4720 ;;
4721 cc) if test -n "$ac_tool_prefix"; then
4722 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4723set dummy ${ac_tool_prefix}c++; ac_word=$2
4724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004726if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728else
4729 case $CXX in
4730 [\\/]* | ?:[\\/]*)
4731 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4732 ;;
4733 *)
4734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4735for as_dir in notfound
4736do
4737 IFS=$as_save_IFS
4738 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004741 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743 break 2
4744 fi
4745done
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004747IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004748
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004749 ;;
4750esac
4751fi
4752CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4755$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756else
Matthias Kloseb9621712010-04-24 17:59:49 +00004757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4758$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004759fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004760
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761
4762fi
4763if test -z "$ac_cv_path_CXX"; then
4764 ac_pt_CXX=$CXX
4765 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004766set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4768$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004772 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775 ;;
4776 *)
4777 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in notfound
4779do
4780 IFS=$as_save_IFS
4781 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004783 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004784 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004786 break 2
4787 fi
4788done
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004790IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004791
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004792 ;;
4793esac
4794fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004795ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4796if test -n "$ac_pt_CXX"; then
4797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4798$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799else
Matthias Kloseb9621712010-04-24 17:59:49 +00004800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004803
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 if test "x$ac_pt_CXX" = x; then
4805 CXX="c++"
4806 else
4807 case $cross_compiling:$ac_tool_warned in
4808yes:)
4809{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4810$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4811ac_tool_warned=yes ;;
4812esac
4813 CXX=$ac_pt_CXX
4814 fi
4815else
4816 CXX="$ac_cv_path_CXX"
4817fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004819 clang|*/clang) if test -n "$ac_tool_prefix"; then
4820 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4821set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
4824if ${ac_cv_path_CXX+:} false; then :
4825 $as_echo_n "(cached) " >&6
4826else
4827 case $CXX in
4828 [\\/]* | ?:[\\/]*)
4829 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4830 ;;
4831 *)
4832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in notfound
4834do
4835 IFS=$as_save_IFS
4836 test -z "$as_dir" && as_dir=.
4837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004839 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841 break 2
4842 fi
4843done
4844 done
4845IFS=$as_save_IFS
4846
Ned Deilycbfb9a52012-06-23 16:02:19 -07004847 ;;
4848esac
4849fi
4850CXX=$ac_cv_path_CXX
4851if test -n "$CXX"; then
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4853$as_echo "$CXX" >&6; }
4854else
4855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859
4860fi
4861if test -z "$ac_cv_path_CXX"; then
4862 ac_pt_CXX=$CXX
4863 # Extract the first word of "clang++", so it can be a program name with args.
4864set dummy clang++; ac_word=$2
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if ${ac_cv_path_ac_pt_CXX+:} false; then :
4868 $as_echo_n "(cached) " >&6
4869else
4870 case $ac_pt_CXX in
4871 [\\/]* | ?:[\\/]*)
4872 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4873 ;;
4874 *)
4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in notfound
4877do
4878 IFS=$as_save_IFS
4879 test -z "$as_dir" && as_dir=.
4880 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004882 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4884 break 2
4885 fi
4886done
4887 done
4888IFS=$as_save_IFS
4889
4890 ;;
4891esac
4892fi
4893ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4894if test -n "$ac_pt_CXX"; then
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4896$as_echo "$ac_pt_CXX" >&6; }
4897else
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4899$as_echo "no" >&6; }
4900fi
4901
4902 if test "x$ac_pt_CXX" = x; then
4903 CXX="clang++"
4904 else
4905 case $cross_compiling:$ac_tool_warned in
4906yes:)
4907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4909ac_tool_warned=yes ;;
4910esac
4911 CXX=$ac_pt_CXX
4912 fi
4913else
4914 CXX="$ac_cv_path_CXX"
4915fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004916 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004917 icc|*/icc) if test -n "$ac_tool_prefix"; then
4918 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4919set dummy ${ac_tool_prefix}icpc; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_CXX+:} false; then :
4923 $as_echo_n "(cached) " >&6
4924else
4925 case $CXX in
4926 [\\/]* | ?:[\\/]*)
4927 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4928 ;;
4929 *)
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in notfound
4932do
4933 IFS=$as_save_IFS
4934 test -z "$as_dir" && as_dir=.
4935 for ac_exec_ext in '' $ac_executable_extensions; do
4936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939 break 2
4940 fi
4941done
4942 done
4943IFS=$as_save_IFS
4944
4945 ;;
4946esac
4947fi
4948CXX=$ac_cv_path_CXX
4949if test -n "$CXX"; then
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4951$as_echo "$CXX" >&6; }
4952else
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958fi
4959if test -z "$ac_cv_path_CXX"; then
4960 ac_pt_CXX=$CXX
4961 # Extract the first word of "icpc", so it can be a program name with args.
4962set dummy icpc; ac_word=$2
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4964$as_echo_n "checking for $ac_word... " >&6; }
4965if ${ac_cv_path_ac_pt_CXX+:} false; then :
4966 $as_echo_n "(cached) " >&6
4967else
4968 case $ac_pt_CXX in
4969 [\\/]* | ?:[\\/]*)
4970 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4971 ;;
4972 *)
4973 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4974for as_dir in notfound
4975do
4976 IFS=$as_save_IFS
4977 test -z "$as_dir" && as_dir=.
4978 for ac_exec_ext in '' $ac_executable_extensions; do
4979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4980 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4981 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4982 break 2
4983 fi
4984done
4985 done
4986IFS=$as_save_IFS
4987
4988 ;;
4989esac
4990fi
4991ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4992if test -n "$ac_pt_CXX"; then
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4994$as_echo "$ac_pt_CXX" >&6; }
4995else
4996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4997$as_echo "no" >&6; }
4998fi
4999
5000 if test "x$ac_pt_CXX" = x; then
5001 CXX="icpc"
5002 else
5003 case $cross_compiling:$ac_tool_warned in
5004yes:)
5005{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5006$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5007ac_tool_warned=yes ;;
5008esac
5009 CXX=$ac_pt_CXX
5010 fi
5011else
5012 CXX="$ac_cv_path_CXX"
5013fi
5014 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005015 esac
5016 if test "$CXX" = "notfound"
5017 then
5018 CXX=""
5019 fi
5020fi
5021if test -z "$CXX"
5022then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005023 if test -n "$ac_tool_prefix"; then
5024 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5025 do
5026 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5029$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005030if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005031 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005032else
5033 if test -n "$CXX"; then
5034 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5035else
5036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5037for as_dir in $PATH
5038do
5039 IFS=$as_save_IFS
5040 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005043 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045 break 2
5046 fi
5047done
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005050
5051fi
5052fi
5053CXX=$ac_cv_prog_CXX
5054if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5056$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057else
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5059$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005060fi
5061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005063 test -n "$CXX" && break
5064 done
5065fi
5066if test -z "$CXX"; then
5067 ac_ct_CXX=$CXX
5068 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5069do
5070 # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5075 $as_echo_n "(cached) " >&6
5076else
5077 if test -n "$ac_ct_CXX"; then
5078 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5079else
5080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5081for as_dir in $PATH
5082do
5083 IFS=$as_save_IFS
5084 test -z "$as_dir" && as_dir=.
5085 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005087 ac_cv_prog_ac_ct_CXX="$ac_prog"
5088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5089 break 2
5090 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005091done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005092 done
5093IFS=$as_save_IFS
5094
5095fi
5096fi
5097ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5098if test -n "$ac_ct_CXX"; then
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5100$as_echo "$ac_ct_CXX" >&6; }
5101else
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107 test -n "$ac_ct_CXX" && break
5108done
5109
5110 if test "x$ac_ct_CXX" = x; then
5111 CXX="notfound"
5112 else
5113 case $cross_compiling:$ac_tool_warned in
5114yes:)
5115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5117ac_tool_warned=yes ;;
5118esac
5119 CXX=$ac_ct_CXX
5120 fi
5121fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005122
5123 if test "$CXX" = "notfound"
5124 then
5125 CXX=""
5126 fi
5127fi
5128if test "$preset_cxx" != "$CXX"
5129then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005130 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005131
5132 By default, distutils will build C++ extension modules with \"$CXX\".
5133 If this is not intended, then set CXX on the configure command line.
5134 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005135$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005136
5137 By default, distutils will build C++ extension modules with \"$CXX\".
5138 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140fi
5141
5142
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005143MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5144
5145
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5147$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5148cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005149#undef bfin
5150#undef cris
5151#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef hppa
5154#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005155#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005156#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005157#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005160#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005161 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005162#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163# if defined(__x86_64__) && defined(__LP64__)
5164 x86_64-linux-gnu
5165# elif defined(__x86_64__) && defined(__ILP32__)
5166 x86_64-linux-gnux32
5167# elif defined(__i386__)
5168 i386-linux-gnu
5169# elif defined(__aarch64__) && defined(__AARCH64EL__)
5170# if defined(__ILP32__)
5171 aarch64_ilp32-linux-gnu
5172# else
5173 aarch64-linux-gnu
5174# endif
5175# elif defined(__aarch64__) && defined(__AARCH64EB__)
5176# if defined(__ILP32__)
5177 aarch64_be_ilp32-linux-gnu
5178# else
5179 aarch64_be-linux-gnu
5180# endif
5181# elif defined(__alpha__)
5182 alpha-linux-gnu
5183# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5184# if defined(__ARMEL__)
5185 arm-linux-gnueabihf
5186# else
5187 armeb-linux-gnueabihf
5188# endif
5189# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5190# if defined(__ARMEL__)
5191 arm-linux-gnueabi
5192# else
5193 armeb-linux-gnueabi
5194# endif
5195# elif defined(__hppa__)
5196 hppa-linux-gnu
5197# elif defined(__ia64__)
5198 ia64-linux-gnu
5199# elif defined(__m68k__) && !defined(__mcoldfire__)
5200 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005201# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5202# if _MIPS_SIM == _ABIO32
5203 mipsisa32r6el-linux-gnu
5204# elif _MIPS_SIM == _ABIN32
5205 mipsisa64r6el-linux-gnuabin32
5206# elif _MIPS_SIM == _ABI64
5207 mipsisa64r6el-linux-gnuabi64
5208# else
5209# error unknown platform triplet
5210# endif
5211# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5212# if _MIPS_SIM == _ABIO32
5213 mipsisa32r6-linux-gnu
5214# elif _MIPS_SIM == _ABIN32
5215 mipsisa64r6-linux-gnuabin32
5216# elif _MIPS_SIM == _ABI64
5217 mipsisa64r6-linux-gnuabi64
5218# else
5219# error unknown platform triplet
5220# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005221# elif defined(__mips_hard_float) && defined(_MIPSEL)
5222# if _MIPS_SIM == _ABIO32
5223 mipsel-linux-gnu
5224# elif _MIPS_SIM == _ABIN32
5225 mips64el-linux-gnuabin32
5226# elif _MIPS_SIM == _ABI64
5227 mips64el-linux-gnuabi64
5228# else
5229# error unknown platform triplet
5230# endif
5231# elif defined(__mips_hard_float)
5232# if _MIPS_SIM == _ABIO32
5233 mips-linux-gnu
5234# elif _MIPS_SIM == _ABIN32
5235 mips64-linux-gnuabin32
5236# elif _MIPS_SIM == _ABI64
5237 mips64-linux-gnuabi64
5238# else
5239# error unknown platform triplet
5240# endif
5241# elif defined(__or1k__)
5242 or1k-linux-gnu
5243# elif defined(__powerpc__) && defined(__SPE__)
5244 powerpc-linux-gnuspe
5245# elif defined(__powerpc64__)
5246# if defined(__LITTLE_ENDIAN__)
5247 powerpc64le-linux-gnu
5248# else
5249 powerpc64-linux-gnu
5250# endif
5251# elif defined(__powerpc__)
5252 powerpc-linux-gnu
5253# elif defined(__s390x__)
5254 s390x-linux-gnu
5255# elif defined(__s390__)
5256 s390-linux-gnu
5257# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5258 sh4-linux-gnu
5259# elif defined(__sparc__) && defined(__arch64__)
5260 sparc64-linux-gnu
5261# elif defined(__sparc__)
5262 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005263# elif defined(__riscv)
5264# if __riscv_xlen == 32
5265 riscv32-linux-gnu
5266# elif __riscv_xlen == 64
5267 riscv64-linux-gnu
5268# else
5269# error unknown platform triplet
5270# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005271# else
5272# error unknown platform triplet
5273# endif
5274#elif defined(__FreeBSD_kernel__)
5275# if defined(__LP64__)
5276 x86_64-kfreebsd-gnu
5277# elif defined(__i386__)
5278 i386-kfreebsd-gnu
5279# else
5280# error unknown platform triplet
5281# endif
5282#elif defined(__gnu_hurd__)
5283 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005284#elif defined(__APPLE__)
5285 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005286#elif defined(__VXWORKS__)
5287 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005288#else
5289# error unknown platform triplet
5290#endif
5291
5292EOF
5293
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005294if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005295 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5297$as_echo "$PLATFORM_TRIPLET" >&6; }
5298else
5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5300$as_echo "none" >&6; }
5301fi
5302rm -f conftest.c conftest.out
5303
5304if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5305 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5306 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5307 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005308elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5309 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005311
doko@ubuntu.com55532312016-06-14 08:55:19 +02005312if test x$MULTIARCH != x; then
5313 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5314fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315
5316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5318$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5319save_LDFLAGS="$LDFLAGS"
5320LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005321
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5323/* end confdefs.h. */
5324
5325int
5326main ()
5327{
5328
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333if ac_fn_c_try_link "$LINENO"; then :
5334 NO_AS_NEEDED="-Wl,--no-as-needed"
5335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5336$as_echo "yes" >&6; }
5337else
5338 NO_AS_NEEDED=""
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342rm -f core conftest.err conftest.$ac_objext \
5343 conftest$ac_exeext conftest.$ac_ext
5344LDFLAGS="$save_LDFLAGS"
5345
5346
5347
5348# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349
Matthias Kloseb9621712010-04-24 17:59:49 +00005350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5351$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005352if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354else
5355 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5356 then ac_cv_path_EGREP="$GREP -E"
5357 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005358 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005359 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 # Loop through the user's path and test for each of PROGNAME-LIST
5361 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005362for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5363do
5364 IFS=$as_save_IFS
5365 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 for ac_prog in egrep; do
5367 for ac_exec_ext in '' $ac_executable_extensions; do
5368 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005369 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005370# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005371 # Check for GNU $ac_path_EGREP
5372case `"$ac_path_EGREP" --version 2>&1` in
5373*GNU*)
5374 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5375*)
5376 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005377 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005378 while :
5379 do
5380 cat "conftest.in" "conftest.in" >"conftest.tmp"
5381 mv "conftest.tmp" "conftest.in"
5382 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005383 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005384 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5385 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005387 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5388 # Best one so far, save it but keep looking for a better one
5389 ac_cv_path_EGREP="$ac_path_EGREP"
5390 ac_path_EGREP_max=$ac_count
5391 fi
5392 # 10*(2^10) chars as input seems more than enough
5393 test $ac_count -gt 10 && break
5394 done
5395 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5396esac
5397
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $ac_path_EGREP_found && break 3
5399 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005400 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005404 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 +00005405 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406else
5407 ac_cv_path_EGREP=$EGREP
5408fi
5409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410 fi
5411fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5413$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005415
5416
Matthias Kloseb9621712010-04-24 17:59:49 +00005417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5418$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005419if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005420 $as_echo_n "(cached) " >&6
5421else
5422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005423/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005424#include <stdlib.h>
5425#include <stdarg.h>
5426#include <string.h>
5427#include <float.h>
5428
5429int
5430main ()
5431{
5432
5433 ;
5434 return 0;
5435}
5436_ACEOF
5437if ac_fn_c_try_compile "$LINENO"; then :
5438 ac_cv_header_stdc=yes
5439else
5440 ac_cv_header_stdc=no
5441fi
5442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5443
5444if test $ac_cv_header_stdc = yes; then
5445 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447/* end confdefs.h. */
5448#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005449
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005450_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005454else
Matthias Kloseb9621712010-04-24 17:59:49 +00005455 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005457rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005458
Matthias Kloseb9621712010-04-24 17:59:49 +00005459fi
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#include <stdlib.h>
5466
5467_ACEOF
5468if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5469 $EGREP "free" >/dev/null 2>&1; then :
5470
5471else
5472 ac_cv_header_stdc=no
5473fi
5474rm -f conftest*
5475
5476fi
5477
5478if test $ac_cv_header_stdc = yes; then
5479 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5480 if test "$cross_compiling" = yes; then :
5481 :
5482else
5483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5484/* end confdefs.h. */
5485#include <ctype.h>
5486#include <stdlib.h>
5487#if ((' ' & 0x0FF) == 0x020)
5488# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5489# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5490#else
5491# define ISLOWER(c) \
5492 (('a' <= (c) && (c) <= 'i') \
5493 || ('j' <= (c) && (c) <= 'r') \
5494 || ('s' <= (c) && (c) <= 'z'))
5495# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5496#endif
5497
5498#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5499int
5500main ()
5501{
5502 int i;
5503 for (i = 0; i < 256; i++)
5504 if (XOR (islower (i), ISLOWER (i))
5505 || toupper (i) != TOUPPER (i))
5506 return 2;
5507 return 0;
5508}
5509_ACEOF
5510if ac_fn_c_try_run "$LINENO"; then :
5511
5512else
5513 ac_cv_header_stdc=no
5514fi
5515rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5516 conftest.$ac_objext conftest.beam conftest.$ac_ext
5517fi
5518
5519fi
5520fi
5521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5522$as_echo "$ac_cv_header_stdc" >&6; }
5523if test $ac_cv_header_stdc = yes; then
5524
5525$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5526
5527fi
5528
5529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5530for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5531 inttypes.h stdint.h unistd.h
5532do :
5533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5534ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5535"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005536if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005537 cat >>confdefs.h <<_ACEOF
5538#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5539_ACEOF
5540
5541fi
5542
5543done
5544
5545
5546
5547 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 +02005548if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 MINIX=yes
5550else
5551 MINIX=
5552fi
5553
5554
5555 if test "$MINIX" = yes; then
5556
5557$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5558
5559
5560$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5561
5562
5563$as_echo "#define _MINIX 1" >>confdefs.h
5564
5565 fi
5566
5567
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5569$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005570if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005571 $as_echo_n "(cached) " >&6
5572else
5573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5574/* end confdefs.h. */
5575
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005576# define __EXTENSIONS__ 1
5577 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005578int
5579main ()
5580{
5581
5582 ;
5583 return 0;
5584}
5585_ACEOF
5586if ac_fn_c_try_compile "$LINENO"; then :
5587 ac_cv_safe_to_define___extensions__=yes
5588else
5589 ac_cv_safe_to_define___extensions__=no
5590fi
5591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5592fi
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5594$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5595 test $ac_cv_safe_to_define___extensions__ = yes &&
5596 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5597
5598 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5599
5600 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5601
5602 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5603
5604 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5605
5606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
Xavier de Gaye95750b12016-07-09 11:05:42 +02005608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5609$as_echo_n "checking for the Android API level... " >&6; }
5610cat >> conftest.c <<EOF
5611#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005612android_api = __ANDROID_API__
5613arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005614#else
5615#error not Android
5616#endif
5617EOF
5618
5619if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005620 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5621 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5623$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005624 if test -z "$ANDROID_API_LEVEL"; then
5625 echo 'Fatal: you must define __ANDROID_API__'
5626 exit 1
5627 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005628
5629cat >>confdefs.h <<_ACEOF
5630#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5631_ACEOF
5632
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005633
5634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5635$as_echo_n "checking for the Android arm ABI... " >&6; }
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5637$as_echo "$_arm_arch" >&6; }
5638 if test "$_arm_arch" = 7; then
5639 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5640 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5641 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005642else
5643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5644$as_echo "not Android" >&6; }
5645fi
5646rm -f conftest.c conftest.out
5647
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648# Check for unsupported systems
5649case $ac_sys_system/$ac_sys_release in
5650atheos*|Linux*/1*)
5651 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5652 echo See README for details.
5653 exit 1;;
5654esac
5655
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5658$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659
5660# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005661if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662 withval=$with_suffix;
5663 case $withval in
5664 no) EXEEXT=;;
5665 yes) EXEEXT=.exe;;
5666 *) EXEEXT=$withval;;
5667 esac
5668fi
5669
Matthias Kloseb9621712010-04-24 17:59:49 +00005670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5671$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672
5673# Test whether we're running on a non-case-sensitive system, in which
5674# case we give a warning if no ext is given
5675
Matthias Kloseb9621712010-04-24 17:59:49 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5677$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005678if test ! -d CaseSensitiveTestDir; then
5679mkdir CaseSensitiveTestDir
5680fi
5681
5682if test -d casesensitivetestdir
5683then
Matthias Kloseb9621712010-04-24 17:59:49 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5685$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686 BUILDEXEEXT=.exe
5687else
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5689$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=$EXEEXT
5691fi
5692rmdir CaseSensitiveTestDir
5693
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694case $ac_sys_system in
5695hp*|HP*)
5696 case $CC in
5697 cc|*/cc) CC="$CC -Ae";;
5698 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005699esac
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5703$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704if test -z "$LIBRARY"
5705then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005706 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005707fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5709$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710
5711# LDLIBRARY is the name of the library to link against (as opposed to the
5712# name of the library into which to insert object files). BLDLIBRARY is also
5713# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5714# is blank as the main program is not linked directly against LDLIBRARY.
5715# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5716# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5717# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5718# DLLLIBRARY is the shared (i.e., DLL) library.
5719#
5720# RUNSHARED is used to run shared python without installed libraries
5721#
5722# INSTSONAME is the name of the shared library that will be use to install
5723# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005724#
5725# LDVERSION is the shared library version number, normally the Python version
5726# with the ABI build flags appended.
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
5729
5730
5731
5732
5733
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735LDLIBRARY="$LIBRARY"
5736BLDLIBRARY='$(LDLIBRARY)'
5737INSTSONAME='$(LDLIBRARY)'
5738DLLLIBRARY=''
5739LDLIBRARYDIR=''
5740RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005741LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742
5743# LINKCC is the command that links the python executable -- default is $(CC).
5744# If CXX is set, and if it is needed to link a main function that was
5745# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5746# python might then depend on the C++ runtime
5747# This is altered for AIX in order to build the export list before
5748# linking.
5749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5751$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752if test -z "$LINKCC"
5753then
5754 LINKCC='$(PURIFY) $(MAINCC)'
5755 case $ac_sys_system in
5756 AIX*)
5757 exp_extra="\"\""
5758 if test $ac_sys_release -ge 5 -o \
5759 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5760 exp_extra="."
5761 fi
5762 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763 QNX*)
5764 # qcc must be used because the other compilers do not
5765 # support -N.
5766 LINKCC=qcc;;
5767 esac
5768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5770$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005771
5772# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5773# make sure we default having it set to "no": this is used by
5774# distutils.unixccompiler to know if it should add --enable-new-dtags
5775# to linker command lines, and failing to detect GNU ld simply results
5776# in the same bahaviour as before.
5777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5779$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780ac_prog=ld
5781if test "$GCC" = yes; then
5782 ac_prog=`$CC -print-prog-name=ld`
5783fi
5784case `"$ac_prog" -V 2>&1 < /dev/null` in
5785 *GNU*)
5786 GNULD=yes;;
5787 *)
5788 GNULD=no;;
5789esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5791$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005792
Matthias Kloseb9621712010-04-24 17:59:49 +00005793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5794$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005795# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005796if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797 enableval=$enable_shared;
5798fi
5799
5800
5801if test -z "$enable_shared"
5802then
5803 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005804 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005805 enable_shared="yes";;
5806 *)
5807 enable_shared="no";;
5808 esac
5809fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5811$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812
Matthias Kloseb9621712010-04-24 17:59:49 +00005813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5814$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005816if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005817 enableval=$enable_profiling;
5818fi
5819
5820if test "x$enable_profiling" = xyes; then
5821 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005822 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824/* end confdefs.h. */
5825int main() { return 0; }
5826_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005827if ac_fn_c_try_link "$LINENO"; then :
5828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005830 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832rm -f core conftest.err conftest.$ac_objext \
5833 conftest$ac_exeext conftest.$ac_ext
5834 CC="$ac_save_cc"
5835else
5836 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005837fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5839$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
doko@ubuntu.comba015832012-06-30 16:52:05 +02005841if test "x$enable_profiling" = xyes; then
5842 BASECFLAGS="-pg $BASECFLAGS"
5843 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844fi
5845
Matthias Kloseb9621712010-04-24 17:59:49 +00005846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5847$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848
5849# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5850# library that we build, but we do not want to link against it (we
5851# will find it with a -framework option). For this reason there is an
5852# extra variable BLDLIBRARY against which Python and the extension
5853# modules are linked, BLDLIBRARY. This is normally the same as
5854# LDLIBRARY, but empty for MacOSX framework builds.
5855if test "$enable_framework"
5856then
5857 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005858 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005859 BLDLIBRARY=''
5860else
5861 BLDLIBRARY='$(LDLIBRARY)'
5862fi
5863
5864# Other platforms follow
5865if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005866 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867
Matthias Kloseb9621712010-04-24 17:59:49 +00005868$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
5870 case $ac_sys_system in
5871 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005872 LDLIBRARY='libpython$(LDVERSION).dll.a'
5873 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874 ;;
5875 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).so'
5877 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005878 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005880 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005881 then
5882 PY3LIBRARY=libpython3.so
5883 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005884 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005885 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005886 LDLIBRARY='libpython$(LDVERSION).so'
5887 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005888 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005890 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005891 then
5892 PY3LIBRARY=libpython3.so
5893 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005894 ;;
5895 hp*|HP*)
5896 case `uname -m` in
5897 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005899 ;;
5900 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005901 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005902 ;;
5903 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005904 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005905 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 LDLIBRARY='libpython$(LDVERSION).dylib'
5909 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005910 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005912 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005913 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005915 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
5917 esac
5918else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005919 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 case $ac_sys_system in
5921 CYGWIN*)
5922 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005923 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 ;;
5925 esac
5926fi
5927
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005928if test "$cross_compiling" = yes; then
5929 RUNSHARED=
5930fi
5931
Matthias Kloseb9621712010-04-24 17:59:49 +00005932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5933$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005935
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005936if test -n "$ac_tool_prefix"; then
5937 for ac_prog in ar aal
5938 do
5939 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5942$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005943if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005944 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945else
5946 if test -n "$AR"; then
5947 ac_cv_prog_AR="$AR" # Let the user override the test.
5948else
5949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5950for as_dir in $PATH
5951do
5952 IFS=$as_save_IFS
5953 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005954 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005955 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005956 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005957 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 break 2
5959 fi
5960done
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962IFS=$as_save_IFS
5963
5964fi
5965fi
5966AR=$ac_cv_prog_AR
5967if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5969$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970else
Matthias Kloseb9621712010-04-24 17:59:49 +00005971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973fi
5974
5975
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005976 test -n "$AR" && break
5977 done
5978fi
5979if test -z "$AR"; then
5980 ac_ct_AR=$AR
5981 for ac_prog in ar aal
5982do
5983 # Extract the first word of "$ac_prog", so it can be a program name with args.
5984set dummy $ac_prog; ac_word=$2
5985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5986$as_echo_n "checking for $ac_word... " >&6; }
5987if ${ac_cv_prog_ac_ct_AR+:} false; then :
5988 $as_echo_n "(cached) " >&6
5989else
5990 if test -n "$ac_ct_AR"; then
5991 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5992else
5993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996 IFS=$as_save_IFS
5997 test -z "$as_dir" && as_dir=.
5998 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006000 ac_cv_prog_ac_ct_AR="$ac_prog"
6001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002 break 2
6003 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006005 done
6006IFS=$as_save_IFS
6007
6008fi
6009fi
6010ac_ct_AR=$ac_cv_prog_ac_ct_AR
6011if test -n "$ac_ct_AR"; then
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6013$as_echo "$ac_ct_AR" >&6; }
6014else
6015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6016$as_echo "no" >&6; }
6017fi
6018
6019
6020 test -n "$ac_ct_AR" && break
6021done
6022
6023 if test "x$ac_ct_AR" = x; then
6024 AR="ar"
6025 else
6026 case $cross_compiling:$ac_tool_warned in
6027yes:)
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6029$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6030ac_tool_warned=yes ;;
6031esac
6032 AR=$ac_ct_AR
6033 fi
6034fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035
6036
6037# tweak ARFLAGS only if the user didn't set it on the command line
6038
6039if test -z "$ARFLAGS"
6040then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006041 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042fi
6043
doko@ubuntu.com58844492012-06-30 18:25:32 +02006044if test -n "$ac_tool_prefix"; then
6045 for ac_prog in readelf
6046 do
6047 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6048set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6050$as_echo_n "checking for $ac_word... " >&6; }
6051if ${ac_cv_prog_READELF+:} false; then :
6052 $as_echo_n "(cached) " >&6
6053else
6054 if test -n "$READELF"; then
6055 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6056else
6057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6058for as_dir in $PATH
6059do
6060 IFS=$as_save_IFS
6061 test -z "$as_dir" && as_dir=.
6062 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006064 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6066 break 2
6067 fi
6068done
6069 done
6070IFS=$as_save_IFS
6071
6072fi
6073fi
6074READELF=$ac_cv_prog_READELF
6075if test -n "$READELF"; then
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6077$as_echo "$READELF" >&6; }
6078else
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6080$as_echo "no" >&6; }
6081fi
6082
6083
6084 test -n "$READELF" && break
6085 done
6086fi
6087if test -z "$READELF"; then
6088 ac_ct_READELF=$READELF
6089 for ac_prog in readelf
6090do
6091 # Extract the first word of "$ac_prog", so it can be a program name with args.
6092set dummy $ac_prog; ac_word=$2
6093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6094$as_echo_n "checking for $ac_word... " >&6; }
6095if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6096 $as_echo_n "(cached) " >&6
6097else
6098 if test -n "$ac_ct_READELF"; then
6099 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6100else
6101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6102for as_dir in $PATH
6103do
6104 IFS=$as_save_IFS
6105 test -z "$as_dir" && as_dir=.
6106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006108 ac_cv_prog_ac_ct_READELF="$ac_prog"
6109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6110 break 2
6111 fi
6112done
6113 done
6114IFS=$as_save_IFS
6115
6116fi
6117fi
6118ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6119if test -n "$ac_ct_READELF"; then
6120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6121$as_echo "$ac_ct_READELF" >&6; }
6122else
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128 test -n "$ac_ct_READELF" && break
6129done
6130
6131 if test "x$ac_ct_READELF" = x; then
6132 READELF=":"
6133 else
6134 case $cross_compiling:$ac_tool_warned in
6135yes:)
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6138ac_tool_warned=yes ;;
6139esac
6140 READELF=$ac_ct_READELF
6141 fi
6142fi
6143
6144if test "$cross_compiling" = yes; then
6145 case "$READELF" in
6146 readelf|:)
6147 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6148 ;;
6149 esac
6150fi
6151
6152
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006154case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006155hp*|HP*)
6156 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157 if test -z "$INSTALL"
6158 then
6159 INSTALL="${srcdir}/install-sh -c"
6160 fi
6161esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006162# Find a good install program. We prefer a C program (faster),
6163# so one script is as good as another. But avoid the broken or
6164# incompatible versions:
6165# SysV /etc/install, /usr/sbin/install
6166# SunOS /usr/etc/install
6167# IRIX /sbin/install
6168# AIX /bin/install
6169# AmigaOS /C/install, which installs bootblocks on floppy discs
6170# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6171# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6172# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6173# OS/2's system install, which has a completely different semantic
6174# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006175# Reject install programs that cannot install multiple files.
6176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6177$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006178if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006179if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006180 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181else
6182 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185 IFS=$as_save_IFS
6186 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006187 # Account for people who put trailing slashes in PATH elements.
6188case $as_dir/ in #((
6189 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006190 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 /usr/ucb/* ) ;;
6193 *)
6194 # OSF1 and SCO ODT 3.0 have their own names for install.
6195 # Don't use installbsd from OSF since it installs stuff as root
6196 # by default.
6197 for ac_prog in ginstall scoinst install; do
6198 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006199 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200 if test $ac_prog = install &&
6201 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6202 # AIX install. It has an incompatible calling convention.
6203 :
6204 elif test $ac_prog = install &&
6205 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6206 # program-specific install script used by HP pwplus--don't use.
6207 :
6208 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006209 rm -rf conftest.one conftest.two conftest.dir
6210 echo one > conftest.one
6211 echo two > conftest.two
6212 mkdir conftest.dir
6213 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6214 test -s conftest.one && test -s conftest.two &&
6215 test -s conftest.dir/conftest.one &&
6216 test -s conftest.dir/conftest.two
6217 then
6218 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6219 break 3
6220 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221 fi
6222 fi
6223 done
6224 done
6225 ;;
6226esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006227
6228 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006229IFS=$as_save_IFS
6230
Matthias Kloseb9621712010-04-24 17:59:49 +00006231rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006232
6233fi
6234 if test "${ac_cv_path_install+set}" = set; then
6235 INSTALL=$ac_cv_path_install
6236 else
6237 # As a last resort, use the slow shell script. Don't cache a
6238 # value for INSTALL within a source directory, because that will
6239 # break other packages using the cache if that directory is
6240 # removed, or if the value is a relative name.
6241 INSTALL=$ac_install_sh
6242 fi
6243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6245$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246
6247# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6248# It thinks the first close brace ends the variable substitution.
6249test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6250
6251test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6252
6253test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6254
Matthias Klose93a0ef12012-03-15 18:08:34 +01006255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6256$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6257if test -z "$MKDIR_P"; then
6258 if ${ac_cv_path_mkdir+:} false; then :
6259 $as_echo_n "(cached) " >&6
6260else
6261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6262for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6263do
6264 IFS=$as_save_IFS
6265 test -z "$as_dir" && as_dir=.
6266 for ac_prog in mkdir gmkdir; do
6267 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006268 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006269 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6270 'mkdir (GNU coreutils) '* | \
6271 'mkdir (coreutils) '* | \
6272 'mkdir (fileutils) '4.1*)
6273 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6274 break 3;;
6275 esac
6276 done
6277 done
6278 done
6279IFS=$as_save_IFS
6280
6281fi
6282
6283 test -d ./--version && rmdir ./--version
6284 if test "${ac_cv_path_mkdir+set}" = set; then
6285 MKDIR_P="$ac_cv_path_mkdir -p"
6286 else
6287 # As a last resort, use the slow shell script. Don't cache a
6288 # value for MKDIR_P within a source directory, because that will
6289 # break other packages using the cache if that directory is
6290 # removed, or if the value is a relative name.
6291 MKDIR_P="$ac_install_sh -d"
6292 fi
6293fi
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6295$as_echo "$MKDIR_P" >&6; }
6296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006297
6298# Not every filesystem supports hard links
6299
6300if test -z "$LN" ; then
6301 case $ac_sys_system in
6302 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303 *) LN=ln;;
6304 esac
6305fi
6306
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006307# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006308
6309ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006310
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6313$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006314
6315# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006316if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317 withval=$with_pydebug;
6318if test "$withval" != no
6319then
6320
Matthias Kloseb9621712010-04-24 17:59:49 +00006321$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6324$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006326 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006327else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329fi
6330else
Matthias Kloseb9621712010-04-24 17:59:49 +00006331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333fi
6334
6335
T. Woutersddbfa2c2017-05-23 01:30:49 +02006336# Check for --with-assertions. Py_DEBUG implies assertions, but also changes
6337# the ABI. This allows enabling assertions without changing the ABI.
6338assertions='false'
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6340$as_echo_n "checking for --with-assertions... " >&6; }
6341
6342# Check whether --with-assertions was given.
6343if test "${with_assertions+set}" = set; then :
6344 withval=$with_assertions;
6345if test "$withval" != no
6346then
6347 assertions='true'
6348fi
6349fi
6350
6351if test "$assertions" = 'true'; then
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6353$as_echo "yes" >&6; }
6354elif test "$Py_DEBUG" = 'true'; then
6355 assertions='true'
6356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6357$as_echo "implied by --with-pydebug" >&6; }
6358else
6359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
Brett Cannon63d98bc2016-09-06 17:12:40 -07006363# Enable optimization flags
6364
6365
6366Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6368$as_echo_n "checking for --enable-optimizations... " >&6; }
6369# Check whether --enable-optimizations was given.
6370if test "${enable_optimizations+set}" = set; then :
6371 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006372if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006373then
6374 Py_OPT='true'
6375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6376$as_echo "yes" >&6; };
6377else
6378 Py_OPT='false'
6379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6380$as_echo "no" >&6; };
6381fi
6382else
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
6387if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006388 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6389 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006390 # 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 +00006391 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006392 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006393 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006394 DEF_MAKE_RULE="build_all"
6395else
6396 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006397 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006398 DEF_MAKE_RULE="all"
6399fi
6400
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006401# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6402# normal names in the default $PATH (ie: Ubuntu). They exist under the
6403# non-suffixed name in their versioned llvm directory.
6404
6405llvm_bin_dir=''
6406llvm_path="${PATH}"
6407if test "${CC}" = "clang"
6408then
6409 clang_bin=`which clang`
6410 # Some systems install clang elsewhere as a symlink to the real path
6411 # which is where the related llvm tools are located.
6412 if test -L "${clang_bin}"
6413 then
6414 clang_dir=`dirname "${clang_bin}"`
6415 clang_bin=`readlink "${clang_bin}"`
6416 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6417 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6418 fi
6419fi
6420
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006421# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6423$as_echo_n "checking for --with-lto... " >&6; }
6424
6425# Check whether --with-lto was given.
6426if test "${with_lto+set}" = set; then :
6427 withval=$with_lto;
6428if test "$withval" != no
6429then
6430 Py_LTO='true'
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6432$as_echo "yes" >&6; };
6433else
6434 Py_LTO='false'
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6436$as_echo "no" >&6; };
6437fi
6438else
6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
6441fi
6442
6443if test "$Py_LTO" = 'true' ; then
6444 case $CC in
6445 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006446
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006448$as_echo_n "checking target system type... " >&6; }
6449if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006450 $as_echo_n "(cached) " >&6
6451else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006452 if test "x$target_alias" = x; then
6453 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006454else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006455 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6456 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6457fi
6458
6459fi
6460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6461$as_echo "$ac_cv_target" >&6; }
6462case $ac_cv_target in
6463*-*-*) ;;
6464*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6465esac
6466target=$ac_cv_target
6467ac_save_IFS=$IFS; IFS='-'
6468set x $ac_cv_target
6469shift
6470target_cpu=$1
6471target_vendor=$2
6472shift; shift
6473# Remember, the first character of IFS is used to create $*,
6474# except with old shells:
6475target_os=$*
6476IFS=$ac_save_IFS
6477case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6478
6479
6480# The aliases save the names the user supplied, while $host etc.
6481# will get canonicalized.
6482test -n "$target_alias" &&
6483 test "$program_prefix$program_suffix$program_transform_name" = \
6484 NONENONEs,x,x, &&
6485 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006486# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6487set dummy $target_alias-llvm-ar; ac_word=$2
6488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6489$as_echo_n "checking for $ac_word... " >&6; }
6490if ${ac_cv_path_LLVM_AR+:} false; then :
6491 $as_echo_n "(cached) " >&6
6492else
6493 case $LLVM_AR in
6494 [\\/]* | ?:[\\/]*)
6495 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6496 ;;
6497 *)
6498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6499for as_dir in ${llvm_path}
6500do
6501 IFS=$as_save_IFS
6502 test -z "$as_dir" && as_dir=.
6503 for ac_exec_ext in '' $ac_executable_extensions; do
6504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6505 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6507 break 2
6508 fi
6509done
6510 done
6511IFS=$as_save_IFS
6512
6513 ;;
6514esac
6515fi
6516LLVM_AR=$ac_cv_path_LLVM_AR
6517if test -n "$LLVM_AR"; then
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6519$as_echo "$LLVM_AR" >&6; }
6520else
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; }
6523fi
6524
6525
6526if test -z "$ac_cv_path_LLVM_AR"; then
6527 if test "$build" = "$target"; then
6528 ac_pt_LLVM_AR=$LLVM_AR
6529 # Extract the first word of "llvm-ar", so it can be a program name with args.
6530set dummy llvm-ar; ac_word=$2
6531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532$as_echo_n "checking for $ac_word... " >&6; }
6533if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535else
6536 case $ac_pt_LLVM_AR in
6537 [\\/]* | ?:[\\/]*)
6538 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6539 ;;
6540 *)
6541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542for as_dir in ${llvm_path}
6543do
6544 IFS=$as_save_IFS
6545 test -z "$as_dir" && as_dir=.
6546 for ac_exec_ext in '' $ac_executable_extensions; do
6547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550 break 2
6551 fi
6552done
6553 done
6554IFS=$as_save_IFS
6555
6556 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6557 ;;
6558esac
6559fi
6560ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6561if test -n "$ac_pt_LLVM_AR"; then
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6563$as_echo "$ac_pt_LLVM_AR" >&6; }
6564else
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569 LLVM_AR=$ac_pt_LLVM_AR
6570 else
6571 LLVM_AR="''"
6572 fi
6573else
6574 LLVM_AR="$ac_cv_path_LLVM_AR"
6575fi
6576
6577
6578 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6579 then
6580 LLVM_AR_FOUND="found"
6581 else
6582 LLVM_AR_FOUND="not-found"
6583 fi
6584 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6585 then
6586 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6587 if test -n "${found_llvm_ar}"
6588 then
6589 LLVM_AR='/usr/bin/xcrun llvm-ar'
6590 LLVM_AR_FOUND=found
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6592$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6593 fi
6594 fi
6595 if test $LLVM_AR_FOUND = not-found
6596 then
6597 LLVM_PROFR_ERR=yes
6598 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6599 else
6600 LLVM_AR_ERR=no
6601 fi
6602 AR="${LLVM_AR}"
6603 case $ac_sys_system in
6604 Darwin*)
6605 # Any changes made here should be reflected in the GCC+Darwin case below
6606 LTOFLAGS="-flto -Wl,-export_dynamic"
6607 ;;
6608 *)
6609 LTOFLAGS="-flto"
6610 ;;
6611 esac
6612 ;;
6613 *gcc*)
6614 case $ac_sys_system in
6615 Darwin*)
6616 LTOFLAGS="-flto -Wl,-export_dynamic"
6617 ;;
6618 *)
6619 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6620 ;;
6621 esac
6622 ;;
6623 esac
6624
6625 if test "$ac_cv_prog_cc_g" = "yes"
6626 then
6627 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6628 # to get debug symbols.
6629 LTOFLAGS="$LTOFLAGS -g"
6630 fi
6631
stratakisf92c7aa2018-12-04 15:54:01 +01006632 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006633 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006634fi
6635
6636# Enable PGO flags.
6637
6638
6639
6640
6641
6642
Gregory P. Smith799520c2016-09-07 16:10:00 -07006643# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6644set dummy $target_alias-llvm-profdata; ac_word=$2
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6646$as_echo_n "checking for $ac_word... " >&6; }
6647if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6648 $as_echo_n "(cached) " >&6
6649else
6650 case $LLVM_PROFDATA in
6651 [\\/]* | ?:[\\/]*)
6652 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6653 ;;
6654 *)
6655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6656for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657do
6658 IFS=$as_save_IFS
6659 test -z "$as_dir" && as_dir=.
6660 for ac_exec_ext in '' $ac_executable_extensions; do
6661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006662 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6664 break 2
6665 fi
6666done
6667 done
6668IFS=$as_save_IFS
6669
Gregory P. Smith799520c2016-09-07 16:10:00 -07006670 ;;
6671esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006672fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006673LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6674if test -n "$LLVM_PROFDATA"; then
6675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6676$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006677else
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6679$as_echo "no" >&6; }
6680fi
6681
6682
Gregory P. Smith799520c2016-09-07 16:10:00 -07006683if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6684 if test "$build" = "$target"; then
6685 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6686 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6687set dummy llvm-profdata; ac_word=$2
6688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6689$as_echo_n "checking for $ac_word... " >&6; }
6690if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6691 $as_echo_n "(cached) " >&6
6692else
6693 case $ac_pt_LLVM_PROFDATA in
6694 [\\/]* | ?:[\\/]*)
6695 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6696 ;;
6697 *)
6698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6699for as_dir in ${llvm_path}
6700do
6701 IFS=$as_save_IFS
6702 test -z "$as_dir" && as_dir=.
6703 for ac_exec_ext in '' $ac_executable_extensions; do
6704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6705 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6707 break 2
6708 fi
6709done
6710 done
6711IFS=$as_save_IFS
6712
6713 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6714 ;;
6715esac
6716fi
6717ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6718if test -n "$ac_pt_LLVM_PROFDATA"; then
6719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6720$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6721else
6722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6727 else
6728 LLVM_PROFDATA="''"
6729 fi
6730else
6731 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6732fi
6733
6734
6735if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6736then
6737 LLVM_PROF_FOUND="found"
6738else
6739 LLVM_PROF_FOUND="not-found"
6740fi
6741if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6742then
6743 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6744 if test -n "${found_llvm_profdata}"
6745 then
6746 # llvm-profdata isn't directly in $PATH in some cases.
6747 # https://apple.stackexchange.com/questions/197053/
6748 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6749 LLVM_PROF_FOUND=found
6750 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6751$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6752 fi
6753fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754LLVM_PROF_ERR=no
6755case $CC in
6756 *clang*)
6757 # Any changes made here should be reflected in the GCC+Darwin case below
6758 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6759 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006760 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006761 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6762 if test $LLVM_PROF_FOUND = not-found
6763 then
6764 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006765 if test "${REQUIRE_PGO}" = "yes"
6766 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006767 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 -07006768 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006769 fi
6770 ;;
6771 *gcc*)
6772 case $ac_sys_system in
6773 Darwin*)
6774 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6775 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006776 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006777 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006778 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006779 then
6780 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006781 if test "${REQUIRE_PGO}" = "yes"
6782 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006783 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 -07006784 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 fi
6786 ;;
6787 *)
6788 PGO_PROF_GEN_FLAG="-fprofile-generate"
6789 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6790 LLVM_PROF_MERGER="true"
6791 LLVM_PROF_FILE=""
6792 ;;
6793 esac
6794 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006795 *icc*)
6796 PGO_PROF_GEN_FLAG="-prof-gen"
6797 PGO_PROF_USE_FLAG="-prof-use"
6798 LLVM_PROF_MERGER="true"
6799 LLVM_PROF_FILE=""
6800 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801esac
6802
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006803# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6804# merged with this chunk of code?
6805
6806# Optimizer/debugger flags
6807# ------------------------
6808# (The following bit of code is complicated enough - please keep things
6809# indented properly. Just pretend you're editing Python code. ;-)
6810
6811# There are two parallel sets of case statements below, one that checks to
6812# see if OPT was set and one that does BASECFLAGS setting based upon
6813# compiler and platform. BASECFLAGS tweaks need to be made even if the
6814# user set OPT.
6815
Victor Stinner23a683a2019-04-12 21:27:37 +02006816case $CC in
6817 *clang*)
6818 cc_is_clang=1
6819 ;;
6820 *)
6821 if $CC --version 2>&1 | grep -q clang
6822 then
6823 cc_is_clang=1
6824 else
6825 cc_is_clang=
6826 fi
6827esac
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# tweak OPT based on compiler and platform, only if the user didn't set
6830# it on the command line
6831
Victor Stinner9ed34a82017-05-02 22:35:58 +02006832
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006833if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834then
6835 case $GCC in
6836 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6838 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6839 WRAP="-fwrapv"
6840 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006841
Victor Stinner35f3d242017-04-21 12:35:24 +02006842 if test -n "${cc_is_clang}"
6843 then
6844 # Clang also needs -fwrapv
6845 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006846 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6847 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006848 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006849 fi
6850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006851 case $ac_cv_prog_cc_g in
6852 yes)
6853 if test "$Py_DEBUG" = 'true' ; then
6854 # Optimization messes up debuggers, so turn it off for
6855 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006856 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006857 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006858 else
Victor Stinner28205b22017-04-21 11:24:34 +02006859 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006860 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 else
Victor Stinner28205b22017-04-21 11:24:34 +02006862 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 fi
6864 ;;
6865 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006866 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867 ;;
6868 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870 case $ac_sys_system in
6871 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6872 ;;
6873 esac
6874 ;;
6875
6876 *)
6877 OPT="-O"
6878 ;;
6879 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880fi
6881
Victor Stinner23a683a2019-04-12 21:27:37 +02006882if test -n "${cc_is_clang}"
6883then
6884 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6885 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6886 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6887 # instruction which can lead to segmentation fault. Instruct clang that
6888 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6889 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6890 # on 16 bytes.
6891 #
6892 # Sadly, the flag must be expected to CFLAGS and not just CFLAGS_NODIST,
6893 # since third party C extensions can have the same issue.
6894 CFLAGS="$CFLAGS -fmax-type-align=8"
6895fi
6896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897
6898
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006899
stratakiscf10a752018-12-19 18:19:01 +01006900
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006901# The -arch flags for universal builds on OSX
6902UNIVERSAL_ARCH_FLAGS=
6903
6904
6905# tweak BASECFLAGS based on compiler and platform
6906case $GCC in
6907yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006908 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006909
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6911$as_echo_n "checking for -Wextra... " >&6; }
6912 ac_save_cc="$CC"
6913 CC="$CC -Wextra -Werror"
6914 if ${ac_cv_extra_warnings+:} false; then :
6915 $as_echo_n "(cached) " >&6
6916else
6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6918/* end confdefs.h. */
6919
6920
6921int
6922main ()
6923{
6924
6925 ;
6926 return 0;
6927}
6928
6929_ACEOF
6930if ac_fn_c_try_compile "$LINENO"; then :
6931
6932 ac_cv_extra_warnings=yes
6933
6934else
6935
6936 ac_cv_extra_warnings=no
6937
6938fi
6939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6940fi
6941
6942 CC="$ac_save_cc"
6943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6944$as_echo "$ac_cv_extra_warnings" >&6; }
6945
6946 if test $ac_cv_extra_warnings = yes
6947 then
6948 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6949 fi
6950
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006951 # Python doesn't violate C99 aliasing rules, but older versions of
6952 # GCC produce warnings for legal Python code. Enable
6953 # -fno-strict-aliasing on versions of GCC that support but produce
6954 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6956$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006957 ac_save_cc="$CC"
6958 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006959 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006960 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006962else
Matthias Kloseb9621712010-04-24 17:59:49 +00006963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006964/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006965
Matthias Kloseb159a552010-04-25 21:00:44 +00006966
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006967int
6968main ()
6969{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006970
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006971 ;
6972 return 0;
6973}
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006976if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
6978 CC="$ac_save_cc -fstrict-aliasing"
6979 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006981/* end confdefs.h. */
6982
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006983 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006984int
6985main ()
6986{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006987double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 ;
6989 return 0;
6990}
Matthias Kloseb159a552010-04-25 21:00:44 +00006991
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006993if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006994
6995 ac_cv_no_strict_aliasing=no
6996
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006997else
Matthias Kloseb159a552010-04-25 21:00:44 +00006998
6999 ac_cv_no_strict_aliasing=yes
7000
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007001fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007004else
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
7006 ac_cv_no_strict_aliasing=no
7007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007010fi
7011
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007013 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7015$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007016 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007017 then
7018 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7019 fi
7020
Zachary Ware5af85642015-12-21 12:09:17 -06007021 # ICC doesn't recognize the option, but only emits a warning
7022 ## XXX does it emit an unused result warning and can it be disabled?
7023 case "$CC" in
7024 *icc*)
7025 ac_cv_disable_unused_result_warning=no
7026 ;;
7027 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7029$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7030 ac_save_cc="$CC"
7031 CC="$CC -Wunused-result -Werror"
7032 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007033 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007034 $as_echo_n "(cached) " >&6
7035else
7036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7037/* end confdefs.h. */
7038
7039
7040int
7041main ()
7042{
7043
7044 ;
7045 return 0;
7046}
7047
7048_ACEOF
7049if ac_fn_c_try_compile "$LINENO"; then :
7050
7051 ac_cv_disable_unused_result_warning=yes
7052
7053else
7054
7055 ac_cv_disable_unused_result_warning=no
7056
7057fi
7058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7059fi
7060
7061 CFLAGS="$save_CFLAGS"
7062 CC="$ac_save_cc"
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7064$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007065 ;;
7066 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007067
7068 if test $ac_cv_disable_unused_result_warning = yes
7069 then
7070 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007071 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7072 fi
7073
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7075$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7076 ac_save_cc="$CC"
7077 CC="$CC -Wunused-parameter -Werror"
7078 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7079 $as_echo_n "(cached) " >&6
7080else
7081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7082/* end confdefs.h. */
7083
7084
7085int
7086main ()
7087{
7088
7089 ;
7090 return 0;
7091}
7092
7093_ACEOF
7094if ac_fn_c_try_compile "$LINENO"; then :
7095
7096 ac_cv_disable_unused_parameter_warning=yes
7097
7098else
7099
7100 ac_cv_disable_unused_parameter_warning=no
7101
7102fi
7103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7104fi
7105
7106 CC="$ac_save_cc"
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7108$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7109
7110 if test $ac_cv_disable_unused_parameter_warning = yes
7111 then
7112 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7113 fi
7114
7115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7116$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7117 ac_save_cc="$CC"
7118 CC="$CC -Wmissing-field-initializers -Werror"
7119 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7120 $as_echo_n "(cached) " >&6
7121else
7122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7123/* end confdefs.h. */
7124
7125
7126int
7127main ()
7128{
7129
7130 ;
7131 return 0;
7132}
7133
7134_ACEOF
7135if ac_fn_c_try_compile "$LINENO"; then :
7136
7137 ac_cv_disable_missing_field_initializers=yes
7138
7139else
7140
7141 ac_cv_disable_missing_field_initializers=no
7142
7143fi
7144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7145fi
7146
7147 CC="$ac_save_cc"
7148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7149$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7150
7151 if test $ac_cv_disable_missing_field_initializers = yes
7152 then
7153 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007154 fi
7155
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7157$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7158 ac_save_cc="$CC"
7159 CC="$CC -Wsign-compare"
7160 save_CFLAGS="$CFLAGS"
7161 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7162 $as_echo_n "(cached) " >&6
7163else
7164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7165/* end confdefs.h. */
7166
7167
7168int
7169main ()
7170{
7171
7172 ;
7173 return 0;
7174}
7175
7176_ACEOF
7177if ac_fn_c_try_compile "$LINENO"; then :
7178
7179 ac_cv_enable_sign_compare_warning=yes
7180
7181else
7182
7183 ac_cv_enable_sign_compare_warning=no
7184
7185fi
7186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7187fi
7188
7189 CFLAGS="$save_CFLAGS"
7190 CC="$ac_save_cc"
7191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7192$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7193
7194 if test $ac_cv_enable_sign_compare_warning = yes
7195 then
7196 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7197 fi
7198
7199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7200$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7201 ac_save_cc="$CC"
7202 CC="$CC -Wunreachable-code"
7203 save_CFLAGS="$CFLAGS"
7204 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7205 $as_echo_n "(cached) " >&6
7206else
7207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7208/* end confdefs.h. */
7209
7210
7211int
7212main ()
7213{
7214
7215 ;
7216 return 0;
7217}
7218
7219_ACEOF
7220if ac_fn_c_try_compile "$LINENO"; then :
7221
7222 ac_cv_enable_unreachable_code_warning=yes
7223
7224else
7225
7226 ac_cv_enable_unreachable_code_warning=no
7227
7228fi
7229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7230fi
7231
7232 CFLAGS="$save_CFLAGS"
7233 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007234
7235 # Don't enable unreachable code warning in debug mode, since it usually
7236 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007237 # Issue #24324: Unfortunately, the unreachable code warning does not work
7238 # correctly on gcc and has been silently removed from the compiler.
7239 # It is supported on clang but on OS X systems gcc may be an alias
7240 # for clang. Try to determine if the compiler is not really gcc and,
7241 # if so, only then enable the warning.
7242 if test $ac_cv_enable_unreachable_code_warning = yes && \
7243 test "$Py_DEBUG" != "true" && \
7244 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007245 then
7246 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007247 else
7248 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007249 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7251$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007252
INADA Naokie3364842018-06-05 20:40:53 +09007253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7254$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7255 ac_save_cc="$CC"
7256 CC="$CC -Werror -Wstrict-prototypes"
7257 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7258 $as_echo_n "(cached) " >&6
7259else
7260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7261/* end confdefs.h. */
7262
7263
7264int
7265main ()
7266{
7267
7268 ;
7269 return 0;
7270}
7271
7272_ACEOF
7273if ac_fn_c_try_compile "$LINENO"; then :
7274
7275 ac_cv_enable_strict_prototypes_warning=yes
7276
7277else
7278
7279 ac_cv_enable_strict_prototypes_warning=no
7280
7281fi
7282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7283fi
7284
7285 CC="$ac_save_cc"
7286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7287$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7288
7289 if test $ac_cv_enable_strict_prototypes_warning = yes
7290 then
7291 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7292 fi
7293
Victor Stinner193ee0a2017-02-06 14:24:00 +01007294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7295$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7296 ac_save_cc="$CC"
7297 CC="$CC -Werror=implicit-function-declaration"
7298 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7299 $as_echo_n "(cached) " >&6
7300else
7301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7302/* end confdefs.h. */
7303
7304
7305int
7306main ()
7307{
7308
7309 ;
7310 return 0;
7311}
7312
7313_ACEOF
7314if ac_fn_c_try_compile "$LINENO"; then :
7315
7316 ac_cv_enable_implicit_function_declaration_error=yes
7317
7318else
7319
7320 ac_cv_enable_implicit_function_declaration_error=no
7321
7322fi
7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324fi
7325
7326 CC="$ac_save_cc"
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7328$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7329
7330 if test $ac_cv_enable_implicit_function_declaration_error = yes
7331 then
7332 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7333 fi
7334
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7336 # support. Without this, treatment of subnormals doesn't follow
7337 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007338 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339 alpha*)
7340 BASECFLAGS="$BASECFLAGS -mieee"
7341 ;;
7342 esac
7343
7344 case $ac_sys_system in
7345 SCO_SV*)
7346 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7347 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007348
Ned Deily87adb6e2013-10-18 21:09:56 -07007349 Darwin*)
7350 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7351 # used to be here, but non-Apple gcc doesn't accept them.
7352 if test "${CC}" = gcc
7353 then
7354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007355$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007356 case "${UNIVERSALSDK}" in
7357 */MacOSX10.4u.sdk)
7358 # Build using 10.4 SDK, force usage of gcc when the
7359 # compiler is gcc, otherwise the user will get very
7360 # confusing error messages when building on OSX 10.6
7361 CC=gcc-4.0
7362 CPP=cpp-4.0
7363 ;;
7364 esac
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007366$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007367 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368
Ned Deily87adb6e2013-10-18 21:09:56 -07007369 if test "${enable_universalsdk}"
7370 then
7371 case "$UNIVERSAL_ARCHS" in
7372 32-bit)
7373 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7374 LIPO_32BIT_FLAGS=""
7375 ARCH_RUN_32BIT=""
7376 ;;
7377 64-bit)
7378 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7379 LIPO_32BIT_FLAGS=""
7380 ARCH_RUN_32BIT="true"
7381 ;;
7382 all)
7383 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7384 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7385 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7386 ;;
7387 intel)
7388 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7389 LIPO_32BIT_FLAGS="-extract i386"
7390 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7391 ;;
7392 intel-32)
7393 UNIVERSAL_ARCH_FLAGS="-arch i386"
7394 LIPO_32BIT_FLAGS=""
7395 ARCH_RUN_32BIT=""
7396 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007397 intel-64)
7398 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7399 LIPO_32BIT_FLAGS=""
7400 ARCH_RUN_32BIT="true"
7401 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007402 3-way)
7403 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7404 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7405 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7406 ;;
7407 *)
7408 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7409 ;;
7410 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007411
Ned Deily87adb6e2013-10-18 21:09:56 -07007412 if test "${UNIVERSALSDK}" != "/"
7413 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007414 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7415 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007416 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007417 else
7418 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7419 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007420 fi
7421 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 # Calculate an appropriate deployment target for this build:
7424 # The deployment target value is used explicitly to enable certain
7425 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007426 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 # component of the string returned by distutils.get_platform().
7428 #
7429 # Use the value from:
7430 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7431 # 2. the operating system version of the build machine if >= 10.6
7432 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7433 # below to pick either 10.3, 10.4, or 10.5 as the target.
7434 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435
Ned Deily87adb6e2013-10-18 21:09:56 -07007436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7437$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007438 cur_target_major=`sw_vers -productVersion | \
7439 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7440 cur_target_minor=`sw_vers -productVersion | \
7441 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7442 cur_target="${cur_target_major}.${cur_target_minor}"
7443 if test ${cur_target_major} -eq 10 && \
7444 test ${cur_target_minor} -ge 3 && \
7445 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007446 then
Ned Deily36820b62014-06-25 13:44:22 -07007447 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007448 cur_target=10.3
7449 if test ${enable_universalsdk}
7450 then
7451 case "$UNIVERSAL_ARCHS" in
7452 all|3-way|intel|64-bit)
7453 # These configurations were first supported in 10.5
7454 cur_target='10.5'
7455 ;;
7456 esac
7457 else
7458 if test `/usr/bin/arch` = "i386"
7459 then
7460 # 10.4 was the first release to support Intel archs
7461 cur_target="10.4"
7462 fi
7463 fi
7464 fi
7465 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007466
Ned Deily87adb6e2013-10-18 21:09:56 -07007467 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7468 # environment with a value that is the same as what we'll use
7469 # in the Makefile to ensure that we'll get the same compiler
7470 # environment during configure and build time.
7471 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7472 export MACOSX_DEPLOYMENT_TARGET
7473 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7475$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007476
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 # end of Darwin* tests
7478 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479 esac
7480 ;;
7481
7482*)
7483 case $ac_sys_system in
7484 OpenUNIX*|UnixWare*)
7485 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7486 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487 SCO_SV*)
7488 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7489 ;;
7490 esac
7491 ;;
7492esac
7493
Zachary Ware5af85642015-12-21 12:09:17 -06007494# ICC needs -fp-model strict or floats behave badly
7495case "$CC" in
7496*icc*)
7497 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7498 ;;
7499esac
7500
T. Woutersddbfa2c2017-05-23 01:30:49 +02007501if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502 :
7503else
7504 OPT="-DNDEBUG $OPT"
7505fi
7506
7507if test "$ac_arch_flags"
7508then
7509 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7510fi
7511
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007512# On some compilers, pthreads are available without further options
7513# (e.g. MacOS X). On some of these systems, the compiler will not
7514# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7515# So we have to see first whether pthreads are available without
7516# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7518$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007519if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007521else
Matthias Kloseb9621712010-04-24 17:59:49 +00007522 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523 ac_cv_pthread_is_default=no
7524else
Matthias Kloseb9621712010-04-24 17:59:49 +00007525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007526/* end confdefs.h. */
7527
Stefan Krah7dba5942012-11-22 22:49:11 +01007528#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007529#include <pthread.h>
7530
7531void* routine(void* p){return NULL;}
7532
7533int main(){
7534 pthread_t p;
7535 if(pthread_create(&p,NULL,routine,NULL)!=0)
7536 return 1;
7537 (void)pthread_detach(p);
7538 return 0;
7539}
7540
7541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543
7544 ac_cv_pthread_is_default=yes
7545 ac_cv_kthread=no
7546 ac_cv_pthread=no
7547
7548else
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7552 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553fi
7554
7555
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007556fi
7557
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7559$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007560
7561
7562if test $ac_cv_pthread_is_default = yes
7563then
7564 ac_cv_kpthread=no
7565else
7566# -Kpthread, if available, provides the right #defines
7567# and linker options to make pthread_create available
7568# Some compilers won't report that they do not support -Kpthread,
7569# so we need to run a program to see whether it really made the
7570# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7572$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007573if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575else
7576 ac_save_cc="$CC"
7577CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007578if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579 ac_cv_kpthread=no
7580else
Matthias Kloseb9621712010-04-24 17:59:49 +00007581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582/* end confdefs.h. */
7583
Stefan Krah7dba5942012-11-22 22:49:11 +01007584#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585#include <pthread.h>
7586
7587void* routine(void* p){return NULL;}
7588
7589int main(){
7590 pthread_t p;
7591 if(pthread_create(&p,NULL,routine,NULL)!=0)
7592 return 1;
7593 (void)pthread_detach(p);
7594 return 0;
7595}
7596
7597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007598if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007599 ac_cv_kpthread=yes
7600else
Matthias Kloseb9621712010-04-24 17:59:49 +00007601 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605fi
7606
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007607CC="$ac_save_cc"
7608fi
7609
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7611$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007612fi
7613
7614if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7615then
7616# -Kthread, if available, provides the right #defines
7617# and linker options to make pthread_create available
7618# Some compilers won't report that they do not support -Kthread,
7619# so we need to run a program to see whether it really made the
7620# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7622$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625else
7626 ac_save_cc="$CC"
7627CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007628if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007629 ac_cv_kthread=no
7630else
Matthias Kloseb9621712010-04-24 17:59:49 +00007631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007632/* end confdefs.h. */
7633
Stefan Krah7dba5942012-11-22 22:49:11 +01007634#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635#include <pthread.h>
7636
7637void* routine(void* p){return NULL;}
7638
7639int main(){
7640 pthread_t p;
7641 if(pthread_create(&p,NULL,routine,NULL)!=0)
7642 return 1;
7643 (void)pthread_detach(p);
7644 return 0;
7645}
7646
7647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007648if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649 ac_cv_kthread=yes
7650else
Matthias Kloseb9621712010-04-24 17:59:49 +00007651 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007653rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7654 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007655fi
7656
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007657CC="$ac_save_cc"
7658fi
7659
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7661$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007662fi
7663
7664if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7665then
7666# -pthread, if available, provides the right #defines
7667# and linker options to make pthread_create available
7668# Some compilers won't report that they do not support -pthread,
7669# so we need to run a program to see whether it really made the
7670# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7672$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007673if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675else
7676 ac_save_cc="$CC"
7677CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007679 ac_cv_pthread=no
7680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007682/* end confdefs.h. */
7683
Stefan Krah7dba5942012-11-22 22:49:11 +01007684#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007685#include <pthread.h>
7686
7687void* routine(void* p){return NULL;}
7688
7689int main(){
7690 pthread_t p;
7691 if(pthread_create(&p,NULL,routine,NULL)!=0)
7692 return 1;
7693 (void)pthread_detach(p);
7694 return 0;
7695}
7696
7697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007698if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007699 ac_cv_pthread=yes
7700else
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007703rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7704 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705fi
7706
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007707CC="$ac_save_cc"
7708fi
7709
Matthias Kloseb9621712010-04-24 17:59:49 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7711$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007712fi
7713
7714# If we have set a CC compiler flag for thread support then
7715# check if it works for CXX, too.
7716ac_cv_cxx_thread=no
7717if test ! -z "$CXX"
7718then
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7720$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721ac_save_cxx="$CXX"
7722
7723if test "$ac_cv_kpthread" = "yes"
7724then
7725 CXX="$CXX -Kpthread"
7726 ac_cv_cxx_thread=yes
7727elif test "$ac_cv_kthread" = "yes"
7728then
7729 CXX="$CXX -Kthread"
7730 ac_cv_cxx_thread=yes
7731elif test "$ac_cv_pthread" = "yes"
7732then
7733 CXX="$CXX -pthread"
7734 ac_cv_cxx_thread=yes
7735fi
7736
7737if test $ac_cv_cxx_thread = yes
7738then
7739 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7740 $CXX -c conftest.$ac_ext 2>&5
7741 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7742 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7743 then
7744 ac_cv_cxx_thread=yes
7745 else
7746 ac_cv_cxx_thread=no
7747 fi
7748 rm -fr conftest*
7749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7751$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007752fi
7753CXX="$ac_save_cxx"
7754
7755
7756# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7758$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007759if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007760 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007761else
Matthias Kloseb9621712010-04-24 17:59:49 +00007762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763/* end confdefs.h. */
7764#include <stdlib.h>
7765#include <stdarg.h>
7766#include <string.h>
7767#include <float.h>
7768
7769int
7770main ()
7771{
7772
7773 ;
7774 return 0;
7775}
7776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007777if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007778 ac_cv_header_stdc=yes
7779else
Matthias Kloseb9621712010-04-24 17:59:49 +00007780 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7783
7784if test $ac_cv_header_stdc = yes; then
7785 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007787/* end confdefs.h. */
7788#include <string.h>
7789
7790_ACEOF
7791if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $EGREP "memchr" >/dev/null 2>&1; then :
7793
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007794else
7795 ac_cv_header_stdc=no
7796fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007797rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798
7799fi
7800
7801if test $ac_cv_header_stdc = yes; then
7802 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007804/* end confdefs.h. */
7805#include <stdlib.h>
7806
7807_ACEOF
7808if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 $EGREP "free" >/dev/null 2>&1; then :
7810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811else
7812 ac_cv_header_stdc=no
7813fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007814rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815
7816fi
7817
7818if test $ac_cv_header_stdc = yes; then
7819 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007821 :
7822else
Matthias Kloseb9621712010-04-24 17:59:49 +00007823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007824/* end confdefs.h. */
7825#include <ctype.h>
7826#include <stdlib.h>
7827#if ((' ' & 0x0FF) == 0x020)
7828# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7829# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7830#else
7831# define ISLOWER(c) \
7832 (('a' <= (c) && (c) <= 'i') \
7833 || ('j' <= (c) && (c) <= 'r') \
7834 || ('s' <= (c) && (c) <= 'z'))
7835# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7836#endif
7837
7838#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7839int
7840main ()
7841{
7842 int i;
7843 for (i = 0; i < 256; i++)
7844 if (XOR (islower (i), ISLOWER (i))
7845 || toupper (i) != TOUPPER (i))
7846 return 2;
7847 return 0;
7848}
7849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007850if ac_fn_c_try_run "$LINENO"; then :
7851
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007852else
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007855rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7856 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007857fi
7858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007859fi
7860fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7862$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863if test $ac_cv_header_stdc = yes; then
7864
Matthias Kloseb9621712010-04-24 17:59:49 +00007865$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007866
7867fi
7868
stratakise768c862018-01-23 16:11:24 +01007869for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007870fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007871ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007872sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007873utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007874poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007875sys/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 +01007876sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007877sys/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 +01007878sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007879sys/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 -07007880libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007881linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007882sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007883do :
7884 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7885ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007886if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007888#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007889_ACEOF
7890
7891fi
7892
Guido van Rossum627b2d71993-12-24 10:39:16 +00007893done
7894
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007895ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007896for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007897 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7899$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007900if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007901 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007902else
Matthias Kloseb9621712010-04-24 17:59:49 +00007903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007904/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007905#include <sys/types.h>
7906#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908int
7909main ()
7910{
7911if ((DIR *) 0)
7912return 0;
7913 ;
7914 return 0;
7915}
7916_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007917if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007919else
Matthias Kloseb9621712010-04-24 17:59:49 +00007920 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007924eval ac_res=\$$as_ac_Header
7925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7926$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007927if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007928 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007929#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007930_ACEOF
7931
7932ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007934
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007935done
7936# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7937if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7939$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007940if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007942else
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007947/* Override any GCC internal prototype to avoid an error.
7948 Use char because int might match the return type of a GCC
7949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007950#ifdef __cplusplus
7951extern "C"
7952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007953char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007954int
7955main ()
7956{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ;
7959 return 0;
7960}
7961_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007962for ac_lib in '' dir; do
7963 if test -z "$ac_lib"; then
7964 ac_res="none required"
7965 else
7966 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007967 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007969 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007972rm -f core conftest.err conftest.$ac_objext \
7973 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007974 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007977done
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980else
7981 ac_cv_search_opendir=no
7982fi
7983rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007984LIBS=$ac_func_search_save_LIBS
7985fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7987$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007990 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007991
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007992fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007993
Michael W. Hudson54241132001-12-07 15:38:26 +00007994else
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7996$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007997if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007999else
8000 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004/* Override any GCC internal prototype to avoid an error.
8005 Use char because int might match the return type of a GCC
8006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008007#ifdef __cplusplus
8008extern "C"
8009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008010char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008011int
8012main ()
8013{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ;
8016 return 0;
8017}
8018_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019for ac_lib in '' x; do
8020 if test -z "$ac_lib"; then
8021 ac_res="none required"
8022 else
8023 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008024 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008026 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008027 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008028fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008029rm -f core conftest.err conftest.$ac_objext \
8030 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008031 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008032 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034done
Victor Stinnere0be4232011-10-25 13:06:09 +02008035if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008036
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008037else
8038 ac_cv_search_opendir=no
8039fi
8040rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008041LIBS=$ac_func_search_save_LIBS
8042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8044$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008046if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008047 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049fi
8050
8051fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8054$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008059/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008060#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008061int
8062main ()
8063{
8064return makedev(0, 0);
8065 ;
8066 return 0;
8067}
8068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008070 ac_cv_header_sys_types_h_makedev=yes
8071else
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008073fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008074rm -f core conftest.err conftest.$ac_objext \
8075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008076
8077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8079$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008080
8081if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008082ac_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 +02008083if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008084
Matthias Kloseb9621712010-04-24 17:59:49 +00008085$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008086
8087fi
8088
8089
8090
8091 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 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 +02008093if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008094
Matthias Kloseb9621712010-04-24 17:59:49 +00008095$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008096
8097fi
8098
8099
8100 fi
8101fi
8102
Michael W. Hudson54241132001-12-07 15:38:26 +00008103
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008104# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8105# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8106SAVE_CFLAGS=$CFLAGS
8107CFLAGS="-std=c99 $CFLAGS"
8108for ac_header in bluetooth/bluetooth.h
8109do :
8110 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8111if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8112 cat >>confdefs.h <<_ACEOF
8113#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8114_ACEOF
8115
8116fi
8117
8118done
8119
8120CFLAGS=$SAVE_CFLAGS
8121
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008122# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8123for ac_header in net/if.h
8124do :
8125 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8126#ifdef STDC_HEADERS
8127# include <stdlib.h>
8128# include <stddef.h>
8129#else
8130# ifdef HAVE_STDLIB_H
8131# include <stdlib.h>
8132# endif
8133#endif
8134#ifdef HAVE_SYS_SOCKET_H
8135# include <sys/socket.h>
8136#endif
8137
8138"
Victor Stinnere0be4232011-10-25 13:06:09 +02008139if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008140 cat >>confdefs.h <<_ACEOF
8141#define HAVE_NET_IF_H 1
8142_ACEOF
8143
8144fi
8145
8146done
8147
8148
Martin v. Löwis11017b12006-01-14 18:12:57 +00008149# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008150for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008151do :
8152 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 +00008153#ifdef HAVE_ASM_TYPES_H
8154#include <asm/types.h>
8155#endif
8156#ifdef HAVE_SYS_SOCKET_H
8157#include <sys/socket.h>
8158#endif
8159
Matthias Kloseb9621712010-04-24 17:59:49 +00008160"
Victor Stinnere0be4232011-10-25 13:06:09 +02008161if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008162 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008163#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008164_ACEOF
8165
8166fi
8167
8168done
8169
8170
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008171# On Linux, qrtr.h requires asm/types.h
8172for ac_header in linux/qrtr.h
8173do :
8174 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8175#ifdef HAVE_ASM_TYPES_H
8176#include <asm/types.h>
8177#endif
8178#ifdef HAVE_SYS_SOCKET_H
8179#include <sys/socket.h>
8180#endif
8181
8182"
8183if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8184 cat >>confdefs.h <<_ACEOF
8185#define HAVE_LINUX_QRTR_H 1
8186_ACEOF
8187
8188fi
8189
8190done
8191
8192
caaveryeffc12f2017-09-06 18:18:10 -04008193for ac_header in linux/vm_sockets.h
8194do :
8195 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8196#ifdef HAVE_SYS_SOCKET_H
8197#include <sys/socket.h>
8198#endif
8199
8200"
8201if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8202 cat >>confdefs.h <<_ACEOF
8203#define HAVE_LINUX_VM_SOCKETS_H 1
8204_ACEOF
8205
8206fi
8207
8208done
8209
8210
Charles-François Natali47413c12011-10-06 19:47:44 +02008211# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008212for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008213do :
8214 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8215ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8216#ifdef HAVE_SYS_SOCKET_H
8217#include <sys/socket.h>
8218#endif
8219
8220"
8221if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8222 cat >>confdefs.h <<_ACEOF
8223#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8224_ACEOF
8225
8226fi
8227
8228done
8229
8230
Guido van Rossum627b2d71993-12-24 10:39:16 +00008231# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008232was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8234$as_echo_n "checking for clock_t in time.h... " >&6; }
8235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008236/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008237#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008238
8239_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008242 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008243else
Martin v. Löwis11437992002-04-12 09:54:03 +00008244
8245
Matthias Kloseb9621712010-04-24 17:59:49 +00008246$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008247
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008248
Guido van Rossum627b2d71993-12-24 10:39:16 +00008249fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008250rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008251
Matthias Kloseb9621712010-04-24 17:59:49 +00008252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8253$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008254
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8256$as_echo_n "checking for makedev... " >&6; }
8257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008258/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008259
Jesus Cea740f53a2010-04-28 11:35:30 +00008260#if defined(MAJOR_IN_MKDEV)
8261#include <sys/mkdev.h>
8262#elif defined(MAJOR_IN_SYSMACROS)
8263#include <sys/sysmacros.h>
8264#else
8265#include <sys/types.h>
8266#endif
8267
Neal Norwitz11690112002-07-30 01:08:28 +00008268int
8269main ()
8270{
Jesus Cea740f53a2010-04-28 11:35:30 +00008271
8272 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008273 ;
8274 return 0;
8275}
Matthias Kloseb159a552010-04-25 21:00:44 +00008276
Neal Norwitz11690112002-07-30 01:08:28 +00008277_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008278if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008279 ac_cv_has_makedev=yes
8280else
Matthias Kloseb9621712010-04-24 17:59:49 +00008281 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008283rm -f core conftest.err conftest.$ac_objext \
8284 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8286$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008287if test "$ac_cv_has_makedev" = "yes"; then
8288
Matthias Kloseb9621712010-04-24 17:59:49 +00008289$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008290
8291fi
8292
Christian Heimes985ecdc2013-11-20 11:46:18 +01008293# byte swapping
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8295$as_echo_n "checking for le64toh... " >&6; }
8296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8297/* end confdefs.h. */
8298
8299#ifdef HAVE_ENDIAN_H
8300#include <endian.h>
8301#elif defined(HAVE_SYS_ENDIAN_H)
8302#include <sys/endian.h>
8303#endif
8304
8305int
8306main ()
8307{
8308
8309 le64toh(1)
8310 ;
8311 return 0;
8312}
8313
8314_ACEOF
8315if ac_fn_c_try_link "$LINENO"; then :
8316 ac_cv_has_le64toh=yes
8317else
8318 ac_cv_has_le64toh=no
8319fi
8320rm -f core conftest.err conftest.$ac_objext \
8321 conftest$ac_exeext conftest.$ac_ext
8322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8323$as_echo "$ac_cv_has_le64toh" >&6; }
8324if test "$ac_cv_has_le64toh" = "yes"; then
8325
8326$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8327
8328fi
8329
Martin v. Löwis399a6892002-10-04 10:22:02 +00008330use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008331# Don't use largefile support for GNU/Hurd
8332case $ac_sys_system in GNU*)
8333 use_lfs=no
8334esac
8335
Martin v. Löwis399a6892002-10-04 10:22:02 +00008336if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008337# Two defines needed to enable largefile support on various platforms
8338# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008339case $ac_sys_system/$ac_sys_release in
8340AIX*)
8341
8342$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8343
8344 ;;
8345esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008346
Matthias Kloseb9621712010-04-24 17:59:49 +00008347$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008348
8349
Matthias Kloseb9621712010-04-24 17:59:49 +00008350$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008351
Martin v. Löwis399a6892002-10-04 10:22:02 +00008352fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008353
Guido van Rossum84e7b241996-08-19 21:59:00 +00008354# Add some code to confdefs.h so that the test for off_t works on SCO
8355cat >> confdefs.h <<\EOF
8356#if defined(SCO_DS)
8357#undef _OFF_T
8358#endif
8359EOF
8360
Guido van Rossumef2255b2000-03-10 22:30:29 +00008361# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008362ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008363if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008364
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008365else
Martin v. Löwis11437992002-04-12 09:54:03 +00008366
8367cat >>confdefs.h <<_ACEOF
8368#define mode_t int
8369_ACEOF
8370
8371fi
8372
Matthias Kloseb9621712010-04-24 17:59:49 +00008373ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008375
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008376else
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
8378cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008379#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008380_ACEOF
8381
8382fi
8383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008385if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008387else
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
8389cat >>confdefs.h <<_ACEOF
8390#define pid_t int
8391_ACEOF
8392
8393fi
8394
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008395
Martin v. Löwis11437992002-04-12 09:54:03 +00008396cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008397#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008398_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008399
Matthias Kloseb9621712010-04-24 17:59:49 +00008400ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008401if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008402
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008403else
Martin v. Löwis11437992002-04-12 09:54:03 +00008404
8405cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008407_ACEOF
8408
8409fi
8410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8412$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008413if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008415else
Matthias Kloseb9621712010-04-24 17:59:49 +00008416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008417/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008418#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008419
8420_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008422 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423 ac_cv_type_uid_t=yes
8424else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008425 ac_cv_type_uid_t=no
8426fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008427rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008428
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008429fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8431$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008432if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008433
Matthias Kloseb9621712010-04-24 17:59:49 +00008434$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008435
8436
Matthias Kloseb9621712010-04-24 17:59:49 +00008437$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008438
8439fi
8440
Mark Dickinson983bc162012-12-02 12:11:38 +00008441
Matthias Kloseb9621712010-04-24 17:59:49 +00008442ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008443if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008446
8447fi
8448
Stefan Krah1919b7e2012-03-21 18:25:23 +01008449ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8450if test "x$ac_cv_type___uint128_t" = xyes; then :
8451
8452$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8453
8454fi
8455
Jack Jansendd19cf82001-12-06 22:36:17 +00008456
Michael W. Hudson54241132001-12-07 15:38:26 +00008457# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008458# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008459# The cast to long int works around a bug in the HP C Compiler
8460# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8461# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8462# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8464$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008465if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008466 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008467else
Matthias Kloseb9621712010-04-24 17:59:49 +00008468 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 +00008469
Martin v. Löwis11437992002-04-12 09:54:03 +00008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 if test "$ac_cv_type_int" = yes; then
8472 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8473$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008474as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008475See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008476 else
8477 ac_cv_sizeof_int=0
8478 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8483$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484
8485
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008488#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008489_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008490
8491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492# The cast to long int works around a bug in the HP C Compiler
8493# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8494# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8495# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8497$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008498if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008499 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008500else
Matthias Kloseb9621712010-04-24 17:59:49 +00008501 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 +00008502
Martin v. Löwis11437992002-04-12 09:54:03 +00008503else
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 if test "$ac_cv_type_long" = yes; then
8505 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008507as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008508See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 else
8510 ac_cv_sizeof_long=0
8511 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8516$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517
8518
8519
Martin v. Löwis11437992002-04-12 09:54:03 +00008520cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008521#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008522_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008523
8524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525# The cast to long int works around a bug in the HP C Compiler
8526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8528# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8530$as_echo_n "checking size of long long... " >&6; }
8531if ${ac_cv_sizeof_long_long+:} false; then :
8532 $as_echo_n "(cached) " >&6
8533else
8534 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8535
8536else
8537 if test "$ac_cv_type_long_long" = yes; then
8538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8540as_fn_error 77 "cannot compute sizeof (long long)
8541See \`config.log' for more details" "$LINENO" 5; }
8542 else
8543 ac_cv_sizeof_long_long=0
8544 fi
8545fi
8546
8547fi
8548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8549$as_echo "$ac_cv_sizeof_long_long" >&6; }
8550
8551
8552
8553cat >>confdefs.h <<_ACEOF
8554#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8555_ACEOF
8556
8557
8558# The cast to long int works around a bug in the HP C Compiler
8559# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8560# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8561# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8563$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008564if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008565 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008566else
Matthias Kloseb9621712010-04-24 17:59:49 +00008567 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 +00008568
Martin v. Löwis11437992002-04-12 09:54:03 +00008569else
Matthias Kloseb9621712010-04-24 17:59:49 +00008570 if test "$ac_cv_type_void_p" = yes; then
8571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008573as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008574See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575 else
8576 ac_cv_sizeof_void_p=0
8577 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8582$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008583
8584
8585
Martin v. Löwis11437992002-04-12 09:54:03 +00008586cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008587#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008588_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008589
8590
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008591# The cast to long int works around a bug in the HP C Compiler
8592# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8593# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8594# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8596$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008597if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008598 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008599else
Matthias Kloseb9621712010-04-24 17:59:49 +00008600 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 +00008601
Martin v. Löwis11437992002-04-12 09:54:03 +00008602else
Matthias Kloseb9621712010-04-24 17:59:49 +00008603 if test "$ac_cv_type_short" = yes; then
8604 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008606as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008607See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608 else
8609 ac_cv_sizeof_short=0
8610 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8615$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008616
8617
8618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008620#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008621_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008622
8623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624# The cast to long int works around a bug in the HP C Compiler
8625# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8626# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8627# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8629$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008630if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008631 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008632else
Matthias Kloseb9621712010-04-24 17:59:49 +00008633 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 +00008634
Martin v. Löwis11437992002-04-12 09:54:03 +00008635else
Matthias Kloseb9621712010-04-24 17:59:49 +00008636 if test "$ac_cv_type_float" = yes; then
8637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008639as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008640See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 else
8642 ac_cv_sizeof_float=0
8643 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008644fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8648$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649
8650
8651
Martin v. Löwis11437992002-04-12 09:54:03 +00008652cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008653#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008654_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008655
8656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657# The cast to long int works around a bug in the HP C Compiler
8658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8660# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8662$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 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 +00008667
Martin v. Löwis11437992002-04-12 09:54:03 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 if test "$ac_cv_type_double" = yes; then
8670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008672as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008673See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674 else
8675 ac_cv_sizeof_double=0
8676 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8681$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682
8683
8684
Martin v. Löwis11437992002-04-12 09:54:03 +00008685cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008686#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008687_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008688
8689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008690# The cast to long int works around a bug in the HP C Compiler
8691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8693# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8695$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008696if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008698else
Matthias Kloseb9621712010-04-24 17:59:49 +00008699 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 +00008700
Martin v. Löwis11437992002-04-12 09:54:03 +00008701else
Matthias Kloseb9621712010-04-24 17:59:49 +00008702 if test "$ac_cv_type_fpos_t" = yes; then
8703 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8704$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008705as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008706See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008707 else
8708 ac_cv_sizeof_fpos_t=0
8709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8714$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715
8716
8717
Martin v. Löwis11437992002-04-12 09:54:03 +00008718cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008719#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008720_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008721
Michael W. Hudson54241132001-12-07 15:38:26 +00008722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008723# The cast to long int works around a bug in the HP C Compiler
8724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8726# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8728$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008729if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008731else
Matthias Kloseb9621712010-04-24 17:59:49 +00008732 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 +00008733
Martin v. Löwis18e16552006-02-15 17:27:45 +00008734else
Matthias Kloseb9621712010-04-24 17:59:49 +00008735 if test "$ac_cv_type_size_t" = yes; then
8736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008738as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008739See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740 else
8741 ac_cv_sizeof_size_t=0
8742 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008744
Martin v. Löwis18e16552006-02-15 17:27:45 +00008745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8747$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748
8749
8750
Martin v. Löwis18e16552006-02-15 17:27:45 +00008751cat >>confdefs.h <<_ACEOF
8752#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8753_ACEOF
8754
8755
Christian Heimes400adb02008-02-01 08:12:03 +00008756# The cast to long int works around a bug in the HP C Compiler
8757# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8758# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8759# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8761$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008762if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008763 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008764else
Matthias Kloseb9621712010-04-24 17:59:49 +00008765 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 +00008766
Christian Heimes400adb02008-02-01 08:12:03 +00008767else
Matthias Kloseb9621712010-04-24 17:59:49 +00008768 if test "$ac_cv_type_pid_t" = yes; then
8769 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8770$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008771as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008772See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008773 else
8774 ac_cv_sizeof_pid_t=0
8775 fi
8776fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008777
Christian Heimes400adb02008-02-01 08:12:03 +00008778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8780$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008781
8782
8783
8784cat >>confdefs.h <<_ACEOF
8785#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8786_ACEOF
8787
8788
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008789# The cast to long int works around a bug in the HP C Compiler
8790# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8791# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8792# This bug is HP SR number 8606223364.
8793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8794$as_echo_n "checking size of uintptr_t... " >&6; }
8795if ${ac_cv_sizeof_uintptr_t+:} false; then :
8796 $as_echo_n "(cached) " >&6
8797else
8798 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8799
8800else
8801 if test "$ac_cv_type_uintptr_t" = yes; then
8802 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8803$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8804as_fn_error 77 "cannot compute sizeof (uintptr_t)
8805See \`config.log' for more details" "$LINENO" 5; }
8806 else
8807 ac_cv_sizeof_uintptr_t=0
8808 fi
8809fi
8810
8811fi
8812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8813$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8814
8815
8816
8817cat >>confdefs.h <<_ACEOF
8818#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8819_ACEOF
8820
8821
Michael W. Hudson54241132001-12-07 15:38:26 +00008822
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008823
Eitan Adler3055c942018-05-15 22:58:09 -07008824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8825$as_echo_n "checking for long double... " >&6; }
8826if ${ac_cv_type_long_double+:} false; then :
8827 $as_echo_n "(cached) " >&6
8828else
8829 if test "$GCC" = yes; then
8830 ac_cv_type_long_double=yes
8831 else
8832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8833/* end confdefs.h. */
8834/* The Stardent Vistra knows sizeof (long double), but does
8835 not support it. */
8836 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008837int
8838main ()
8839{
Eitan Adler3055c942018-05-15 22:58:09 -07008840static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8841 sizeof (double) <= sizeof (long double))];
8842test_array [0] = 0;
8843return test_array [0];
8844
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008845 ;
8846 return 0;
8847}
8848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008849if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008850 ac_cv_type_long_double=yes
8851else
8852 ac_cv_type_long_double=no
8853fi
8854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8855 fi
8856fi
8857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8858$as_echo "$ac_cv_type_long_double" >&6; }
8859 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008860
Matthias Kloseb9621712010-04-24 17:59:49 +00008861$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008862
Eitan Adler3055c942018-05-15 22:58:09 -07008863 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008864
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008865# The cast to long int works around a bug in the HP C Compiler
8866# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8867# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8868# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8870$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008871if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008872 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873else
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 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 +00008875
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008876else
Matthias Kloseb9621712010-04-24 17:59:49 +00008877 if test "$ac_cv_type_long_double" = yes; then
8878 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8879$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008880as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008881See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008882 else
8883 ac_cv_sizeof_long_double=0
8884 fi
8885fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008886
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8889$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008890
8891
8892
8893cat >>confdefs.h <<_ACEOF
8894#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8895_ACEOF
8896
8897
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899# The cast to long int works around a bug in the HP C Compiler
8900# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8901# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8902# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8904$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008905if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008907else
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 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 +00008909
Thomas Woutersb2137042007-02-01 18:02:27 +00008910else
Matthias Kloseb9621712010-04-24 17:59:49 +00008911 if test "$ac_cv_type__Bool" = yes; then
8912 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008914as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008915See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008916 else
8917 ac_cv_sizeof__Bool=0
8918 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920
Thomas Woutersb2137042007-02-01 18:02:27 +00008921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8923$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924
8925
8926
Thomas Woutersb2137042007-02-01 18:02:27 +00008927cat >>confdefs.h <<_ACEOF
8928#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8929_ACEOF
8930
8931
Thomas Woutersb2137042007-02-01 18:02:27 +00008932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008933# The cast to long int works around a bug in the HP C Compiler
8934# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8935# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8936# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8938$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008939if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008941else
Matthias Kloseb9621712010-04-24 17:59:49 +00008942 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008943#ifdef HAVE_SYS_TYPES_H
8944#include <sys/types.h>
8945#endif
8946
Matthias Kloseb9621712010-04-24 17:59:49 +00008947"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008948
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008949else
Matthias Kloseb9621712010-04-24 17:59:49 +00008950 if test "$ac_cv_type_off_t" = yes; then
8951 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8952$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008953as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008954See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008955 else
8956 ac_cv_sizeof_off_t=0
8957 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008959
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008960fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8962$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008963
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008964
8965
Martin v. Löwis11437992002-04-12 09:54:03 +00008966cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008967#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008968_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008969
Michael W. Hudson54241132001-12-07 15:38:26 +00008970
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008971
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8973$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008974if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008975 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008976
Matthias Kloseb9621712010-04-24 17:59:49 +00008977$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8980$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8983$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008984fi
8985
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008986# The cast to long int works around a bug in the HP C Compiler
8987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8989# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8991$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008992if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008994else
Matthias Kloseb9621712010-04-24 17:59:49 +00008995 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996#ifdef HAVE_SYS_TYPES_H
8997#include <sys/types.h>
8998#endif
8999#ifdef HAVE_TIME_H
9000#include <time.h>
9001#endif
9002
Matthias Kloseb9621712010-04-24 17:59:49 +00009003"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009004
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005else
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 if test "$ac_cv_type_time_t" = yes; then
9007 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009009as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009010See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009011 else
9012 ac_cv_sizeof_time_t=0
9013 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009015
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009016fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9018$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009019
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009020
9021
Martin v. Löwis11437992002-04-12 09:54:03 +00009022cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009023#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009024_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009025
Michael W. Hudson54241132001-12-07 15:38:26 +00009026
9027
Trent Mick635f6fb2000-08-23 21:33:05 +00009028# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009029ac_save_cc="$CC"
9030if test "$ac_cv_kpthread" = "yes"
9031then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009032elif test "$ac_cv_kthread" = "yes"
9033then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009034elif test "$ac_cv_pthread" = "yes"
9035then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009036fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009037
Matthias Kloseb9621712010-04-24 17:59:49 +00009038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9039$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009040have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009042/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009043
9044 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009045int
9046main ()
9047{
Guido van Rossum12580492000-09-24 16:47:19 +00009048pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 ;
9050 return 0;
9051}
Matthias Kloseb159a552010-04-25 21:00:44 +00009052
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009054if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009055 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9059$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009060if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009061 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9064# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9066$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009067if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009068 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009069else
Matthias Kloseb9621712010-04-24 17:59:49 +00009070 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009071#ifdef HAVE_PTHREAD_H
9072#include <pthread.h>
9073#endif
9074
Matthias Kloseb9621712010-04-24 17:59:49 +00009075"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009076
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009077else
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 if test "$ac_cv_type_pthread_t" = yes; then
9079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009081as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009082See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009083 else
9084 ac_cv_sizeof_pthread_t=0
9085 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009087
Trent Mick635f6fb2000-08-23 21:33:05 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9090$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009091
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009092
9093
Martin v. Löwis11437992002-04-12 09:54:03 +00009094cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009095#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009096_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098
Trent Mick635f6fb2000-08-23 21:33:05 +00009099fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009100
9101# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9102# This checking will be unnecessary after removing deprecated TLS API.
9103# The cast to long int works around a bug in the HP C Compiler
9104# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9105# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9106# This bug is HP SR number 8606223364.
9107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9108$as_echo_n "checking size of pthread_key_t... " >&6; }
9109if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9110 $as_echo_n "(cached) " >&6
9111else
9112 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9113"; then :
9114
9115else
9116 if test "$ac_cv_type_pthread_key_t" = yes; then
9117 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9118$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9119as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9120See \`config.log' for more details" "$LINENO" 5; }
9121 else
9122 ac_cv_sizeof_pthread_key_t=0
9123 fi
9124fi
9125
9126fi
9127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9128$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9129
9130
9131
9132cat >>confdefs.h <<_ACEOF
9133#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9134_ACEOF
9135
9136
9137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9138$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9139if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9141/* end confdefs.h. */
9142#include <pthread.h>
9143int
9144main ()
9145{
9146pthread_key_t k; k * 1;
9147 ;
9148 return 0;
9149}
9150_ACEOF
9151if ac_fn_c_try_compile "$LINENO"; then :
9152 ac_pthread_key_t_is_arithmetic_type=yes
9153else
9154 ac_pthread_key_t_is_arithmetic_type=no
9155
9156fi
9157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9159$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9160 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9161
9162$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9163
9164 fi
9165else
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9167$as_echo "no" >&6; }
9168fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009169CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009170
Michael W. Hudson54241132001-12-07 15:38:26 +00009171
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009172case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009173 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009174 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9175 ;;
9176 Darwin/*)
9177 OTHER_LIBTOOL_OPT=""
9178 ;;
9179esac
9180
9181
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009182
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009183case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009184 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009185 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9186 if test "${enable_universalsdk}"; then
9187 :
9188 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009189 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009190 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009191 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009192 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009193 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009194 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009195 if test ${gcc_version} '<' 4.0
9196 then
9197 LIBTOOL_CRUFT="-lcc_dynamic"
9198 else
9199 LIBTOOL_CRUFT=""
9200 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009201 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009202 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009203else
Matthias Kloseb9621712010-04-24 17:59:49 +00009204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009205/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009206
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009207 #include <unistd.h>
9208 int main(int argc, char*argv[])
9209 {
9210 if (sizeof(long) == 4) {
9211 return 0;
9212 } else {
9213 return 1;
9214 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009215 }
9216
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009218if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009219 ac_osx_32bit=yes
9220else
Matthias Kloseb9621712010-04-24 17:59:49 +00009221 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009225fi
9226
9227
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009229 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230 i386)
9231 MACOSX_DEFAULT_ARCH="i386"
9232 ;;
9233 ppc)
9234 MACOSX_DEFAULT_ARCH="ppc"
9235 ;;
9236 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009237 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009238 ;;
9239 esac
9240 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009241 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009242 i386)
9243 MACOSX_DEFAULT_ARCH="x86_64"
9244 ;;
9245 ppc)
9246 MACOSX_DEFAULT_ARCH="ppc64"
9247 ;;
9248 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009249 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009250 ;;
9251 esac
9252
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253 fi
9254
9255 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009256 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009257 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009258esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9260$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009261if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009262then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009263 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009264 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009265 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009266
Matthias Kloseb9621712010-04-24 17:59:49 +00009267$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009268
Matthias Kloseb9621712010-04-24 17:59:49 +00009269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9270$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009271 if test $enable_shared = "yes"
9272 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009273 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 +00009274 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009275else
Matthias Kloseb9621712010-04-24 17:59:49 +00009276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9277$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009278fi
9279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9281$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009282case $ac_sys_system/$ac_sys_release in
9283 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009286
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9288$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009289 ;;
9290 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9292$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009293 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009294esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009297
Michael W. Hudson54241132001-12-07 15:38:26 +00009298
9299
9300
9301
Benjamin Peterson99f03762010-04-11 22:15:28 +00009302
Thomas Wouters477c8d52006-05-27 19:21:47 +00009303
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009304# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9305# -- usually .so, .sl on HP-UX, .dll on Cygwin
9306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9307$as_echo_n "checking the extension of shared libraries... " >&6; }
9308if test -z "$SHLIB_SUFFIX"; then
9309 case $ac_sys_system in
9310 hp*|HP*)
9311 case `uname -m` in
9312 ia64) SHLIB_SUFFIX=.so;;
9313 *) SHLIB_SUFFIX=.sl;;
9314 esac
9315 ;;
9316 CYGWIN*) SHLIB_SUFFIX=.dll;;
9317 *) SHLIB_SUFFIX=.so;;
9318 esac
9319fi
9320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9321$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009322
Guido van Rossum0a516c91994-09-12 10:58:40 +00009323# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009324# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009325# (Shared libraries in this instance are shared modules to be loaded into
9326# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9328$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009329if test -z "$LDSHARED"
9330then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009331 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009332 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009333 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009334 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009335 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009336 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009337 if test "$GCC" = "yes" ; then
9338 LDSHARED='$(CC) -shared'
9339 LDCXXSHARED='$(CXX) -shared'
9340 else
9341 LDSHARED='$(CC) -G'
9342 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009343 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009344 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009345 if test "$GCC" = "yes" ; then
9346 LDSHARED='$(CC) -shared'
9347 LDCXXSHARED='$(CXX) -shared'
9348 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009349 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009350 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009351 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009352 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009353 LDSHARED='$(CC) -bundle'
9354 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009355 if test "$enable_framework" ; then
9356 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009357 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9358 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009359 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009360 else
9361 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009362 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009363 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009364 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009365 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009366 LDSHARED='$(CC) -bundle'
9367 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009368 if test "$enable_framework" ; then
9369 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009370 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9371 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009372 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009373 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009374 # No framework, use the Python app as bundle-loader
9375 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009376 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009377 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009378 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009379 Darwin/*)
9380 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9381 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009382
Ned Deily36820b62014-06-25 13:44:22 -07009383 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9384 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9385 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9386 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9387 if test ${dep_target_major} -eq 10 && \
9388 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009389 then
Ned Deily36820b62014-06-25 13:44:22 -07009390 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009391 LDSHARED='$(CC) -bundle'
9392 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009393 if test "$enable_framework" ; then
9394 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009395 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9396 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009397 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009398 else
9399 # No framework, use the Python app as bundle-loader
9400 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9401 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009402 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009403 fi
Ned Deily36820b62014-06-25 13:44:22 -07009404 else
9405 # building for OS X 10.3 and later
9406 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9407 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9408 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009409 fi
9410 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009411 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009412 LDSHARED='$(CC) -shared'
9413 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009414 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009415 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009416 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009417 LDSHARED='$(CC) -shared'
9418 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009419 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009420 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009421 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009422 OpenBSD*)
9423 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9424 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009425 LDSHARED='$(CC) -shared $(CCSHARED)'
9426 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009427 else
9428 case `uname -r` in
9429 [01].* | 2.[0-7] | 2.[0-7].*)
9430 LDSHARED="ld -Bshareable ${LDFLAGS}"
9431 ;;
9432 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009433 LDSHARED='$(CC) -shared $(CCSHARED)'
9434 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009435 ;;
9436 esac
9437 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009438 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009439 LDSHARED='$(CC) -shared'
9440 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009441 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009442 if test "$GCC" = "yes" ; then
9443 LDSHARED='$(CC) -shared'
9444 LDCXXSHARED='$(CXX) -shared'
9445 else
9446 LDSHARED='$(CC) -G'
9447 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009448 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009449 SCO_SV*)
9450 LDSHARED='$(CC) -Wl,-G,-Bexport'
9451 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9452 CYGWIN*)
9453 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9454 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009455 *) LDSHARED="ld";;
9456 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9459$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009460LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009461BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009462# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009463# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9465$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466if test -z "$CCSHARED"
9467then
Guido van Rossum07397971997-04-29 21:49:50 +00009468 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009469 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009470 then CCSHARED="-fPIC";
9471 elif test `uname -p` = sparc;
9472 then CCSHARED="-xcode=pic32";
9473 else CCSHARED="-Kpic";
9474 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009475 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009476 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009477 else CCSHARED="+z";
9478 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009479 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009480 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009481 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009482 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009483 if test "$GCC" = "yes"
9484 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009485 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009486 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009487 SCO_SV*)
9488 if test "$GCC" = "yes"
9489 then CCSHARED="-fPIC"
9490 else CCSHARED="-Kpic -belf"
9491 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009492 VxWorks*)
9493 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009494 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9497$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009498# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009499# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9501$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009502if test -z "$LINKFORSHARED"
9503then
Guido van Rossum07397971997-04-29 21:49:50 +00009504 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009505 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009506 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009507 LINKFORSHARED="-Wl,-E -Wl,+s";;
9508# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009509 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009510 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009511 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009513 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009514
9515 # Issue #18075: the default maximum stack size (8MBytes) is too
9516 # small for the default recursion limit. Increase the stack size
9517 # to ensure that tests don't crash
9518 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9519
Jack Jansene578a632001-08-15 01:27:14 +00009520 if test "$enable_framework"
9521 then
Jack Jansenda49e192005-01-07 13:08:22 +00009522 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009523 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009524 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009525 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009526 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009527 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009528 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009529 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9530 then
9531 LINKFORSHARED="-Wl,--export-dynamic"
9532 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009533 SunOS/5*) case $CC in
9534 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009535 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009536 then
9537 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009538 fi;;
9539 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009540 CYGWIN*)
9541 if test $enable_shared = "no"
9542 then
9543 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9544 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009545 QNX*)
9546 # -Wl,-E causes the symbols to be added to the dynamic
9547 # symbol table so that they can be found when a module
9548 # is loaded. -N 2048K causes the stack size to be set
9549 # to 2048 kilobytes so that the stack doesn't overflow
9550 # when running test_compile.py.
9551 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009552 VxWorks*)
9553 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009555fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9557$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009558
Michael W. Hudson54241132001-12-07 15:38:26 +00009559
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009560
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9562$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009563if test ! "$LIBRARY" = "$LDLIBRARY"
9564then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009565 case $ac_sys_system in
9566 CYGWIN*)
9567 # Cygwin needs CCSHARED when building extension DLLs
9568 # but not when building the interpreter DLL.
9569 CFLAGSFORSHARED='';;
9570 *)
9571 CFLAGSFORSHARED='$(CCSHARED)'
9572 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9575$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009576
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009577# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9578# library (with --enable-shared).
9579# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009580# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9581# if it is not required, since it creates a dependency of the shared library
9582# to LIBS. This, in turn, means that applications linking the shared libpython
9583# don't need to link LIBS explicitly. The default should be only changed
9584# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009585
Matthias Kloseb9621712010-04-24 17:59:49 +00009586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9587$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009588case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009589 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009590 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009591esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9593$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009594
9595
Guido van Rossum627b2d71993-12-24 10:39:16 +00009596# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9598$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009599if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009600 $as_echo_n "(cached) " >&6
9601else
9602 ac_check_lib_save_LIBS=$LIBS
9603LIBS="-lsendfile $LIBS"
9604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9605/* end confdefs.h. */
9606
9607/* Override any GCC internal prototype to avoid an error.
9608 Use char because int might match the return type of a GCC
9609 builtin and then its argument prototype would still apply. */
9610#ifdef __cplusplus
9611extern "C"
9612#endif
9613char sendfile ();
9614int
9615main ()
9616{
9617return sendfile ();
9618 ;
9619 return 0;
9620}
9621_ACEOF
9622if ac_fn_c_try_link "$LINENO"; then :
9623 ac_cv_lib_sendfile_sendfile=yes
9624else
9625 ac_cv_lib_sendfile_sendfile=no
9626fi
9627rm -f core conftest.err conftest.$ac_objext \
9628 conftest$ac_exeext conftest.$ac_ext
9629LIBS=$ac_check_lib_save_LIBS
9630fi
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9632$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009633if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009634 cat >>confdefs.h <<_ACEOF
9635#define HAVE_LIBSENDFILE 1
9636_ACEOF
9637
9638 LIBS="-lsendfile $LIBS"
9639
9640fi
9641
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9643$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009646else
Martin v. Löwis11437992002-04-12 09:54:03 +00009647 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009648LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652/* Override any GCC internal prototype to avoid an error.
9653 Use char because int might match the return type of a GCC
9654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009655#ifdef __cplusplus
9656extern "C"
9657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009658char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009659int
9660main ()
9661{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009662return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009663 ;
9664 return 0;
9665}
9666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009667if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009669else
Matthias Kloseb9621712010-04-24 17:59:49 +00009670 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009672rm -f core conftest.err conftest.$ac_objext \
9673 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009674LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9677$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009678if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 cat >>confdefs.h <<_ACEOF
9680#define HAVE_LIBDL 1
9681_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009683 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009684
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009685fi
9686 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9688$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009689if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009690 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009691else
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009693LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697/* Override any GCC internal prototype to avoid an error.
9698 Use char because int might match the return type of a GCC
9699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009700#ifdef __cplusplus
9701extern "C"
9702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009703char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704int
9705main ()
9706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009707return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 ;
9709 return 0;
9710}
9711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714else
Matthias Kloseb9621712010-04-24 17:59:49 +00009715 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717rm -f core conftest.err conftest.$ac_objext \
9718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009719LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009720fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9722$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009723if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 cat >>confdefs.h <<_ACEOF
9725#define HAVE_LIBDLD 1
9726_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009727
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009728 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009729
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009730fi
9731 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009732
Michael Felt0d3ccb42017-12-30 22:39:20 +01009733# checks for uuid.h location
9734for ac_header in uuid/uuid.h uuid.h
9735do :
9736 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9737ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9738if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9739 cat >>confdefs.h <<_ACEOF
9740#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9741_ACEOF
9742
9743fi
9744
9745done
9746
9747
Berker Peksag9a10ff42017-11-08 23:09:16 +03009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9749$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9751/* end confdefs.h. */
9752#include <uuid/uuid.h>
9753int
9754main ()
9755{
9756
9757#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009758void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009759#endif
9760
9761 ;
9762 return 0;
9763}
9764_ACEOF
9765if ac_fn_c_try_compile "$LINENO"; then :
9766
9767$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9768
9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9770$as_echo "yes" >&6; }
9771else
9772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9773$as_echo "no" >&6; }
9774
9775fi
9776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9777
Michael Felt0d3ccb42017-12-30 22:39:20 +01009778# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009779# FreeBSD and OpenBSD provides support as well
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9781$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783/* end confdefs.h. */
9784#include <uuid.h>
9785int
9786main ()
9787{
9788
9789#ifndef uuid_create
9790void *x = uuid_create
9791#endif
9792
9793 ;
9794 return 0;
9795}
9796_ACEOF
9797if ac_fn_c_try_compile "$LINENO"; then :
9798
9799$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9800
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9802$as_echo "yes" >&6; }
9803else
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9805$as_echo "no" >&6; }
9806
9807fi
9808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9809
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009810# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9811# stream in big-endian byte-order
9812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9813$as_echo_n "checking for uuid_enc_be... " >&6; }
9814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9815/* end confdefs.h. */
9816#include <uuid.h>
9817int
9818main ()
9819{
9820
9821#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009822void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009823#endif
9824
9825 ;
9826 return 0;
9827}
9828_ACEOF
9829if ac_fn_c_try_compile "$LINENO"; then :
9830
9831$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9832
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9834$as_echo "yes" >&6; }
9835else
9836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9837$as_echo "no" >&6; }
9838
9839fi
9840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9841
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009842# 'Real Time' functions on Solaris
9843# posix4 on Solaris 2.6
9844# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009846$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009847if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009849else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009850 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854/* Override any GCC internal prototype to avoid an error.
9855 Use char because int might match the return type of a GCC
9856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009857#ifdef __cplusplus
9858extern "C"
9859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009860char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009861int
9862main ()
9863{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009865 ;
9866 return 0;
9867}
9868_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869for ac_lib in '' pthread rt posix4; do
9870 if test -z "$ac_lib"; then
9871 ac_res="none required"
9872 else
9873 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009874 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009875 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009876 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009878fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009879rm -f core conftest.err conftest.$ac_objext \
9880 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009881 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009884done
Victor Stinnere0be4232011-10-25 13:06:09 +02009885if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887else
9888 ac_cv_search_sem_init=no
9889fi
9890rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009891LIBS=$ac_func_search_save_LIBS
9892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9894$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009896if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009898
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009899fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009900
Martin v. Löwis519adae2003-09-20 10:47:47 +00009901
Martin v. Löwis19d17342003-06-14 21:03:05 +00009902# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9904$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009905if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009906 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907else
9908 ac_check_lib_save_LIBS=$LIBS
9909LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009911/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913/* Override any GCC internal prototype to avoid an error.
9914 Use char because int might match the return type of a GCC
9915 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009916#ifdef __cplusplus
9917extern "C"
9918#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009919char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009920int
9921main ()
9922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009924 ;
9925 return 0;
9926}
9927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009928if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009929 ac_cv_lib_intl_textdomain=yes
9930else
Matthias Kloseb9621712010-04-24 17:59:49 +00009931 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009933rm -f core conftest.err conftest.$ac_objext \
9934 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935LIBS=$ac_check_lib_save_LIBS
9936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9938$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009939if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940
Matthias Kloseb9621712010-04-24 17:59:49 +00009941$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009942
Brett Cannonc6d936e2009-06-07 20:09:53 +00009943 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009944fi
9945
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009946
9947# checks for system dependent C++ extensions support
9948case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009949 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9950$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009952/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009953
Georg Brandl59e87bd2011-02-15 19:48:59 +00009954 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009955int
9956main ()
9957{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009958loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 ;
9960 return 0;
9961}
Matthias Kloseb159a552010-04-25 21:00:44 +00009962
Martin v. Löwis11437992002-04-12 09:54:03 +00009963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009964if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009965
Matthias Kloseb159a552010-04-25 21:00:44 +00009966
Matthias Kloseb9621712010-04-24 17:59:49 +00009967$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009968
Matthias Kloseb159a552010-04-25 21:00:44 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009970$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009971
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009972else
Matthias Kloseb159a552010-04-25 21:00:44 +00009973
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009976
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009977fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009980 *) ;;
9981esac
9982
Christian Heimes985ecdc2013-11-20 11:46:18 +01009983# check for systems that require aligned memory access
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9985$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009986if ${ac_cv_aligned_required+:} false; then :
9987 $as_echo_n "(cached) " >&6
9988else
9989 if test "$cross_compiling" = yes; then :
9990 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009991else
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9993/* end confdefs.h. */
9994
9995int main()
9996{
9997 char s[16];
9998 int i, *p1, *p2;
9999 for (i=0; i < 16; i++)
10000 s[i] = i;
10001 p1 = (int*)(s+1);
10002 p2 = (int*)(s+2);
10003 if (*p1 == *p2)
10004 return 1;
10005 return 0;
10006}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010007_ACEOF
10008if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010009 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010010else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010011 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012fi
10013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10014 conftest.$ac_objext conftest.beam conftest.$ac_ext
10015fi
10016
10017
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010018fi
10019
10020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10021$as_echo "$ac_cv_aligned_required" >&6; }
10022if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010023
10024$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10025
10026fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010027
10028# str, bytes and memoryview hash algorithm
10029
10030
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10032$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10033
10034# Check whether --with-hash_algorithm was given.
10035if test "${with_hash_algorithm+set}" = set; then :
10036 withval=$with_hash_algorithm;
10037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10038$as_echo "$withval" >&6; }
10039case "$withval" in
10040 siphash24)
10041 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10042
10043 ;;
10044 fnv)
10045 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10046
10047 ;;
10048 *)
10049 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10050 ;;
10051esac
10052
10053else
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10055$as_echo "default" >&6; }
10056fi
10057
10058
Charles-François Natalid30b0222014-05-08 23:08:51 +010010059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10060$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10061
10062# Check whether --with-address_sanitizer was given.
10063if test "${with_address_sanitizer+set}" = set; then :
10064 withval=$with_address_sanitizer;
10065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10066$as_echo "$withval" >&6; }
10067BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10068LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010069# ASan works by controlling memory allocation, our own malloc interferes.
10070with_pymalloc="no"
10071
10072else
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10079$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10080
10081# Check whether --with-memory_sanitizer was given.
10082if test "${with_memory_sanitizer+set}" = set; then :
10083 withval=$with_memory_sanitizer;
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10085$as_echo "$withval" >&6; }
10086BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10087LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10088# MSan works by controlling memory allocation, our own malloc interferes.
10089with_pymalloc="no"
10090
10091else
10092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10093$as_echo "no" >&6; }
10094fi
10095
10096
10097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10098$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10099
10100# Check whether --with-undefined_behavior_sanitizer was given.
10101if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10102 withval=$with_undefined_behavior_sanitizer;
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10104$as_echo "$withval" >&6; }
10105BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10106LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010107
10108else
10109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10110$as_echo "no" >&6; }
10111fi
10112
10113
Guido van Rossum70c7f481998-03-26 18:44:10 +000010114# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10116$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010117if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010119else
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010121LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010131char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10150$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010151if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010152 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010153fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010154 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10156$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010157if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010158 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010159else
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010161LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165/* Override any GCC internal prototype to avoid an error.
10166 Use char because int might match the return type of a GCC
10167 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168#ifdef __cplusplus
10169extern "C"
10170#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010171char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010172int
10173main ()
10174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010175return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176 ;
10177 return 0;
10178}
10179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010182else
Matthias Kloseb9621712010-04-24 17:59:49 +000010183 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010185rm -f core conftest.err conftest.$ac_objext \
10186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010187LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10190$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010191if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010192 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010193fi
10194 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010195
Matthias Kloseb9621712010-04-24 17:59:49 +000010196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10197$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010199# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10203$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010204LIBS="$withval $LIBS"
10205
10206else
Matthias Kloseb9621712010-04-24 17:59:49 +000010207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010209fi
10210
Guido van Rossum7f43da71994-08-01 12:15:30 +000010211
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010212
10213
10214
10215
10216
10217
Victor Stinner23a683a2019-04-12 21:27:37 +020010218
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010219if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10220 if test -n "$ac_tool_prefix"; then
10221 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10222set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10224$as_echo_n "checking for $ac_word... " >&6; }
10225if ${ac_cv_path_PKG_CONFIG+:} false; then :
10226 $as_echo_n "(cached) " >&6
10227else
10228 case $PKG_CONFIG in
10229 [\\/]* | ?:[\\/]*)
10230 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10231 ;;
10232 *)
10233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10234for as_dir in $PATH
10235do
10236 IFS=$as_save_IFS
10237 test -z "$as_dir" && as_dir=.
10238 for ac_exec_ext in '' $ac_executable_extensions; do
10239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10240 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10242 break 2
10243 fi
10244done
10245 done
10246IFS=$as_save_IFS
10247
10248 ;;
10249esac
10250fi
10251PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10252if test -n "$PKG_CONFIG"; then
10253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10254$as_echo "$PKG_CONFIG" >&6; }
10255else
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10257$as_echo "no" >&6; }
10258fi
10259
10260
10261fi
10262if test -z "$ac_cv_path_PKG_CONFIG"; then
10263 ac_pt_PKG_CONFIG=$PKG_CONFIG
10264 # Extract the first word of "pkg-config", so it can be a program name with args.
10265set dummy pkg-config; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10269 $as_echo_n "(cached) " >&6
10270else
10271 case $ac_pt_PKG_CONFIG in
10272 [\\/]* | ?:[\\/]*)
10273 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10274 ;;
10275 *)
10276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279 IFS=$as_save_IFS
10280 test -z "$as_dir" && as_dir=.
10281 for ac_exec_ext in '' $ac_executable_extensions; do
10282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285 break 2
10286 fi
10287done
10288 done
10289IFS=$as_save_IFS
10290
10291 ;;
10292esac
10293fi
10294ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10295if test -n "$ac_pt_PKG_CONFIG"; then
10296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10297$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10298else
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303 if test "x$ac_pt_PKG_CONFIG" = x; then
10304 PKG_CONFIG=""
10305 else
10306 case $cross_compiling:$ac_tool_warned in
10307yes:)
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10309$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10310ac_tool_warned=yes ;;
10311esac
10312 PKG_CONFIG=$ac_pt_PKG_CONFIG
10313 fi
10314else
10315 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10316fi
10317
10318fi
10319if test -n "$PKG_CONFIG"; then
10320 _pkg_min_version=0.9.0
10321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10322$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10323 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10325$as_echo "yes" >&6; }
10326 else
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329 PKG_CONFIG=""
10330 fi
10331fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010332
10333# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10335$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010336
10337# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010338if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010339 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010340else
10341 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010342fi
10343
10344
Matthias Kloseb9621712010-04-24 17:59:49 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10346$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347
10348# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10350$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010351
10352# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010353if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010354 withval=$with_system_ffi;
10355fi
10356
10357
Zachary Waref40d4dd2016-09-17 01:25:24 -050010358if test "$ac_sys_system" = "Darwin"
10359then
10360 case "$with_system_ffi" in
10361 "")
10362 with_system_ffi="no"
10363 ;;
10364 yes|no)
10365 ;;
10366 *)
10367 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10368 ;;
10369 esac
10370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10371$as_echo "$with_system_ffi" >&6; }
10372else
10373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10374$as_echo "yes" >&6; }
10375 if test "$with_system_ffi" != ""
10376 then
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10378$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10379 fi
10380 with_system_ffi="yes"
10381fi
Zachary Ware935043d2016-09-09 17:01:21 -070010382
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010383if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010384 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10385else
10386 LIBFFI_INCLUDEDIR=""
10387fi
10388
10389
Stefan Krah60187b52012-03-23 19:06:27 +010010390# Check for use of the system libmpdec library
10391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10392$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10393
10394# Check whether --with-system_libmpdec was given.
10395if test "${with_system_libmpdec+set}" = set; then :
10396 withval=$with_system_libmpdec;
10397else
10398 with_system_libmpdec="no"
10399fi
10400
10401
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10403$as_echo "$with_system_libmpdec" >&6; }
10404
Benjamin Peterson076ed002010-10-31 17:11:02 +000010405# Check for support for loadable sqlite extensions
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10407$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10408# Check whether --enable-loadable-sqlite-extensions was given.
10409if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10410 enableval=$enable_loadable_sqlite_extensions;
10411else
10412 enable_loadable_sqlite_extensions="no"
10413fi
10414
10415
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10417$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10418
Ned Deilyd819b932013-09-06 01:07:05 -070010419# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10420
10421
10422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10423$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10424
10425# Check whether --with-tcltk-includes was given.
10426if test "${with_tcltk_includes+set}" = set; then :
10427 withval=$with_tcltk_includes;
10428else
10429 with_tcltk_includes="default"
10430fi
10431
10432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10433$as_echo "$with_tcltk_includes" >&6; }
10434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10435$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10436
10437# Check whether --with-tcltk-libs was given.
10438if test "${with_tcltk_libs+set}" = set; then :
10439 withval=$with_tcltk_libs;
10440else
10441 with_tcltk_libs="default"
10442fi
10443
10444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10445$as_echo "$with_tcltk_libs" >&6; }
10446if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10447then
10448 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10449 then
10450 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10451 fi
10452 TCLTK_INCLUDES=""
10453 TCLTK_LIBS=""
10454else
10455 TCLTK_INCLUDES="$with_tcltk_includes"
10456 TCLTK_LIBS="$with_tcltk_libs"
10457fi
10458
Matthias Klose55708cc2009-04-30 08:06:49 +000010459# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10461$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010462
10463# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010465 withval=$with_dbmliborder;
10466if test x$with_dbmliborder = xyes
10467then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010468as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010469else
10470 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10471 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10472 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010473 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010474 fi
10475 done
10476fi
10477fi
10478
Matthias Kloseb9621712010-04-24 17:59:49 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10480$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010481
Martin v. Löwis11437992002-04-12 09:54:03 +000010482# Templates for things AC_DEFINEd more than once.
10483# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010484
10485
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010486if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010487then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010488 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010489 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010490
10491 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010492elif test "$ac_cv_kpthread" = "yes"
10493then
10494 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010495 if test "$ac_cv_cxx_thread" = "yes"; then
10496 CXX="$CXX -Kpthread"
10497 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010498 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010499elif test "$ac_cv_kthread" = "yes"
10500then
10501 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010502 if test "$ac_cv_cxx_thread" = "yes"; then
10503 CXX="$CXX -Kthread"
10504 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010505 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010506elif test "$ac_cv_pthread" = "yes"
10507then
10508 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010509 if test "$ac_cv_cxx_thread" = "yes"; then
10510 CXX="$CXX -pthread"
10511 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010512 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010513else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010514 if test ! -z "$withval" -a -d "$withval"
10515 then LDFLAGS="$LDFLAGS -L$withval"
10516 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010517
10518 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010519 # define _POSIX_THREADS in unistd.h. Some apparently don't
10520 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10522$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010525
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010526#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010527#ifdef _POSIX_THREADS
10528yes
10529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010530
10531_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010532if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010533 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010534 unistd_defines_pthreads=yes
10535else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010536 unistd_defines_pthreads=no
10537fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010538rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010539
Matthias Kloseb9621712010-04-24 17:59:49 +000010540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10541$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010542
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010544
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010545 # Just looking for pthread_create in libpthread is not enough:
10546 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10547 # So we really have to include pthread.h, and then link.
10548 _libs=$LIBS
10549 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10551$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010554
10555#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010556#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010557
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010558void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010559int
10560main ()
10561{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010562
10563pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010564 ;
10565 return 0;
10566}
10567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010569
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10571$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010572 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010573
Guido van Rossum02a1c402000-02-25 19:26:31 +000010574else
Martin v. Löwis11437992002-04-12 09:54:03 +000010575
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010576 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010577 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010578if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010579
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010580 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010581
Guido van Rossumad678af1998-10-02 14:42:15 +000010582else
Guido van Rossumad678af1998-10-02 14:42:15 +000010583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10585$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010586if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010590LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594/* Override any GCC internal prototype to avoid an error.
10595 Use char because int might match the return type of a GCC
10596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010597#ifdef __cplusplus
10598extern "C"
10599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010600char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010601int
10602main ()
10603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010613fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010614rm -f core conftest.err conftest.$ac_objext \
10615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010616LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010617fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10619$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010620if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010621
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010622 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010623 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010624
Greg Steinadf63d62000-07-05 10:38:09 +000010625else
Greg Steinadf63d62000-07-05 10:38:09 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10628$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010629if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010631else
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010633LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637/* Override any GCC internal prototype to avoid an error.
10638 Use char because int might match the return type of a GCC
10639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010640#ifdef __cplusplus
10641extern "C"
10642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010643char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010644int
10645main ()
10646{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010648 ;
10649 return 0;
10650}
10651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010652if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010654else
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010657rm -f core conftest.err conftest.$ac_objext \
10658 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010659LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10662$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010663if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010664
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010665 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010666 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010667
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010668else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10671$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010672if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010673 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010674else
Martin v. Löwis11437992002-04-12 09:54:03 +000010675 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010676LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010680/* Override any GCC internal prototype to avoid an error.
10681 Use char because int might match the return type of a GCC
10682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010683#ifdef __cplusplus
10684extern "C"
10685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010686char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010687int
10688main ()
10689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010690return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010697else
Matthias Kloseb9621712010-04-24 17:59:49 +000010698 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010700rm -f core conftest.err conftest.$ac_objext \
10701 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10705$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010706if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010707
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010708 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010709 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010710
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010711else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010712
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10714$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010715if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010717else
Martin v. Löwis11437992002-04-12 09:54:03 +000010718 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010719LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723/* Override any GCC internal prototype to avoid an error.
10724 Use char because int might match the return type of a GCC
10725 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010726#ifdef __cplusplus
10727extern "C"
10728#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010729char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010730int
10731main ()
10732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010734 ;
10735 return 0;
10736}
10737_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010738if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010740else
Matthias Kloseb9621712010-04-24 17:59:49 +000010741 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010742fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010743rm -f core conftest.err conftest.$ac_objext \
10744 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010745LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10748$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010749if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010750
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010751 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010752 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010753
Guido van Rossumb93a8621998-05-07 13:27:32 +000010754else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010755
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010756 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10757
Guido van Rossum2d38f911996-06-26 19:47:01 +000010758fi
10759
Guido van Rossum627b2d71993-12-24 10:39:16 +000010760
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010761fi
10762
Guido van Rossum0be3e491997-05-22 20:33:33 +000010763fi
10764
Guido van Rossum49545951997-12-02 19:28:29 +000010765fi
10766
Guido van Rossumb93a8621998-05-07 13:27:32 +000010767fi
10768
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010770rm -f core conftest.err conftest.$ac_objext \
10771 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010772
Matthias Kloseb9621712010-04-24 17:59:49 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10774$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010775if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010777else
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010779LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010783/* Override any GCC internal prototype to avoid an error.
10784 Use char because int might match the return type of a GCC
10785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010786#ifdef __cplusplus
10787extern "C"
10788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010789char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010793return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ;
10795 return 0;
10796}
10797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010800else
Matthias Kloseb9621712010-04-24 17:59:49 +000010801 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010802fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010803rm -f core conftest.err conftest.$ac_objext \
10804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10808$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010809if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010810
Martin v. Löwis130fb172001-07-19 11:00:41 +000010811 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010812
Guido van Rossum627b2d71993-12-24 10:39:16 +000010813fi
10814
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010815
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010816fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010817
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010818if test "$posix_threads" = "yes"; then
10819 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010820
Matthias Kloseb9621712010-04-24 17:59:49 +000010821$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010822
10823 fi
10824
10825 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10826 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010827 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010828$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010829
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010830 ;;
10831 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010832$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833
10834 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010835 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010836$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010837
10838 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010839 esac
10840
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10842$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010843 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010844 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847 ac_cv_pthread_system_supported=no
10848else
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010850/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010851
10852 #include <stdio.h>
10853 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010854 void *foo(void *parm) {
10855 return NULL;
10856 }
10857 main() {
10858 pthread_attr_t attr;
10859 pthread_t id;
10860 if (pthread_attr_init(&attr)) exit(-1);
10861 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10862 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10863 exit(0);
10864 }
10865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010866if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010867 ac_cv_pthread_system_supported=yes
10868else
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010871rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10872 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010873fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010875
Guido van Rossum627b2d71993-12-24 10:39:16 +000010876fi
10877
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10879$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010880 if test "$ac_cv_pthread_system_supported" = "yes"; then
10881
Matthias Kloseb9621712010-04-24 17:59:49 +000010882$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010883
10884 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 for ac_func in pthread_sigmask
10886do :
10887 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010888if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010889 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010890#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010891_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010892 case $ac_sys_system in
10893 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894
Matthias Kloseb9621712010-04-24 17:59:49 +000010895$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010896
10897 ;;
10898 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899fi
10900done
10901
pdoxe14679c2017-10-05 00:01:56 -070010902 for ac_func in pthread_getcpuclockid
10903do :
10904 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10905if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10906 cat >>confdefs.h <<_ACEOF
10907#define HAVE_PTHREAD_GETCPUCLOCKID 1
10908_ACEOF
10909
10910fi
10911done
10912
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010913fi
10914
10915
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010916# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010917
Matthias Kloseb9621712010-04-24 17:59:49 +000010918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10919$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010920# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010921if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010923 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10925$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010926 ipv6=no
10927 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10929$as_echo "yes" >&6; }
10930 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931
10932 ipv6=yes
10933 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935else
Martin v. Löwis11437992002-04-12 09:54:03 +000010936
Matthias Kloseb9621712010-04-24 17:59:49 +000010937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010938/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010939 /* AF_INET6 available check */
10940#include <sys/types.h>
10941#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010942int
10943main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010945int domain = AF_INET6;
10946 ;
10947 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010948}
Martin v. Löwis11437992002-04-12 09:54:03 +000010949_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010950if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10953$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010954 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010955
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010956else
Matthias Kloseb159a552010-04-25 21:00:44 +000010957
Matthias Kloseb9621712010-04-24 17:59:49 +000010958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10959$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010962fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010964
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010965if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10967$as_echo_n "checking if RFC2553 API is available... " >&6; }
10968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010969/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010970
10971 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010972#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010973int
10974main ()
10975{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010976struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010977 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ;
10979 return 0;
10980}
Matthias Kloseb159a552010-04-25 21:00:44 +000010981
Martin v. Löwis11437992002-04-12 09:54:03 +000010982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010986$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010987 ipv6=yes
10988
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010989else
Matthias Kloseb159a552010-04-25 21:00:44 +000010990
10991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010992$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010993 ipv6=no
10994
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010997fi
10998
10999if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011000 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001
11002fi
11003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004fi
11005
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011006
11007ipv6type=unknown
11008ipv6lib=none
11009ipv6trylibc=no
11010
11011if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11013$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011014 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11015 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011016 case $i in
11017 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011019/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011020
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021#include <netinet/in.h>
11022#ifdef IPV6_INRIA_VERSION
11023yes
11024#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011025_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011028 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011029fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011030rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031
11032 ;;
11033 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011035/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011037#include <netinet/in.h>
11038#ifdef __KAME__
11039yes
11040#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011041_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011043 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011044 ipv6type=$i;
11045 ipv6lib=inet6
11046 ipv6libdir=/usr/local/v6/lib
11047 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011048fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011049rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050
11051 ;;
11052 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011056#include <features.h>
11057#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11058yes
11059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011062 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011063 ipv6type=$i;
11064 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011065fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011066rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011067
11068 ;;
11069 linux-inet6)
11070 if test -d /usr/inet6; then
11071 ipv6type=$i
11072 ipv6lib=inet6
11073 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011074 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011075 fi
11076 ;;
11077 solaris)
11078 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011079 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080 ipv6type=$i
11081 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011082 fi
11083 fi
11084 ;;
11085 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011087/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011089#include <sys/param.h>
11090#ifdef _TOSHIBA_INET6
11091yes
11092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011093_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011095 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096 ipv6type=$i;
11097 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011098 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011100rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101
11102 ;;
11103 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011105/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011106
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011107#include </usr/local/v6/include/sys/v6config.h>
11108#ifdef __V6D__
11109yes
11110#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011111_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011114 ipv6type=$i;
11115 ipv6lib=v6;
11116 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011117 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011119rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011120
11121 ;;
11122 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011125
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011126#include <sys/param.h>
11127#ifdef _ZETA_MINAMI_INET6
11128yes
11129#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011130_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011132 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011133 ipv6type=$i;
11134 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011135 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011137rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138
11139 ;;
11140 esac
11141 if test "$ipv6type" != "unknown"; then
11142 break
11143 fi
11144 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11146$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147fi
11148
11149if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11150 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11151 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11152 echo "using lib$ipv6lib"
11153 else
11154 if test $ipv6trylibc = "yes"; then
11155 echo "using libc"
11156 else
11157 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11158 echo "You need to fetch lib$ipv6lib.a from appropriate"
11159 echo 'ipv6 kit and compile beforehand.'
11160 exit 1
11161 fi
11162 fi
11163fi
11164
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11166$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11168/* end confdefs.h. */
11169 /* CAN_RAW_FD_FRAMES available check */
11170#include <linux/can/raw.h>
11171int
11172main ()
11173{
11174int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11175 ;
11176 return 0;
11177}
11178_ACEOF
11179if ac_fn_c_try_compile "$LINENO"; then :
11180
11181
11182$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11183
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11185$as_echo "yes" >&6; }
11186
11187else
11188
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190$as_echo "no" >&6; }
11191
11192fi
11193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11194
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011195# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11197$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011200if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011201 withval=$with_doc_strings;
11202fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011203
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011204
11205if test -z "$with_doc_strings"
11206then with_doc_strings="yes"
11207fi
11208if test "$with_doc_strings" != "no"
11209then
11210
Matthias Kloseb9621712010-04-24 17:59:49 +000011211$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011212
11213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11215$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011216
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011217# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11219$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011221# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011222if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011223 withval=$with_pymalloc;
11224fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011225
Neil Schemenauera35c6882001-02-27 04:45:05 +000011226
Neil Schemenauer16c22972002-03-22 15:34:49 +000011227if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011228then
11229 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011230fi
11231if test "$with_pymalloc" != "no"
11232then
Martin v. Löwis11437992002-04-12 09:54:03 +000011233
Matthias Kloseb9621712010-04-24 17:59:49 +000011234$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011235
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011236 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11239$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011240
Nick Coghlan6ea41862017-06-11 13:16:15 +100011241# Check for --with-c-locale-coercion
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11243$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11244
11245# Check whether --with-c-locale-coercion was given.
11246if test "${with_c_locale_coercion+set}" = set; then :
11247 withval=$with_c_locale_coercion;
11248fi
11249
11250
11251if test -z "$with_c_locale_coercion"
11252then
11253 with_c_locale_coercion="yes"
11254fi
11255if test "$with_c_locale_coercion" != "no"
11256then
11257
11258$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11259
11260fi
11261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11262$as_echo "$with_c_locale_coercion" >&6; }
11263
Benjamin Peterson05159c42009-12-03 03:01:27 +000011264# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11266$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011267
11268# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011270 withval=$with_valgrind;
11271else
11272 with_valgrind=no
11273fi
11274
Matthias Kloseb9621712010-04-24 17:59:49 +000011275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11276$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011277if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011278 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 +020011279if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011280
Matthias Kloseb9621712010-04-24 17:59:49 +000011281$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011282
11283else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011284 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011285
11286fi
11287
11288
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011289 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011290fi
11291
Łukasz Langaa785c872016-09-09 17:37:37 -070011292# Check for DTrace support
11293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11294$as_echo_n "checking for --with-dtrace... " >&6; }
11295
11296# Check whether --with-dtrace was given.
11297if test "${with_dtrace+set}" = set; then :
11298 withval=$with_dtrace;
11299else
11300 with_dtrace=no
11301fi
11302
11303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11304$as_echo "$with_dtrace" >&6; }
11305
11306
11307
11308
11309
11310DTRACE=
11311DFLAGS=
11312DTRACE_HEADERS=
11313DTRACE_OBJS=
11314
11315if test "$with_dtrace" = "yes"
11316then
11317 # Extract the first word of "dtrace", so it can be a program name with args.
11318set dummy dtrace; ac_word=$2
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11320$as_echo_n "checking for $ac_word... " >&6; }
11321if ${ac_cv_path_DTRACE+:} false; then :
11322 $as_echo_n "(cached) " >&6
11323else
11324 case $DTRACE in
11325 [\\/]* | ?:[\\/]*)
11326 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11327 ;;
11328 *)
11329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11330for as_dir in $PATH
11331do
11332 IFS=$as_save_IFS
11333 test -z "$as_dir" && as_dir=.
11334 for ac_exec_ext in '' $ac_executable_extensions; do
11335 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11336 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11337 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11338 break 2
11339 fi
11340done
11341 done
11342IFS=$as_save_IFS
11343
11344 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11345 ;;
11346esac
11347fi
11348DTRACE=$ac_cv_path_DTRACE
11349if test -n "$DTRACE"; then
11350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11351$as_echo "$DTRACE" >&6; }
11352else
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
11355fi
11356
11357
11358 if test "$DTRACE" = "not found"; then
11359 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11360 fi
11361
11362$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11363
11364 DTRACE_HEADERS="Include/pydtrace_probes.h"
11365
11366 # On OS X, DTrace providers do not need to be explicitly compiled and
11367 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11368 # generation flag '-G'. We check for presence of this flag, rather than
11369 # hardcoding support by OS, in the interest of robustness.
11370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11371$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11372if ${ac_cv_dtrace_link+:} false; then :
11373 $as_echo_n "(cached) " >&6
11374else
11375 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011376 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011377 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11378 ac_cv_dtrace_link=yes
11379
11380fi
11381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11382$as_echo "$ac_cv_dtrace_link" >&6; }
11383 if test "$ac_cv_dtrace_link" = "yes"; then
11384 DTRACE_OBJS="Python/pydtrace.o"
11385 fi
11386fi
11387
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011388# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011389
Guido van Rossum98935bf2001-09-05 19:13:16 +000011390DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011391
Guido van Rossume97ee181999-12-20 21:27:22 +000011392# the dlopen() function means we might want to use dynload_shlib.o. some
11393# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011394for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011395do :
11396 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011397if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011398 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011399#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011400_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011401
Guido van Rossume97ee181999-12-20 21:27:22 +000011402fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011403done
Guido van Rossume97ee181999-12-20 21:27:22 +000011404
Michael W. Hudson54241132001-12-07 15:38:26 +000011405
Guido van Rossume97ee181999-12-20 21:27:22 +000011406# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11407# loading of modules.
11408
Matthias Kloseb9621712010-04-24 17:59:49 +000011409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11410$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011411if test -z "$DYNLOADFILE"
11412then
11413 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011414 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11415 if test "$ac_cv_func_dlopen" = yes
11416 then DYNLOADFILE="dynload_shlib.o"
11417 else DYNLOADFILE="dynload_aix.o"
11418 fi
11419 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011420 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011421 *)
11422 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11423 # out any dynamic loading
11424 if test "$ac_cv_func_dlopen" = yes
11425 then DYNLOADFILE="dynload_shlib.o"
11426 else DYNLOADFILE="dynload_stub.o"
11427 fi
11428 ;;
11429 esac
11430fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11432$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011433if test "$DYNLOADFILE" != "dynload_stub.o"
11434then
Martin v. Löwis11437992002-04-12 09:54:03 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011437
11438fi
11439
Neil Schemenauer4e425612001-06-19 15:44:15 +000011440# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11441
Michael W. Hudson54241132001-12-07 15:38:26 +000011442
Matthias Kloseb9621712010-04-24 17:59:49 +000011443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11444$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011445if test -z "$MACHDEP_OBJS"
11446then
Jack Jansene578a632001-08-15 01:27:14 +000011447 MACHDEP_OBJS=$extra_machdep_objs
11448else
11449 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011450fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011451if test -z "$MACHDEP_OBJS"; then
11452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11453$as_echo "none" >&6; }
11454else
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11456$as_echo "$MACHDEP_OBJS" >&6; }
11457fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011458
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011460for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011461 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011462 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011463 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011464 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011465 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011466 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011467 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011468 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011469 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011470 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011471 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011472 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11473 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011474 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011475 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011476 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011477 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11478 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011479 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011480 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011481 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011482 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011483 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011484do :
11485 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11486ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011487if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011489#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011490_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011491
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011492fi
11493done
11494
Michael W. Hudson54241132001-12-07 15:38:26 +000011495
Benjamin Peterson40caa052018-09-12 15:52:40 -070011496# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11497# links. Some libc implementations have a stub lchmod implementation that always
11498# returns an error.
11499if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011500 for ac_func in lchmod
11501do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011502 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11503if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011504 cat >>confdefs.h <<_ACEOF
11505#define HAVE_LCHMOD 1
11506_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011507
11508fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011509done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011510
11511fi
11512
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011513ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11514 #include <dirent.h>
11515"
11516if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11517
11518$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11519
11520fi
11521
11522
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011523# For some functions, having a definition is not sufficient, since
11524# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11526$as_echo_n "checking for chroot... " >&6; }
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011528/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011529#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011530int
11531main ()
11532{
11533void *x=chroot
11534 ;
11535 return 0;
11536}
11537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011539
Matthias Kloseb9621712010-04-24 17:59:49 +000011540$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011541
Matthias Kloseb159a552010-04-25 21:00:44 +000011542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011543$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011544else
Matthias Kloseb9621712010-04-24 17:59:49 +000011545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11546$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011547
11548fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11551$as_echo_n "checking for link... " >&6; }
11552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011554#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011555int
11556main ()
11557{
11558void *x=link
11559 ;
11560 return 0;
11561}
11562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011564
Matthias Kloseb9621712010-04-24 17:59:49 +000011565$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011566
Matthias Kloseb159a552010-04-25 21:00:44 +000011567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569else
Matthias Kloseb9621712010-04-24 17:59:49 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11571$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572
11573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11576$as_echo_n "checking for symlink... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011579#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011580int
11581main ()
11582{
11583void *x=symlink
11584 ;
11585 return 0;
11586}
11587_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011591
Matthias Kloseb159a552010-04-25 21:00:44 +000011592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594else
Matthias Kloseb9621712010-04-24 17:59:49 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597
11598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11601$as_echo_n "checking for fchdir... " >&6; }
11602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011603/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011604#include <unistd.h>
11605int
11606main ()
11607{
11608void *x=fchdir
11609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011614
Matthias Kloseb9621712010-04-24 17:59:49 +000011615$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011616
Matthias Kloseb159a552010-04-25 21:00:44 +000011617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011618$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011619else
Matthias Kloseb9621712010-04-24 17:59:49 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11621$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011622
11623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11626$as_echo_n "checking for fsync... " >&6; }
11627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011628/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011629#include <unistd.h>
11630int
11631main ()
11632{
11633void *x=fsync
11634 ;
11635 return 0;
11636}
11637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011639
Matthias Kloseb9621712010-04-24 17:59:49 +000011640$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011641
Matthias Kloseb159a552010-04-25 21:00:44 +000011642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644else
Matthias Kloseb9621712010-04-24 17:59:49 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647
11648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11651$as_echo_n "checking for fdatasync... " >&6; }
11652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011654#include <unistd.h>
11655int
11656main ()
11657{
11658void *x=fdatasync
11659 ;
11660 return 0;
11661}
11662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011664
Matthias Kloseb9621712010-04-24 17:59:49 +000011665$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011666
Matthias Kloseb159a552010-04-25 21:00:44 +000011667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669else
Matthias Kloseb9621712010-04-24 17:59:49 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11671$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672
11673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11676$as_echo_n "checking for epoll... " >&6; }
11677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011678/* end confdefs.h. */
11679#include <sys/epoll.h>
11680int
11681main ()
11682{
11683void *x=epoll_create
11684 ;
11685 return 0;
11686}
11687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011689
Matthias Kloseb9621712010-04-24 17:59:49 +000011690$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011691
Matthias Kloseb159a552010-04-25 21:00:44 +000011692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011694else
Matthias Kloseb9621712010-04-24 17:59:49 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11696$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011697
11698fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11701$as_echo_n "checking for epoll_create1... " >&6; }
11702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11703/* end confdefs.h. */
11704#include <sys/epoll.h>
11705int
11706main ()
11707{
11708void *x=epoll_create1
11709 ;
11710 return 0;
11711}
11712_ACEOF
11713if ac_fn_c_try_compile "$LINENO"; then :
11714
11715$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11716
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11718$as_echo "yes" >&6; }
11719else
11720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11721$as_echo "no" >&6; }
11722
11723fi
11724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11726$as_echo_n "checking for kqueue... " >&6; }
11727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011728/* end confdefs.h. */
11729
11730#include <sys/types.h>
11731#include <sys/event.h>
11732
11733int
11734main ()
11735{
11736int x=kqueue()
11737 ;
11738 return 0;
11739}
11740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011741if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011742
Matthias Kloseb9621712010-04-24 17:59:49 +000011743$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011744
Matthias Kloseb159a552010-04-25 21:00:44 +000011745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011746$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011747else
Matthias Kloseb9621712010-04-24 17:59:49 +000011748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011750
11751fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11754$as_echo_n "checking for prlimit... " >&6; }
11755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11756/* end confdefs.h. */
11757
11758#include <sys/time.h>
11759#include <sys/resource.h>
11760
11761int
11762main ()
11763{
11764void *x=prlimit
11765 ;
11766 return 0;
11767}
11768_ACEOF
11769if ac_fn_c_try_compile "$LINENO"; then :
11770
11771$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11772
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11774$as_echo "yes" >&6; }
11775else
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777$as_echo "no" >&6; }
11778
11779fi
11780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781
Martin v. Löwisd5843682002-11-21 20:41:28 +000011782# On some systems (eg. FreeBSD 5), we would find a definition of the
11783# functions ctermid_r, setgroups in the library, but no prototype
11784# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11785# address to avoid compiler warnings and potential miscompilations
11786# because of the missing prototypes.
11787
Matthias Kloseb9621712010-04-24 17:59:49 +000011788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11789$as_echo_n "checking for ctermid_r... " >&6; }
11790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011791/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011792
Martin v. Löwisd5843682002-11-21 20:41:28 +000011793#include <stdio.h>
11794
Martin v. Löwisd5843682002-11-21 20:41:28 +000011795int
11796main ()
11797{
11798void* p = ctermid_r
11799 ;
11800 return 0;
11801}
11802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011803if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011804
Matthias Kloseb9621712010-04-24 17:59:49 +000011805$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011806
Matthias Kloseb159a552010-04-25 21:00:44 +000011807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011808$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011809else
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011812
11813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11815
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11817$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011818if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011819 $as_echo_n "(cached) " >&6
11820else
11821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011822/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011823#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011824int
11825main ()
11826{
11827void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011828
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011829 ;
11830 return 0;
11831}
11832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011833if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011834 ac_cv_flock_decl=yes
11835else
11836 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011837
11838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011840
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011841fi
11842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11843$as_echo "$ac_cv_flock_decl" >&6; }
11844if test "x${ac_cv_flock_decl}" = xyes; then
11845 for ac_func in flock
11846do :
11847 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011848if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011849 cat >>confdefs.h <<_ACEOF
11850#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011851_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011852
Antoine Pitroua3000072010-09-07 14:52:42 +000011853else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011855$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011856if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011857 $as_echo_n "(cached) " >&6
11858else
11859 ac_check_lib_save_LIBS=$LIBS
11860LIBS="-lbsd $LIBS"
11861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11862/* end confdefs.h. */
11863
11864/* Override any GCC internal prototype to avoid an error.
11865 Use char because int might match the return type of a GCC
11866 builtin and then its argument prototype would still apply. */
11867#ifdef __cplusplus
11868extern "C"
11869#endif
11870char flock ();
11871int
11872main ()
11873{
11874return flock ();
11875 ;
11876 return 0;
11877}
11878_ACEOF
11879if ac_fn_c_try_link "$LINENO"; then :
11880 ac_cv_lib_bsd_flock=yes
11881else
11882 ac_cv_lib_bsd_flock=no
11883fi
11884rm -f core conftest.err conftest.$ac_objext \
11885 conftest$ac_exeext conftest.$ac_ext
11886LIBS=$ac_check_lib_save_LIBS
11887fi
11888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11889$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011890if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011891 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011892
11893
11894$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11895
11896
11897fi
11898
11899
11900fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011901done
11902
Antoine Pitroua3000072010-09-07 14:52:42 +000011903fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11906$as_echo_n "checking for getpagesize... " >&6; }
11907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011909
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011910#include <unistd.h>
11911
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011912int
11913main ()
11914{
11915void* p = getpagesize
11916 ;
11917 return 0;
11918}
11919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011923
Matthias Kloseb159a552010-04-25 21:00:44 +000011924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011925$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11928$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011929
11930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011932
Victor Stinner984890f2011-11-24 13:53:38 +010011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11934$as_echo_n "checking for broken unsetenv... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11936/* end confdefs.h. */
11937
11938#include <stdlib.h>
11939
11940int
11941main ()
11942{
11943int res = unsetenv("DUMMY")
11944 ;
11945 return 0;
11946}
11947_ACEOF
11948if ac_fn_c_try_compile "$LINENO"; then :
11949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11950$as_echo "no" >&6; }
11951else
11952
11953$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11954
11955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11956$as_echo "yes" >&6; }
11957
11958fi
11959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11960
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011961for ac_prog in true
11962do
11963 # Extract the first word of "$ac_prog", so it can be a program name with args.
11964set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11966$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011967if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011968 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011969else
11970 if test -n "$TRUE"; then
11971 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11972else
11973as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11974for as_dir in $PATH
11975do
11976 IFS=$as_save_IFS
11977 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011978 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011979 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011980 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011981 $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 +000011982 break 2
11983 fi
11984done
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011987
11988fi
11989fi
11990TRUE=$ac_cv_prog_TRUE
11991if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11993$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011994else
Matthias Kloseb9621712010-04-24 17:59:49 +000011995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11996$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011997fi
11998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011999
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012000 test -n "$TRUE" && break
12001done
12002test -n "$TRUE" || TRUE="/bin/true"
12003
12004
Matthias Kloseb9621712010-04-24 17:59:49 +000012005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12006$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012009else
12010 ac_check_lib_save_LIBS=$LIBS
12011LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012013/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012015/* Override any GCC internal prototype to avoid an error.
12016 Use char because int might match the return type of a GCC
12017 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012018#ifdef __cplusplus
12019extern "C"
12020#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012021char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012022int
12023main ()
12024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012025return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012026 ;
12027 return 0;
12028}
12029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012030if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012031 ac_cv_lib_c_inet_aton=yes
12032else
Matthias Kloseb9621712010-04-24 17:59:49 +000012033 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012034fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012035rm -f core conftest.err conftest.$ac_objext \
12036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037LIBS=$ac_check_lib_save_LIBS
12038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12040$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012041if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012042 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012043else
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12045$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012046if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012048else
12049 ac_check_lib_save_LIBS=$LIBS
12050LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012052/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054/* Override any GCC internal prototype to avoid an error.
12055 Use char because int might match the return type of a GCC
12056 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057#ifdef __cplusplus
12058extern "C"
12059#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012060char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061int
12062main ()
12063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012064return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065 ;
12066 return 0;
12067}
12068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012070 ac_cv_lib_resolv_inet_aton=yes
12071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012074rm -f core conftest.err conftest.$ac_objext \
12075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012076LIBS=$ac_check_lib_save_LIBS
12077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12079$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012080if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081 cat >>confdefs.h <<_ACEOF
12082#define HAVE_LIBRESOLV 1
12083_ACEOF
12084
12085 LIBS="-lresolv $LIBS"
12086
12087fi
12088
12089
12090fi
12091
12092
Christian Heimesd0764e22007-12-04 15:00:33 +000012093# On Tru64, chflags seems to be present, but calling it will
12094# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12096$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012097if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012101 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012102else
Matthias Kloseb9621712010-04-24 17:59:49 +000012103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012104/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012105
Christian Heimesd0764e22007-12-04 15:00:33 +000012106#include <sys/stat.h>
12107#include <unistd.h>
12108int main(int argc, char*argv[])
12109{
12110 if(chflags(argv[0], 0) != 0)
12111 return 1;
12112 return 0;
12113}
Ned Deily3eb67d52011-06-28 00:00:28 -070012114
Christian Heimesd0764e22007-12-04 15:00:33 +000012115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012117 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012118else
Matthias Kloseb9621712010-04-24 17:59:49 +000012119 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12122 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012123fi
12124
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12128$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012129if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012130 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012131if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012132 ac_cv_have_chflags="yes"
12133else
12134 ac_cv_have_chflags="no"
12135fi
12136
12137fi
12138if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012139
Matthias Kloseb9621712010-04-24 17:59:49 +000012140$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012141
12142fi
12143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12145$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012146if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012148else
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012150 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012151else
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012153/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012154
Christian Heimesd0764e22007-12-04 15:00:33 +000012155#include <sys/stat.h>
12156#include <unistd.h>
12157int main(int argc, char*argv[])
12158{
12159 if(lchflags(argv[0], 0) != 0)
12160 return 1;
12161 return 0;
12162}
Ned Deily3eb67d52011-06-28 00:00:28 -070012163
Christian Heimesd0764e22007-12-04 15:00:33 +000012164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012165if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012166 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012167else
Matthias Kloseb9621712010-04-24 17:59:49 +000012168 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012169fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12171 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012172fi
12173
12174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012175fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12177$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012178if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012179 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012181 ac_cv_have_lchflags="yes"
12182else
12183 ac_cv_have_lchflags="no"
12184fi
12185
12186fi
12187if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012188
Matthias Kloseb9621712010-04-24 17:59:49 +000012189$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012190
12191fi
12192
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012193case $ac_sys_system/$ac_sys_release in
12194Darwin/*)
12195 _CUR_CFLAGS="${CFLAGS}"
12196 _CUR_LDFLAGS="${LDFLAGS}"
12197 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12198 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12199 ;;
12200esac
12201
Matthias Kloseb9621712010-04-24 17:59:49 +000012202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12203$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012204if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012205 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012206else
12207 ac_check_lib_save_LIBS=$LIBS
12208LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012209cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012210/* end confdefs.h. */
12211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012212/* Override any GCC internal prototype to avoid an error.
12213 Use char because int might match the return type of a GCC
12214 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012215#ifdef __cplusplus
12216extern "C"
12217#endif
12218char inflateCopy ();
12219int
12220main ()
12221{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012222return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012223 ;
12224 return 0;
12225}
12226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012227if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012228 ac_cv_lib_z_inflateCopy=yes
12229else
Matthias Kloseb9621712010-04-24 17:59:49 +000012230 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232rm -f core conftest.err conftest.$ac_objext \
12233 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012234LIBS=$ac_check_lib_save_LIBS
12235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12237$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012238if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012241
12242fi
12243
12244
12245case $ac_sys_system/$ac_sys_release in
12246Darwin/*)
12247 CFLAGS="${_CUR_CFLAGS}"
12248 LDFLAGS="${_CUR_LDFLAGS}"
12249 ;;
12250esac
12251
Matthias Kloseb9621712010-04-24 17:59:49 +000012252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12253$as_echo_n "checking for hstrerror... " >&6; }
12254cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012256
Martin v. Löwise9416172003-05-03 10:12:45 +000012257#include <netdb.h>
12258
Martin v. Löwise9416172003-05-03 10:12:45 +000012259int
12260main ()
12261{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012262void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012268
Matthias Kloseb9621712010-04-24 17:59:49 +000012269$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012270
Matthias Kloseb159a552010-04-25 21:00:44 +000012271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012272$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012273else
Matthias Kloseb9621712010-04-24 17:59:49 +000012274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12275$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012276
12277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012278rm -f core conftest.err conftest.$ac_objext \
12279 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12282$as_echo_n "checking for inet_aton... " >&6; }
12283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012284/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012285
Martin v. Löwis86d66262006-02-17 08:40:11 +000012286#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012287#include <sys/socket.h>
12288#include <netinet/in.h>
12289#include <arpa/inet.h>
12290
Martin v. Löwise9416172003-05-03 10:12:45 +000012291int
12292main ()
12293{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012294void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012295 ;
12296 return 0;
12297}
12298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012300
Matthias Kloseb9621712010-04-24 17:59:49 +000012301$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012302
Matthias Kloseb159a552010-04-25 21:00:44 +000012303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012304$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012305else
Matthias Kloseb9621712010-04-24 17:59:49 +000012306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12307$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012308
12309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012310rm -f core conftest.err conftest.$ac_objext \
12311 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012312
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12314$as_echo_n "checking for inet_pton... " >&6; }
12315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012316/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012317
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012318#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012319#include <sys/socket.h>
12320#include <netinet/in.h>
12321#include <arpa/inet.h>
12322
Martin v. Löwise9416172003-05-03 10:12:45 +000012323int
12324main ()
12325{
12326void* p = inet_pton
12327 ;
12328 return 0;
12329}
12330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012331if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012332
Matthias Kloseb9621712010-04-24 17:59:49 +000012333$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012334
Matthias Kloseb159a552010-04-25 21:00:44 +000012335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012337else
Matthias Kloseb9621712010-04-24 17:59:49 +000012338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12339$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012340
12341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012343
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012344# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12346$as_echo_n "checking for setgroups... " >&6; }
12347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012349
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012350#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012351#ifdef HAVE_GRP_H
12352#include <grp.h>
12353#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012354
Martin v. Löwisd5843682002-11-21 20:41:28 +000012355int
12356main ()
12357{
12358void* p = setgroups
12359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012364
Matthias Kloseb9621712010-04-24 17:59:49 +000012365$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012366
Matthias Kloseb159a552010-04-25 21:00:44 +000012367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012369else
Matthias Kloseb9621712010-04-24 17:59:49 +000012370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12371$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012372
12373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012375
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012376# check for openpty and forkpty
12377
12378for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012379do :
12380 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012381if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012383#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012384_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012385
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012386else
Matthias Kloseb9621712010-04-24 17:59:49 +000012387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12388$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012389if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012390 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012391else
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012393LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012394cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012397/* Override any GCC internal prototype to avoid an error.
12398 Use char because int might match the return type of a GCC
12399 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012400#ifdef __cplusplus
12401extern "C"
12402#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012403char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012404int
12405main ()
12406{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012407return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 ;
12409 return 0;
12410}
12411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012412if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012413 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012417rm -f core conftest.err conftest.$ac_objext \
12418 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012419LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12422$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012423if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012424 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012425 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12428$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012429if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012430 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012431else
12432 ac_check_lib_save_LIBS=$LIBS
12433LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012435/* end confdefs.h. */
12436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437/* Override any GCC internal prototype to avoid an error.
12438 Use char because int might match the return type of a GCC
12439 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012440#ifdef __cplusplus
12441extern "C"
12442#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012443char openpty ();
12444int
12445main ()
12446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012448 ;
12449 return 0;
12450}
12451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012453 ac_cv_lib_bsd_openpty=yes
12454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012457rm -f core conftest.err conftest.$ac_objext \
12458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012459LIBS=$ac_check_lib_save_LIBS
12460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12462$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012463if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012464 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012465 LIBS="$LIBS -lbsd"
12466fi
12467
12468
12469fi
12470
Fred Drake8cef4cf2000-06-28 16:40:38 +000012471
12472fi
12473done
12474
12475for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012476do :
12477 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012478if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012481_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012482
Fred Drake8cef4cf2000-06-28 16:40:38 +000012483else
Matthias Kloseb9621712010-04-24 17:59:49 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12485$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012486if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012488else
Martin v. Löwis11437992002-04-12 09:54:03 +000012489 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012490LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494/* Override any GCC internal prototype to avoid an error.
12495 Use char because int might match the return type of a GCC
12496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012497#ifdef __cplusplus
12498extern "C"
12499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012500char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012501int
12502main ()
12503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012504return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012505 ;
12506 return 0;
12507}
12508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511else
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012514rm -f core conftest.err conftest.$ac_objext \
12515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012516LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12519$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012520if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012522 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012523else
Matthias Kloseb9621712010-04-24 17:59:49 +000012524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12525$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012526if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012527 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012528else
12529 ac_check_lib_save_LIBS=$LIBS
12530LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012532/* end confdefs.h. */
12533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012534/* Override any GCC internal prototype to avoid an error.
12535 Use char because int might match the return type of a GCC
12536 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012537#ifdef __cplusplus
12538extern "C"
12539#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012540char forkpty ();
12541int
12542main ()
12543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012545 ;
12546 return 0;
12547}
12548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012550 ac_cv_lib_bsd_forkpty=yes
12551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012554rm -f core conftest.err conftest.$ac_objext \
12555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012556LIBS=$ac_check_lib_save_LIBS
12557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12559$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012560if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012561 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012562 LIBS="$LIBS -lbsd"
12563fi
12564
12565
12566fi
12567
Fred Drake8cef4cf2000-06-28 16:40:38 +000012568
12569fi
12570done
12571
Jack Jansendd19cf82001-12-06 22:36:17 +000012572
Michael W. Hudson54241132001-12-07 15:38:26 +000012573# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012574for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012575do :
12576 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12577ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012578if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012580#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012581_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012582
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012583fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012584done
12585
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012587ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012588if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012589 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012590
Martin v. Löwis1142de32002-03-29 16:28:31 +000012591else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012593 *" dup2.$ac_objext "* ) ;;
12594 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012596esac
12597
Martin v. Löwis1142de32002-03-29 16:28:31 +000012598fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012599
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012600ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012601if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012602 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12603
12604else
12605 case " $LIBOBJS " in
12606 *" strdup.$ac_objext "* ) ;;
12607 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12608 ;;
12609esac
12610
12611fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012612
12613
12614for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012615do :
12616 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012617if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012619#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012622/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012624int
12625main ()
12626{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012627getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 ;
12629 return 0;
12630}
12631_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012632if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012635
Guido van Rossum627b2d71993-12-24 10:39:16 +000012636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012638
Guido van Rossum627b2d71993-12-24 10:39:16 +000012639fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012640done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012641
Jack Jansen150753c2003-03-29 22:07:47 +000012642for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012643do :
12644 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012645if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012646 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012647#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012651#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012652int
12653main ()
12654{
12655setpgrp(0,0);
12656 ;
12657 return 0;
12658}
12659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012661
Matthias Kloseb9621712010-04-24 17:59:49 +000012662$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012663
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012666
12667fi
12668done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012669
Thomas Wouters3a584202000-08-05 23:28:51 +000012670for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012671do :
12672 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012673if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012675#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012678/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012680int
12681main ()
12682{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
12689
Guido van Rossum627b2d71993-12-24 10:39:16 +000012690else
Skip Montanaro6dead952003-09-25 14:50:04 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012693
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Guido van Rossum627b2d71993-12-24 10:39:16 +000012695fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012697
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012699done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012700
Michael W. Hudson54241132001-12-07 15:38:26 +000012701
Gregory P. Smith387512c2018-12-30 15:42:32 -080012702# We search for both crypt and crypt_r as one or the other may be defined
12703# This gets us our -lcrypt in LIBS when required on the target platform.
12704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12705$as_echo_n "checking for library containing crypt... " >&6; }
12706if ${ac_cv_search_crypt+:} false; then :
12707 $as_echo_n "(cached) " >&6
12708else
12709 ac_func_search_save_LIBS=$LIBS
12710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12711/* end confdefs.h. */
12712
12713/* Override any GCC internal prototype to avoid an error.
12714 Use char because int might match the return type of a GCC
12715 builtin and then its argument prototype would still apply. */
12716#ifdef __cplusplus
12717extern "C"
12718#endif
12719char crypt ();
12720int
12721main ()
12722{
12723return crypt ();
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728for ac_lib in '' crypt; do
12729 if test -z "$ac_lib"; then
12730 ac_res="none required"
12731 else
12732 ac_res=-l$ac_lib
12733 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12734 fi
12735 if ac_fn_c_try_link "$LINENO"; then :
12736 ac_cv_search_crypt=$ac_res
12737fi
12738rm -f core conftest.err conftest.$ac_objext \
12739 conftest$ac_exeext
12740 if ${ac_cv_search_crypt+:} false; then :
12741 break
12742fi
12743done
12744if ${ac_cv_search_crypt+:} false; then :
12745
12746else
12747 ac_cv_search_crypt=no
12748fi
12749rm conftest.$ac_ext
12750LIBS=$ac_func_search_save_LIBS
12751fi
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12753$as_echo "$ac_cv_search_crypt" >&6; }
12754ac_res=$ac_cv_search_crypt
12755if test "$ac_res" != no; then :
12756 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12757
12758fi
12759
12760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12761$as_echo_n "checking for library containing crypt_r... " >&6; }
12762if ${ac_cv_search_crypt_r+:} false; then :
12763 $as_echo_n "(cached) " >&6
12764else
12765 ac_func_search_save_LIBS=$LIBS
12766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12767/* end confdefs.h. */
12768
12769/* Override any GCC internal prototype to avoid an error.
12770 Use char because int might match the return type of a GCC
12771 builtin and then its argument prototype would still apply. */
12772#ifdef __cplusplus
12773extern "C"
12774#endif
12775char crypt_r ();
12776int
12777main ()
12778{
12779return crypt_r ();
12780 ;
12781 return 0;
12782}
12783_ACEOF
12784for ac_lib in '' crypt; do
12785 if test -z "$ac_lib"; then
12786 ac_res="none required"
12787 else
12788 ac_res=-l$ac_lib
12789 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12790 fi
12791 if ac_fn_c_try_link "$LINENO"; then :
12792 ac_cv_search_crypt_r=$ac_res
12793fi
12794rm -f core conftest.err conftest.$ac_objext \
12795 conftest$ac_exeext
12796 if ${ac_cv_search_crypt_r+:} false; then :
12797 break
12798fi
12799done
12800if ${ac_cv_search_crypt_r+:} false; then :
12801
12802else
12803 ac_cv_search_crypt_r=no
12804fi
12805rm conftest.$ac_ext
12806LIBS=$ac_func_search_save_LIBS
12807fi
12808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12809$as_echo "$ac_cv_search_crypt_r" >&6; }
12810ac_res=$ac_cv_search_crypt_r
12811if test "$ac_res" != no; then :
12812 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12813
12814fi
12815
12816
12817ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12818if test "x$ac_cv_func_crypt_r" = xyes; then :
12819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820/* end confdefs.h. */
12821
12822#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12823#include <crypt.h>
12824
12825int
12826main ()
12827{
12828
12829struct crypt_data d;
12830char *r = crypt_r("", "", &d);
12831
12832 ;
12833 return 0;
12834}
12835_ACEOF
12836if ac_fn_c_try_compile "$LINENO"; then :
12837
12838$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12839
12840fi
12841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12842
12843fi
12844
12845
Victor Stinnere0be4232011-10-25 13:06:09 +020012846for ac_func in clock_gettime
12847do :
12848 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12849if test "x$ac_cv_func_clock_gettime" = xyes; then :
12850 cat >>confdefs.h <<_ACEOF
12851#define HAVE_CLOCK_GETTIME 1
12852_ACEOF
12853
12854else
12855
12856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12857$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12858if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12859 $as_echo_n "(cached) " >&6
12860else
12861 ac_check_lib_save_LIBS=$LIBS
12862LIBS="-lrt $LIBS"
12863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12864/* end confdefs.h. */
12865
12866/* Override any GCC internal prototype to avoid an error.
12867 Use char because int might match the return type of a GCC
12868 builtin and then its argument prototype would still apply. */
12869#ifdef __cplusplus
12870extern "C"
12871#endif
12872char clock_gettime ();
12873int
12874main ()
12875{
12876return clock_gettime ();
12877 ;
12878 return 0;
12879}
12880_ACEOF
12881if ac_fn_c_try_link "$LINENO"; then :
12882 ac_cv_lib_rt_clock_gettime=yes
12883else
12884 ac_cv_lib_rt_clock_gettime=no
12885fi
12886rm -f core conftest.err conftest.$ac_objext \
12887 conftest$ac_exeext conftest.$ac_ext
12888LIBS=$ac_check_lib_save_LIBS
12889fi
12890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12891$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12892if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12893
Victor Stinner7efb8332014-08-29 15:41:08 +020012894 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012895 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12896
12897
12898$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12899
12900
12901fi
12902
12903
12904fi
12905done
12906
12907
12908for ac_func in clock_getres
12909do :
12910 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12911if test "x$ac_cv_func_clock_getres" = xyes; then :
12912 cat >>confdefs.h <<_ACEOF
12913#define HAVE_CLOCK_GETRES 1
12914_ACEOF
12915
12916else
12917
12918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12919$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12920if ${ac_cv_lib_rt_clock_getres+:} false; then :
12921 $as_echo_n "(cached) " >&6
12922else
12923 ac_check_lib_save_LIBS=$LIBS
12924LIBS="-lrt $LIBS"
12925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12926/* end confdefs.h. */
12927
12928/* Override any GCC internal prototype to avoid an error.
12929 Use char because int might match the return type of a GCC
12930 builtin and then its argument prototype would still apply. */
12931#ifdef __cplusplus
12932extern "C"
12933#endif
12934char clock_getres ();
12935int
12936main ()
12937{
12938return clock_getres ();
12939 ;
12940 return 0;
12941}
12942_ACEOF
12943if ac_fn_c_try_link "$LINENO"; then :
12944 ac_cv_lib_rt_clock_getres=yes
12945else
12946 ac_cv_lib_rt_clock_getres=no
12947fi
12948rm -f core conftest.err conftest.$ac_objext \
12949 conftest$ac_exeext conftest.$ac_ext
12950LIBS=$ac_check_lib_save_LIBS
12951fi
12952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12953$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12954if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12955
12956 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12957
12958
12959fi
12960
12961
12962fi
12963done
12964
12965
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012966for ac_func in clock_settime
12967do :
12968 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12969if test "x$ac_cv_func_clock_settime" = xyes; then :
12970 cat >>confdefs.h <<_ACEOF
12971#define HAVE_CLOCK_SETTIME 1
12972_ACEOF
12973
12974else
12975
12976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12977$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12978if ${ac_cv_lib_rt_clock_settime+:} false; then :
12979 $as_echo_n "(cached) " >&6
12980else
12981 ac_check_lib_save_LIBS=$LIBS
12982LIBS="-lrt $LIBS"
12983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12984/* end confdefs.h. */
12985
12986/* Override any GCC internal prototype to avoid an error.
12987 Use char because int might match the return type of a GCC
12988 builtin and then its argument prototype would still apply. */
12989#ifdef __cplusplus
12990extern "C"
12991#endif
12992char clock_settime ();
12993int
12994main ()
12995{
12996return clock_settime ();
12997 ;
12998 return 0;
12999}
13000_ACEOF
13001if ac_fn_c_try_link "$LINENO"; then :
13002 ac_cv_lib_rt_clock_settime=yes
13003else
13004 ac_cv_lib_rt_clock_settime=no
13005fi
13006rm -f core conftest.err conftest.$ac_objext \
13007 conftest$ac_exeext conftest.$ac_ext
13008LIBS=$ac_check_lib_save_LIBS
13009fi
13010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13011$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13012if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13013
13014 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13015
13016
13017fi
13018
13019
13020fi
13021done
13022
13023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13025$as_echo_n "checking for major... " >&6; }
13026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013027/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013028
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013029#if defined(MAJOR_IN_MKDEV)
13030#include <sys/mkdev.h>
13031#elif defined(MAJOR_IN_SYSMACROS)
13032#include <sys/sysmacros.h>
13033#else
13034#include <sys/types.h>
13035#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013036
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013037int
13038main ()
13039{
13040
13041 makedev(major(0),minor(0));
13042
13043 ;
13044 return 0;
13045}
13046_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013047if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013048
13049
Matthias Kloseb9621712010-04-24 17:59:49 +000013050$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13053$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013054
13055else
Skip Montanaro6dead952003-09-25 14:50:04 +000013056
Matthias Kloseb9621712010-04-24 17:59:49 +000013057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13058$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013059
13060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013061rm -f core conftest.err conftest.$ac_objext \
13062 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013063
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013064# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013065# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13067$as_echo_n "checking for getaddrinfo... " >&6; }
13068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013070
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013071#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013072#include <sys/socket.h>
13073#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013074#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013075
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013079getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013084if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013085 have_getaddrinfo=yes
13086else
Matthias Kloseb9621712010-04-24 17:59:49 +000013087 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
13091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13092$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013093if test $have_getaddrinfo = yes
13094then
Matthias Kloseb9621712010-04-24 17:59:49 +000013095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13096$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013097 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013098 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013099else
Matthias Kloseb9621712010-04-24 17:59:49 +000013100 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013101
13102if test "${enable_ipv6+set}" = set; then
13103 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13104else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013105 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013106fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013107else
Matthias Kloseb9621712010-04-24 17:59:49 +000013108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013109/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013110
Stefan Krah19c21392012-11-22 23:47:32 +010013111#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013112#include <sys/types.h>
13113#include <netdb.h>
13114#include <string.h>
13115#include <sys/socket.h>
13116#include <netinet/in.h>
13117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013118int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013119{
13120 int passive, gaierr, inet4 = 0, inet6 = 0;
13121 struct addrinfo hints, *ai, *aitop;
13122 char straddr[INET6_ADDRSTRLEN], strport[16];
13123
13124 for (passive = 0; passive <= 1; passive++) {
13125 memset(&hints, 0, sizeof(hints));
13126 hints.ai_family = AF_UNSPEC;
13127 hints.ai_flags = passive ? AI_PASSIVE : 0;
13128 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013129 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013130 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13131 (void)gai_strerror(gaierr);
13132 goto bad;
13133 }
13134 for (ai = aitop; ai; ai = ai->ai_next) {
13135 if (ai->ai_addr == NULL ||
13136 ai->ai_addrlen == 0 ||
13137 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13138 straddr, sizeof(straddr), strport, sizeof(strport),
13139 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13140 goto bad;
13141 }
13142 switch (ai->ai_family) {
13143 case AF_INET:
13144 if (strcmp(strport, "54321") != 0) {
13145 goto bad;
13146 }
13147 if (passive) {
13148 if (strcmp(straddr, "0.0.0.0") != 0) {
13149 goto bad;
13150 }
13151 } else {
13152 if (strcmp(straddr, "127.0.0.1") != 0) {
13153 goto bad;
13154 }
13155 }
13156 inet4++;
13157 break;
13158 case AF_INET6:
13159 if (strcmp(strport, "54321") != 0) {
13160 goto bad;
13161 }
13162 if (passive) {
13163 if (strcmp(straddr, "::") != 0) {
13164 goto bad;
13165 }
13166 } else {
13167 if (strcmp(straddr, "::1") != 0) {
13168 goto bad;
13169 }
13170 }
13171 inet6++;
13172 break;
13173 case AF_UNSPEC:
13174 goto bad;
13175 break;
13176 default:
13177 /* another family support? */
13178 break;
13179 }
13180 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013181 freeaddrinfo(aitop);
13182 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013183 }
13184
13185 if (!(inet4 == 0 || inet4 == 2))
13186 goto bad;
13187 if (!(inet6 == 0 || inet6 == 2))
13188 goto bad;
13189
13190 if (aitop)
13191 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013192 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013193
13194 bad:
13195 if (aitop)
13196 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013197 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013198}
13199
Martin v. Löwis11437992002-04-12 09:54:03 +000013200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013201if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013202 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013203else
Matthias Kloseb9621712010-04-24 17:59:49 +000013204 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013210fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13215$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13216
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013217if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218then
13219 if test $ipv6 = yes
13220 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221 echo 'Fatal: You must get working getaddrinfo() function.'
13222 echo ' or you can specify "--disable-ipv6"'.
13223 exit 1
13224 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013225else
Martin v. Löwis11437992002-04-12 09:54:03 +000013226
Matthias Kloseb9621712010-04-24 17:59:49 +000013227$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013228
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013229fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013230
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013231for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013232do :
13233 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013234if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013236#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013237_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013238
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239fi
13240done
13241
Michael W. Hudson54241132001-12-07 15:38:26 +000013242
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13245$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013246if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013251#include <sys/types.h>
13252#include <sys/time.h>
13253#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Martin v. Löwis11437992002-04-12 09:54:03 +000013255int
13256main ()
13257{
13258if ((struct tm *) 0)
13259return 0;
13260 ;
13261 return 0;
13262}
13263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013264if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013265 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013266else
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13272$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013273if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Matthias Kloseb9621712010-04-24 17:59:49 +000013275$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276
13277fi
13278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13280$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013281if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013282 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013283else
Matthias Kloseb9621712010-04-24 17:59:49 +000013284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013286#include <sys/types.h>
13287#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289int
13290main ()
13291{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013292struct tm tm;
13293 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013294 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013295 ;
13296 return 0;
13297}
13298_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013299if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013300 ac_cv_struct_tm=time.h
13301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13307$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013308if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Matthias Kloseb9621712010-04-24 17:59:49 +000013310$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311
13312fi
13313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314ac_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 +000013315#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Matthias Kloseb9621712010-04-24 17:59:49 +000013317"
Victor Stinnere0be4232011-10-25 13:06:09 +020013318if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013319
13320cat >>confdefs.h <<_ACEOF
13321#define HAVE_STRUCT_TM_TM_ZONE 1
13322_ACEOF
13323
13324
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013325fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013326
Martin v. Löwis11437992002-04-12 09:54:03 +000013327if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13328
Matthias Kloseb9621712010-04-24 17:59:49 +000013329$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013330
13331else
Matthias Kloseb9621712010-04-24 17:59:49 +000013332 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13333"
Victor Stinnere0be4232011-10-25 13:06:09 +020013334if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013335 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013336else
Matthias Kloseb9621712010-04-24 17:59:49 +000013337 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013338fi
13339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013341#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342_ACEOF
13343
Matthias Kloseb9621712010-04-24 17:59:49 +000013344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13345$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013346if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348else
Matthias Kloseb9621712010-04-24 17:59:49 +000013349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013350/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013351#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352#if !HAVE_DECL_TZNAME
13353extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Martin v. Löwis11437992002-04-12 09:54:03 +000013356int
13357main ()
13358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ;
13361 return 0;
13362}
13363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013364if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013365 ac_cv_var_tzname=yes
13366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013369rm -f core conftest.err conftest.$ac_objext \
13370 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013371fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13373$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013374 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013377
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013378 fi
13379fi
13380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381ac_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 +020013382if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
13384cat >>confdefs.h <<_ACEOF
13385#define HAVE_STRUCT_STAT_ST_RDEV 1
13386_ACEOF
13387
13388
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013389fi
13390
Matthias Kloseb9621712010-04-24 17:59:49 +000013391ac_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 +020013392if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013393
Martin v. Löwis11437992002-04-12 09:54:03 +000013394cat >>confdefs.h <<_ACEOF
13395#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13396_ACEOF
13397
13398
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013399fi
13400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401ac_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 +020013402if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013403
13404cat >>confdefs.h <<_ACEOF
13405#define HAVE_STRUCT_STAT_ST_FLAGS 1
13406_ACEOF
13407
13408
13409fi
13410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411ac_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 +020013412if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013413
13414cat >>confdefs.h <<_ACEOF
13415#define HAVE_STRUCT_STAT_ST_GEN 1
13416_ACEOF
13417
13418
13419fi
13420
Matthias Kloseb9621712010-04-24 17:59:49 +000013421ac_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 +020013422if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013423
13424cat >>confdefs.h <<_ACEOF
13425#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13426_ACEOF
13427
13428
13429fi
13430
Matthias Kloseb9621712010-04-24 17:59:49 +000013431ac_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 +020013432if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013433
Martin v. Löwis11437992002-04-12 09:54:03 +000013434cat >>confdefs.h <<_ACEOF
13435#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13436_ACEOF
13437
13438
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013439fi
13440
Stefan Krah267b6392016-04-26 01:09:18 +020013441ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13442 #include <sys/types.h>
13443 #include <pwd.h>
13444
13445"
13446if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13447
13448cat >>confdefs.h <<_ACEOF
13449#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13450_ACEOF
13451
13452
13453fi
13454ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13455 #include <sys/types.h>
13456 #include <pwd.h>
13457
13458"
13459if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13460
13461cat >>confdefs.h <<_ACEOF
13462#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13463_ACEOF
13464
13465
13466fi
13467
Zachary Ware6a6967e2016-10-01 00:47:27 -050013468# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13469ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13470"
13471if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13472
13473cat >>confdefs.h <<_ACEOF
13474#define HAVE_SIGINFO_T_SI_BAND 1
13475_ACEOF
13476
13477
13478fi
13479
Michael W. Hudson54241132001-12-07 15:38:26 +000013480
Matthias Kloseb9621712010-04-24 17:59:49 +000013481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13482$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013483if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013484 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013485else
Matthias Kloseb159a552010-04-25 21:00:44 +000013486
Matthias Kloseb9621712010-04-24 17:59:49 +000013487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013488/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013489#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013490int
13491main ()
13492{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013493return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013494 ;
13495 return 0;
13496}
13497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013499 ac_cv_header_time_altzone=yes
13500else
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013505fi
13506
Matthias Kloseb9621712010-04-24 17:59:49 +000013507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13508$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013509if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512
13513fi
13514
Guido van Rossumda88dad1995-01-26 00:46:29 +000013515was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13517$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013519/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013520
13521#include <sys/types.h>
13522#include <sys/select.h>
13523#include <sys/time.h>
13524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528;
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ;
13530 return 0;
13531}
13532_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
13535
Matthias Kloseb9621712010-04-24 17:59:49 +000013536$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013537
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013538 was_it_defined=yes
13539
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13543$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544
Matthias Kloseb9621712010-04-24 17:59:49 +000013545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13546$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013547if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013548 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013549else
Matthias Kloseb9621712010-04-24 17:59:49 +000013550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013552#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013556struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ;
13558 return 0;
13559}
13560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013562 ac_cv_struct_addrinfo=yes
13563else
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13567fi
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13570$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013571if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013574
13575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13578$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013579if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013580 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013583/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584
13585# include <sys/types.h>
13586# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013587int
13588main ()
13589{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013591 ;
13592 return 0;
13593}
13594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013596 ac_cv_struct_sockaddr_storage=yes
13597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13601fi
13602
Matthias Kloseb9621712010-04-24 17:59:49 +000013603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13604$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013605if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013608
13609fi
13610
Christian Heimesdffa3942016-09-05 23:54:41 +020013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13612$as_echo_n "checking for sockaddr_alg... " >&6; }
13613if ${ac_cv_struct_sockaddr_alg+:} false; then :
13614 $as_echo_n "(cached) " >&6
13615else
13616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13617/* end confdefs.h. */
13618
13619# include <sys/types.h>
13620# include <sys/socket.h>
13621# include <linux/if_alg.h>
13622int
13623main ()
13624{
13625struct sockaddr_alg s
13626 ;
13627 return 0;
13628}
13629_ACEOF
13630if ac_fn_c_try_compile "$LINENO"; then :
13631 ac_cv_struct_sockaddr_alg=yes
13632else
13633 ac_cv_struct_sockaddr_alg=no
13634fi
13635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13636fi
13637
13638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13639$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13640if test $ac_cv_struct_sockaddr_alg = yes; then
13641
13642$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13643
13644fi
13645
Guido van Rossum627b2d71993-12-24 10:39:16 +000013646# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013647
Matthias Kloseb9621712010-04-24 17:59:49 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13649$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013650if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013651 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013652else
Matthias Kloseb9621712010-04-24 17:59:49 +000013653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013655$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013656int
13657main ()
13658{
13659static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013660test_array [0] = 0;
13661return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013662
13663 ;
13664 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013665}
Martin v. Löwis11437992002-04-12 09:54:03 +000013666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013667if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013668 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013669else
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13675$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013676if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013677 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013678
13679fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013680
Matthias Kloseb9621712010-04-24 17:59:49 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13682$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013683if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013685else
Matthias Kloseb9621712010-04-24 17:59:49 +000013686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013687/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689int
13690main ()
13691{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013694 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013696 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013697 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698 char const *const *pcpcc;
13699 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 /* NEC SVR4.0.2 mips cc rejects this. */
13701 struct point {int x, y;};
13702 static struct point const zero = {0,0};
13703 /* AIX XL C 1.02.0.0 rejects this.
13704 It does not let you subtract one const X* pointer from another in
13705 an arm of an if-expression whose if-part is not a constant
13706 expression */
13707 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013708 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013710 ++pcpcc;
13711 ppc = (char**) pcpcc;
13712 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013713 { /* SCO 3.2v4 cc rejects this sort of thing. */
13714 char tx;
13715 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013717
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013719 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 }
13721 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13722 int x[] = {25, 17};
13723 const int *foo = &x[0];
13724 ++foo;
13725 }
13726 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13727 typedef const int *iptr;
13728 iptr p = 0;
13729 ++p;
13730 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013731 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013732 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013733 struct s { int j; const int *ap[3]; } bx;
13734 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013735 }
13736 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13737 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013740 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013741#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 ;
13744 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013745}
Martin v. Löwis11437992002-04-12 09:54:03 +000013746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013747if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013748 ac_cv_c_const=yes
13749else
Matthias Kloseb9621712010-04-24 17:59:49 +000013750 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13755$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013756if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013759
13760fi
13761
Michael W. Hudson54241132001-12-07 15:38:26 +000013762
Guido van Rossumda88dad1995-01-26 00:46:29 +000013763works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13765$as_echo_n "checking for working signed char... " >&6; }
13766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013768
Martin v. Löwis11437992002-04-12 09:54:03 +000013769int
13770main ()
13771{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013772signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013773 ;
13774 return 0;
13775}
13776_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013777if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013778 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013779else
Skip Montanaro6dead952003-09-25 14:50:04 +000013780
Matthias Kloseb9621712010-04-24 17:59:49 +000013781$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013782
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013783
Guido van Rossum7f43da71994-08-01 12:15:30 +000013784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13787$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013788
Guido van Rossumda88dad1995-01-26 00:46:29 +000013789have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13791$as_echo_n "checking for prototypes... " >&6; }
13792cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013794int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013795int
13796main ()
13797{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013798return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013799 ;
13800 return 0;
13801}
13802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013803if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013806
Matthias Kloseb159a552010-04-25 21:00:44 +000013807 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13811$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013812
Guido van Rossumda88dad1995-01-26 00:46:29 +000013813works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13815$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013818
13819#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013820int foo(int x, ...) {
13821 va_list va;
13822 va_start(va, x);
13823 va_arg(va, int);
13824 va_arg(va, char *);
13825 va_arg(va, double);
13826 return 0;
13827}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013828
Martin v. Löwis11437992002-04-12 09:54:03 +000013829int
13830main ()
13831{
Guido van Rossum90eea071996-08-30 20:58:57 +000013832return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013833 ;
13834 return 0;
13835}
13836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013837if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
13839
Matthias Kloseb9621712010-04-24 17:59:49 +000013840$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013841
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013842 works=yes
13843
Guido van Rossum627b2d71993-12-24 10:39:16 +000013844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13847$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013848
Martin v. Löwisd6320502004-08-12 13:45:08 +000013849# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13851$as_echo_n "checking for socketpair... " >&6; }
13852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013853/* end confdefs.h. */
13854
13855#include <sys/types.h>
13856#include <sys/socket.h>
13857
13858int
13859main ()
13860{
13861void *x=socketpair
13862 ;
13863 return 0;
13864}
13865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013869
Matthias Kloseb159a552010-04-25 21:00:44 +000013870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013871$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013872else
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13874$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013875
13876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013878
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013879# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13881$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013883/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013884#include <sys/types.h>
13885#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013886int
13887main ()
13888{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013889struct sockaddr x;
13890x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 ;
13892 return 0;
13893}
13894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if ac_fn_c_try_compile "$LINENO"; then :
13896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13897$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013900
13901else
Matthias Kloseb9621712010-04-24 17:59:49 +000013902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13903$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013904
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013907
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013908# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013909
13910
Matthias Kloseb9621712010-04-24 17:59:49 +000013911ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013912if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013915
Matthias Kloseb9621712010-04-24 17:59:49 +000013916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13917$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013918 OLD_CFLAGS=$CFLAGS
13919 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013921/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013922
13923# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013924
Martin v. Löwis11437992002-04-12 09:54:03 +000013925int
13926main ()
13927{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013928
13929 char *name;
13930 struct hostent *he, *res;
13931 char buffer[2048];
13932 int buflen = 2048;
13933 int h_errnop;
13934
13935 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013936
13937 ;
13938 return 0;
13939}
13940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013941if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013942
Matthias Kloseb9621712010-04-24 17:59:49 +000013943 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013944
Martin v. Löwis11437992002-04-12 09:54:03 +000013945
Matthias Kloseb9621712010-04-24 17:59:49 +000013946$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13949$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013950
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013951else
Skip Montanaro6dead952003-09-25 14:50:04 +000013952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13954$as_echo "no" >&6; }
13955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13956$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013958/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013959
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013960# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013961
Martin v. Löwis11437992002-04-12 09:54:03 +000013962int
13963main ()
13964{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013965
13966 char *name;
13967 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013968 char buffer[2048];
13969 int buflen = 2048;
13970 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013971
Matthias Kloseb159a552010-04-25 21:00:44 +000013972 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
13974 ;
13975 return 0;
13976}
13977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Matthias Kloseb9621712010-04-24 17:59:49 +000013980 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013981
Martin v. Löwis11437992002-04-12 09:54:03 +000013982
Matthias Kloseb159a552010-04-25 21:00:44 +000013983$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13986$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013987
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988else
Skip Montanaro6dead952003-09-25 14:50:04 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13991$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13993$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995/* end confdefs.h. */
13996
13997# include <netdb.h>
13998
13999int
14000main ()
14001{
14002
14003 char *name;
14004 struct hostent *he;
14005 struct hostent_data data;
14006
14007 (void) gethostbyname_r(name, he, &data);
14008
14009 ;
14010 return 0;
14011}
14012_ACEOF
14013if ac_fn_c_try_compile "$LINENO"; then :
14014
14015 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14016
14017
14018$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14019
14020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14021$as_echo "yes" >&6; }
14022
14023else
14024
14025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14026$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014031fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014033
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014036 CFLAGS=$OLD_CFLAGS
14037
14038else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014039
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 for ac_func in gethostbyname
14041do :
14042 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014043if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014045#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014046_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014047
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014048fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014049done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014050
Michael W. Hudson54241132001-12-07 15:38:26 +000014051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052fi
14053
Michael W. Hudson54241132001-12-07 15:38:26 +000014054
14055
14056
14057
14058
14059
Guido van Rossum627b2d71993-12-24 10:39:16 +000014060# checks for system services
14061# (none yet)
14062
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014063# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014064ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014065if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014066
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014067else
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14069$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014070if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014072else
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014074LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078/* Override any GCC internal prototype to avoid an error.
14079 Use char because int might match the return type of a GCC
14080 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014081#ifdef __cplusplus
14082extern "C"
14083#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014084char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014085int
14086main ()
14087{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 ;
14090 return 0;
14091}
14092_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014093if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014097fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014098rm -f core conftest.err conftest.$ac_objext \
14099 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014100LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14103$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014104if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 cat >>confdefs.h <<_ACEOF
14106#define HAVE_LIBIEEE 1
14107_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014108
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014109 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110
Guido van Rossum627b2d71993-12-24 10:39:16 +000014111fi
14112
Michael W. Hudson54241132001-12-07 15:38:26 +000014113
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014114fi
14115
Michael W. Hudson54241132001-12-07 15:38:26 +000014116
Guido van Rossum7f43da71994-08-01 12:15:30 +000014117# check for --with-libm=...
14118
Guido van Rossum563e7081996-09-10 18:20:48 +000014119case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014120Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014121*) LIBM=-lm
14122esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14124$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014126# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014127if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014128 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014129if test "$withval" = no
14130then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14132$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014133elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014134then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14136$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014137else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014138fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014139else
Matthias Kloseb9621712010-04-24 17:59:49 +000014140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14141$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014142fi
14143
Guido van Rossum7f43da71994-08-01 12:15:30 +000014144
14145# check for --with-libc=...
14146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14148$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014151if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014153if test "$withval" = no
14154then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14156$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014157elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014158then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14160$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014161else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014163else
Matthias Kloseb9621712010-04-24 17:59:49 +000014164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14165$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014166fi
14167
Guido van Rossum7f43da71994-08-01 12:15:30 +000014168
Stefan Krah1919b7e2012-03-21 18:25:23 +010014169# **************************************
14170# * Check for gcc x64 inline assembler *
14171# **************************************
14172
14173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14174$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14176/* end confdefs.h. */
14177
14178int
14179main ()
14180{
14181
14182 __asm__ __volatile__ ("movq %rcx, %rax");
14183
14184 ;
14185 return 0;
14186}
14187_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014188if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014189 have_gcc_asm_for_x64=yes
14190else
14191 have_gcc_asm_for_x64=no
14192fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014193rm -f core conftest.err conftest.$ac_objext \
14194 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14196$as_echo "$have_gcc_asm_for_x64" >&6; }
14197if test "$have_gcc_asm_for_x64" = yes
14198then
14199
14200$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14201
14202fi
14203
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014204# **************************************************
14205# * Check for various properties of floating point *
14206# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014207
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14209$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14210if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014211 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014212else
14213
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014214
14215ax_cv_c_float_words_bigendian=unknown
14216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014217/* end confdefs.h. */
14218
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014219
14220double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14221
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014222
14223_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014224if ac_fn_c_try_compile "$LINENO"; then :
14225
14226
14227if grep noonsees conftest.$ac_objext >/dev/null ; then
14228 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014229fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014230if grep seesnoon conftest.$ac_objext >/dev/null ; then
14231 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14232 ax_cv_c_float_words_bigendian=no
14233 else
14234 ax_cv_c_float_words_bigendian=unknown
14235 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014236fi
14237
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014238
14239fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014241fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14243$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014244
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014245case $ax_cv_c_float_words_bigendian in
14246 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014247
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014248$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14249 ;;
14250 no)
14251 ;;
14252 *)
14253 as_fn_error $? "
14254
14255Unknown float word ordering. You need to manually preset
14256ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14257
14258 " "$LINENO" 5 ;;
14259esac
14260
14261
14262if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014263then
14264
Matthias Kloseb9621712010-04-24 17:59:49 +000014265$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014266
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014267elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014268then
14269
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14271
14272else
14273 # Some ARM platforms use a mixed-endian representation for doubles.
14274 # While Python doesn't currently have full support for these platforms
14275 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14276 # conversions work.
14277 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14278 # or little, then it must be this?
14279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014281
14282fi
14283
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014284# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014285# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014286# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014287# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014288# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014289# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014290
14291# This inline assembler syntax may also work for suncc and icc,
14292# so we try it on all platforms.
14293
Matthias Kloseb9621712010-04-24 17:59:49 +000014294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14295$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014297/* end confdefs.h. */
14298
14299int
14300main ()
14301{
14302
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014303 unsigned short cw;
14304 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14305 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014306
14307 ;
14308 return 0;
14309}
14310_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014311if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014312 have_gcc_asm_for_x87=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014315fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014316rm -f core conftest.err conftest.$ac_objext \
14317 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14319$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014320if test "$have_gcc_asm_for_x87" = yes
14321then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014322
Matthias Kloseb9621712010-04-24 17:59:49 +000014323$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014324
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014326
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14328$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14330/* end confdefs.h. */
14331
14332int
14333main ()
14334{
14335
14336 unsigned int fpcr;
14337 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14338 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14339
14340 ;
14341 return 0;
14342}
14343_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014344if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014345 have_gcc_asm_for_mc68881=yes
14346else
14347 have_gcc_asm_for_mc68881=no
14348fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014349rm -f core conftest.err conftest.$ac_objext \
14350 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14352$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14353if test "$have_gcc_asm_for_mc68881" = yes
14354then
14355
14356$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14357
14358fi
14359
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014360# Detect whether system arithmetic is subject to x87-style double
14361# rounding issues. The result of this test has little meaning on non
14362# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14363# mode is round-to-nearest and double rounding issues are present, and
14364# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14366$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014367# $BASECFLAGS may affect the result
14368ac_save_cc="$CC"
14369CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014370if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014371 ac_cv_x87_double_rounding=no
14372else
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014374/* end confdefs.h. */
14375
14376#include <stdlib.h>
14377#include <math.h>
14378int main() {
14379 volatile double x, y, z;
14380 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14381 x = 0.99999999999999989; /* 1-2**-53 */
14382 y = 1./x;
14383 if (y != 1.)
14384 exit(0);
14385 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14386 x = 1e16;
14387 y = 2.99999;
14388 z = x + y;
14389 if (z != 1e16+4.)
14390 exit(0);
14391 /* both tests show evidence of double rounding */
14392 exit(1);
14393}
14394
14395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014396if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014397 ac_cv_x87_double_rounding=no
14398else
Matthias Kloseb9621712010-04-24 17:59:49 +000014399 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14402 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014403fi
14404
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014405CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14407$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014408if test "$ac_cv_x87_double_rounding" = yes
14409then
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014412
14413fi
14414
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014415# ************************************
14416# * Check for mathematical functions *
14417# ************************************
14418
14419LIBS_SAVE=$LIBS
14420LIBS="$LIBS $LIBM"
14421
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014422for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14423do :
14424 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14425ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014426if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014427 cat >>confdefs.h <<_ACEOF
14428#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14429_ACEOF
14430
14431fi
14432done
14433
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014434for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014435do :
14436 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14437ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014438if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014439 cat >>confdefs.h <<_ACEOF
14440#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14441_ACEOF
14442
14443fi
14444done
14445
14446ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14447"
Victor Stinnere0be4232011-10-25 13:06:09 +020014448if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014449 ac_have_decl=1
14450else
14451 ac_have_decl=0
14452fi
14453
14454cat >>confdefs.h <<_ACEOF
14455#define HAVE_DECL_ISINF $ac_have_decl
14456_ACEOF
14457ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14458"
Victor Stinnere0be4232011-10-25 13:06:09 +020014459if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014460 ac_have_decl=1
14461else
14462 ac_have_decl=0
14463fi
14464
14465cat >>confdefs.h <<_ACEOF
14466#define HAVE_DECL_ISNAN $ac_have_decl
14467_ACEOF
14468ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14469"
Victor Stinnere0be4232011-10-25 13:06:09 +020014470if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014471 ac_have_decl=1
14472else
14473 ac_have_decl=0
14474fi
14475
14476cat >>confdefs.h <<_ACEOF
14477#define HAVE_DECL_ISFINITE $ac_have_decl
14478_ACEOF
14479
14480
Mark Dickinsona614f042009-11-28 12:48:43 +000014481# For multiprocessing module, check that sem_open
14482# actually works. For FreeBSD versions <= 7.2,
14483# the kernel module that provides POSIX semaphores
14484# isn't loaded by default, so an attempt to call
14485# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14487$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014488if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014489 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014490else
Matthias Kloseb9621712010-04-24 17:59:49 +000014491 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014492 ac_cv_posix_semaphores_enabled=yes
14493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014495/* end confdefs.h. */
14496
14497#include <unistd.h>
14498#include <fcntl.h>
14499#include <stdio.h>
14500#include <semaphore.h>
14501#include <sys/stat.h>
14502
14503int main(void) {
14504 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14505 if (a == SEM_FAILED) {
14506 perror("sem_open");
14507 return 1;
14508 }
14509 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014510 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014511 return 0;
14512}
14513
14514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014515if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014516 ac_cv_posix_semaphores_enabled=yes
14517else
Matthias Kloseb9621712010-04-24 17:59:49 +000014518 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014520rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14521 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014522fi
14523
14524
Mark Dickinsona614f042009-11-28 12:48:43 +000014525fi
14526
Matthias Kloseb9621712010-04-24 17:59:49 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14528$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014529if test $ac_cv_posix_semaphores_enabled = no
14530then
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014533
14534fi
14535
Mark Dickinson10683072009-04-18 21:18:19 +000014536# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14538$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014539if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014540 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014541else
Matthias Kloseb9621712010-04-24 17:59:49 +000014542 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014543 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014544else
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014546/* end confdefs.h. */
14547
14548#include <unistd.h>
14549#include <fcntl.h>
14550#include <stdio.h>
14551#include <semaphore.h>
14552#include <sys/stat.h>
14553
14554int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014555 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014556 int count;
14557 int res;
14558 if(a==SEM_FAILED){
14559 perror("sem_open");
14560 return 1;
14561
14562 }
14563 res = sem_getvalue(a, &count);
14564 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014565 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014566 return res==-1 ? 1 : 0;
14567}
14568
Mark Dickinson10683072009-04-18 21:18:19 +000014569_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014570if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014571 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014574fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14576 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014577fi
14578
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014579
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014580fi
14581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14583$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014584if test $ac_cv_broken_sem_getvalue = yes
14585then
14586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588
14589fi
14590
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014591ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14592"
14593if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14594 ac_have_decl=1
14595else
14596 ac_have_decl=0
14597fi
14598
14599cat >>confdefs.h <<_ACEOF
14600#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14601_ACEOF
14602ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14603"
14604if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14605 ac_have_decl=1
14606else
14607 ac_have_decl=0
14608fi
14609
14610cat >>confdefs.h <<_ACEOF
14611#define HAVE_DECL_RTLD_NOW $ac_have_decl
14612_ACEOF
14613ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14614"
14615if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14616 ac_have_decl=1
14617else
14618 ac_have_decl=0
14619fi
14620
14621cat >>confdefs.h <<_ACEOF
14622#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14623_ACEOF
14624ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14625"
14626if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14627 ac_have_decl=1
14628else
14629 ac_have_decl=0
14630fi
14631
14632cat >>confdefs.h <<_ACEOF
14633#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14634_ACEOF
14635ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14636"
14637if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14638 ac_have_decl=1
14639else
14640 ac_have_decl=0
14641fi
14642
14643cat >>confdefs.h <<_ACEOF
14644#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14645_ACEOF
14646ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14647"
14648if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14649 ac_have_decl=1
14650else
14651 ac_have_decl=0
14652fi
14653
14654cat >>confdefs.h <<_ACEOF
14655#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14656_ACEOF
14657ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14658"
14659if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14660 ac_have_decl=1
14661else
14662 ac_have_decl=0
14663fi
14664
14665cat >>confdefs.h <<_ACEOF
14666#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14667_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014668ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14669"
14670if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14671 ac_have_decl=1
14672else
14673 ac_have_decl=0
14674fi
14675
14676cat >>confdefs.h <<_ACEOF
14677#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14678_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014679
14680
Mark Dickinsonbd792642009-03-18 20:06:12 +000014681# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14683$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014684# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014685if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014686 enableval=$enable_big_digits; case $enable_big_digits in
14687yes)
14688 enable_big_digits=30 ;;
14689no)
14690 enable_big_digits=15 ;;
1469115|30)
14692 ;;
14693*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014694 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 +000014695esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14697$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014698
14699cat >>confdefs.h <<_ACEOF
14700#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14701_ACEOF
14702
14703
14704else
Matthias Kloseb9621712010-04-24 17:59:49 +000014705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14706$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014707fi
14708
14709
Guido van Rossumef2255b2000-03-10 22:30:29 +000014710# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014711ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014712if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014713
14714
Matthias Kloseb9621712010-04-24 17:59:49 +000014715$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014716
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014717 wchar_h="yes"
14718
Guido van Rossumef2255b2000-03-10 22:30:29 +000014719else
Martin v. Löwis11437992002-04-12 09:54:03 +000014720 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014721
14722fi
14723
Michael W. Hudson54241132001-12-07 15:38:26 +000014724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014726# determine wchar_t size
14727if test "$wchar_h" = yes
14728then
Matthias Kloseb9621712010-04-24 17:59:49 +000014729 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14731# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14732# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14734$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014735if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014737else
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14739"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
Martin v. Löwis11437992002-04-12 09:54:03 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 if test "$ac_cv_type_wchar_t" = yes; then
14743 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014745as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014746See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014747 else
14748 ac_cv_sizeof_wchar_t=0
14749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014751
Martin v. Löwis11437992002-04-12 09:54:03 +000014752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14754$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755
14756
14757
Martin v. Löwis11437992002-04-12 09:54:03 +000014758cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014759#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014760_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014761
Michael W. Hudson54241132001-12-07 15:38:26 +000014762
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014763fi
14764
Matthias Kloseb9621712010-04-24 17:59:49 +000014765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14766$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014767have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014769/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014770
14771#include <tcl.h>
14772#if TCL_UTF_MAX != 6
14773# error "NOT UCS4_TCL"
14774#endif
14775int
14776main ()
14777{
14778
14779 ;
14780 return 0;
14781}
14782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014783if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014784
14785
Matthias Kloseb9621712010-04-24 17:59:49 +000014786$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014787
14788 have_ucs4_tcl=yes
14789
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14793$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014794
Skip Montanaro6dead952003-09-25 14:50:04 +000014795# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014796if test "$wchar_h" = yes
14797then
14798 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14800$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014801 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014802 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014803else
14804
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014806 ac_cv_wchar_t_signed=yes
14807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014809/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014810
14811 #include <wchar.h>
14812 int main()
14813 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014814 /* Success: exit code 0 */
14815 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014816 }
14817
14818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014819if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014820 ac_cv_wchar_t_signed=yes
14821else
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014826fi
14827
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014828fi
14829
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14831$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014832fi
14833
Michael Osipov3738fad2018-08-24 18:17:19 +020014834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14835$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014836# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014837if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014838 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014839then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014842
Michael Osipov3738fad2018-08-24 18:17:19 +020014843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14844$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014845else
Michael Osipov3738fad2018-08-24 18:17:19 +020014846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14847$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014848fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014849
14850# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14852$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014853if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014855else
Matthias Kloseb9621712010-04-24 17:59:49 +000014856 ac_cv_c_bigendian=unknown
14857 # See if we're dealing with a universal compiler.
14858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14859/* end confdefs.h. */
14860#ifndef __APPLE_CC__
14861 not a universal capable compiler
14862 #endif
14863 typedef int dummy;
14864
Skip Montanaro6dead952003-09-25 14:50:04 +000014865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014866if ac_fn_c_try_compile "$LINENO"; then :
14867
14868 # Check for potential -arch flags. It is not universal unless
14869 # there are at least two -arch flags with different values.
14870 ac_arch=
14871 ac_prev=
14872 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14873 if test -n "$ac_prev"; then
14874 case $ac_word in
14875 i?86 | x86_64 | ppc | ppc64)
14876 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14877 ac_arch=$ac_word
14878 else
14879 ac_cv_c_bigendian=universal
14880 break
14881 fi
14882 ;;
14883 esac
14884 ac_prev=
14885 elif test "x$ac_word" = "x-arch"; then
14886 ac_prev=arch
14887 fi
14888 done
14889fi
14890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14891 if test $ac_cv_c_bigendian = unknown; then
14892 # See if sys/param.h defines the BYTE_ORDER macro.
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014894/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014895#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014896 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014897
Martin v. Löwis11437992002-04-12 09:54:03 +000014898int
14899main ()
14900{
Matthias Kloseb9621712010-04-24 17:59:49 +000014901#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14902 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14903 && LITTLE_ENDIAN)
14904 bogus endian macros
14905 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014906
14907 ;
14908 return 0;
14909}
14910_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014911if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014912 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014914/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014915#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918int
14919main ()
14920{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014921#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 not big endian
14923 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
14925 ;
14926 return 0;
14927}
14928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014929if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014930 ac_cv_c_bigendian=yes
14931else
Matthias Kloseb9621712010-04-24 17:59:49 +000014932 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014935fi
14936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937 fi
14938 if test $ac_cv_c_bigendian = unknown; then
14939 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014941/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014942#include <limits.h>
14943
Martin v. Löwis11437992002-04-12 09:54:03 +000014944int
14945main ()
14946{
Matthias Kloseb9621712010-04-24 17:59:49 +000014947#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14948 bogus endian macros
14949 #endif
14950
Martin v. Löwis11437992002-04-12 09:54:03 +000014951 ;
14952 return 0;
14953}
14954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014955if ac_fn_c_try_compile "$LINENO"; then :
14956 # It does; now see whether it defined to _BIG_ENDIAN or not.
14957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14958/* end confdefs.h. */
14959#include <limits.h>
14960
14961int
14962main ()
14963{
14964#ifndef _BIG_ENDIAN
14965 not big endian
14966 #endif
14967
14968 ;
14969 return 0;
14970}
14971_ACEOF
14972if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014974else
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14978fi
14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14980 fi
14981 if test $ac_cv_c_bigendian = unknown; then
14982 # Compile a test program.
14983 if test "$cross_compiling" = yes; then :
14984 # Try to guess by grepping values from an object file.
14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14986/* end confdefs.h. */
14987short int ascii_mm[] =
14988 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14989 short int ascii_ii[] =
14990 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14991 int use_ascii (int i) {
14992 return ascii_mm[i] + ascii_ii[i];
14993 }
14994 short int ebcdic_ii[] =
14995 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14996 short int ebcdic_mm[] =
14997 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14998 int use_ebcdic (int i) {
14999 return ebcdic_mm[i] + ebcdic_ii[i];
15000 }
15001 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015002
Matthias Kloseb9621712010-04-24 17:59:49 +000015003int
15004main ()
15005{
15006return use_ascii (foo) == use_ebcdic (foo);
15007 ;
15008 return 0;
15009}
15010_ACEOF
15011if ac_fn_c_try_compile "$LINENO"; then :
15012 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15013 ac_cv_c_bigendian=yes
15014 fi
15015 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15016 if test "$ac_cv_c_bigendian" = unknown; then
15017 ac_cv_c_bigendian=no
15018 else
15019 # finding both strings is unlikely to happen, but who knows?
15020 ac_cv_c_bigendian=unknown
15021 fi
15022 fi
15023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015025else
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015027/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015029int
15030main ()
15031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 /* Are we little or big endian? From Harbison&Steele. */
15034 union
15035 {
15036 long int l;
15037 char c[sizeof (long int)];
15038 } u;
15039 u.l = 1;
15040 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015041
15042 ;
15043 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015044}
Martin v. Löwis11437992002-04-12 09:54:03 +000015045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015046if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015047 ac_cv_c_bigendian=no
15048else
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15052 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15058$as_echo "$ac_cv_c_bigendian" >&6; }
15059 case $ac_cv_c_bigendian in #(
15060 yes)
15061 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15062;; #(
15063 no)
15064 ;; #(
15065 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015068
Matthias Kloseb9621712010-04-24 17:59:49 +000015069 ;; #(
15070 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015071 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015072 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015074
Michael W. Hudson54241132001-12-07 15:38:26 +000015075
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015076# ABI version string for Python extension modules. This appears between the
15077# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15078# from the following attributes which affect the ABI of this Python build (in
15079# this order):
15080#
15081# * The Python implementation (always 'cpython-' for us)
15082# * The major and minor version numbers
15083# * --with-pydebug (adds a 'd')
15084# * --with-pymalloc (adds a 'm')
15085# * --with-wide-unicode (adds a 'u')
15086#
15087# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015088# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15089# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015090
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15092$as_echo_n "checking ABIFLAGS... " >&6; }
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15094$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15096$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015097SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15099$as_echo "$SOABI" >&6; }
15100
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015101
15102case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015103 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015104 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15105 *)
15106 EXT_SUFFIX=${SHLIB_SUFFIX};;
15107esac
15108
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15110$as_echo_n "checking LDVERSION... " >&6; }
15111LDVERSION='$(VERSION)$(ABIFLAGS)'
15112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15113$as_echo "$LDVERSION" >&6; }
15114
doko@python.org87421192013-01-26 11:39:31 +010015115
doko@ubuntu.com55532312016-06-14 08:55:19 +020015116if test x$PLATFORM_TRIPLET = x; then
15117 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15118else
15119 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15120fi
doko@python.org87421192013-01-26 11:39:31 +010015121
15122
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015123# Check whether right shifting a negative integer extends the sign bit
15124# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15126$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015127if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015128 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130
Matthias Kloseb9621712010-04-24 17:59:49 +000015131if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015132 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015133else
Matthias Kloseb9621712010-04-24 17:59:49 +000015134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015135/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015136
15137int main()
15138{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015139 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015140}
15141
Martin v. Löwis11437992002-04-12 09:54:03 +000015142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015143if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015144 ac_cv_rshift_extends_sign=yes
15145else
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015147fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015150fi
15151
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152fi
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15155$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015156if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015157then
Martin v. Löwis11437992002-04-12 09:54:03 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015160
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015161fi
15162
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015163# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15165$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015166if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015167 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015171/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015173int
15174main ()
15175{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015176
15177 FILE *f = fopen("/dev/null", "r");
15178 flockfile(f);
15179 getc_unlocked(f);
15180 funlockfile(f);
15181
Martin v. Löwis11437992002-04-12 09:54:03 +000015182 ;
15183 return 0;
15184}
15185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015186if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015187 ac_cv_have_getc_unlocked=yes
15188else
Matthias Kloseb9621712010-04-24 17:59:49 +000015189 ac_cv_have_getc_unlocked=no
15190fi
15191rm -f core conftest.err conftest.$ac_objext \
15192 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15196$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015197if test "$ac_cv_have_getc_unlocked" = yes
15198then
Martin v. Löwis11437992002-04-12 09:54:03 +000015199
Matthias Kloseb9621712010-04-24 17:59:49 +000015200$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015201
15202fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015203
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015204# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015205# save the value of LIBS so we don't actually link Python with readline
15206LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015207
Gregory P. Smith18820942008-09-07 06:24:49 +000015208# On some systems we need to link readline to a termcap compatible
15209# library. NOTE: Keep the precedence of listed libraries synchronised
15210# with setup.py.
15211py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15213$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015214for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015215 if test -z "$py_libtermcap"; then
15216 READLINE_LIBS="-lreadline"
15217 else
15218 READLINE_LIBS="-lreadline -l$py_libtermcap"
15219 fi
15220 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015222/* end confdefs.h. */
15223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224/* Override any GCC internal prototype to avoid an error.
15225 Use char because int might match the return type of a GCC
15226 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015227#ifdef __cplusplus
15228extern "C"
15229#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015230char readline ();
15231int
15232main ()
15233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015239if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015240 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015242rm -f core conftest.err conftest.$ac_objext \
15243 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015244 if test $py_cv_lib_readline = yes; then
15245 break
15246 fi
15247done
15248# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15249#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015250if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15252$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015253else
Matthias Kloseb9621712010-04-24 17:59:49 +000015254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15255$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015256
Matthias Kloseb9621712010-04-24 17:59:49 +000015257$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015258
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015259fi
15260
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015261# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015263/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015264#include <readline/readline.h>
15265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015266if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015267 have_readline=yes
15268else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015269 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015270
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015271fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015272rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015273if test $have_readline = yes
15274then
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015276/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015277#include <readline/readline.h>
15278
15279_ACEOF
15280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015282
Matthias Kloseb9621712010-04-24 17:59:49 +000015283$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015284
15285fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015286rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015289/* end confdefs.h. */
15290#include <readline/readline.h>
15291
15292_ACEOF
15293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015297
15298fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015299rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015300
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015301fi
15302
Martin v. Löwis0daad592001-09-30 21:09:59 +000015303# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15305$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015306if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015308else
Martin v. Löwis11437992002-04-12 09:54:03 +000015309 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015310LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314/* Override any GCC internal prototype to avoid an error.
15315 Use char because int might match the return type of a GCC
15316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015317#ifdef __cplusplus
15318extern "C"
15319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015320char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015321int
15322main ()
15323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015324return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 ;
15326 return 0;
15327}
15328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015329if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015334rm -f core conftest.err conftest.$ac_objext \
15335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015336LIBS=$ac_check_lib_save_LIBS
15337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15339$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015340if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015341
Matthias Kloseb9621712010-04-24 17:59:49 +000015342$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015343
Martin v. Löwis0daad592001-09-30 21:09:59 +000015344fi
15345
Michael W. Hudson54241132001-12-07 15:38:26 +000015346
Thomas Wouters89d996e2007-09-08 17:39:28 +000015347# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15349$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015350if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015352else
15353 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015354LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015356/* end confdefs.h. */
15357
15358/* Override any GCC internal prototype to avoid an error.
15359 Use char because int might match the return type of a GCC
15360 builtin and then its argument prototype would still apply. */
15361#ifdef __cplusplus
15362extern "C"
15363#endif
15364char rl_completion_display_matches_hook ();
15365int
15366main ()
15367{
15368return rl_completion_display_matches_hook ();
15369 ;
15370 return 0;
15371}
15372_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015373if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015374 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15375else
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015377fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015378rm -f core conftest.err conftest.$ac_objext \
15379 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015380LIBS=$ac_check_lib_save_LIBS
15381fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15383$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015384if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015385
Matthias Kloseb9621712010-04-24 17:59:49 +000015386$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015387
15388fi
15389
15390
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015391# also in 4.0, but not in editline
15392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15393$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15394if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15395 $as_echo_n "(cached) " >&6
15396else
15397 ac_check_lib_save_LIBS=$LIBS
15398LIBS="-lreadline $READLINE_LIBS $LIBS"
15399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15400/* end confdefs.h. */
15401
15402/* Override any GCC internal prototype to avoid an error.
15403 Use char because int might match the return type of a GCC
15404 builtin and then its argument prototype would still apply. */
15405#ifdef __cplusplus
15406extern "C"
15407#endif
15408char rl_resize_terminal ();
15409int
15410main ()
15411{
15412return rl_resize_terminal ();
15413 ;
15414 return 0;
15415}
15416_ACEOF
15417if ac_fn_c_try_link "$LINENO"; then :
15418 ac_cv_lib_readline_rl_resize_terminal=yes
15419else
15420 ac_cv_lib_readline_rl_resize_terminal=no
15421fi
15422rm -f core conftest.err conftest.$ac_objext \
15423 conftest$ac_exeext conftest.$ac_ext
15424LIBS=$ac_check_lib_save_LIBS
15425fi
15426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15427$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15428if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15429
15430$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15431
15432fi
15433
15434
Martin v. Löwis0daad592001-09-30 21:09:59 +000015435# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15437$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015438if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015440else
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015442LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446/* Override any GCC internal prototype to avoid an error.
15447 Use char because int might match the return type of a GCC
15448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015449#ifdef __cplusplus
15450extern "C"
15451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015452char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015453int
15454main ()
15455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015456return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 ;
15458 return 0;
15459}
15460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015462 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015463else
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015465fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015466rm -f core conftest.err conftest.$ac_objext \
15467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015468LIBS=$ac_check_lib_save_LIBS
15469fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15471$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015472if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015473
Matthias Kloseb9621712010-04-24 17:59:49 +000015474$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015475
Guido van Rossum353ae582001-07-10 16:45:32 +000015476fi
15477
Jack Jansendd19cf82001-12-06 22:36:17 +000015478
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015479# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015481/* end confdefs.h. */
15482#include <readline/readline.h>
15483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015485 have_readline=yes
15486else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015487 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015488
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015489fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015490rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015491if test $have_readline = yes
15492then
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015494/* end confdefs.h. */
15495#include <readline/readline.h>
15496
15497_ACEOF
15498if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015499 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015500
Matthias Kloseb9621712010-04-24 17:59:49 +000015501$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015502
15503fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015504rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015505
15506fi
15507
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15509$as_echo_n "checking for append_history in -lreadline... " >&6; }
15510if ${ac_cv_lib_readline_append_history+:} false; then :
15511 $as_echo_n "(cached) " >&6
15512else
15513 ac_check_lib_save_LIBS=$LIBS
15514LIBS="-lreadline $READLINE_LIBS $LIBS"
15515cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15516/* end confdefs.h. */
15517
15518/* Override any GCC internal prototype to avoid an error.
15519 Use char because int might match the return type of a GCC
15520 builtin and then its argument prototype would still apply. */
15521#ifdef __cplusplus
15522extern "C"
15523#endif
15524char append_history ();
15525int
15526main ()
15527{
15528return append_history ();
15529 ;
15530 return 0;
15531}
15532_ACEOF
15533if ac_fn_c_try_link "$LINENO"; then :
15534 ac_cv_lib_readline_append_history=yes
15535else
15536 ac_cv_lib_readline_append_history=no
15537fi
15538rm -f core conftest.err conftest.$ac_objext \
15539 conftest$ac_exeext conftest.$ac_ext
15540LIBS=$ac_check_lib_save_LIBS
15541fi
15542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15543$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15544if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15545
15546$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15547
15548fi
15549
15550
Martin v. Löwis82bca632006-02-10 20:49:30 +000015551# End of readline checks: restore LIBS
15552LIBS=$LIBS_no_readline
15553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15555$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015556if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015557 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015558else
Martin v. Löwis11437992002-04-12 09:54:03 +000015559
Matthias Kloseb9621712010-04-24 17:59:49 +000015560if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015561 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015562else
Matthias Kloseb9621712010-04-24 17:59:49 +000015563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015564/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015565
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015566#include <stdlib.h>
15567#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015568int main()
15569{
15570 int val1 = nice(1);
15571 if (val1 != -1 && val1 == nice(2))
15572 exit(0);
15573 exit(1);
15574}
15575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015577if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015578 ac_cv_broken_nice=yes
15579else
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015584fi
15585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586fi
15587
Matthias Kloseb9621712010-04-24 17:59:49 +000015588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15589$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015590if test "$ac_cv_broken_nice" = yes
15591then
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
Matthias Kloseb9621712010-04-24 17:59:49 +000015593$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015594
15595fi
15596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15598$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015599if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015600 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015601else
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015603 ac_cv_broken_poll=no
15604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015606/* end confdefs.h. */
15607
15608#include <poll.h>
15609
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015610int main()
15611{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015612 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015613 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015614
15615 close (42);
15616
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015617 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015618 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015619 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015620 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015621 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015622 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015623 return 1;
15624}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015625
15626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015627if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015628 ac_cv_broken_poll=yes
15629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015631fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015635
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015636fi
15637
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15639$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015640if test "$ac_cv_broken_poll" = yes
15641then
15642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015644
15645fi
15646
Martin v. Löwis1d459062005-03-14 21:23:33 +000015647# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15649$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015650if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015651 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015652else
15653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015655 ac_cv_working_tzset=no
15656else
Matthias Kloseb9621712010-04-24 17:59:49 +000015657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015658/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015659
15660#include <stdlib.h>
15661#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015662#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015663
15664#if HAVE_TZNAME
15665extern char *tzname[];
15666#endif
15667
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015668int main()
15669{
Brett Cannon18367812003-09-19 00:59:16 +000015670 /* Note that we need to ensure that not only does tzset(3)
15671 do 'something' with localtime, but it works as documented
15672 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015673 This includes making sure that tzname is set properly if
15674 tm->tm_zone does not exist since it is the alternative way
15675 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015676
15677 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015678 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015679 */
15680
Martin v. Löwis1d459062005-03-14 21:23:33 +000015681 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015682 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15683
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015684 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015685 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015686 if (localtime(&groundhogday)->tm_hour != 0)
15687 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015688#if HAVE_TZNAME
15689 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15690 if (strcmp(tzname[0], "UTC") ||
15691 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15692 exit(1);
15693#endif
Brett Cannon18367812003-09-19 00:59:16 +000015694
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015695 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015696 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015697 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015698 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015699#if HAVE_TZNAME
15700 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15701 exit(1);
15702#endif
Brett Cannon18367812003-09-19 00:59:16 +000015703
15704 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15705 tzset();
15706 if (localtime(&groundhogday)->tm_hour != 11)
15707 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015708#if HAVE_TZNAME
15709 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15710 exit(1);
15711#endif
15712
15713#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015714 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15715 exit(1);
15716 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15717 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015718#endif
Brett Cannon18367812003-09-19 00:59:16 +000015719
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015720 exit(0);
15721}
15722
15723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015724if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725 ac_cv_working_tzset=yes
15726else
Matthias Kloseb9621712010-04-24 17:59:49 +000015727 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015731fi
15732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015733fi
15734
Matthias Kloseb9621712010-04-24 17:59:49 +000015735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15736$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015737if test "$ac_cv_working_tzset" = yes
15738then
15739
Matthias Kloseb9621712010-04-24 17:59:49 +000015740$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015741
15742fi
15743
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015744# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15746$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015747if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015749else
Matthias Kloseb9621712010-04-24 17:59:49 +000015750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015751/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015752#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015753int
15754main ()
15755{
15756
15757struct stat st;
15758st.st_mtim.tv_nsec = 1;
15759
15760 ;
15761 return 0;
15762}
15763_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015764if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015765 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015766else
Matthias Kloseb9621712010-04-24 17:59:49 +000015767 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015768fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15770fi
15771
Matthias Kloseb9621712010-04-24 17:59:49 +000015772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15773$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015774if test "$ac_cv_stat_tv_nsec" = yes
15775then
15776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778
15779fi
15780
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015781# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15783$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015784if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015785 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015786else
Matthias Kloseb9621712010-04-24 17:59:49 +000015787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015788/* end confdefs.h. */
15789#include <sys/stat.h>
15790int
15791main ()
15792{
15793
15794struct stat st;
15795st.st_mtimespec.tv_nsec = 1;
15796
15797 ;
15798 return 0;
15799}
15800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015801if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015802 ac_cv_stat_tv_nsec2=yes
15803else
Matthias Kloseb9621712010-04-24 17:59:49 +000015804 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15807fi
15808
Matthias Kloseb9621712010-04-24 17:59:49 +000015809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15810$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015811if test "$ac_cv_stat_tv_nsec2" = yes
15812then
15813
Matthias Kloseb9621712010-04-24 17:59:49 +000015814$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815
15816fi
15817
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015818# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015819ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015820if test "$cross_compiling" = no; then
15821 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15822fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015823
15824for ac_header in curses.h ncurses.h
15825do :
15826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15827ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15828if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15829 cat >>confdefs.h <<_ACEOF
15830#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15831_ACEOF
15832
15833fi
15834
15835done
15836
15837
15838# On Solaris, term.h requires curses.h
15839for ac_header in term.h
15840do :
15841 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15842#ifdef HAVE_CURSES_H
15843#include <curses.h>
15844#endif
15845
15846"
15847if test "x$ac_cv_header_term_h" = xyes; then :
15848 cat >>confdefs.h <<_ACEOF
15849#define HAVE_TERM_H 1
15850_ACEOF
15851
15852fi
15853
15854done
15855
15856
Jack Jansen666b1e72001-10-31 12:11:48 +000015857# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15859$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015860if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015862else
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015864/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015865#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015866int
15867main ()
15868{
Jack Jansen666b1e72001-10-31 12:11:48 +000015869
15870 int rtn;
15871 rtn = mvwdelch(0,0,0);
15872
Martin v. Löwis11437992002-04-12 09:54:03 +000015873 ;
15874 return 0;
15875}
15876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015877if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015878 ac_cv_mvwdelch_is_expression=yes
15879else
Matthias Kloseb9621712010-04-24 17:59:49 +000015880 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15883fi
15884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15886$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015887
15888if test "$ac_cv_mvwdelch_is_expression" = yes
15889then
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015892
15893fi
15894
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015895# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15896# structs since version 5.7. If the macro is defined as zero before including
15897# [n]curses.h, ncurses will expose fields of the structs regardless of the
15898# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15900$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015901if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015903else
Matthias Kloseb9621712010-04-24 17:59:49 +000015904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015905/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015906
15907 #define NCURSES_OPAQUE 0
15908 #include <curses.h>
15909
Martin v. Löwis11437992002-04-12 09:54:03 +000015910int
15911main ()
15912{
Jack Jansen666b1e72001-10-31 12:11:48 +000015913
15914 WINDOW *w;
15915 w->_flags = 0;
15916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917 ;
15918 return 0;
15919}
15920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015921if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015922 ac_cv_window_has_flags=yes
15923else
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15927fi
15928
Matthias Kloseb9621712010-04-24 17:59:49 +000015929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15930$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015931
Jack Jansen666b1e72001-10-31 12:11:48 +000015932
15933if test "$ac_cv_window_has_flags" = yes
15934then
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015937
15938fi
15939
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15941$as_echo_n "checking for is_pad... " >&6; }
15942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943/* end confdefs.h. */
15944#include <curses.h>
15945int
15946main ()
15947{
15948
15949#ifndef is_pad
15950void *x=is_pad
15951#endif
15952
15953 ;
15954 return 0;
15955}
15956_ACEOF
15957if ac_fn_c_try_compile "$LINENO"; then :
15958
15959$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15960
15961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15962$as_echo "yes" >&6; }
15963else
15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15965$as_echo "no" >&6; }
15966
15967fi
15968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15971$as_echo_n "checking for is_term_resized... " >&6; }
15972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015973/* end confdefs.h. */
15974#include <curses.h>
15975int
15976main ()
15977{
15978void *x=is_term_resized
15979 ;
15980 return 0;
15981}
15982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015984
Matthias Kloseb9621712010-04-24 17:59:49 +000015985$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015986
Matthias Kloseb159a552010-04-25 21:00:44 +000015987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015988$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989else
Matthias Kloseb9621712010-04-24 17:59:49 +000015990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15991$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015992
15993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15995
Matthias Kloseb9621712010-04-24 17:59:49 +000015996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15997$as_echo_n "checking for resize_term... " >&6; }
15998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015999/* end confdefs.h. */
16000#include <curses.h>
16001int
16002main ()
16003{
16004void *x=resize_term
16005 ;
16006 return 0;
16007}
16008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016009if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016010
Matthias Kloseb9621712010-04-24 17:59:49 +000016011$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016012
Matthias Kloseb159a552010-04-25 21:00:44 +000016013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015else
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16017$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018
16019fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16021
Matthias Kloseb9621712010-04-24 17:59:49 +000016022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16023$as_echo_n "checking for resizeterm... " >&6; }
16024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016025/* end confdefs.h. */
16026#include <curses.h>
16027int
16028main ()
16029{
16030void *x=resizeterm
16031 ;
16032 return 0;
16033}
16034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016035if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016036
Matthias Kloseb9621712010-04-24 17:59:49 +000016037$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016038
Matthias Kloseb159a552010-04-25 21:00:44 +000016039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016040$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016041else
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16043$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016044
16045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016047
16048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16049$as_echo_n "checking for immedok... " >&6; }
16050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16051/* end confdefs.h. */
16052#include <curses.h>
16053int
16054main ()
16055{
16056
16057#ifndef immedok
16058void *x=immedok
16059#endif
16060
16061 ;
16062 return 0;
16063}
16064_ACEOF
16065if ac_fn_c_try_compile "$LINENO"; then :
16066
16067$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16068
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16070$as_echo "yes" >&6; }
16071else
16072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16073$as_echo "no" >&6; }
16074
16075fi
16076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16077
16078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16079$as_echo_n "checking for syncok... " >&6; }
16080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16081/* end confdefs.h. */
16082#include <curses.h>
16083int
16084main ()
16085{
16086
16087#ifndef syncok
16088void *x=syncok
16089#endif
16090
16091 ;
16092 return 0;
16093}
16094_ACEOF
16095if ac_fn_c_try_compile "$LINENO"; then :
16096
16097$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16098
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16100$as_echo "yes" >&6; }
16101else
16102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16103$as_echo "no" >&6; }
16104
16105fi
16106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16107
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16109$as_echo_n "checking for wchgat... " >&6; }
16110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16111/* end confdefs.h. */
16112#include <curses.h>
16113int
16114main ()
16115{
16116
16117#ifndef wchgat
16118void *x=wchgat
16119#endif
16120
16121 ;
16122 return 0;
16123}
16124_ACEOF
16125if ac_fn_c_try_compile "$LINENO"; then :
16126
16127$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16128
16129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16130$as_echo "yes" >&6; }
16131else
16132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16133$as_echo "no" >&6; }
16134
16135fi
16136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16137
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16139$as_echo_n "checking for filter... " >&6; }
16140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141/* end confdefs.h. */
16142#include <curses.h>
16143int
16144main ()
16145{
16146
16147#ifndef filter
16148void *x=filter
16149#endif
16150
16151 ;
16152 return 0;
16153}
16154_ACEOF
16155if ac_fn_c_try_compile "$LINENO"; then :
16156
16157$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16158
16159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16160$as_echo "yes" >&6; }
16161else
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16163$as_echo "no" >&6; }
16164
16165fi
16166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16167
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16169$as_echo_n "checking for has_key... " >&6; }
16170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16171/* end confdefs.h. */
16172#include <curses.h>
16173int
16174main ()
16175{
16176
16177#ifndef has_key
16178void *x=has_key
16179#endif
16180
16181 ;
16182 return 0;
16183}
16184_ACEOF
16185if ac_fn_c_try_compile "$LINENO"; then :
16186
16187$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16188
16189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16190$as_echo "yes" >&6; }
16191else
16192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16193$as_echo "no" >&6; }
16194
16195fi
16196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16197
16198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16199$as_echo_n "checking for typeahead... " >&6; }
16200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201/* end confdefs.h. */
16202#include <curses.h>
16203int
16204main ()
16205{
16206
16207#ifndef typeahead
16208void *x=typeahead
16209#endif
16210
16211 ;
16212 return 0;
16213}
16214_ACEOF
16215if ac_fn_c_try_compile "$LINENO"; then :
16216
16217$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16218
16219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16220$as_echo "yes" >&6; }
16221else
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16223$as_echo "no" >&6; }
16224
16225fi
16226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16227
16228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16229$as_echo_n "checking for use_env... " >&6; }
16230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16231/* end confdefs.h. */
16232#include <curses.h>
16233int
16234main ()
16235{
16236
16237#ifndef use_env
16238void *x=use_env
16239#endif
16240
16241 ;
16242 return 0;
16243}
16244_ACEOF
16245if ac_fn_c_try_compile "$LINENO"; then :
16246
16247$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16248
16249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16250$as_echo "yes" >&6; }
16251else
16252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16253$as_echo "no" >&6; }
16254
16255fi
16256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016257# last curses configure check
16258CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16261$as_echo "$as_me: checking for device files" >&6;}
16262
16263if test "x$cross_compiling" = xyes; then
16264 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16266$as_echo_n "checking for /dev/ptmx... " >&6; }
16267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16268$as_echo "not set" >&6; }
16269 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16270 fi
16271 if test "${ac_cv_file__dev_ptc+set}" != set; then
16272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16273$as_echo_n "checking for /dev/ptc... " >&6; }
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16275$as_echo "not set" >&6; }
16276 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16277 fi
16278fi
16279
Matthias Kloseb9621712010-04-24 17:59:49 +000016280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16281$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016282if ${ac_cv_file__dev_ptmx+:} false; then :
16283 $as_echo_n "(cached) " >&6
16284else
16285 test "$cross_compiling" = yes &&
16286 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16287if test -r "/dev/ptmx"; then
16288 ac_cv_file__dev_ptmx=yes
16289else
16290 ac_cv_file__dev_ptmx=no
16291fi
16292fi
16293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16294$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16295if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016296
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016297fi
16298
16299if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016300
Matthias Kloseb9621712010-04-24 17:59:49 +000016301$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016302
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016303fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16305$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016306if ${ac_cv_file__dev_ptc+:} false; then :
16307 $as_echo_n "(cached) " >&6
16308else
16309 test "$cross_compiling" = yes &&
16310 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16311if test -r "/dev/ptc"; then
16312 ac_cv_file__dev_ptc=yes
16313else
16314 ac_cv_file__dev_ptc=no
16315fi
16316fi
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16318$as_echo "$ac_cv_file__dev_ptc" >&6; }
16319if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016320
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016321fi
16322
16323if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016324
Matthias Kloseb9621712010-04-24 17:59:49 +000016325$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016326
Neal Norwitz865400f2003-03-21 01:42:58 +000016327fi
16328
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016329if test $ac_sys_system = Darwin
16330then
16331 LIBS="$LIBS -framework CoreFoundation"
16332fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016333
Matthias Kloseb9621712010-04-24 17:59:49 +000016334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16335$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016336if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016337 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016338else
Matthias Kloseb9621712010-04-24 17:59:49 +000016339 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016340 ac_cv_have_size_t_format="cross -- assuming yes"
16341
Thomas Wouters477c8d52006-05-27 19:21:47 +000016342else
Matthias Kloseb9621712010-04-24 17:59:49 +000016343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016344/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016345
Thomas Wouters477c8d52006-05-27 19:21:47 +000016346#include <stdio.h>
16347#include <stddef.h>
16348#include <string.h>
16349
Christian Heimes2c181612007-12-17 20:04:13 +000016350#ifdef HAVE_SYS_TYPES_H
16351#include <sys/types.h>
16352#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016353
16354#ifdef HAVE_SSIZE_T
16355typedef ssize_t Py_ssize_t;
16356#elif SIZEOF_VOID_P == SIZEOF_LONG
16357typedef long Py_ssize_t;
16358#else
16359typedef int Py_ssize_t;
16360#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016361
Christian Heimes2c181612007-12-17 20:04:13 +000016362int main()
16363{
16364 char buffer[256];
16365
Thomas Wouters477c8d52006-05-27 19:21:47 +000016366 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16367 return 1;
16368
Thomas Wouters89f507f2006-12-13 04:49:30 +000016369 if (strcmp(buffer, "123"))
16370 return 1;
16371
16372 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16373 return 1;
16374
16375 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016376 return 1;
16377
16378 return 0;
16379}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016380
Thomas Wouters477c8d52006-05-27 19:21:47 +000016381_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016382if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016383 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016384else
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016386fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16388 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016389fi
16390
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016391fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16393$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016394if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016395
Matthias Kloseb9621712010-04-24 17:59:49 +000016396$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016397
16398fi
16399
Matthias Kloseb9621712010-04-24 17:59:49 +000016400ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016401#ifdef HAVE_SYS_TYPES_H
16402#include <sys/types.h>
16403#endif
16404#ifdef HAVE_SYS_SOCKET_H
16405#include <sys/socket.h>
16406#endif
16407
Matthias Kloseb9621712010-04-24 17:59:49 +000016408"
Victor Stinnere0be4232011-10-25 13:06:09 +020016409if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016410
Martin v. Löwis11437992002-04-12 09:54:03 +000016411else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016414
16415fi
16416
Michael W. Hudson54241132001-12-07 15:38:26 +000016417
Matthias Kloseb9621712010-04-24 17:59:49 +000016418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16419$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016420if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016421 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016422else
Matthias Kloseb9621712010-04-24 17:59:49 +000016423 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016424 ac_cv_broken_mbstowcs=no
16425else
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016427/* end confdefs.h. */
16428
Stefan Krah19c21392012-11-22 23:47:32 +010016429#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016430#include<stdlib.h>
16431int main() {
16432 size_t len = -1;
16433 const char *str = "text";
16434 len = mbstowcs(NULL, str, 0);
16435 return (len != 4);
16436}
16437
16438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016439if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016440 ac_cv_broken_mbstowcs=no
16441else
Matthias Kloseb9621712010-04-24 17:59:49 +000016442 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016443fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16445 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016446fi
16447
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016448fi
16449
Matthias Kloseb9621712010-04-24 17:59:49 +000016450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16451$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016452if test "$ac_cv_broken_mbstowcs" = yes
16453then
16454
Matthias Kloseb9621712010-04-24 17:59:49 +000016455$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016456
16457fi
16458
Antoine Pitroub52ec782009-01-25 16:34:23 +000016459# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16461$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016462
16463# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016464if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016465 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016466if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016467then
16468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016470
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16472$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016473fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016474if test "$withval" = no
16475then
16476
16477$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16480$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016481fi
16482
Antoine Pitrou042b1282010-08-13 21:15:58 +000016483else
16484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16485$as_echo "no value specified" >&6; }
16486fi
16487
Antoine Pitroub52ec782009-01-25 16:34:23 +000016488
Matthias Kloseb17289e2012-03-15 19:51:34 +010016489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16490$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16491if ${ac_cv_computed_gotos+:} false; then :
16492 $as_echo_n "(cached) " >&6
16493else
16494 if test "$cross_compiling" = yes; then :
16495 if test "${with_computed_gotos+set}" = set; then
16496 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16497 else
16498 ac_cv_computed_gotos=no
16499 fi
16500else
16501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502/* end confdefs.h. */
16503
16504int main(int argc, char **argv)
16505{
16506 static void *targets[1] = { &&LABEL1 };
16507 goto LABEL2;
16508LABEL1:
16509 return 0;
16510LABEL2:
16511 goto *targets[0];
16512 return 1;
16513}
16514
16515_ACEOF
16516if ac_fn_c_try_run "$LINENO"; then :
16517 ac_cv_computed_gotos=yes
16518else
16519 ac_cv_computed_gotos=no
16520fi
16521rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16522 conftest.$ac_objext conftest.beam conftest.$ac_ext
16523fi
16524
16525fi
16526
16527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16528$as_echo "$ac_cv_computed_gotos" >&6; }
16529case "$ac_cv_computed_gotos" in yes*)
16530
16531$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16532
16533esac
16534
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016535case $ac_sys_system in
16536AIX*)
16537
16538$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16539 ;;
16540esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016541
Michael W. Hudson54241132001-12-07 15:38:26 +000016542
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016543
16544
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016545for h in `(cd $srcdir;echo Python/thread_*.h)`
16546do
16547 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16548done
16549
Michael W. Hudson54241132001-12-07 15:38:26 +000016550
Victor Stinner21a74a92019-04-11 22:28:12 +020016551SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16553$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016554for dir in $SRCDIRS; do
16555 if test ! -d $dir; then
16556 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016557 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016558done
Matthias Kloseb9621712010-04-24 17:59:49 +000016559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16560$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016561
Stefan Krah1919b7e2012-03-21 18:25:23 +010016562# Availability of -O2:
16563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16564$as_echo_n "checking for -O2... " >&6; }
16565saved_cflags="$CFLAGS"
16566CFLAGS="-O2"
16567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568/* end confdefs.h. */
16569
16570int
16571main ()
16572{
16573
16574
16575 ;
16576 return 0;
16577}
16578_ACEOF
16579if ac_fn_c_try_compile "$LINENO"; then :
16580 have_O2=yes
16581else
16582 have_O2=no
16583fi
16584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16586$as_echo "$have_O2" >&6; }
16587CFLAGS="$saved_cflags"
16588
16589# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16590# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16592$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16593saved_cflags="$CFLAGS"
16594CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16595if test "$have_O2" = no; then
16596 CFLAGS=""
16597fi
16598if test "$cross_compiling" = yes; then :
16599 have_glibc_memmove_bug=undefined
16600else
16601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16602/* end confdefs.h. */
16603
16604#include <stdio.h>
16605#include <stdlib.h>
16606#include <string.h>
16607void foo(void *p, void *q) { memmove(p, q, 19); }
16608int main() {
16609 char a[32] = "123456789000000000";
16610 foo(&a[9], a);
16611 if (strcmp(a, "123456789123456789000000000") != 0)
16612 return 1;
16613 foo(a, &a[9]);
16614 if (strcmp(a, "123456789000000000") != 0)
16615 return 1;
16616 return 0;
16617}
16618
16619_ACEOF
16620if ac_fn_c_try_run "$LINENO"; then :
16621 have_glibc_memmove_bug=no
16622else
16623 have_glibc_memmove_bug=yes
16624fi
16625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16626 conftest.$ac_objext conftest.beam conftest.$ac_ext
16627fi
16628
16629CFLAGS="$saved_cflags"
16630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16631$as_echo "$have_glibc_memmove_bug" >&6; }
16632if test "$have_glibc_memmove_bug" = yes; then
16633
16634$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16635
16636fi
16637
16638if test "$have_gcc_asm_for_x87" = yes; then
16639 # Some versions of gcc miscompile inline asm:
16640 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16641 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16642 case $CC in
16643 *gcc*)
16644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16645$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16646 saved_cflags="$CFLAGS"
16647 CFLAGS="-O2"
16648 if test "$cross_compiling" = yes; then :
16649 have_ipa_pure_const_bug=undefined
16650else
16651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16652/* end confdefs.h. */
16653
16654 __attribute__((noinline)) int
16655 foo(int *p) {
16656 int r;
16657 asm ( "movl \$6, (%1)\n\t"
16658 "xorl %0, %0\n\t"
16659 : "=r" (r) : "r" (p) : "memory"
16660 );
16661 return r;
16662 }
16663 int main() {
16664 int p = 8;
16665 if ((foo(&p) ? : p) != 6)
16666 return 1;
16667 return 0;
16668 }
16669
16670_ACEOF
16671if ac_fn_c_try_run "$LINENO"; then :
16672 have_ipa_pure_const_bug=no
16673else
16674 have_ipa_pure_const_bug=yes
16675fi
16676rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16677 conftest.$ac_objext conftest.beam conftest.$ac_ext
16678fi
16679
16680 CFLAGS="$saved_cflags"
16681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16682$as_echo "$have_ipa_pure_const_bug" >&6; }
16683 if test "$have_ipa_pure_const_bug" = yes; then
16684
16685$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16686
16687 fi
16688 ;;
16689 esac
16690fi
16691
Victor Stinner4f5366e2015-01-09 02:13:19 +010016692# Check for stdatomic.h
16693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16694$as_echo_n "checking for stdatomic.h... " >&6; }
16695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16696/* end confdefs.h. */
16697
16698
16699 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016700 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016701 int main() {
16702 int loaded_value = atomic_load(&value);
16703 return 0;
16704 }
16705
16706
16707_ACEOF
16708if ac_fn_c_try_link "$LINENO"; then :
16709 have_stdatomic_h=yes
16710else
16711 have_stdatomic_h=no
16712fi
16713rm -f core conftest.err conftest.$ac_objext \
16714 conftest$ac_exeext conftest.$ac_ext
16715
16716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16717$as_echo "$have_stdatomic_h" >&6; }
16718
16719if test "$have_stdatomic_h" = yes; then
16720
16721$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16722
16723fi
16724
16725# Check for GCC >= 4.7 __atomic builtins
16726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16727$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16729/* end confdefs.h. */
16730
16731
16732 volatile int val = 1;
16733 int main() {
16734 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16735 return 0;
16736 }
16737
16738
16739_ACEOF
16740if ac_fn_c_try_link "$LINENO"; then :
16741 have_builtin_atomic=yes
16742else
16743 have_builtin_atomic=no
16744fi
16745rm -f core conftest.err conftest.$ac_objext \
16746 conftest$ac_exeext conftest.$ac_ext
16747
16748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16749$as_echo "$have_builtin_atomic" >&6; }
16750
16751if test "$have_builtin_atomic" = yes; then
16752
16753$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16754
16755fi
16756
Ned Deily322f5ba2013-11-21 23:01:59 -080016757# ensurepip option
16758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16759$as_echo_n "checking for ensurepip... " >&6; }
16760
16761# Check whether --with-ensurepip was given.
16762if test "${with_ensurepip+set}" = set; then :
16763 withval=$with_ensurepip;
16764else
16765 with_ensurepip=upgrade
16766fi
16767
16768case $with_ensurepip in #(
16769 yes|upgrade) :
16770 ENSUREPIP=upgrade ;; #(
16771 install) :
16772 ENSUREPIP=install ;; #(
16773 no) :
16774 ENSUREPIP=no ;; #(
16775 *) :
16776 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16777esac
16778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16779$as_echo "$ENSUREPIP" >&6; }
16780
16781
Victor Stinner35a97c02015-03-08 02:59:09 +010016782# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16784$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16786/* end confdefs.h. */
16787
16788
16789 #include <dirent.h>
16790
16791 int main() {
16792 struct dirent entry;
16793 return entry.d_type == DT_UNKNOWN;
16794 }
16795
16796
16797_ACEOF
16798if ac_fn_c_try_link "$LINENO"; then :
16799 have_dirent_d_type=yes
16800else
16801 have_dirent_d_type=no
16802fi
16803rm -f core conftest.err conftest.$ac_objext \
16804 conftest$ac_exeext conftest.$ac_ext
16805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16806$as_echo "$have_dirent_d_type" >&6; }
16807
16808if test "$have_dirent_d_type" = yes; then
16809
16810$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16811
16812fi
16813
Victor Stinner9eb57c52015-03-19 22:21:49 +010016814# check if the Linux getrandom() syscall is available
16815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16816$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16818/* end confdefs.h. */
16819
16820
Victor Stinner1b80b242016-04-12 22:34:58 +020016821 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016822 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016823 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016824
16825 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016826 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016827 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016828 const int flags = GRND_NONBLOCK;
16829 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016830 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016831 return 0;
16832 }
16833
16834
16835_ACEOF
16836if ac_fn_c_try_link "$LINENO"; then :
16837 have_getrandom_syscall=yes
16838else
16839 have_getrandom_syscall=no
16840fi
16841rm -f core conftest.err conftest.$ac_objext \
16842 conftest$ac_exeext conftest.$ac_ext
16843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16844$as_echo "$have_getrandom_syscall" >&6; }
16845
16846if test "$have_getrandom_syscall" = yes; then
16847
16848$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16849
16850fi
16851
Victor Stinner3abf44e2015-09-18 15:38:37 +020016852# check if the getrandom() function is available
16853# the test was written for the Solaris function of <sys/random.h>
16854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16855$as_echo_n "checking for the getrandom() function... " >&6; }
16856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16857/* end confdefs.h. */
16858
16859
16860 #include <sys/random.h>
16861
16862 int main() {
16863 char buffer[1];
16864 const size_t buflen = sizeof(buffer);
16865 const int flags = 0;
16866 /* ignore the result, Python checks for ENOSYS at runtime */
16867 (void)getrandom(buffer, buflen, flags);
16868 return 0;
16869 }
16870
16871
16872_ACEOF
16873if ac_fn_c_try_link "$LINENO"; then :
16874 have_getrandom=yes
16875else
16876 have_getrandom=no
16877fi
16878rm -f core conftest.err conftest.$ac_objext \
16879 conftest$ac_exeext conftest.$ac_ext
16880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16881$as_echo "$have_getrandom" >&6; }
16882
16883if test "$have_getrandom" = yes; then
16884
16885$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16886
16887fi
16888
Neil Schemenauer5741c452019-02-08 10:48:46 -080016889# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16890# shm_* may only be available if linking against librt
16891save_LIBS="$LIBS"
16892save_includes_default="$ac_includes_default"
16893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16894$as_echo_n "checking for library containing shm_open... " >&6; }
16895if ${ac_cv_search_shm_open+:} false; then :
16896 $as_echo_n "(cached) " >&6
16897else
16898 ac_func_search_save_LIBS=$LIBS
16899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16900/* end confdefs.h. */
16901
16902/* Override any GCC internal prototype to avoid an error.
16903 Use char because int might match the return type of a GCC
16904 builtin and then its argument prototype would still apply. */
16905#ifdef __cplusplus
16906extern "C"
16907#endif
16908char shm_open ();
16909int
16910main ()
16911{
16912return shm_open ();
16913 ;
16914 return 0;
16915}
16916_ACEOF
16917for ac_lib in '' rt; do
16918 if test -z "$ac_lib"; then
16919 ac_res="none required"
16920 else
16921 ac_res=-l$ac_lib
16922 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16923 fi
16924 if ac_fn_c_try_link "$LINENO"; then :
16925 ac_cv_search_shm_open=$ac_res
16926fi
16927rm -f core conftest.err conftest.$ac_objext \
16928 conftest$ac_exeext
16929 if ${ac_cv_search_shm_open+:} false; then :
16930 break
16931fi
16932done
16933if ${ac_cv_search_shm_open+:} false; then :
16934
16935else
16936 ac_cv_search_shm_open=no
16937fi
16938rm conftest.$ac_ext
16939LIBS=$ac_func_search_save_LIBS
16940fi
16941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16942$as_echo "$ac_cv_search_shm_open" >&6; }
16943ac_res=$ac_cv_search_shm_open
16944if test "$ac_res" != no; then :
16945 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16946
16947fi
16948
16949if test "$ac_cv_search_shm_open" = "-lrt"; then
16950
16951$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16952
16953fi
16954for ac_header in sys/mman.h
16955do :
16956 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16957if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16958 cat >>confdefs.h <<_ACEOF
16959#define HAVE_SYS_MMAN_H 1
16960_ACEOF
16961
16962fi
16963
16964done
16965
16966# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16967ac_includes_default="\
16968${ac_includes_default}
16969#ifndef __cplusplus
16970# ifdef HAVE_SYS_MMAN_H
16971# include <sys/mman.h>
16972# endif
16973#endif
16974"
16975for ac_func in shm_open shm_unlink
16976do :
16977 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16978ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16979if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16980 cat >>confdefs.h <<_ACEOF
16981#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16982_ACEOF
16983
16984fi
16985done
16986
16987# we don't want to link with librt always, restore LIBS
16988LIBS="$save_LIBS"
16989ac_includes_default="$save_includes_default"
16990
Christian Heimesff5be6e2018-01-20 13:19:21 +010016991# Check for usable OpenSSL
16992
16993 found=false
16994
16995# Check whether --with-openssl was given.
16996if test "${with_openssl+set}" = set; then :
16997 withval=$with_openssl;
16998 case "$withval" in
16999 "" | y | ye | yes | n | no)
17000 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17001 ;;
17002 *) ssldirs="$withval"
17003 ;;
17004 esac
17005
17006else
17007
17008 # if pkg-config is installed and openssl has installed a .pc file,
17009 # then use that information and don't search ssldirs
17010 if test -n "$ac_tool_prefix"; then
17011 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17012set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17014$as_echo_n "checking for $ac_word... " >&6; }
17015if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17016 $as_echo_n "(cached) " >&6
17017else
17018 if test -n "$PKG_CONFIG"; then
17019 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17020else
17021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17022for as_dir in $PATH
17023do
17024 IFS=$as_save_IFS
17025 test -z "$as_dir" && as_dir=.
17026 for ac_exec_ext in '' $ac_executable_extensions; do
17027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17028 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17030 break 2
17031 fi
17032done
17033 done
17034IFS=$as_save_IFS
17035
17036fi
17037fi
17038PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17039if test -n "$PKG_CONFIG"; then
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17041$as_echo "$PKG_CONFIG" >&6; }
17042else
17043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17044$as_echo "no" >&6; }
17045fi
17046
17047
17048fi
17049if test -z "$ac_cv_prog_PKG_CONFIG"; then
17050 ac_ct_PKG_CONFIG=$PKG_CONFIG
17051 # Extract the first word of "pkg-config", so it can be a program name with args.
17052set dummy pkg-config; ac_word=$2
17053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17054$as_echo_n "checking for $ac_word... " >&6; }
17055if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17056 $as_echo_n "(cached) " >&6
17057else
17058 if test -n "$ac_ct_PKG_CONFIG"; then
17059 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17060else
17061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17062for as_dir in $PATH
17063do
17064 IFS=$as_save_IFS
17065 test -z "$as_dir" && as_dir=.
17066 for ac_exec_ext in '' $ac_executable_extensions; do
17067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17068 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17070 break 2
17071 fi
17072done
17073 done
17074IFS=$as_save_IFS
17075
17076fi
17077fi
17078ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17079if test -n "$ac_ct_PKG_CONFIG"; then
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17081$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17082else
17083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17084$as_echo "no" >&6; }
17085fi
17086
17087 if test "x$ac_ct_PKG_CONFIG" = x; then
17088 PKG_CONFIG=""
17089 else
17090 case $cross_compiling:$ac_tool_warned in
17091yes:)
17092{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17093$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17094ac_tool_warned=yes ;;
17095esac
17096 PKG_CONFIG=$ac_ct_PKG_CONFIG
17097 fi
17098else
17099 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17100fi
17101
17102 if test x"$PKG_CONFIG" != x""; then
17103 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17104 if test $? = 0; then
17105 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17106 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17107 found=true
17108 fi
17109 fi
17110
17111 # no such luck; use some default ssldirs
17112 if ! $found; then
17113 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17114 fi
17115
17116
17117fi
17118
17119
17120
17121 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17122 # an 'openssl' subdirectory
17123
17124 if ! $found; then
17125 OPENSSL_INCLUDES=
17126 for ssldir in $ssldirs; do
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17128$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17129 if test -f "$ssldir/include/openssl/ssl.h"; then
17130 OPENSSL_INCLUDES="-I$ssldir/include"
17131 OPENSSL_LDFLAGS="-L$ssldir/lib"
17132 OPENSSL_LIBS="-lssl -lcrypto"
17133 found=true
17134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17135$as_echo "yes" >&6; }
17136 break
17137 else
17138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17139$as_echo "no" >&6; }
17140 fi
17141 done
17142
17143 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17144 # it will just work!
17145 fi
17146
17147 # try the preprocessor and linker with our new flags,
17148 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17149
17150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17151$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17152 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17153 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17154
17155 save_LIBS="$LIBS"
17156 save_LDFLAGS="$LDFLAGS"
17157 save_CPPFLAGS="$CPPFLAGS"
17158 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17159 LIBS="$OPENSSL_LIBS $LIBS"
17160 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17162/* end confdefs.h. */
17163#include <openssl/ssl.h>
17164int
17165main ()
17166{
17167SSL_new(NULL)
17168 ;
17169 return 0;
17170}
17171_ACEOF
17172if ac_fn_c_try_link "$LINENO"; then :
17173
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17175$as_echo "yes" >&6; }
17176 have_openssl=yes
17177
17178else
17179
17180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17181$as_echo "no" >&6; }
17182 have_openssl=no
17183
17184fi
17185rm -f core conftest.err conftest.$ac_objext \
17186 conftest$ac_exeext conftest.$ac_ext
17187 CPPFLAGS="$save_CPPFLAGS"
17188 LDFLAGS="$save_LDFLAGS"
17189 LIBS="$save_LIBS"
17190
17191
17192
17193
17194
17195
17196if test "$have_openssl" = yes; then
17197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17198$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17199
17200 save_LIBS="$LIBS"
17201 save_LDFLAGS="$LDFLAGS"
17202 save_CPPFLAGS="$CPPFLAGS"
17203 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17204 LIBS="$OPENSSL_LIBS $LIBS"
17205 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17206
17207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208/* end confdefs.h. */
17209
17210 #include <openssl/x509_vfy.h>
17211
17212int
17213main ()
17214{
17215
17216 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17217 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17218 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17219 X509_VERIFY_PARAM_set_hostflags(p, 0);
17220
17221 ;
17222 return 0;
17223}
17224
17225_ACEOF
17226if ac_fn_c_try_link "$LINENO"; then :
17227
17228 ac_cv_has_x509_verify_param_set1_host=yes
17229
17230else
17231
17232 ac_cv_has_x509_verify_param_set1_host=no
17233
17234fi
17235rm -f core conftest.err conftest.$ac_objext \
17236 conftest$ac_exeext conftest.$ac_ext
17237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17238$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17239 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17240
17241$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17242
17243 fi
17244
17245 CPPFLAGS="$save_CPPFLAGS"
17246 LDFLAGS="$save_LDFLAGS"
17247 LIBS="$save_LIBS"
17248fi
17249
Christian Heimes892d66e2018-01-29 14:10:18 +010017250# ssl module default cipher suite string
17251
17252
17253
17254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17255$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17256
17257# Check whether --with-ssl-default-suites was given.
17258if test "${with_ssl_default_suites+set}" = set; then :
17259 withval=$with_ssl_default_suites;
17260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17261$as_echo "$withval" >&6; }
17262case "$withval" in
17263 python)
17264 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17265
17266 ;;
17267 openssl)
17268 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17269
17270 ;;
17271 *)
17272 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17273
17274 cat >>confdefs.h <<_ACEOF
17275#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17276_ACEOF
17277
17278 ;;
17279esac
17280
17281else
17282
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17284$as_echo "python" >&6; }
17285$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17286
17287
17288fi
17289
17290
17291
Guido van Rossum627b2d71993-12-24 10:39:16 +000017292# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017293ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017294
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017295ac_config_files="$ac_config_files Modules/ld_so_aix"
17296
Martin v. Löwis11437992002-04-12 09:54:03 +000017297cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017298# This file is a shell script that caches the results of configure
17299# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017300# scripts and configure runs, see configure's option --config-cache.
17301# It is not useful on other systems. If it contains results you don't
17302# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017303#
Martin v. Löwis11437992002-04-12 09:54:03 +000017304# config.status only pays attention to the cache file if you give it
17305# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017306#
Skip Montanaro6dead952003-09-25 14:50:04 +000017307# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017308# loading this file, other *unset* `ac_cv_foo' will be assigned the
17309# following values.
17310
17311_ACEOF
17312
Guido van Rossumf78abae1997-01-21 22:02:36 +000017313# The following way of writing the cache mishandles newlines in values,
17314# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017315# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017316# Ultrix sh set writes to stderr and can't be redirected directly,
17317# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017318(
17319 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17320 eval ac_val=\$$ac_var
17321 case $ac_val in #(
17322 *${as_nl}*)
17323 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017324 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17325$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017326 esac
17327 case $ac_var in #(
17328 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017329 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17330 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331 esac ;;
17332 esac
17333 done
17334
Martin v. Löwis11437992002-04-12 09:54:03 +000017335 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17337 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017338 # `set' does not quote correctly, so add quotes: double-quote
17339 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017341 "s/'/'\\\\''/g;
17342 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017344 *)
17345 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 esac |
17349 sort
17350) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017351 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017353 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017355 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17356 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017357 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17358 :end' >>confcache
17359if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17360 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017361 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017362 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17363$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017364 if test ! -f "$cache_file" || test -h "$cache_file"; then
17365 cat confcache >"$cache_file"
17366 else
17367 case $cache_file in #(
17368 */* | ?:*)
17369 mv -f confcache "$cache_file"$$ &&
17370 mv -f "$cache_file"$$ "$cache_file" ;; #(
17371 *)
17372 mv -f confcache "$cache_file" ;;
17373 esac
17374 fi
17375 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017376 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017377 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17378$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017379 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017380fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017381rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017382
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017383test "x$prefix" = xNONE && prefix=$ac_default_prefix
17384# Let make expand exec_prefix.
17385test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017386
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017387DEFS=-DHAVE_CONFIG_H
17388
Skip Montanaro6dead952003-09-25 14:50:04 +000017389ac_libobjs=
17390ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017391U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017392for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17393 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017395 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17397 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017398 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17399 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017400done
17401LIBOBJS=$ac_libobjs
17402
17403LTLIBOBJS=$ac_ltlibobjs
17404
17405
Martin v. Löwis11437992002-04-12 09:54:03 +000017406
Matthias Kloseb9621712010-04-24 17:59:49 +000017407
Victor Stinnere0be4232011-10-25 13:06:09 +020017408: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017409ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017410ac_clean_files_save=$ac_clean_files
17411ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017412{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17413$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17414as_write_fail=0
17415cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017416#! $SHELL
17417# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017418# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017419# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017420# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017421
Martin v. Löwis11437992002-04-12 09:54:03 +000017422debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017423ac_cs_recheck=false
17424ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017425
Matthias Kloseb9621712010-04-24 17:59:49 +000017426SHELL=\${CONFIG_SHELL-$SHELL}
17427export SHELL
17428_ASEOF
17429cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17430## -------------------- ##
17431## M4sh Initialization. ##
17432## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434# Be more Bourne compatible
17435DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017436if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017437 emulate sh
17438 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017439 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017440 # is contrary to our usage. Disable this feature.
17441 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017443else
Matthias Kloseb9621712010-04-24 17:59:49 +000017444 case `(set -o) 2>/dev/null` in #(
17445 *posix*) :
17446 set -o posix ;; #(
17447 *) :
17448 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017450fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017451
17452
Matthias Kloseb9621712010-04-24 17:59:49 +000017453as_nl='
17454'
17455export as_nl
17456# Printing a long string crashes Solaris 7 /usr/bin/printf.
17457as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17458as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17459as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17460# Prefer a ksh shell builtin over an external printf program on Solaris,
17461# but without wasting forks for bash or zsh.
17462if test -z "$BASH_VERSION$ZSH_VERSION" \
17463 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17464 as_echo='print -r --'
17465 as_echo_n='print -rn --'
17466elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17467 as_echo='printf %s\n'
17468 as_echo_n='printf %s'
17469else
17470 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17471 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17472 as_echo_n='/usr/ucb/echo -n'
17473 else
17474 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17475 as_echo_n_body='eval
17476 arg=$1;
17477 case $arg in #(
17478 *"$as_nl"*)
17479 expr "X$arg" : "X\\(.*\\)$as_nl";
17480 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17481 esac;
17482 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17483 '
17484 export as_echo_n_body
17485 as_echo_n='sh -c $as_echo_n_body as_echo'
17486 fi
17487 export as_echo_body
17488 as_echo='sh -c $as_echo_body as_echo'
17489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017490
17491# The user is always right.
17492if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017493 PATH_SEPARATOR=:
17494 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17495 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17496 PATH_SEPARATOR=';'
17497 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500
17501# IFS
17502# We need space, tab and new line, in precisely that order. Quoting is
17503# there to prevent editors from complaining about space-tab.
17504# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17505# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017506IFS=" "" $as_nl"
17507
17508# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017509as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017510case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511 *[\\/]* ) as_myself=$0 ;;
17512 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017513for as_dir in $PATH
17514do
17515 IFS=$as_save_IFS
17516 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017517 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17518 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017519IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017520
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521 ;;
17522esac
17523# We did not find ourselves, most probably we were run as `sh COMMAND'
17524# in which case we are not to be found in the path.
17525if test "x$as_myself" = x; then
17526 as_myself=$0
17527fi
17528if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017529 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17530 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531fi
17532
Matthias Kloseb9621712010-04-24 17:59:49 +000017533# Unset variables that we do not need and which cause bugs (e.g. in
17534# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17535# suppresses any "Segmentation fault" message there. '((' could
17536# trigger a bug in pdksh 5.2.14.
17537for as_var in BASH_ENV ENV MAIL MAILPATH
17538do eval test x\${$as_var+set} = xset \
17539 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540done
17541PS1='$ '
17542PS2='> '
17543PS4='+ '
17544
17545# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017546LC_ALL=C
17547export LC_ALL
17548LANGUAGE=C
17549export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550
Matthias Kloseb9621712010-04-24 17:59:49 +000017551# CDPATH.
17552(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17553
17554
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555# as_fn_error STATUS ERROR [LINENO LOG_FD]
17556# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017557# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17558# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017559# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017560as_fn_error ()
17561{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017562 as_status=$1; test $as_status -eq 0 && as_status=1
17563 if test "$4"; then
17564 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17565 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017566 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017567 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017568 as_fn_exit $as_status
17569} # as_fn_error
17570
17571
17572# as_fn_set_status STATUS
17573# -----------------------
17574# Set $? to STATUS, without forking.
17575as_fn_set_status ()
17576{
17577 return $1
17578} # as_fn_set_status
17579
17580# as_fn_exit STATUS
17581# -----------------
17582# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17583as_fn_exit ()
17584{
17585 set +e
17586 as_fn_set_status $1
17587 exit $1
17588} # as_fn_exit
17589
17590# as_fn_unset VAR
17591# ---------------
17592# Portably unset VAR.
17593as_fn_unset ()
17594{
17595 { eval $1=; unset $1;}
17596}
17597as_unset=as_fn_unset
17598# as_fn_append VAR VALUE
17599# ----------------------
17600# Append the text in VALUE to the end of the definition contained in VAR. Take
17601# advantage of any shell optimizations that allow amortized linear growth over
17602# repeated appends, instead of the typical quadratic growth present in naive
17603# implementations.
17604if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17605 eval 'as_fn_append ()
17606 {
17607 eval $1+=\$2
17608 }'
17609else
17610 as_fn_append ()
17611 {
17612 eval $1=\$$1\$2
17613 }
17614fi # as_fn_append
17615
17616# as_fn_arith ARG...
17617# ------------------
17618# Perform arithmetic evaluation on the ARGs, and store the result in the
17619# global $as_val. Take advantage of shells that can avoid forks. The arguments
17620# must be portable across $(()) and expr.
17621if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17622 eval 'as_fn_arith ()
17623 {
17624 as_val=$(( $* ))
17625 }'
17626else
17627 as_fn_arith ()
17628 {
17629 as_val=`expr "$@" || test $? -eq 1`
17630 }
17631fi # as_fn_arith
17632
17633
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017634if expr a : '\(a\)' >/dev/null 2>&1 &&
17635 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17636 as_expr=expr
17637else
17638 as_expr=false
17639fi
17640
17641if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17642 as_basename=basename
17643else
17644 as_basename=false
17645fi
17646
Matthias Kloseb9621712010-04-24 17:59:49 +000017647if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17648 as_dirname=dirname
17649else
17650 as_dirname=false
17651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653as_me=`$as_basename -- "$0" ||
17654$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17655 X"$0" : 'X\(//\)$' \| \
17656 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017657$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 sed '/^.*\/\([^/][^/]*\)\/*$/{
17659 s//\1/
17660 q
17661 }
17662 /^X\/\(\/\/\)$/{
17663 s//\1/
17664 q
17665 }
17666 /^X\/\(\/\).*/{
17667 s//\1/
17668 q
17669 }
17670 s/.*/./; q'`
17671
Matthias Kloseb9621712010-04-24 17:59:49 +000017672# Avoid depending upon Character Ranges.
17673as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17674as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17675as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17676as_cr_digits='0123456789'
17677as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678
17679ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017680case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017682 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017684 xy) ECHO_C='\c';;
17685 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17686 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 esac;;
17688*)
17689 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017690esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017691
Martin v. Löwis11437992002-04-12 09:54:03 +000017692rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017693if test -d conf$$.dir; then
17694 rm -f conf$$.dir/conf$$.file
17695else
17696 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017697 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017699if (echo >conf$$.file) 2>/dev/null; then
17700 if ln -s conf$$.file conf$$ 2>/dev/null; then
17701 as_ln_s='ln -s'
17702 # ... but there are two gotchas:
17703 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17704 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017705 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017707 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017708 elif ln conf$$.file conf$$ 2>/dev/null; then
17709 as_ln_s=ln
17710 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017711 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017712 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017713else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017714 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017715fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17717rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017718
Matthias Kloseb9621712010-04-24 17:59:49 +000017719
17720# as_fn_mkdir_p
17721# -------------
17722# Create "$as_dir" as a directory, including parents if necessary.
17723as_fn_mkdir_p ()
17724{
17725
17726 case $as_dir in #(
17727 -*) as_dir=./$as_dir;;
17728 esac
17729 test -d "$as_dir" || eval $as_mkdir_p || {
17730 as_dirs=
17731 while :; do
17732 case $as_dir in #(
17733 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17734 *) as_qdir=$as_dir;;
17735 esac
17736 as_dirs="'$as_qdir' $as_dirs"
17737 as_dir=`$as_dirname -- "$as_dir" ||
17738$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17739 X"$as_dir" : 'X\(//\)[^/]' \| \
17740 X"$as_dir" : 'X\(//\)$' \| \
17741 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17742$as_echo X"$as_dir" |
17743 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17744 s//\1/
17745 q
17746 }
17747 /^X\(\/\/\)[^/].*/{
17748 s//\1/
17749 q
17750 }
17751 /^X\(\/\/\)$/{
17752 s//\1/
17753 q
17754 }
17755 /^X\(\/\).*/{
17756 s//\1/
17757 q
17758 }
17759 s/.*/./; q'`
17760 test -d "$as_dir" && break
17761 done
17762 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017763 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017764
17765
17766} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017767if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017768 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017769else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017771 as_mkdir_p=false
17772fi
17773
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017774
17775# as_fn_executable_p FILE
17776# -----------------------
17777# Test if FILE is an executable regular file.
17778as_fn_executable_p ()
17779{
17780 test -f "$1" && test -x "$1"
17781} # as_fn_executable_p
17782as_test_x='test -x'
17783as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017784
17785# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017786as_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 +000017787
17788# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017789as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017790
17791
Martin v. Löwis11437992002-04-12 09:54:03 +000017792exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017793## ----------------------------------- ##
17794## Main body of $CONFIG_STATUS script. ##
17795## ----------------------------------- ##
17796_ASEOF
17797test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017798
Matthias Kloseb9621712010-04-24 17:59:49 +000017799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17800# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017801# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017802# values after options handling.
17803ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017804This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017805generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017806
17807 CONFIG_FILES = $CONFIG_FILES
17808 CONFIG_HEADERS = $CONFIG_HEADERS
17809 CONFIG_LINKS = $CONFIG_LINKS
17810 CONFIG_COMMANDS = $CONFIG_COMMANDS
17811 $ $0 $@
17812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017813on `(hostname || uname -n) 2>/dev/null | sed 1q`
17814"
17815
Martin v. Löwis11437992002-04-12 09:54:03 +000017816_ACEOF
17817
Matthias Kloseb9621712010-04-24 17:59:49 +000017818case $ac_config_files in *"
17819"*) set x $ac_config_files; shift; ac_config_files=$*;;
17820esac
17821
17822case $ac_config_headers in *"
17823"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17824esac
17825
17826
17827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017828# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017829config_files="$ac_config_files"
17830config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017832_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017833
Matthias Kloseb9621712010-04-24 17:59:49 +000017834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017835ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017836\`$as_me' instantiates files and other configuration actions
17837from templates according to the current configuration. Unless the files
17838and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017839
Matthias Kloseb9621712010-04-24 17:59:49 +000017840Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017841
17842 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017844 --config print configuration, then exit
17845 -q, --quiet, --silent
17846 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 -d, --debug don't remove temporary files
17848 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017849 --file=FILE[:TEMPLATE]
17850 instantiate the configuration file FILE
17851 --header=FILE[:TEMPLATE]
17852 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017853
17854Configuration files:
17855$config_files
17856
17857Configuration headers:
17858$config_headers
17859
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017860Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017861
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017863cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17864ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017865ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017866python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017867configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017868 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017869
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017870Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017871This config.status script is free software; the Free Software Foundation
17872gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017873
17874ac_pwd='$ac_pwd'
17875srcdir='$srcdir'
17876INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017877MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017878test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017879_ACEOF
17880
Matthias Kloseb9621712010-04-24 17:59:49 +000017881cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17882# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017883ac_need_defaults=:
17884while test $# != 0
17885do
17886 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017887 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17889 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017890 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017891 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017892 --*=)
17893 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17894 ac_optarg=
17895 ac_shift=:
17896 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017898 ac_option=$1
17899 ac_optarg=$2
17900 ac_shift=shift
17901 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 esac
17903
Skip Montanaro6dead952003-09-25 14:50:04 +000017904 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017906 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17907 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017908 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017909 $as_echo "$ac_cs_version"; exit ;;
17910 --config | --confi | --conf | --con | --co | --c )
17911 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 debug=: ;;
17914 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017915 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017916 case $ac_optarg in
17917 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017918 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017919 esac
17920 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 ac_need_defaults=false;;
17922 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017923 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017924 case $ac_optarg in
17925 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17926 esac
17927 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017928 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017929 --he | --h)
17930 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017931 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017932Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017934 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017935 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17936 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17937 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017938
17939 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017940 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017941Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017942
Matthias Kloseb9621712010-04-24 17:59:49 +000017943 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017944 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017945
17946 esac
17947 shift
17948done
17949
Skip Montanaro6dead952003-09-25 14:50:04 +000017950ac_configure_extra_args=
17951
17952if $ac_cs_silent; then
17953 exec 6>/dev/null
17954 ac_configure_extra_args="$ac_configure_extra_args --silent"
17955fi
17956
17957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017958cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017959if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017960 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017961 shift
17962 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17963 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017964 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017965 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017966fi
17967
Martin v. Löwis11437992002-04-12 09:54:03 +000017968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017969cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970exec 5>>config.log
17971{
17972 echo
17973 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17974## Running $as_me. ##
17975_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017976 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017977} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017980cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017981_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017982
Matthias Kloseb9621712010-04-24 17:59:49 +000017983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984
17985# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017986for ac_config_target in $ac_config_targets
17987do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017988 case $ac_config_target in
17989 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17990 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17991 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017992 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17993 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017994 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017995 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017996 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017997 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998
Victor Stinnere0be4232011-10-25 13:06:09 +020017999 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018000 esac
18001done
18002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003
Martin v. Löwis11437992002-04-12 09:54:03 +000018004# If the user did not use the arguments to specify the items to instantiate,
18005# then the envvar interface is used. Set only those that are not.
18006# We use the long form for the default assignment because of an extremely
18007# bizarre bug on SunOS 4.1.3.
18008if $ac_need_defaults; then
18009 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18010 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18011fi
18012
Skip Montanaro6dead952003-09-25 14:50:04 +000018013# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018014# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018015# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018016# Hook for its removal unless debugging.
18017# Note that there is a small window in which the directory will not be cleaned:
18018# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018019$debug ||
18020{
Victor Stinnere0be4232011-10-25 13:06:09 +020018021 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018023 : "${ac_tmp:=$tmp}"
18024 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018026 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018027}
Martin v. Löwis11437992002-04-12 09:54:03 +000018028# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018029
Martin v. Löwis11437992002-04-12 09:54:03 +000018030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018031 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018032 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018033} ||
18034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018035 tmp=./conf$$-$RANDOM
18036 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018037} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018038ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018039
Matthias Kloseb9621712010-04-24 17:59:49 +000018040# Set up the scripts for CONFIG_FILES section.
18041# No need to generate them if there are no CONFIG_FILES.
18042# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018044
Matthias Kloseb9621712010-04-24 17:59:49 +000018045
18046ac_cr=`echo X | tr X '\015'`
18047# On cygwin, bash can eat \r inside `` if the user requested igncr.
18048# But we know of no other shell where ac_cr would be empty at this
18049# point, so we can use a bashism as a fallback.
18050if test "x$ac_cr" = x; then
18051 eval ac_cr=\$\'\\r\'
18052fi
18053ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18054if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018055 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018056else
18057 ac_cs_awk_cr=$ac_cr
18058fi
18059
Victor Stinnere0be4232011-10-25 13:06:09 +020018060echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018061_ACEOF
18062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018063
Matthias Kloseb9621712010-04-24 17:59:49 +000018064{
18065 echo "cat >conf$$subs.awk <<_ACEOF" &&
18066 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18067 echo "_ACEOF"
18068} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018069 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18070ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071ac_delim='%!_!# '
18072for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018073 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018074 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018075
Matthias Kloseb9621712010-04-24 17:59:49 +000018076 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18077 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018078 break
18079 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018080 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081 else
18082 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018083 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018084done
Matthias Kloseb9621712010-04-24 17:59:49 +000018085rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018086
Matthias Kloseb9621712010-04-24 17:59:49 +000018087cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018088cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018090sed -n '
18091h
18092s/^/S["/; s/!.*/"]=/
18093p
18094g
18095s/^[^!]*!//
18096:repl
18097t repl
18098s/'"$ac_delim"'$//
18099t delim
18100:nl
18101h
18102s/\(.\{148\}\)..*/\1/
18103t more1
18104s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18105p
18106n
18107b repl
18108:more1
18109s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18110p
18111g
18112s/.\{148\}//
18113t nl
18114:delim
18115h
18116s/\(.\{148\}\)..*/\1/
18117t more2
18118s/["\\]/\\&/g; s/^/"/; s/$/"/
18119p
18120b
18121:more2
18122s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18123p
18124g
18125s/.\{148\}//
18126t delim
18127' <conf$$subs.awk | sed '
18128/^[^""]/{
18129 N
18130 s/\n//
18131}
18132' >>$CONFIG_STATUS || ac_write_fail=1
18133rm -f conf$$subs.awk
18134cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18135_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018136cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018137 for (key in S) S_is_set[key] = 1
18138 FS = ""
18139
18140}
18141{
18142 line = $ 0
18143 nfields = split(line, field, "@")
18144 substed = 0
18145 len = length(field[1])
18146 for (i = 2; i < nfields; i++) {
18147 key = field[i]
18148 keylen = length(key)
18149 if (S_is_set[key]) {
18150 value = S[key]
18151 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18152 len += length(value) + length(field[++i])
18153 substed = 1
18154 } else
18155 len += 1 + keylen
18156 }
18157
18158 print line
18159}
18160
18161_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018163cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18164if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18165 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18166else
18167 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018168fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018169 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018170_ACEOF
18171
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018172# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18173# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018174# trailing colons and then remove the whole line if VPATH becomes empty
18175# (actually we leave an empty line to preserve line numbers).
18176if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018177 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18178h
18179s///
18180s/^/:/
18181s/[ ]*$/:/
18182s/:\$(srcdir):/:/g
18183s/:\${srcdir}:/:/g
18184s/:@srcdir@:/:/g
18185s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018186s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018187x
18188s/\(=[ ]*\).*/\1/
18189G
18190s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191s/^[^=]*=[ ]*$//
18192}'
18193fi
18194
Matthias Kloseb9621712010-04-24 17:59:49 +000018195cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018196fi # test -n "$CONFIG_FILES"
18197
Matthias Kloseb9621712010-04-24 17:59:49 +000018198# Set up the scripts for CONFIG_HEADERS section.
18199# No need to generate them if there are no CONFIG_HEADERS.
18200# This happens for instance with `./config.status Makefile'.
18201if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018202cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018203BEGIN {
18204_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205
Matthias Kloseb9621712010-04-24 17:59:49 +000018206# Transform confdefs.h into an awk script `defines.awk', embedded as
18207# here-document in config.status, that substitutes the proper values into
18208# config.h.in to produce config.h.
18209
18210# Create a delimiter string that does not exist in confdefs.h, to ease
18211# handling of long lines.
18212ac_delim='%!_!# '
18213for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018214 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18215 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018216 break
18217 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018218 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018219 else
18220 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18221 fi
18222done
18223
18224# For the awk script, D is an array of macro values keyed by name,
18225# likewise P contains macro parameters if any. Preserve backslash
18226# newline sequences.
18227
18228ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18229sed -n '
18230s/.\{148\}/&'"$ac_delim"'/g
18231t rset
18232:rset
18233s/^[ ]*#[ ]*define[ ][ ]*/ /
18234t def
18235d
18236:def
18237s/\\$//
18238t bsnl
18239s/["\\]/\\&/g
18240s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18241D["\1"]=" \3"/p
18242s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18243d
18244:bsnl
18245s/["\\]/\\&/g
18246s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18247D["\1"]=" \3\\\\\\n"\\/p
18248t cont
18249s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18250t cont
18251d
18252:cont
18253n
18254s/.\{148\}/&'"$ac_delim"'/g
18255t clear
18256:clear
18257s/\\$//
18258t bsnlc
18259s/["\\]/\\&/g; s/^/"/; s/$/"/p
18260d
18261:bsnlc
18262s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18263b cont
18264' <confdefs.h | sed '
18265s/'"$ac_delim"'/"\\\
18266"/g' >>$CONFIG_STATUS || ac_write_fail=1
18267
18268cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18269 for (key in D) D_is_set[key] = 1
18270 FS = ""
18271}
18272/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18273 line = \$ 0
18274 split(line, arg, " ")
18275 if (arg[1] == "#") {
18276 defundef = arg[2]
18277 mac1 = arg[3]
18278 } else {
18279 defundef = substr(arg[1], 2)
18280 mac1 = arg[2]
18281 }
18282 split(mac1, mac2, "(") #)
18283 macro = mac2[1]
18284 prefix = substr(line, 1, index(line, defundef) - 1)
18285 if (D_is_set[macro]) {
18286 # Preserve the white space surrounding the "#".
18287 print prefix "define", macro P[macro] D[macro]
18288 next
18289 } else {
18290 # Replace #undef with comments. This is necessary, for example,
18291 # in the case of _POSIX_SOURCE, which is predefined and required
18292 # on some systems where configure will not decide to define it.
18293 if (defundef == "undef") {
18294 print "/*", prefix defundef, macro, "*/"
18295 next
18296 }
18297 }
18298}
18299{ print }
18300_ACAWK
18301_ACEOF
18302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018303 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018304fi # test -n "$CONFIG_HEADERS"
18305
18306
18307eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18308shift
18309for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018310do
18311 case $ac_tag in
18312 :[FHLC]) ac_mode=$ac_tag; continue;;
18313 esac
18314 case $ac_mode$ac_tag in
18315 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018316 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018317 :[FH]-) ac_tag=-:-;;
18318 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18319 esac
18320 ac_save_IFS=$IFS
18321 IFS=:
18322 set x $ac_tag
18323 IFS=$ac_save_IFS
18324 shift
18325 ac_file=$1
18326 shift
18327
18328 case $ac_mode in
18329 :L) ac_source=$1;;
18330 :[FH])
18331 ac_file_inputs=
18332 for ac_f
18333 do
18334 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018335 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018336 *) # Look for the file first in the build tree, then in the source tree
18337 # (if the path is not absolute). The absolute path cannot be DOS-style,
18338 # because $ac_f cannot contain `:'.
18339 test -f "$ac_f" ||
18340 case $ac_f in
18341 [\\/$]*) false;;
18342 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18343 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018344 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018345 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018346 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18347 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018348 done
18349
18350 # Let's still pretend it is `configure' which instantiates (i.e., don't
18351 # use $as_me), people would be surprised to read:
18352 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018353 configure_input='Generated from '`
18354 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18355 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018356 if test x"$ac_file" != x-; then
18357 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018358 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18359$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018361 # Neutralize special characters interpreted by sed in replacement strings.
18362 case $configure_input in #(
18363 *\&* | *\|* | *\\* )
18364 ac_sed_conf_input=`$as_echo "$configure_input" |
18365 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18366 *) ac_sed_conf_input=$configure_input;;
18367 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018368
18369 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018370 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18371 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372 esac
18373 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 esac
18375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018376 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018377$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018378 X"$ac_file" : 'X\(//\)[^/]' \| \
18379 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018381$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18383 s//\1/
18384 q
18385 }
18386 /^X\(\/\/\)[^/].*/{
18387 s//\1/
18388 q
18389 }
18390 /^X\(\/\/\)$/{
18391 s//\1/
18392 q
18393 }
18394 /^X\(\/\).*/{
18395 s//\1/
18396 q
18397 }
18398 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018399 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 ac_builddir=.
18401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402case "$ac_dir" in
18403.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18404*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018405 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018407 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408 case $ac_top_builddir_sub in
18409 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18410 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18411 esac ;;
18412esac
18413ac_abs_top_builddir=$ac_pwd
18414ac_abs_builddir=$ac_pwd$ac_dir_suffix
18415# for backward compatibility:
18416ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018417
18418case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018419 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018420 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421 ac_top_srcdir=$ac_top_builddir_sub
18422 ac_abs_top_srcdir=$ac_pwd ;;
18423 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018424 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425 ac_top_srcdir=$srcdir
18426 ac_abs_top_srcdir=$srcdir ;;
18427 *) # Relative name.
18428 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18429 ac_top_srcdir=$ac_top_build_prefix$srcdir
18430 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018431esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018433
Martin v. Löwis11437992002-04-12 09:54:03 +000018434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 case $ac_mode in
18436 :F)
18437 #
18438 # CONFIG_FILE
18439 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018440
18441 case $INSTALL in
18442 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018443 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018444 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018445 ac_MKDIR_P=$MKDIR_P
18446 case $MKDIR_P in
18447 [\\/$]* | ?:[\\/]* ) ;;
18448 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18449 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451
Matthias Kloseb9621712010-04-24 17:59:49 +000018452cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453# If the template does not know about datarootdir, expand it.
18454# FIXME: This hack should be removed a few years after 2.60.
18455ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018456ac_sed_dataroot='
18457/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458 p
18459 q
18460}
18461/@datadir@/p
18462/@docdir@/p
18463/@infodir@/p
18464/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018465/@mandir@/p'
18466case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018467*datarootdir*) ac_datarootdir_seen=yes;;
18468*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18470$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018473 ac_datarootdir_hack='
18474 s&@datadir@&$datadir&g
18475 s&@docdir@&$docdir&g
18476 s&@infodir@&$infodir&g
18477 s&@localedir@&$localedir&g
18478 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018479 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480esac
18481_ACEOF
18482
18483# Neutralize VPATH when `$srcdir' = `.'.
18484# Shell code in configure.ac might set extrasub.
18485# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18487ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018488$extrasub
18489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018491:t
18492/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018493s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018495s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496s&@srcdir@&$ac_srcdir&;t t
18497s&@abs_srcdir@&$ac_abs_srcdir&;t t
18498s&@top_srcdir@&$ac_top_srcdir&;t t
18499s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18500s&@builddir@&$ac_builddir&;t t
18501s&@abs_builddir@&$ac_abs_builddir&;t t
18502s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18503s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018504s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018506"
Victor Stinnere0be4232011-10-25 13:06:09 +020018507eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18508 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018510test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018511 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18512 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18513 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018515which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018516$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018517which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018518
Victor Stinnere0be4232011-10-25 13:06:09 +020018519 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018520 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018521 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18522 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018523 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018524 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 ;;
18526 :H)
18527 #
18528 # CONFIG_HEADER
18529 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018530 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018531 {
18532 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018533 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18534 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018535 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018536 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018537 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18538$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018539 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018540 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018541 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018542 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018543 fi
18544 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018545 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018546 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018547 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018548 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551
18552 esac
18553
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018554
18555 case $ac_file$ac_mode in
18556 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18557
18558 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559done # for ac_tag
18560
Guido van Rossum627b2d71993-12-24 10:39:16 +000018561
Matthias Kloseb9621712010-04-24 17:59:49 +000018562as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018563_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018564ac_clean_files=$ac_clean_files_save
18565
Matthias Kloseb9621712010-04-24 17:59:49 +000018566test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018567 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018568
Martin v. Löwis11437992002-04-12 09:54:03 +000018569
18570# configure is writing to config.log, and then calls config.status.
18571# config.status does its own redirection, appending to config.log.
18572# Unfortunately, on DOS this fails, as config.log is still kept open
18573# by configure, so config.status won't be able to write to it; its
18574# output is simply discarded. So we exec the FD to /dev/null,
18575# effectively closing config.log, so it can be properly (re)opened and
18576# appended to by config.status. When coming back to configure, we
18577# need to make the FD available again.
18578if test "$no_create" != yes; then
18579 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018580 ac_config_status_args=
18581 test "$silent" = yes &&
18582 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018584 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 exec 5>>config.log
18586 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18587 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018588 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018589fi
18590if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18592$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018593fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018594
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018595
Christian Heimes75ed8902013-11-20 01:11:18 +010018596echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018597if test ! -f Modules/Setup.local
18598then
18599 echo "# Edit this file for local setup changes" >Modules/Setup.local
18600fi
18601
Christian Heimes75ed8902013-11-20 01:11:18 +010018602echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018603$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018604 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018605 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018606mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018607
18608if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18609 echo "" >&6
18610 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018611 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 +000018612 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018613 echo "" >&6
18614 echo "" >&6
18615fi
18616