blob: b02d17c053c6b5b859ed19dcd6762277ec539b9d [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
Victor Stinnerf4e47032019-04-25 00:56:28 +0200817with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200818with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000819enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700820with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100821with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100822with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800823with_memory_sanitizer
824with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833enable_ipv6
834with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000836with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700838with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_libm
840with_libc
841enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000842with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800843with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100844with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100845with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898includedir='${prefix}/include'
899oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
901infodir='${datarootdir}/info'
902htmldir='${docdir}'
903dvidir='${docdir}'
904pdfdir='${docdir}'
905psdir='${docdir}'
906libdir='${exec_prefix}/lib'
907localedir='${datarootdir}/locale'
908mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000913do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914 # If the previous option needs an argument, assign it.
915 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917 ac_prev=
918 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000919 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200922 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
923 *=) ac_optarg= ;;
924 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 # Accept the important Cygnus configure options, so we can diagnose typos.
928
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000929 case $ac_dashdash$ac_option in
930 --)
931 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -bindir | --bindir | --bindi | --bind | --bin | --bi)
934 ac_prev=bindir ;;
935 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937
938 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943 -cache-file | --cache-file | --cache-fil | --cache-fi \
944 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
945 ac_prev=cache_file ;;
946 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
947 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 cache_file=$ac_optarg ;;
949
950 --config-cache | -C)
951 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000954 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000957
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000958 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
959 | --dataroo | --dataro | --datar)
960 ac_prev=datarootdir ;;
961 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
962 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
963 datarootdir=$ac_optarg ;;
964
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000966 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000967 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200969 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 ac_useropt_orig=$ac_useropt
971 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
972 case $ac_user_opts in
973 *"
974"enable_$ac_useropt"
975"*) ;;
976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
977 ac_unrecognized_sep=', ';;
978 esac
979 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000980
981 -docdir | --docdir | --docdi | --doc | --do)
982 ac_prev=docdir ;;
983 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
984 docdir=$ac_optarg ;;
985
986 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
987 ac_prev=dvidir ;;
988 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
989 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
991 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000992 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200995 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 ac_useropt_orig=$ac_useropt
997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
998 case $ac_user_opts in
999 *"
1000"enable_$ac_useropt"
1001"*) ;;
1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1003 ac_unrecognized_sep=', ';;
1004 esac
1005 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1008 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1009 | --exec | --exe | --ex)
1010 ac_prev=exec_prefix ;;
1011 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1012 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1013 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
1016 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 # Obsolete; use --with-gas.
1018 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 -help | --help | --hel | --he | -h)
1021 ac_init_help=long ;;
1022 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1023 ac_init_help=recursive ;;
1024 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1025 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1033 ac_prev=htmldir ;;
1034 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1035 | --ht=*)
1036 htmldir=$ac_optarg ;;
1037
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038 -includedir | --includedir | --includedi | --included | --include \
1039 | --includ | --inclu | --incl | --inc)
1040 ac_prev=includedir ;;
1041 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1042 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -infodir | --infodir | --infodi | --infod | --info | --inf)
1046 ac_prev=infodir ;;
1047 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libdir | --libdir | --libdi | --libd)
1051 ac_prev=libdir ;;
1052 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
1055 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1056 | --libexe | --libex | --libe)
1057 ac_prev=libexecdir ;;
1058 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1059 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 -localedir | --localedir | --localedi | --localed | --locale)
1063 ac_prev=localedir ;;
1064 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1065 localedir=$ac_optarg ;;
1066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001067 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001068 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 ac_prev=localstatedir ;;
1070 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001071 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
1074 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1075 ac_prev=mandir ;;
1076 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001078
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 # Obsolete; use --without-fp.
1081 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
1083 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085 no_create=yes ;;
1086
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001087 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1088 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1089 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1092 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1093 | --oldin | --oldi | --old | --ol | --o)
1094 ac_prev=oldincludedir ;;
1095 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1096 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1097 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1101 ac_prev=prefix ;;
1102 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1106 | --program-pre | --program-pr | --program-p)
1107 ac_prev=program_prefix ;;
1108 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1109 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1113 | --program-suf | --program-su | --program-s)
1114 ac_prev=program_suffix ;;
1115 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1116 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
1119 -program-transform-name | --program-transform-name \
1120 | --program-transform-nam | --program-transform-na \
1121 | --program-transform-n | --program-transform- \
1122 | --program-transform | --program-transfor \
1123 | --program-transfo | --program-transf \
1124 | --program-trans | --program-tran \
1125 | --progr-tra | --program-tr | --program-t)
1126 ac_prev=program_transform_name ;;
1127 -program-transform-name=* | --program-transform-name=* \
1128 | --program-transform-nam=* | --program-transform-na=* \
1129 | --program-transform-n=* | --program-transform-=* \
1130 | --program-transform=* | --program-transfor=* \
1131 | --program-transfo=* | --program-transf=* \
1132 | --program-trans=* | --program-tran=* \
1133 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001136 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1137 ac_prev=pdfdir ;;
1138 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1139 pdfdir=$ac_optarg ;;
1140
1141 -psdir | --psdir | --psdi | --psd | --ps)
1142 ac_prev=psdir ;;
1143 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1144 psdir=$ac_optarg ;;
1145
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1147 | -silent | --silent | --silen | --sile | --sil)
1148 silent=yes ;;
1149
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1151 ac_prev=sbindir ;;
1152 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1153 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001155
1156 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1157 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1158 | --sharedst | --shareds | --shared | --share | --shar \
1159 | --sha | --sh)
1160 ac_prev=sharedstatedir ;;
1161 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1162 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1163 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1164 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 -site | --site | --sit)
1168 ac_prev=site ;;
1169 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001170 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1173 ac_prev=srcdir ;;
1174 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001177 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1178 | --syscon | --sysco | --sysc | --sys | --sy)
1179 ac_prev=sysconfdir ;;
1180 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1181 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
1189 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1190 verbose=yes ;;
1191
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 -version | --version | --versio | --versi | --vers | -V)
1193 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194
1195 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001196 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001197 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001199 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt_orig=$ac_useropt
1201 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1202 case $ac_user_opts in
1203 *"
1204"with_$ac_useropt"
1205"*) ;;
1206 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1207 ac_unrecognized_sep=', ';;
1208 esac
1209 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210
1211 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001212 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt_orig=$ac_useropt
1217 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1218 case $ac_user_opts in
1219 *"
1220"with_$ac_useropt"
1221"*) ;;
1222 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1223 ac_unrecognized_sep=', ';;
1224 esac
1225 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227 --x)
1228 # Obsolete; use --with-x.
1229 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1232 | --x-incl | --x-inc | --x-in | --x-i)
1233 ac_prev=x_includes ;;
1234 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1235 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
1238 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1239 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1240 ac_prev=x_libraries ;;
1241 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1242 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001244
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1246Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 ;;
1248
Martin v. Löwis11437992002-04-12 09:54:03 +00001249 *=*)
1250 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1251 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 case $ac_envvar in #(
1253 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001254 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001257 export $ac_envvar ;;
1258
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001259 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001260 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001261 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001264 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 ;;
1266
1267 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268done
1269
Guido van Rossum7f43da71994-08-01 12:15:30 +00001270if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001272 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001273fi
1274
Matthias Kloseb9621712010-04-24 17:59:49 +00001275if test -n "$ac_unrecognized_opts"; then
1276 case $enable_option_checking in
1277 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001278 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001279 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1280 esac
1281fi
1282
1283# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1285 datadir sysconfdir sharedstatedir localstatedir includedir \
1286 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001287 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001290 # Remove trailing slashes.
1291 case $ac_val in
1292 */ )
1293 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1294 eval $ac_var=\$ac_val;;
1295 esac
1296 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001297 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 [\\/$]* | ?:[\\/]* ) continue;;
1299 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001300 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001301 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001302done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# There might be people who depend on the old broken behavior: `$host'
1305# used to hold the argument of --host etc.
1306# FIXME: To remove some day.
1307build=$build_alias
1308host=$host_alias
1309target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Martin v. Löwis11437992002-04-12 09:54:03 +00001311# FIXME: To remove some day.
1312if test "x$host_alias" != x; then
1313 if test "x$build_alias" = x; then
1314 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 elif test "x$build_alias" != "x$host_alias"; then
1316 cross_compiling=yes
1317 fi
1318fi
1319
1320ac_tool_prefix=
1321test -n "$host_alias" && ac_tool_prefix=$host_alias-
1322
1323test "$silent" = yes && exec 6>/dev/null
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_pwd=`pwd` && test -n "$ac_pwd" &&
1327ac_ls_di=`ls -di .` &&
1328ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332
1333
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334# Find the source files, if location was not specified.
1335if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001338 ac_confdir=`$as_dirname -- "$as_myself" ||
1339$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1340 X"$as_myself" : 'X\(//\)[^/]' \| \
1341 X"$as_myself" : 'X\(//\)$' \| \
1342 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1343$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1345 s//\1/
1346 q
1347 }
1348 /^X\(\/\/\)[^/].*/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)$/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\).*/{
1357 s//\1/
1358 q
1359 }
1360 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001363 srcdir=..
1364 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001365else
1366 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368if test ! -r "$srcdir/$ac_unique_file"; then
1369 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001370 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1373ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001375 pwd)`
1376# When building in place, set srcdir=.
1377if test "$ac_abs_confdir" = "$ac_pwd"; then
1378 srcdir=.
1379fi
1380# Remove unnecessary trailing slashes from srcdir.
1381# Double slashes in file names in object file debugging info
1382# mess up M-x gdb in Emacs.
1383case $srcdir in
1384*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1385esac
1386for ac_var in $ac_precious_vars; do
1387 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1388 eval ac_env_${ac_var}_value=\$${ac_var}
1389 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1391done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001392
Martin v. Löwis11437992002-04-12 09:54:03 +00001393#
1394# Report the --help message.
1395#
1396if test "$ac_init_help" = "long"; then
1397 # Omit some internal or obsolete options to make the list less imposing.
1398 # This message is too long to be a string in the A/UX 3.1 sh.
1399 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001400\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402Usage: $0 [OPTION]... [VAR=VALUE]...
1403
1404To assign environment variables (e.g., CC, CFLAGS...), specify them as
1405VAR=VALUE. See below for descriptions of some of the useful variables.
1406
1407Defaults for the options are specified in brackets.
1408
1409Configuration:
1410 -h, --help display this help and exit
1411 --help=short display options specific to this package
1412 --help=recursive display the short help of all the included packages
1413 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001414 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001415 --cache-file=FILE cache test results in FILE [disabled]
1416 -C, --config-cache alias for \`--cache-file=config.cache'
1417 -n, --no-create do not create output files
1418 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1419
Martin v. Löwis11437992002-04-12 09:54:03 +00001420Installation directories:
1421 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001422 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001423 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425
1426By default, \`make install' will install all the files in
1427\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1428an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1429for instance \`--prefix=\$HOME'.
1430
1431For better control, use the options below.
1432
1433Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 --bindir=DIR user executables [EPREFIX/bin]
1435 --sbindir=DIR system admin executables [EPREFIX/sbin]
1436 --libexecdir=DIR program executables [EPREFIX/libexec]
1437 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1438 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1439 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1440 --libdir=DIR object code libraries [EPREFIX/lib]
1441 --includedir=DIR C header files [PREFIX/include]
1442 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1443 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1444 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1445 --infodir=DIR info documentation [DATAROOTDIR/info]
1446 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1447 --mandir=DIR man documentation [DATAROOTDIR/man]
1448 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1449 --htmldir=DIR html documentation [DOCDIR]
1450 --dvidir=DIR dvi documentation [DOCDIR]
1451 --pdfdir=DIR pdf documentation [DOCDIR]
1452 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454
1455 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001456
1457System types:
1458 --build=BUILD configure for building on BUILD [guessed]
1459 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001460 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001461_ACEOF
1462fi
1463
1464if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001465 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001466 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001468 cat <<\_ACEOF
1469
1470Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001471 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1473 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001474 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001475 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-framework[=INSTALLDIR]
1477 Build (MacOSX|Darwin) framework
1478 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001479 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001480 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1481 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001482 --enable-loadable-sqlite-extensions
1483 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001484 --enable-ipv6 Enable ipv6 (with ipv4) support
1485 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001486 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001487 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001488
1489Optional Packages:
1490 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1491 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001492 --with-universal-archs=ARCH
1493 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001494 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1495 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001496 --with-framework-name=FRAMEWORK
1497 specify an alternate name of the framework built
1498 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001504 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001505 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001506 --with-lto Enable Link Time Optimization in any build. Disabled
1507 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001508 --with-hash-algorithm=[fnv|siphash24]
1509 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001510 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001511 enable AddressSanitizer (asan)
1512 --with-memory-sanitizer enable MemorySanitizer (msan)
1513 --with-undefined-behavior-sanitizer
1514 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001516 --with-system-expat build pyexpat module using an installed expat
1517 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001518 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001519 --with-system-libmpdec build _decimal module using an installed libmpdec
1520 library
Ned Deilyd819b932013-09-06 01:07:05 -07001521 --with-tcltk-includes='-I...'
1522 override search for Tcl and Tk include files
1523 --with-tcltk-libs='-L...'
1524 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001525 --with-dbmliborder=db1:db2:...
1526 order to check db backends for dbm. Valid value is a
1527 colon separated string with the backend names
1528 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
1530 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001531 --with(out)-c-locale-coercion
1532 disable/enable C locale coercion to a UTF-8 based
1533 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001534 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001535 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with-libm=STRING math library
1537 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001538 --with(out)-computed-gotos
1539 Use computed gotos in evaluation loop (enabled by
1540 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001541 --with(out)-ensurepip=[=upgrade]
1542 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001543 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001544 --with-ssl-default-suites=[python|openssl|STRING]
1545 Override default cipher suites string, python: use
1546 Python's preferred selection (default), openssl:
1547 leave OpenSSL's defaults untouched, STRING: use a
1548 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001551 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 CC C compiler command
1553 CFLAGS C compiler flags
1554 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1555 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001560 PKG_CONFIG path to pkg-config utility
1561 PKG_CONFIG_PATH
1562 directories to add to pkg-config's search path
1563 PKG_CONFIG_LIBDIR
1564 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
1566Use these variables to override the choices made by `configure' or to help
1567it to find libraries and programs with nonstandard names/locations.
1568
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001569Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001570_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001572fi
1573
1574if test "$ac_init_help" = "recursive"; then
1575 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001576 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 test -d "$ac_dir" ||
1578 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1579 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_builddir=.
1581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582case "$ac_dir" in
1583.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1584*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001585 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 case $ac_top_builddir_sub in
1589 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1590 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1591 esac ;;
1592esac
1593ac_abs_top_builddir=$ac_pwd
1594ac_abs_builddir=$ac_pwd$ac_dir_suffix
1595# for backward compatibility:
1596ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
1598case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001600 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 ac_top_srcdir=$ac_top_builddir_sub
1602 ac_abs_top_srcdir=$ac_pwd ;;
1603 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 ac_top_srcdir=$srcdir
1606 ac_abs_top_srcdir=$srcdir ;;
1607 *) # Relative name.
1608 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1609 ac_top_srcdir=$ac_top_build_prefix$srcdir
1610 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001611esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001612ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614 cd "$ac_dir" || { ac_status=$?; continue; }
1615 # Check for guested configure.
1616 if test -f "$ac_srcdir/configure.gnu"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1619 elif test -f "$ac_srcdir/configure"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001622 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 fi || ac_status=$?
1625 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001626 done
1627fi
1628
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001629test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001630if $ac_init_version; then
1631 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001632python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001633generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001634
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001636This configure script is free software; the Free Software Foundation
1637gives unlimited permission to copy, distribute and modify it.
1638_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001639 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001641
1642## ------------------------ ##
1643## Autoconf initialization. ##
1644## ------------------------ ##
1645
1646# ac_fn_c_try_compile LINENO
1647# --------------------------
1648# Try to compile conftest.$ac_ext, and return whether this succeeded.
1649ac_fn_c_try_compile ()
1650{
1651 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1652 rm -f conftest.$ac_objext
1653 if { { ac_try="$ac_compile"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_compile") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1668 test $ac_status = 0; } && {
1669 test -z "$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 } && test -s conftest.$ac_objext; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
1676
1677 ac_retval=1
1678fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001679 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001680 as_fn_set_status $ac_retval
1681
1682} # ac_fn_c_try_compile
1683
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001684# ac_fn_c_try_cpp LINENO
1685# ----------------------
1686# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1687ac_fn_c_try_cpp ()
1688{
1689 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690 if { { ac_try="$ac_cpp conftest.$ac_ext"
1691case "(($ac_try" in
1692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1693 *) ac_try_echo=$ac_try;;
1694esac
1695eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1696$as_echo "$ac_try_echo"; } >&5
1697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1698 ac_status=$?
1699 if test -s conftest.err; then
1700 grep -v '^ *+' conftest.err >conftest.er1
1701 cat conftest.er1 >&5
1702 mv -f conftest.er1 conftest.err
1703 fi
1704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1705 test $ac_status = 0; } > conftest.i && {
1706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1707 test ! -s conftest.err
1708 }; then :
1709 ac_retval=0
1710else
1711 $as_echo "$as_me: failed program was:" >&5
1712sed 's/^/| /' conftest.$ac_ext >&5
1713
1714 ac_retval=1
1715fi
1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717 as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_cpp
1720
Matthias Kloseb9621712010-04-24 17:59:49 +00001721# ac_fn_c_try_link LINENO
1722# -----------------------
1723# Try to link conftest.$ac_ext, and return whether this succeeded.
1724ac_fn_c_try_link ()
1725{
1726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1727 rm -f conftest.$ac_objext conftest$ac_exeext
1728 if { { ac_try="$ac_link"
1729case "(($ac_try" in
1730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1731 *) ac_try_echo=$ac_try;;
1732esac
1733eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1734$as_echo "$ac_try_echo"; } >&5
1735 (eval "$ac_link") 2>conftest.err
1736 ac_status=$?
1737 if test -s conftest.err; then
1738 grep -v '^ *+' conftest.err >conftest.er1
1739 cat conftest.er1 >&5
1740 mv -f conftest.er1 conftest.err
1741 fi
1742 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1743 test $ac_status = 0; } && {
1744 test -z "$ac_c_werror_flag" ||
1745 test ! -s conftest.err
1746 } && test -s conftest$ac_exeext && {
1747 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001748 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001749 }; then :
1750 ac_retval=0
1751else
1752 $as_echo "$as_me: failed program was:" >&5
1753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755 ac_retval=1
1756fi
1757 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1758 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1759 # interfere with the next link command; also delete a directory that is
1760 # left behind by Apple's compiler. We do this before executing the actions.
1761 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001762 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001763 as_fn_set_status $ac_retval
1764
1765} # ac_fn_c_try_link
1766
Matthias Kloseb9621712010-04-24 17:59:49 +00001767# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1768# -------------------------------------------------------
1769# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1770# the include files in INCLUDES and setting the cache variable VAR
1771# accordingly.
1772ac_fn_c_check_header_mongrel ()
1773{
1774 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001775 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001778if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 $as_echo_n "(cached) " >&6
1780fi
1781eval ac_res=\$$3
1782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1783$as_echo "$ac_res" >&6; }
1784else
1785 # Is the header compilable?
1786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1787$as_echo_n "checking $2 usability... " >&6; }
1788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1789/* end confdefs.h. */
1790$4
1791#include <$2>
1792_ACEOF
1793if ac_fn_c_try_compile "$LINENO"; then :
1794 ac_header_compiler=yes
1795else
1796 ac_header_compiler=no
1797fi
1798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1800$as_echo "$ac_header_compiler" >&6; }
1801
1802# Is the header present?
1803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1804$as_echo_n "checking $2 presence... " >&6; }
1805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1806/* end confdefs.h. */
1807#include <$2>
1808_ACEOF
1809if ac_fn_c_try_cpp "$LINENO"; then :
1810 ac_header_preproc=yes
1811else
1812 ac_header_preproc=no
1813fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001814rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1816$as_echo "$ac_header_preproc" >&6; }
1817
1818# So? What about this header?
1819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1820 yes:no: )
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1822$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1824$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1825 ;;
1826 no:yes:* )
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1828$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1830$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1832$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1834$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1836$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001837( $as_echo "## --------------------------------------- ##
1838## Report this to https://bugs.python.org/ ##
1839## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 ) | sed "s/^/$as_me: WARNING: /" >&2
1841 ;;
1842esac
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1844$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001845if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001846 $as_echo_n "(cached) " >&6
1847else
1848 eval "$3=\$ac_header_compiler"
1849fi
1850eval ac_res=\$$3
1851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1852$as_echo "$ac_res" >&6; }
1853fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001854 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001855
1856} # ac_fn_c_check_header_mongrel
1857
1858# ac_fn_c_try_run LINENO
1859# ----------------------
1860# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1861# that executables *can* be run.
1862ac_fn_c_try_run ()
1863{
1864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1865 if { { ac_try="$ac_link"
1866case "(($ac_try" in
1867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1868 *) ac_try_echo=$ac_try;;
1869esac
1870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1871$as_echo "$ac_try_echo"; } >&5
1872 (eval "$ac_link") 2>&5
1873 ac_status=$?
1874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1875 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1876 { { case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879esac
1880eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881$as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_try") 2>&5
1883 ac_status=$?
1884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885 test $ac_status = 0; }; }; then :
1886 ac_retval=0
1887else
1888 $as_echo "$as_me: program exited with status $ac_status" >&5
1889 $as_echo "$as_me: failed program was:" >&5
1890sed 's/^/| /' conftest.$ac_ext >&5
1891
1892 ac_retval=$ac_status
1893fi
1894 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001896 as_fn_set_status $ac_retval
1897
1898} # ac_fn_c_try_run
1899
1900# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1901# -------------------------------------------------------
1902# Tests whether HEADER exists and can be compiled using the include files in
1903# INCLUDES, setting the cache variable VAR accordingly.
1904ac_fn_c_check_header_compile ()
1905{
1906 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1908$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001909if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001910 $as_echo_n "(cached) " >&6
1911else
1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913/* end confdefs.h. */
1914$4
1915#include <$2>
1916_ACEOF
1917if ac_fn_c_try_compile "$LINENO"; then :
1918 eval "$3=yes"
1919else
1920 eval "$3=no"
1921fi
1922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1923fi
1924eval ac_res=\$$3
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1926$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001928
1929} # ac_fn_c_check_header_compile
1930
Matthias Kloseb9621712010-04-24 17:59:49 +00001931# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1932# -------------------------------------------
1933# Tests whether TYPE exists after having included INCLUDES, setting cache
1934# variable VAR accordingly.
1935ac_fn_c_check_type ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001940if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001941 $as_echo_n "(cached) " >&6
1942else
1943 eval "$3=no"
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$4
1947int
1948main ()
1949{
1950if (sizeof ($2))
1951 return 0;
1952 ;
1953 return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof (($2)))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970
1971else
1972 eval "$3=yes"
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001982
1983} # ac_fn_c_check_type
1984
Matthias Kloseb9621712010-04-24 17:59:49 +00001985# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1986# --------------------------------------------
1987# Tries to find the compile-time value of EXPR in a program that includes
1988# INCLUDES, setting VAR accordingly. Returns whether the value could be
1989# computed
1990ac_fn_c_compute_int ()
1991{
1992 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1993 if test "$cross_compiling" = yes; then
1994 # Depending upon the size, compute the lo and hi bounds.
1995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1996/* end confdefs.h. */
1997$4
1998int
1999main ()
2000{
2001static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002002test_array [0] = 0;
2003return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002004
2005 ;
2006 return 0;
2007}
2008_ACEOF
2009if ac_fn_c_try_compile "$LINENO"; then :
2010 ac_lo=0 ac_mid=0
2011 while :; do
2012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2013/* end confdefs.h. */
2014$4
2015int
2016main ()
2017{
2018static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002019test_array [0] = 0;
2020return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002021
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 ac_hi=$ac_mid; break
2028else
2029 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030 if test $ac_lo -le $ac_mid; then
2031 ac_lo= ac_hi=
2032 break
2033 fi
2034 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035fi
2036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037 done
2038else
2039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002046test_array [0] = 0;
2047return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_hi=-1 ac_mid=-1
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002063test_array [0] = 0;
2064return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_lo=$ac_mid; break
2072else
2073 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2074 if test $ac_mid -le $ac_hi; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 ac_lo= ac_hi=
2084fi
2085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088# Binary search between lo and hi bounds.
2089while test "x$ac_lo" != "x$ac_hi"; do
2090 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002098test_array [0] = 0;
2099return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_hi=$ac_mid
2107else
2108 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2109fi
2110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2111done
2112case $ac_lo in #((
2113?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2114'') ac_retval=1 ;;
2115esac
2116 else
2117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120static long int longval () { return $2; }
2121static unsigned long int ulongval () { return $2; }
2122#include <stdio.h>
2123#include <stdlib.h>
2124int
2125main ()
2126{
2127
2128 FILE *f = fopen ("conftest.val", "w");
2129 if (! f)
2130 return 1;
2131 if (($2) < 0)
2132 {
2133 long int i = longval ();
2134 if (i != ($2))
2135 return 1;
2136 fprintf (f, "%ld", i);
2137 }
2138 else
2139 {
2140 unsigned long int i = ulongval ();
2141 if (i != ($2))
2142 return 1;
2143 fprintf (f, "%lu", i);
2144 }
2145 /* Do not output a trailing newline, as this causes \r\n confusion
2146 on some platforms. */
2147 return ferror (f) || fclose (f) != 0;
2148
2149 ;
2150 return 0;
2151}
2152_ACEOF
2153if ac_fn_c_try_run "$LINENO"; then :
2154 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2155else
2156 ac_retval=1
2157fi
2158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2159 conftest.$ac_objext conftest.beam conftest.$ac_ext
2160rm -f conftest.val
2161
2162 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002163 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002164 as_fn_set_status $ac_retval
2165
2166} # ac_fn_c_compute_int
2167
2168# ac_fn_c_check_func LINENO FUNC VAR
2169# ----------------------------------
2170# Tests whether FUNC exists, setting the cache variable VAR accordingly
2171ac_fn_c_check_func ()
2172{
2173 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002176if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002177 $as_echo_n "(cached) " >&6
2178else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180/* end confdefs.h. */
2181/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2183#define $2 innocuous_$2
2184
2185/* System header to define __stub macros and hopefully few prototypes,
2186 which can conflict with char $2 (); below.
2187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2188 <limits.h> exists even on freestanding compilers. */
2189
2190#ifdef __STDC__
2191# include <limits.h>
2192#else
2193# include <assert.h>
2194#endif
2195
2196#undef $2
2197
2198/* Override any GCC internal prototype to avoid an error.
2199 Use char because int might match the return type of a GCC
2200 builtin and then its argument prototype would still apply. */
2201#ifdef __cplusplus
2202extern "C"
2203#endif
2204char $2 ();
2205/* The GNU C library defines this for functions which it implements
2206 to always fail with ENOSYS. Some functions are actually named
2207 something starting with __ and the normal name is an alias. */
2208#if defined __stub_$2 || defined __stub___$2
2209choke me
2210#endif
2211
2212int
2213main ()
2214{
2215return $2 ();
2216 ;
2217 return 0;
2218}
2219_ACEOF
2220if ac_fn_c_try_link "$LINENO"; then :
2221 eval "$3=yes"
2222else
2223 eval "$3=no"
2224fi
2225rm -f core conftest.err conftest.$ac_objext \
2226 conftest$ac_exeext conftest.$ac_ext
2227fi
2228eval ac_res=\$$3
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2230$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002231 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002232
2233} # ac_fn_c_check_func
2234
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002235# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2236# ---------------------------------------------
2237# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2238# accordingly.
2239ac_fn_c_check_decl ()
2240{
2241 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2242 as_decl_name=`echo $2|sed 's/ *(.*//'`
2243 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2245$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2246if eval \${$3+:} false; then :
2247 $as_echo_n "(cached) " >&6
2248else
2249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2250/* end confdefs.h. */
2251$4
2252int
2253main ()
2254{
2255#ifndef $as_decl_name
2256#ifdef __cplusplus
2257 (void) $as_decl_use;
2258#else
2259 (void) $as_decl_name;
2260#endif
2261#endif
2262
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_compile "$LINENO"; then :
2268 eval "$3=yes"
2269else
2270 eval "$3=no"
2271fi
2272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2273fi
2274eval ac_res=\$$3
2275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2276$as_echo "$ac_res" >&6; }
2277 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2278
2279} # ac_fn_c_check_decl
2280
Matthias Kloseb9621712010-04-24 17:59:49 +00002281# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2282# ----------------------------------------------------
2283# Tries to find if the field MEMBER exists in type AGGR, after including
2284# INCLUDES, setting cache variable VAR accordingly.
2285ac_fn_c_check_member ()
2286{
2287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2289$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002290if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295$5
2296int
2297main ()
2298{
2299static $2 ac_aggr;
2300if (ac_aggr.$3)
2301return 0;
2302 ;
2303 return 0;
2304}
2305_ACEOF
2306if ac_fn_c_try_compile "$LINENO"; then :
2307 eval "$4=yes"
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$5
2312int
2313main ()
2314{
2315static $2 ac_aggr;
2316if (sizeof ac_aggr.$3)
2317return 0;
2318 ;
2319 return 0;
2320}
2321_ACEOF
2322if ac_fn_c_try_compile "$LINENO"; then :
2323 eval "$4=yes"
2324else
2325 eval "$4=no"
2326fi
2327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331eval ac_res=\$$4
2332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2333$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002334 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002335
2336} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002337cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002338This file contains any messages produced by compilers while
2339running configure, to aid debugging if configure makes a mistake.
2340
Ned Deily5489bda2018-01-31 17:44:09 -05002341It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002342generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002343
2344 $ $0 $@
2345
2346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002347exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002348{
2349cat <<_ASUNAME
2350## --------- ##
2351## Platform. ##
2352## --------- ##
2353
2354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2355uname -m = `(uname -m) 2>/dev/null || echo unknown`
2356uname -r = `(uname -r) 2>/dev/null || echo unknown`
2357uname -s = `(uname -s) 2>/dev/null || echo unknown`
2358uname -v = `(uname -v) 2>/dev/null || echo unknown`
2359
2360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2361/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2362
2363/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2364/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002367/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2368/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2369/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2370
2371_ASUNAME
2372
2373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2374for as_dir in $PATH
2375do
2376 IFS=$as_save_IFS
2377 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002378 $as_echo "PATH: $as_dir"
2379 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002380IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002381
2382} >&5
2383
2384cat >&5 <<_ACEOF
2385
2386
2387## ----------- ##
2388## Core tests. ##
2389## ----------- ##
2390
2391_ACEOF
2392
2393
2394# Keep a trace of the command line.
2395# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002396# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002397# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002400ac_configure_args0=
2401ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_must_keep_next=false
2403for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002404do
Skip Montanaro6dead952003-09-25 14:50:04 +00002405 for ac_arg
2406 do
2407 case $ac_arg in
2408 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2409 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2410 | -silent | --silent | --silen | --sile | --sil)
2411 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002412 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 esac
2415 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002420 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 case $ac_arg in
2423 *=* | --config-cache | -C | -disable-* | --disable-* \
2424 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2425 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2426 | -with-* | --with-* | -without-* | --without-* | --x)
2427 case "$ac_configure_args0 " in
2428 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2429 esac
2430 ;;
2431 -* ) ac_must_keep_next=true ;;
2432 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002433 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002434 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 ;;
2436 esac
2437 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002438done
Matthias Kloseb9621712010-04-24 17:59:49 +00002439{ ac_configure_args0=; unset ac_configure_args0;}
2440{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442# When interrupted or exit'd, cleanup temporary files, and complete
2443# config.log. We remove comments because anyway the quotes in there
2444# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002445# WARNING: Use '\'' to represent an apostrophe within the trap.
2446# 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 +00002447trap 'exit_status=$?
2448 # Save into config.log some information that might help in debugging.
2449 {
2450 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002451
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002452 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002453## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 echo
2456 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457(
2458 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2459 eval ac_val=\$$ac_var
2460 case $ac_val in #(
2461 *${as_nl}*)
2462 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002463 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002465 esac
2466 case $ac_var in #(
2467 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2469 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002470 esac ;;
2471 esac
2472 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2475 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 "s/'\''/'\''\\\\'\'''\''/g;
2478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2479 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002480 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 esac |
2484 sort
2485)
Martin v. Löwis11437992002-04-12 09:54:03 +00002486 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002487
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002489## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_vars
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501
2502 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002503 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002504## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 echo
2507 for ac_var in $ac_subst_files
2508 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 eval ac_val=\$$ac_var
2510 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002511 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 done | sort
2515 echo
2516 fi
2517
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002519 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002520## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002522 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
2525 fi
2526 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 $as_echo "$as_me: caught signal $ac_signal"
2528 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 rm -f core *.core core.conftest.* &&
2531 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002534for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002536done
2537ac_signal=0
2538
2539# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
Matthias Kloseb9621712010-04-24 17:59:49 +00002542$as_echo "/* confdefs.h */" > confdefs.h
2543
Martin v. Löwis11437992002-04-12 09:54:03 +00002544# Predefined preprocessor variables.
2545
2546cat >>confdefs.h <<_ACEOF
2547#define PACKAGE_NAME "$PACKAGE_NAME"
2548_ACEOF
2549
Martin v. Löwis11437992002-04-12 09:54:03 +00002550cat >>confdefs.h <<_ACEOF
2551#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2552_ACEOF
2553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554cat >>confdefs.h <<_ACEOF
2555#define PACKAGE_VERSION "$PACKAGE_VERSION"
2556_ACEOF
2557
Martin v. Löwis11437992002-04-12 09:54:03 +00002558cat >>confdefs.h <<_ACEOF
2559#define PACKAGE_STRING "$PACKAGE_STRING"
2560_ACEOF
2561
Martin v. Löwis11437992002-04-12 09:54:03 +00002562cat >>confdefs.h <<_ACEOF
2563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2564_ACEOF
2565
Matthias Kloseb9621712010-04-24 17:59:49 +00002566cat >>confdefs.h <<_ACEOF
2567#define PACKAGE_URL "$PACKAGE_URL"
2568_ACEOF
2569
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
2571# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002572# Prefer an explicitly selected file to automatically selected ones.
2573ac_site_file1=NONE
2574ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 # We do not want a PATH search for config.site.
2577 case $CONFIG_SITE in #((
2578 -*) ac_site_file1=./$CONFIG_SITE;;
2579 */*) ac_site_file1=$CONFIG_SITE;;
2580 *) ac_site_file1=./$CONFIG_SITE;;
2581 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$prefix/share/config.site
2584 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585else
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$ac_default_prefix/share/config.site
2587 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002588fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002589for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590do
Matthias Kloseb9621712010-04-24 17:59:49 +00002591 test "x$ac_site_file" = xNONE && continue
2592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2594$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002596 . "$ac_site_file" \
2597 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2599as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002600See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002601 fi
2602done
2603
2604if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002605 # Some versions of bash will fail to source /dev/null (special files
2606 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2609$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2612 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 esac
2614 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002615else
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2617$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002618 >$cache_file
2619fi
2620
2621# Check that the precious variables saved in the cache have kept the same
2622# value.
2623ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2626 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2628 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 case $ac_old_set,$ac_new_set in
2630 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002631 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2632$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 +00002633 ac_cache_corrupted=: ;;
2634 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2636$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_cache_corrupted=: ;;
2638 ,);;
2639 *)
2640 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002641 # differences in whitespace do not lead to failure.
2642 ac_old_val_w=`echo x $ac_old_val`
2643 ac_new_val_w=`echo x $ac_new_val`
2644 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2645 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2646$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2647 ac_cache_corrupted=:
2648 else
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2650$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2651 eval $ac_var=\$ac_old_val
2652 fi
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2654$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2656$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 fi;;
2658 esac
2659 # Pass precious variables to config.status.
2660 if test "$ac_new_set" = set; then
2661 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 *) ac_arg=$ac_var=$ac_new_val ;;
2664 esac
2665 case " $ac_configure_args " in
2666 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002667 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 esac
2669 fi
2670done
2671if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002672 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2675$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002676 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002678## -------------------- ##
2679## Main body of script. ##
2680## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002681
Guido van Rossum7f43da71994-08-01 12:15:30 +00002682ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002683ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002684ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2685ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2686ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002687
Guido van Rossum627b2d71993-12-24 10:39:16 +00002688
Michael W. Hudson54241132001-12-07 15:38:26 +00002689
Trent Nelson4d4ec652012-10-16 08:51:24 -04002690
Christian Heimesff5be6e2018-01-20 13:19:21 +01002691
2692
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002693if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002694 # If we're building out-of-tree, we need to make sure the following
2695 # resources get picked up before their $srcdir counterparts.
2696 # Objects/ -> typeslots.inc
2697 # Include/ -> Python-ast.h, graminit.h
2698 # Python/ -> importlib.h
2699 # (A side effect of this is that these resources will automatically be
2700 # regenerated when building out-of-tree, regardless of whether or not
2701 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2702 # off.)
2703 BASECPPFLAGS="-IObjects -IInclude -IPython"
2704else
2705 BASECPPFLAGS=""
2706fi
2707
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708
2709
2710
2711
Victor Stinner9ed34a82017-05-02 22:35:58 +02002712if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002713then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002714# Extract the first word of "git", so it can be a program name with args.
2715set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2717$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002718if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002719 $as_echo_n "(cached) " >&6
2720else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002721 if test -n "$HAS_GIT"; then
2722 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002723else
2724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2725for as_dir in $PATH
2726do
2727 IFS=$as_save_IFS
2728 test -z "$as_dir" && as_dir=.
2729 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002731 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2733 break 2
2734 fi
2735done
2736 done
2737IFS=$as_save_IFS
2738
Ned Deily5c4b0d02017-03-04 00:19:55 -05002739 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002740fi
2741fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002742HAS_GIT=$ac_cv_prog_HAS_GIT
2743if test -n "$HAS_GIT"; then
2744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2745$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002746else
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2748$as_echo "no" >&6; }
2749fi
2750
2751
2752else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002753HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002754fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756then
Xiang Zhang4c855572018-08-20 22:36:19 +08002757 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2758 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2759 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002760else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002761 GITVERSION=""
2762 GITTAG=""
2763 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002764fi
2765
2766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002768
2769
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002770ac_aux_dir=
2771for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2772 if test -f "$ac_dir/install-sh"; then
2773 ac_aux_dir=$ac_dir
2774 ac_install_sh="$ac_aux_dir/install-sh -c"
2775 break
2776 elif test -f "$ac_dir/install.sh"; then
2777 ac_aux_dir=$ac_dir
2778 ac_install_sh="$ac_aux_dir/install.sh -c"
2779 break
2780 elif test -f "$ac_dir/shtool"; then
2781 ac_aux_dir=$ac_dir
2782 ac_install_sh="$ac_aux_dir/shtool install -c"
2783 break
2784 fi
2785done
2786if test -z "$ac_aux_dir"; then
2787 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2788fi
2789
2790# These three variables are undocumented and unsupported,
2791# and are intended to be withdrawn in a future Autoconf release.
2792# They can cause serious problems if a builder's source tree is in a directory
2793# whose full name contains unusual characters.
2794ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2795ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2796ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2797
2798
2799# Make sure we can run config.sub.
2800$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2801 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2802
2803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2804$as_echo_n "checking build system type... " >&6; }
2805if ${ac_cv_build+:} false; then :
2806 $as_echo_n "(cached) " >&6
2807else
2808 ac_build_alias=$build_alias
2809test "x$ac_build_alias" = x &&
2810 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2811test "x$ac_build_alias" = x &&
2812 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2813ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2814 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2815
2816fi
2817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2818$as_echo "$ac_cv_build" >&6; }
2819case $ac_cv_build in
2820*-*-*) ;;
2821*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2822esac
2823build=$ac_cv_build
2824ac_save_IFS=$IFS; IFS='-'
2825set x $ac_cv_build
2826shift
2827build_cpu=$1
2828build_vendor=$2
2829shift; shift
2830# Remember, the first character of IFS is used to create $*,
2831# except with old shells:
2832build_os=$*
2833IFS=$ac_save_IFS
2834case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2835
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2838$as_echo_n "checking host system type... " >&6; }
2839if ${ac_cv_host+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 if test "x$host_alias" = x; then
2843 ac_cv_host=$ac_cv_build
2844else
2845 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2847fi
2848
2849fi
2850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2851$as_echo "$ac_cv_host" >&6; }
2852case $ac_cv_host in
2853*-*-*) ;;
2854*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2855esac
2856host=$ac_cv_host
2857ac_save_IFS=$IFS; IFS='-'
2858set x $ac_cv_host
2859shift
2860host_cpu=$1
2861host_vendor=$2
2862shift; shift
2863# Remember, the first character of IFS is used to create $*,
2864# except with old shells:
2865host_os=$*
2866IFS=$ac_save_IFS
2867case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2868
2869
2870
doko@python.orga10e4a92013-01-25 18:45:12 +01002871
2872
Ned Deilyfcbc2462014-08-22 13:32:49 -07002873# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2874rm -f pybuilddir.txt
2875
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002876for ac_prog in python$PACKAGE_VERSION python3 python
2877do
2878 # Extract the first word of "$ac_prog", so it can be a program name with args.
2879set dummy $ac_prog; ac_word=$2
2880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2881$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002882if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002883 $as_echo_n "(cached) " >&6
2884else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002885 if test -n "$PYTHON_FOR_REGEN"; then
2886 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002887else
2888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2889for as_dir in $PATH
2890do
2891 IFS=$as_save_IFS
2892 test -z "$as_dir" && as_dir=.
2893 for ac_exec_ext in '' $ac_executable_extensions; do
2894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002895 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2897 break 2
2898 fi
2899done
2900 done
2901IFS=$as_save_IFS
2902
2903fi
2904fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002905PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2906if test -n "$PYTHON_FOR_REGEN"; then
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2908$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002909else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2911$as_echo "no" >&6; }
2912fi
2913
2914
Victor Stinnera5c62a82017-05-03 18:21:48 +02002915 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002916done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002937 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 +02002938 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002939elif test "$cross_compiling" = maybe; then
2940 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002941else
2942 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2943fi
2944
2945
Martin v. Löwis11437992002-04-12 09:54:03 +00002946
Benjamin Petersond23f8222009-04-05 19:13:16 +00002947if test "$prefix" != "/"; then
2948 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2949fi
2950
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952
2953
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002954# We don't use PACKAGE_ variables, and they cause conflicts
2955# with other autoconf-based packages that include Python.h
2956grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2957rm confdefs.h
2958mv confdefs.h.new confdefs.h
2959
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002960
Ned Deily5489bda2018-01-31 17:44:09 -05002961VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002962
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002963# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002964
2965SOVERSION=1.0
2966
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002967# The later defininition of _XOPEN_SOURCE disables certain features
2968# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2969
Matthias Kloseb9621712010-04-24 17:59:49 +00002970$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971
2972
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2974# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2975# them.
2976
Matthias Kloseb9621712010-04-24 17:59:49 +00002977$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002978
2979
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2981# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2982# them.
2983
Matthias Kloseb9621712010-04-24 17:59:49 +00002984$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002985
2986
Martin v. Löwisd6320502004-08-12 13:45:08 +00002987# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002988# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2989# them.
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002992
2993
2994
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002995define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002996
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002997# Arguments passed to configure.
2998
2999CONFIG_ARGS="$ac_configure_args"
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3002$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003004if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003006 case $enableval in
3007 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003008 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003009 # information
3010 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003011 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003012 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003013 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3014 if test ! -d "${enableval}"
3015 then
3016 enableval=/
3017 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003018 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003019 ;;
3020 esac
3021 case $enableval in
3022 no)
3023 UNIVERSALSDK=
3024 enable_universalsdk=
3025 ;;
3026 *)
3027 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 if test ! -d "${UNIVERSALSDK}"
3029 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003030 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003032 ;;
3033 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003034
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003035
Thomas Wouters477c8d52006-05-27 19:21:47 +00003036else
3037
3038 UNIVERSALSDK=
3039 enable_universalsdk=
3040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003041fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003043if test -n "${UNIVERSALSDK}"
3044then
Matthias Kloseb9621712010-04-24 17:59:49 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3046$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047else
Matthias Kloseb9621712010-04-24 17:59:49 +00003048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3049$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003052
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deily87adb6e2013-10-18 21:09:56 -07003054ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deilycbfb9a52012-06-23 16:02:19 -07003056# For backward compatibility reasons we prefer to select '32-bit' if available,
3057# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003058UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003059if test "`uname -s`" = "Darwin"
3060then
3061 if test -n "${UNIVERSALSDK}"
3062 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003063 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003064 then
3065 UNIVERSAL_ARCHS="intel"
3066 fi
3067 fi
3068fi
3069
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003070
Matthias Kloseb9621712010-04-24 17:59:49 +00003071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3072$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073
3074# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003075if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077 UNIVERSAL_ARCHS="$withval"
3078
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079fi
3080
Ned Deily87adb6e2013-10-18 21:09:56 -07003081if test -n "${UNIVERSALSDK}"
3082then
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3084$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3085else
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3087$as_echo "no" >&6; }
3088fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003090
3091# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003092if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003093 withval=$with_framework_name;
3094 PYTHONFRAMEWORK=${withval}
3095 PYTHONFRAMEWORKDIR=${withval}.framework
3096 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3097
3098else
3099
3100 PYTHONFRAMEWORK=Python
3101 PYTHONFRAMEWORKDIR=Python.framework
3102 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3103
3104fi
3105
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003107if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003109 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003110 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003111 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003112 esac
3113 case $enableval in
3114 no)
3115 PYTHONFRAMEWORK=
3116 PYTHONFRAMEWORKDIR=no-framework
3117 PYTHONFRAMEWORKPREFIX=
3118 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003119 FRAMEWORKINSTALLFIRST=
3120 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003121 FRAMEWORKALTINSTALLFIRST=
3122 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003123 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003124 if test "x${prefix}" = "xNONE"; then
3125 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3126 else
3127 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3128 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003129 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003130 ;;
3131 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003132 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003133 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003134 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003135 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003136 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3137 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003138 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003139 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003140
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003141 if test "x${prefix}" = "xNONE" ; then
3142 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003143
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147
3148 case "${enableval}" in
3149 /System*)
3150 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3151 if test "${prefix}" = "NONE" ; then
3152 # See below
3153 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3154 fi
3155 ;;
3156
3157 /Library*)
3158 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3159 ;;
3160
3161 */Library/Frameworks)
3162 MDIR="`dirname "${enableval}"`"
3163 MDIR="`dirname "${MDIR}"`"
3164 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3165
3166 if test "${prefix}" = "NONE"; then
3167 # User hasn't specified the
3168 # --prefix option, but wants to install
3169 # the framework in a non-default location,
3170 # ensure that the compatibility links get
3171 # installed relative to that prefix as well
3172 # instead of in /usr/local.
3173 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3174 fi
3175 ;;
3176
3177 *)
3178 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3179 ;;
3180 esac
3181
Jack Jansen127e56e2001-09-11 14:41:54 +00003182 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003184 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003190 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3191
3192 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3193
Jack Jansene578a632001-08-15 01:27:14 +00003194 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Guido van Rossum563e7081996-09-10 18:20:48 +00003196else
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORKPREFIX=
3201 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 FRAMEWORKINSTALLFIRST=
3203 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003204 FRAMEWORKALTINSTALLFIRST=
3205 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003206 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003207 if test "x${prefix}" = "xNONE" ; then
3208 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3209 else
3210 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3211 fi
Jack Jansene578a632001-08-15 01:27:14 +00003212 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215fi
3216
Thomas Wouters477c8d52006-05-27 19:21:47 +00003217
3218
Michael W. Hudson54241132001-12-07 15:38:26 +00003219
3220
3221
3222
Jack Jansene578a632001-08-15 01:27:14 +00003223
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003224
3225
3226
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003227
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003228
Ned Deilyb8f944f2013-11-21 22:42:25 -08003229
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003230
3231cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003232#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003233_ACEOF
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003237## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003238## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003239##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003240# Set name for machine-dependent library files
3241
Matthias Kloseb9621712010-04-24 17:59:49 +00003242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3243$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244if test -z "$MACHDEP"
3245then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003246 # avoid using uname for cross builds
3247 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003248 # ac_sys_system and ac_sys_release are used for setting
3249 # a lot of different things including 'define_xopen_source'
3250 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003251 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003252 *-*-linux-android*)
3253 ac_sys_system=Linux-android
3254 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 *-*-linux*)
3256 ac_sys_system=Linux
3257 ;;
3258 *-*-cygwin*)
3259 ac_sys_system=Cygwin
3260 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003261 *-*-vxworks*)
3262 ac_sys_system=VxWorks
3263 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3268 esac
3269 ac_sys_release=
3270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003272 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003273 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 fi
3279 ac_md_system=`echo $ac_sys_system |
3280 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3281 ac_md_release=`echo $ac_sys_release |
3282 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3283 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003284
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003286 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003287 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003288 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003289 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003290 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003292fi
Guido van Rossum91922671997-10-09 20:24:13 +00003293
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003294
3295if test "$cross_compiling" = yes; then
3296 case "$host" in
3297 *-*-linux*)
3298 case "$host_cpu" in
3299 arm*)
3300 _host_cpu=arm
3301 ;;
3302 *)
3303 _host_cpu=$host_cpu
3304 esac
3305 ;;
3306 *-*-cygwin*)
3307 _host_cpu=
3308 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003309 *-*-vxworks*)
3310 _host_cpu=$host_cpu
3311 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003312 *)
3313 # for now, limit cross builds to known configurations
3314 MACHDEP="unknown"
3315 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3316 esac
3317 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3318fi
3319
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003320# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3321# disable features if it is defined, without any means to access these
3322# features as extensions. For these systems, we skip the definition of
3323# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3324# some feature, make sure there is no alternative way to access this
3325# feature. Also, when using wildcards, make sure you have verified the
3326# need for not defining _XOPEN_SOURCE on all systems matching the
3327# wildcard, and that the wildcard does not include future systems
3328# (which may remove their limitations).
3329case $ac_sys_system/$ac_sys_release in
3330 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3331 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003332 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003333 # In addition, Stefan Krah confirms that issue #1244610 exists through
3334 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003335 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336 define_xopen_source=no
3337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003342
3343 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003350
3351 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003352 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3353 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3354 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003355 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 +00003356 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003357 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3358 # request to enable features supported by the standard as a request
3359 # to disable features not supported by the standard. The best way
3360 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3361 # entirely and define __EXTENSIONS__ instead.
3362 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003363 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3365 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003366 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003367 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 define_xopen_source=no;;
3369 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003373 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3374 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3375 # identifies itself as Darwin/7.*
3376 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3377 # disables platform specific features beyond repair.
3378 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # has no effect, don't bother defining them
3380 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003381 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003382 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003383 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003384 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3385 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3386 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003387 AIX/4)
3388 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003389 AIX/5)
3390 if test `uname -r` -eq 1; then
3391 define_xopen_source=no
3392 fi
3393 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003394 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3395 # defining NI_NUMERICHOST.
3396 QNX/6.3.2)
3397 define_xopen_source=no
3398 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003399 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3400 # in network headers still using system V types.
3401 VxWorks/*)
3402 define_xopen_source=no
3403 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003404
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003405esac
3406
3407if test $define_xopen_source = yes
3408then
Victor Stinner14d098d2011-09-07 22:29:43 +02003409 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003410
Victor Stinner14d098d2011-09-07 22:29:43 +02003411$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
3414 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3415 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3416 # several APIs are not declared. Since this is also needed in some
3417 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Matthias Kloseb9621712010-04-24 17:59:49 +00003419$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
3421
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003422
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003423$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003424
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003425fi
3426
Christian Heimes647cd872013-12-07 23:39:33 +01003427# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3428case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003429 hp*|HP*)
3430 define_stdc_a1=yes;;
3431 *)
3432 define_stdc_a1=no;;
3433esac
3434
3435if test $define_stdc_a1 = yes
3436then
Christian Heimes647cd872013-12-07 23:39:33 +01003437
3438$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3439
Christian Heimesb02bcae2013-12-08 15:21:08 +01003440fi
Christian Heimes647cd872013-12-07 23:39:33 +01003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3443# it may influence the way we can build extensions, so distutils
3444# needs to check it
3445
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446
Jack Jansen6b08a402004-06-03 12:41:45 +00003447CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003449
Guido van Rossum627b2d71993-12-24 10:39:16 +00003450# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003451
3452# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3453# for debug/optimization stuff. BASECFLAGS is for flags that are required
3454# just to get things to compile and link. Users are free to override OPT
3455# when running configure or make. The build should not break if they do.
3456# BASECFLAGS should generally not be messed with, however.
3457
Guido van Rossum8b131c51995-03-09 14:10:13 +00003458# If the user switches compilers, we can't believe the cache
3459if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3460then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003461 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003462(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003463fi
3464
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003465# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3466# when the compiler supports them, but we don't always want -O2, and
3467# we set -g later.
3468if test -z "$CFLAGS"; then
3469 CFLAGS=
3470fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003471
3472if test "$ac_sys_system" = "Darwin"
3473then
3474 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003475 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003476 # information
3477 if test -z "${CC}"
3478 then
3479 found_gcc=
3480 found_clang=
3481 as_save_IFS=$IFS; IFS=:
3482 for as_dir in $PATH
3483 do
3484 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003485 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003486 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 fi
3489 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003490 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003491 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003492 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003493 fi
3494 fi
3495 done
3496 IFS=$as_save_IFS
3497
3498 if test -n "$found_gcc" -a -n "$found_clang"
3499 then
3500 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3501 then
3502 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3503$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3504 CC="$found_clang"
3505 CXX="$found_clang++"
3506 fi
3507
3508
3509 elif test -z "$found_gcc" -a -n "$found_clang"
3510 then
3511 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3512$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3513 CC="$found_clang"
3514 CXX="$found_clang++"
3515
3516 elif test -z "$found_gcc" -a -z "$found_clang"
3517 then
3518 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3519 if test -n "${found_clang}"
3520 then
3521 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3522$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3523 CC="${found_clang}"
3524 CXX="`/usr/bin/xcrun -find clang++`"
3525
3526 # else: use default behaviour
3527 fi
3528 fi
3529 fi
3530fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003531ac_ext=c
3532ac_cpp='$CPP $CPPFLAGS'
3533ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3534ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3535ac_compiler_gnu=$ac_cv_c_compiler_gnu
3536if test -n "$ac_tool_prefix"; then
3537 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3538set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3540$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003541if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003542 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003543else
3544 if test -n "$CC"; then
3545 ac_cv_prog_CC="$CC" # Let the user override the test.
3546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3548for as_dir in $PATH
3549do
3550 IFS=$as_save_IFS
3551 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003552 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003554 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003555 $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 +00003556 break 2
3557 fi
3558done
Matthias Kloseb9621712010-04-24 17:59:49 +00003559 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003560IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003561
Jack Jansendd19cf82001-12-06 22:36:17 +00003562fi
3563fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003564CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003565if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3567$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003568else
Matthias Kloseb9621712010-04-24 17:59:49 +00003569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3570$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003571fi
3572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573
Martin v. Löwis11437992002-04-12 09:54:03 +00003574fi
3575if test -z "$ac_cv_prog_CC"; then
3576 ac_ct_CC=$CC
3577 # Extract the first word of "gcc", so it can be a program name with args.
3578set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3580$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003581if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003582 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003583else
3584 if test -n "$ac_ct_CC"; then
3585 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3586else
3587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3588for as_dir in $PATH
3589do
3590 IFS=$as_save_IFS
3591 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003592 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003594 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003595 $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 +00003596 break 2
3597 fi
3598done
Matthias Kloseb9621712010-04-24 17:59:49 +00003599 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003601
3602fi
3603fi
3604ac_ct_CC=$ac_cv_prog_ac_ct_CC
3605if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3607$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003608else
Matthias Kloseb9621712010-04-24 17:59:49 +00003609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3610$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003611fi
3612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 if test "x$ac_ct_CC" = x; then
3614 CC=""
3615 else
3616 case $cross_compiling:$ac_tool_warned in
3617yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003620ac_tool_warned=yes ;;
3621esac
3622 CC=$ac_ct_CC
3623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627
Jack Jansendd19cf82001-12-06 22:36:17 +00003628if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003629 if test -n "$ac_tool_prefix"; then
3630 # 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 +00003631set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3633$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003634if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003635 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003636else
3637 if test -n "$CC"; then
3638 ac_cv_prog_CC="$CC" # Let the user override the test.
3639else
Martin v. Löwis11437992002-04-12 09:54:03 +00003640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3641for as_dir in $PATH
3642do
3643 IFS=$as_save_IFS
3644 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003647 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 $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 +00003649 break 2
3650 fi
3651done
Matthias Kloseb9621712010-04-24 17:59:49 +00003652 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003653IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003654
3655fi
3656fi
3657CC=$ac_cv_prog_CC
3658if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3660$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661else
Matthias Kloseb9621712010-04-24 17:59:49 +00003662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3663$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003664fi
3665
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003666
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003668fi
3669if test -z "$CC"; then
3670 # Extract the first word of "cc", so it can be a program name with args.
3671set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3673$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003674if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 if test -n "$CC"; then
3678 ac_cv_prog_CC="$CC" # Let the user override the test.
3679else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003680 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3689 ac_prog_rejected=yes
3690 continue
3691 fi
3692 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 $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 +00003694 break 2
3695 fi
3696done
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003699
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700if test $ac_prog_rejected = yes; then
3701 # We found a bogon in the path, so make sure we never use it.
3702 set dummy $ac_cv_prog_CC
3703 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003705 # We chose a different compiler from the bogus one.
3706 # However, it has the same basename, so the bogon will be chosen
3707 # first if we set CC to just the basename; use the full file name.
3708 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003709 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003710 fi
3711fi
3712fi
3713fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003715if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3717$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003718else
Matthias Kloseb9621712010-04-24 17:59:49 +00003719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3720$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721fi
3722
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723
Martin v. Löwis11437992002-04-12 09:54:03 +00003724fi
3725if test -z "$CC"; then
3726 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003727 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 do
3729 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3732$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003733if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003735else
3736 if test -n "$CC"; then
3737 ac_cv_prog_CC="$CC" # Let the user override the test.
3738else
Martin v. Löwis11437992002-04-12 09:54:03 +00003739as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3740for as_dir in $PATH
3741do
3742 IFS=$as_save_IFS
3743 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003745 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 $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 +00003748 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003750done
Matthias Kloseb9621712010-04-24 17:59:49 +00003751 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003753
3754fi
3755fi
3756CC=$ac_cv_prog_CC
3757if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760else
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003763fi
3764
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 test -n "$CC" && break
3767 done
3768fi
3769if test -z "$CC"; then
3770 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003772do
3773 # Extract the first word of "$ac_prog", so it can be a program name with args.
3774set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3776$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003777if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003779else
3780 if test -n "$ac_ct_CC"; then
3781 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3782else
3783as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3784for as_dir in $PATH
3785do
3786 IFS=$as_save_IFS
3787 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003789 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003791 $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 +00003792 break 2
3793 fi
3794done
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003797
Martin v. Löwis11437992002-04-12 09:54:03 +00003798fi
3799fi
3800ac_ct_CC=$ac_cv_prog_ac_ct_CC
3801if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3803$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003804else
Matthias Kloseb9621712010-04-24 17:59:49 +00003805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3806$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003807fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003808
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 test -n "$ac_ct_CC" && break
3811done
Michael W. Hudson54241132001-12-07 15:38:26 +00003812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813 if test "x$ac_ct_CC" = x; then
3814 CC=""
3815 else
3816 case $cross_compiling:$ac_tool_warned in
3817yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003818{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3819$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820ac_tool_warned=yes ;;
3821esac
3822 CC=$ac_ct_CC
3823 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003824fi
3825
3826fi
3827
3828
Matthias Kloseb9621712010-04-24 17:59:49 +00003829test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3830$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003831as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003832See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833
3834# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003835$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3836set X $ac_compile
3837ac_compiler=$2
3838for ac_option in --version -v -V -qversion; do
3839 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840case "(($ac_try" in
3841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3842 *) ac_try_echo=$ac_try;;
3843esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003844eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3845$as_echo "$ac_try_echo"; } >&5
3846 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003847 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 if test -s conftest.err; then
3849 sed '10a\
3850... rest of stderr output deleted ...
3851 10q' conftest.err >conftest.er1
3852 cat conftest.er1 >&5
3853 fi
3854 rm -f conftest.er1 conftest.err
3855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3856 test $ac_status = 0; }
3857done
Martin v. Löwis11437992002-04-12 09:54:03 +00003858
Matthias Kloseb9621712010-04-24 17:59:49 +00003859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003860/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862int
3863main ()
3864{
3865
3866 ;
3867 return 0;
3868}
3869_ACEOF
3870ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003871ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003872# Try to create an executable without -o first, disregard a.out.
3873# It will help us diagnose broken compilers, and finding out an intuition
3874# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3876$as_echo_n "checking whether the C compiler works... " >&6; }
3877ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3878
3879# The possible output files:
3880ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882ac_rmfiles=
3883for ac_file in $ac_files
3884do
3885 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3888 esac
3889done
3890rm -f $ac_rmfiles
3891
Matthias Kloseb9621712010-04-24 17:59:49 +00003892if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003897eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003900 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003903 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3904# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3905# in a Makefile. We should not override ac_cv_exeext if it was cached,
3906# so that the user can short-circuit this test for compilers unknown to
3907# Autoconf.
3908for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003909do
3910 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003913 ;;
3914 [ab].out )
3915 # We found the default executable, but exeext='' is most
3916 # certainly right.
3917 break;;
3918 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003919 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003920 then :; else
3921 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3922 fi
3923 # We set ac_cv_exeext here because the later test for it is not
3924 # safe: cross compilers may not add the suffix if given an `-o'
3925 # argument, so we may need to know it at that point already.
3926 # Even if this section looks crufty: it has the advantage of
3927 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003928 break;;
3929 * )
3930 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 esac
3932done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003933test "$ac_cv_exeext" = no && ac_cv_exeext=
3934
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003935else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 ac_file=''
3937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003938if test -z "$ac_file"; then :
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3940$as_echo "no" >&6; }
3941$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003942sed 's/^/| /' conftest.$ac_ext >&5
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003946as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003947See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003948else
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3950$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3953$as_echo_n "checking for C compiler default output file name... " >&6; }
3954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3955$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003957
Matthias Kloseb9621712010-04-24 17:59:49 +00003958rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3961$as_echo_n "checking for suffix of executables... " >&6; }
3962if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3972 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003973 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3974# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3975# work properly (i.e., refer to `conftest.exe'), while it won't with
3976# `rm'.
3977for ac_file in conftest.exe conftest conftest.*; do
3978 test -f "$ac_file" || continue
3979 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003981 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3982 break;;
3983 * ) break;;
3984 esac
3985done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003986else
Matthias Kloseb9621712010-04-24 17:59:49 +00003987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003989as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003990See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003991fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003992rm -f conftest conftest$ac_cv_exeext
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3994$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995
3996rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003997EXEEXT=$ac_cv_exeext
3998ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00003999cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4000/* end confdefs.h. */
4001#include <stdio.h>
4002int
4003main ()
4004{
4005FILE *f = fopen ("conftest.out", "w");
4006 return ferror (f) || fclose (f) != 0;
4007
4008 ;
4009 return 0;
4010}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004012ac_clean_files="$ac_clean_files conftest.out"
4013# Check that the compiler produces executables we can run. If not, either
4014# the compiler is broken, or we cross compile.
4015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4016$as_echo_n "checking whether we are cross compiling... " >&6; }
4017if test "$cross_compiling" != yes; then
4018 { { ac_try="$ac_link"
4019case "(($ac_try" in
4020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4021 *) ac_try_echo=$ac_try;;
4022esac
4023eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4024$as_echo "$ac_try_echo"; } >&5
4025 (eval "$ac_link") 2>&5
4026 ac_status=$?
4027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4028 test $ac_status = 0; }
4029 if { ac_try='./conftest$ac_cv_exeext'
4030 { { case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033esac
4034eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035$as_echo "$ac_try_echo"; } >&5
4036 (eval "$ac_try") 2>&5
4037 ac_status=$?
4038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; }; then
4040 cross_compiling=no
4041 else
4042 if test "$cross_compiling" = maybe; then
4043 cross_compiling=yes
4044 else
4045 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4046$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004047as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004048If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004049See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004050 fi
4051 fi
4052fi
4053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4054$as_echo "$cross_compiling" >&6; }
4055
4056rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4057ac_clean_files=$ac_clean_files_save
4058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4059$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004060if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004061 $as_echo_n "(cached) " >&6
4062else
4063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004064/* end confdefs.h. */
4065
4066int
4067main ()
4068{
4069
4070 ;
4071 return 0;
4072}
4073_ACEOF
4074rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004075if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004083 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086 for ac_file in conftest.o conftest.obj conftest.*; do
4087 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004088 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4091 break;;
4092 esac
4093done
4094else
Matthias Kloseb9621712010-04-24 17:59:49 +00004095 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004096sed 's/^/| /' conftest.$ac_ext >&5
4097
Matthias Kloseb9621712010-04-24 17:59:49 +00004098{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4099$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004100as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004101See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004103rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4106$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004107OBJEXT=$ac_cv_objext
4108ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4110$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004111if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004113else
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004116
Martin v. Löwis11437992002-04-12 09:54:03 +00004117int
4118main ()
4119{
4120#ifndef __GNUC__
4121 choke me
4122#endif
4123
4124 ;
4125 return 0;
4126}
4127_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004128if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 ac_compiler_gnu=yes
4130else
Matthias Kloseb9621712010-04-24 17:59:49 +00004131 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004134ac_cv_c_compiler_gnu=$ac_compiler_gnu
4135
4136fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4138$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4139if test $ac_compiler_gnu = yes; then
4140 GCC=yes
4141else
4142 GCC=
4143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004144ac_test_CFLAGS=${CFLAGS+set}
4145ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4147$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004148if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004150else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004151 ac_save_c_werror_flag=$ac_c_werror_flag
4152 ac_c_werror_flag=yes
4153 ac_cv_prog_cc_g=no
4154 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161
4162 ;
4163 return 0;
4164}
4165_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004166if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004167 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004168else
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 CFLAGS=""
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004171/* end confdefs.h. */
4172
4173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
4180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004181if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182
Matthias Kloseb9621712010-04-24 17:59:49 +00004183else
4184 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187/* end confdefs.h. */
4188
4189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004198 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205 ac_c_werror_flag=$ac_save_c_werror_flag
4206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4208$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004209if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004210 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004211elif test $ac_cv_prog_cc_g = yes; then
4212 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004213 CFLAGS="-g -O2"
4214 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004215 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216 fi
4217else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004218 if test "$GCC" = yes; then
4219 CFLAGS="-O2"
4220 else
4221 CFLAGS=
4222 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4225$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004226if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004228else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004230ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004232/* end confdefs.h. */
4233#include <stdarg.h>
4234#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004235struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004236/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4237struct buf { int x; };
4238FILE * (*rcsopen) (struct buf *, struct stat *, int);
4239static char *e (p, i)
4240 char **p;
4241 int i;
4242{
4243 return p[i];
4244}
4245static char *f (char * (*g) (char **, int), char **p, ...)
4246{
4247 char *s;
4248 va_list v;
4249 va_start (v,p);
4250 s = g (p, va_arg (v,int));
4251 va_end (v);
4252 return s;
4253}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004254
4255/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4256 function prototypes and stuff, but not '\xHH' hex character constants.
4257 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004259 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4260 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004261 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004262int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4263
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4265 inside strings and character constants. */
4266#define FOO(x) 'x'
4267int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4268
Skip Montanaro6dead952003-09-25 14:50:04 +00004269int test (int i, double x);
4270struct s1 {int (*f) (int a);};
4271struct s2 {int (*f) (double a);};
4272int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4273int argc;
4274char **argv;
4275int
4276main ()
4277{
4278return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4279 ;
4280 return 0;
4281}
4282_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004283for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4284 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004285do
4286 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004287 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004288 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290rm -f core conftest.err conftest.$ac_objext
4291 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004292done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004294CC=$ac_save_CC
4295
4296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297# AC_CACHE_VAL
4298case "x$ac_cv_prog_cc_c89" in
4299 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4301$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4304$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004305 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004306 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4308$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004309esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004310if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004311
Matthias Kloseb9621712010-04-24 17:59:49 +00004312fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004313
Martin v. Löwis11437992002-04-12 09:54:03 +00004314ac_ext=c
4315ac_cpp='$CPP $CPPFLAGS'
4316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4318ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004319
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004320ac_ext=c
4321ac_cpp='$CPP $CPPFLAGS'
4322ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4323ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4324ac_compiler_gnu=$ac_cv_c_compiler_gnu
4325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4326$as_echo_n "checking how to run the C preprocessor... " >&6; }
4327# On Suns, sometimes $CPP names a directory.
4328if test -n "$CPP" && test -d "$CPP"; then
4329 CPP=
4330fi
4331if test -z "$CPP"; then
4332 if ${ac_cv_prog_CPP+:} false; then :
4333 $as_echo_n "(cached) " >&6
4334else
4335 # Double quotes because CPP needs to be expanded
4336 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4337 do
4338 ac_preproc_ok=false
4339for ac_c_preproc_warn_flag in '' yes
4340do
4341 # Use a header file that comes with gcc, so configuring glibc
4342 # with a fresh cross-compiler works.
4343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4344 # <limits.h> exists even on freestanding compilers.
4345 # On the NeXT, cc -E runs the code through the compiler's parser,
4346 # not just through cpp. "Syntax error" is here to catch this case.
4347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4348/* end confdefs.h. */
4349#ifdef __STDC__
4350# include <limits.h>
4351#else
4352# include <assert.h>
4353#endif
4354 Syntax error
4355_ACEOF
4356if ac_fn_c_try_cpp "$LINENO"; then :
4357
4358else
4359 # Broken: fails on valid input.
4360continue
4361fi
4362rm -f conftest.err conftest.i conftest.$ac_ext
4363
4364 # OK, works on sane cases. Now check whether nonexistent headers
4365 # can be detected and how.
4366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4367/* end confdefs.h. */
4368#include <ac_nonexistent.h>
4369_ACEOF
4370if ac_fn_c_try_cpp "$LINENO"; then :
4371 # Broken: success on invalid input.
4372continue
4373else
4374 # Passes both tests.
4375ac_preproc_ok=:
4376break
4377fi
4378rm -f conftest.err conftest.i conftest.$ac_ext
4379
4380done
4381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4382rm -f conftest.i conftest.err conftest.$ac_ext
4383if $ac_preproc_ok; then :
4384 break
4385fi
4386
4387 done
4388 ac_cv_prog_CPP=$CPP
4389
4390fi
4391 CPP=$ac_cv_prog_CPP
4392else
4393 ac_cv_prog_CPP=$CPP
4394fi
4395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4396$as_echo "$CPP" >&6; }
4397ac_preproc_ok=false
4398for ac_c_preproc_warn_flag in '' yes
4399do
4400 # Use a header file that comes with gcc, so configuring glibc
4401 # with a fresh cross-compiler works.
4402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4403 # <limits.h> exists even on freestanding compilers.
4404 # On the NeXT, cc -E runs the code through the compiler's parser,
4405 # not just through cpp. "Syntax error" is here to catch this case.
4406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407/* end confdefs.h. */
4408#ifdef __STDC__
4409# include <limits.h>
4410#else
4411# include <assert.h>
4412#endif
4413 Syntax error
4414_ACEOF
4415if ac_fn_c_try_cpp "$LINENO"; then :
4416
4417else
4418 # Broken: fails on valid input.
4419continue
4420fi
4421rm -f conftest.err conftest.i conftest.$ac_ext
4422
4423 # OK, works on sane cases. Now check whether nonexistent headers
4424 # can be detected and how.
4425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4426/* end confdefs.h. */
4427#include <ac_nonexistent.h>
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430 # Broken: success on invalid input.
4431continue
4432else
4433 # Passes both tests.
4434ac_preproc_ok=:
4435break
4436fi
4437rm -f conftest.err conftest.i conftest.$ac_ext
4438
4439done
4440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4441rm -f conftest.i conftest.err conftest.$ac_ext
4442if $ac_preproc_ok; then :
4443
4444else
4445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4447as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4448See \`config.log' for more details" "$LINENO" 5; }
4449fi
4450
4451ac_ext=c
4452ac_cpp='$CPP $CPPFLAGS'
4453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4455ac_compiler_gnu=$ac_cv_c_compiler_gnu
4456
4457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4458$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4459if ${ac_cv_path_GREP+:} false; then :
4460 $as_echo_n "(cached) " >&6
4461else
4462 if test -z "$GREP"; then
4463 ac_path_GREP_found=false
4464 # Loop through the user's path and test for each of PROGNAME-LIST
4465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4466for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4467do
4468 IFS=$as_save_IFS
4469 test -z "$as_dir" && as_dir=.
4470 for ac_prog in grep ggrep; do
4471 for ac_exec_ext in '' $ac_executable_extensions; do
4472 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4473 as_fn_executable_p "$ac_path_GREP" || continue
4474# Check for GNU ac_path_GREP and select it if it is found.
4475 # Check for GNU $ac_path_GREP
4476case `"$ac_path_GREP" --version 2>&1` in
4477*GNU*)
4478 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4479*)
4480 ac_count=0
4481 $as_echo_n 0123456789 >"conftest.in"
4482 while :
4483 do
4484 cat "conftest.in" "conftest.in" >"conftest.tmp"
4485 mv "conftest.tmp" "conftest.in"
4486 cp "conftest.in" "conftest.nl"
4487 $as_echo 'GREP' >> "conftest.nl"
4488 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4489 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4490 as_fn_arith $ac_count + 1 && ac_count=$as_val
4491 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4492 # Best one so far, save it but keep looking for a better one
4493 ac_cv_path_GREP="$ac_path_GREP"
4494 ac_path_GREP_max=$ac_count
4495 fi
4496 # 10*(2^10) chars as input seems more than enough
4497 test $ac_count -gt 10 && break
4498 done
4499 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4500esac
4501
4502 $ac_path_GREP_found && break 3
4503 done
4504 done
4505 done
4506IFS=$as_save_IFS
4507 if test -z "$ac_cv_path_GREP"; then
4508 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4509 fi
4510else
4511 ac_cv_path_GREP=$GREP
4512fi
4513
4514fi
4515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4516$as_echo "$ac_cv_path_GREP" >&6; }
4517 GREP="$ac_cv_path_GREP"
4518
4519
Łukasz Langaa785c872016-09-09 17:37:37 -07004520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4521$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4522if ${ac_cv_path_SED+:} false; then :
4523 $as_echo_n "(cached) " >&6
4524else
4525 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4526 for ac_i in 1 2 3 4 5 6 7; do
4527 ac_script="$ac_script$as_nl$ac_script"
4528 done
4529 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4530 { ac_script=; unset ac_script;}
4531 if test -z "$SED"; then
4532 ac_path_SED_found=false
4533 # Loop through the user's path and test for each of PROGNAME-LIST
4534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4535for as_dir in $PATH
4536do
4537 IFS=$as_save_IFS
4538 test -z "$as_dir" && as_dir=.
4539 for ac_prog in sed gsed; do
4540 for ac_exec_ext in '' $ac_executable_extensions; do
4541 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4542 as_fn_executable_p "$ac_path_SED" || continue
4543# Check for GNU ac_path_SED and select it if it is found.
4544 # Check for GNU $ac_path_SED
4545case `"$ac_path_SED" --version 2>&1` in
4546*GNU*)
4547 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4548*)
4549 ac_count=0
4550 $as_echo_n 0123456789 >"conftest.in"
4551 while :
4552 do
4553 cat "conftest.in" "conftest.in" >"conftest.tmp"
4554 mv "conftest.tmp" "conftest.in"
4555 cp "conftest.in" "conftest.nl"
4556 $as_echo '' >> "conftest.nl"
4557 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4558 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4559 as_fn_arith $ac_count + 1 && ac_count=$as_val
4560 if test $ac_count -gt ${ac_path_SED_max-0}; then
4561 # Best one so far, save it but keep looking for a better one
4562 ac_cv_path_SED="$ac_path_SED"
4563 ac_path_SED_max=$ac_count
4564 fi
4565 # 10*(2^10) chars as input seems more than enough
4566 test $ac_count -gt 10 && break
4567 done
4568 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4569esac
4570
4571 $ac_path_SED_found && break 3
4572 done
4573 done
4574 done
4575IFS=$as_save_IFS
4576 if test -z "$ac_cv_path_SED"; then
4577 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4578 fi
4579else
4580 ac_cv_path_SED=$SED
4581fi
4582
4583fi
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4585$as_echo "$ac_cv_path_SED" >&6; }
4586 SED="$ac_cv_path_SED"
4587 rm -f conftest.sed
4588
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004589
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590
4591
Matthias Kloseb9621712010-04-24 17:59:49 +00004592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4593$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004595# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004596if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004597 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004598
4599 case $withval in
4600 no) with_cxx_main=no
4601 MAINCC='$(CC)';;
4602 yes) with_cxx_main=yes
4603 MAINCC='$(CXX)';;
4604 *) with_cxx_main=yes
4605 MAINCC=$withval
4606 if test -z "$CXX"
4607 then
4608 CXX=$withval
4609 fi;;
4610 esac
4611else
4612
4613 with_cxx_main=no
4614 MAINCC='$(CC)'
4615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004616fi
4617
Matthias Kloseb9621712010-04-24 17:59:49 +00004618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4619$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004620
4621preset_cxx="$CXX"
4622if test -z "$CXX"
4623then
4624 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004625 gcc) if test -n "$ac_tool_prefix"; then
4626 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4627set dummy ${ac_tool_prefix}g++; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_CXX+:} false; then :
4631 $as_echo_n "(cached) " >&6
4632else
4633 case $CXX in
4634 [\\/]* | ?:[\\/]*)
4635 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4636 ;;
4637 *)
4638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in notfound
4640do
4641 IFS=$as_save_IFS
4642 test -z "$as_dir" && as_dir=.
4643 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004645 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647 break 2
4648 fi
4649done
4650 done
4651IFS=$as_save_IFS
4652
4653 ;;
4654esac
4655fi
4656CXX=$ac_cv_path_CXX
4657if test -n "$CXX"; then
4658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4659$as_echo "$CXX" >&6; }
4660else
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665
4666fi
4667if test -z "$ac_cv_path_CXX"; then
4668 ac_pt_CXX=$CXX
4669 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004670set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4672$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004673if ${ac_cv_path_ac_pt_CXX+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675else
4676 case $ac_pt_CXX in
4677 [\\/]* | ?:[\\/]*)
4678 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4679 ;;
4680 *)
4681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4682for as_dir in notfound
4683do
4684 IFS=$as_save_IFS
4685 test -z "$as_dir" && as_dir=.
4686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004688 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4690 break 2
4691 fi
4692done
4693 done
4694IFS=$as_save_IFS
4695
4696 ;;
4697esac
4698fi
4699ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4700if test -n "$ac_pt_CXX"; then
4701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4702$as_echo "$ac_pt_CXX" >&6; }
4703else
4704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4705$as_echo "no" >&6; }
4706fi
4707
4708 if test "x$ac_pt_CXX" = x; then
4709 CXX="g++"
4710 else
4711 case $cross_compiling:$ac_tool_warned in
4712yes:)
4713{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4714$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4715ac_tool_warned=yes ;;
4716esac
4717 CXX=$ac_pt_CXX
4718 fi
4719else
4720 CXX="$ac_cv_path_CXX"
4721fi
4722 ;;
4723 cc) if test -n "$ac_tool_prefix"; then
4724 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4725set dummy ${ac_tool_prefix}c++; ac_word=$2
4726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4727$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004728if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004730else
4731 case $CXX in
4732 [\\/]* | ?:[\\/]*)
4733 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4734 ;;
4735 *)
4736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4737for as_dir in notfound
4738do
4739 IFS=$as_save_IFS
4740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004744 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745 break 2
4746 fi
4747done
Matthias Kloseb9621712010-04-24 17:59:49 +00004748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004749IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004750
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751 ;;
4752esac
4753fi
4754CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004755if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4757$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004758else
Matthias Kloseb9621712010-04-24 17:59:49 +00004759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4760$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004762
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004763
4764fi
4765if test -z "$ac_cv_path_CXX"; then
4766 ac_pt_CXX=$CXX
4767 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4770$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004772 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004773else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004774 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 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 +00004777 ;;
4778 *)
4779 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4780for as_dir in notfound
4781do
4782 IFS=$as_save_IFS
4783 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004784 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004785 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004786 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004787 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788 break 2
4789 fi
4790done
Matthias Kloseb9621712010-04-24 17:59:49 +00004791 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004792IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004793
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794 ;;
4795esac
4796fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4798if test -n "$ac_pt_CXX"; then
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4800$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004801else
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4803$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004804fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004805
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004806 if test "x$ac_pt_CXX" = x; then
4807 CXX="c++"
4808 else
4809 case $cross_compiling:$ac_tool_warned in
4810yes:)
4811{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4812$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4813ac_tool_warned=yes ;;
4814esac
4815 CXX=$ac_pt_CXX
4816 fi
4817else
4818 CXX="$ac_cv_path_CXX"
4819fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004820 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004821 clang|*/clang) if test -n "$ac_tool_prefix"; then
4822 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4823set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4825$as_echo_n "checking for $ac_word... " >&6; }
4826if ${ac_cv_path_CXX+:} false; then :
4827 $as_echo_n "(cached) " >&6
4828else
4829 case $CXX in
4830 [\\/]* | ?:[\\/]*)
4831 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4832 ;;
4833 *)
4834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4835for as_dir in notfound
4836do
4837 IFS=$as_save_IFS
4838 test -z "$as_dir" && as_dir=.
4839 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004840 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004841 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4842 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4843 break 2
4844 fi
4845done
4846 done
4847IFS=$as_save_IFS
4848
Ned Deilycbfb9a52012-06-23 16:02:19 -07004849 ;;
4850esac
4851fi
4852CXX=$ac_cv_path_CXX
4853if test -n "$CXX"; then
4854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4855$as_echo "$CXX" >&6; }
4856else
4857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4858$as_echo "no" >&6; }
4859fi
4860
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004861
4862fi
4863if test -z "$ac_cv_path_CXX"; then
4864 ac_pt_CXX=$CXX
4865 # Extract the first word of "clang++", so it can be a program name with args.
4866set dummy clang++; ac_word=$2
4867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4868$as_echo_n "checking for $ac_word... " >&6; }
4869if ${ac_cv_path_ac_pt_CXX+:} false; then :
4870 $as_echo_n "(cached) " >&6
4871else
4872 case $ac_pt_CXX in
4873 [\\/]* | ?:[\\/]*)
4874 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4875 ;;
4876 *)
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4878for as_dir in notfound
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
4882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004884 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4886 break 2
4887 fi
4888done
4889 done
4890IFS=$as_save_IFS
4891
4892 ;;
4893esac
4894fi
4895ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4896if test -n "$ac_pt_CXX"; then
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4898$as_echo "$ac_pt_CXX" >&6; }
4899else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4901$as_echo "no" >&6; }
4902fi
4903
4904 if test "x$ac_pt_CXX" = x; then
4905 CXX="clang++"
4906 else
4907 case $cross_compiling:$ac_tool_warned in
4908yes:)
4909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4911ac_tool_warned=yes ;;
4912esac
4913 CXX=$ac_pt_CXX
4914 fi
4915else
4916 CXX="$ac_cv_path_CXX"
4917fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004918 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004919 icc|*/icc) if test -n "$ac_tool_prefix"; then
4920 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4921set dummy ${ac_tool_prefix}icpc; ac_word=$2
4922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4923$as_echo_n "checking for $ac_word... " >&6; }
4924if ${ac_cv_path_CXX+:} false; then :
4925 $as_echo_n "(cached) " >&6
4926else
4927 case $CXX in
4928 [\\/]* | ?:[\\/]*)
4929 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4930 ;;
4931 *)
4932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4933for as_dir in notfound
4934do
4935 IFS=$as_save_IFS
4936 test -z "$as_dir" && as_dir=.
4937 for ac_exec_ext in '' $ac_executable_extensions; do
4938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4939 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4941 break 2
4942 fi
4943done
4944 done
4945IFS=$as_save_IFS
4946
4947 ;;
4948esac
4949fi
4950CXX=$ac_cv_path_CXX
4951if test -n "$CXX"; then
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4953$as_echo "$CXX" >&6; }
4954else
4955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4956$as_echo "no" >&6; }
4957fi
4958
4959
4960fi
4961if test -z "$ac_cv_path_CXX"; then
4962 ac_pt_CXX=$CXX
4963 # Extract the first word of "icpc", so it can be a program name with args.
4964set dummy icpc; ac_word=$2
4965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4966$as_echo_n "checking for $ac_word... " >&6; }
4967if ${ac_cv_path_ac_pt_CXX+:} false; then :
4968 $as_echo_n "(cached) " >&6
4969else
4970 case $ac_pt_CXX in
4971 [\\/]* | ?:[\\/]*)
4972 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4973 ;;
4974 *)
4975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4976for as_dir in notfound
4977do
4978 IFS=$as_save_IFS
4979 test -z "$as_dir" && as_dir=.
4980 for ac_exec_ext in '' $ac_executable_extensions; do
4981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4982 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4984 break 2
4985 fi
4986done
4987 done
4988IFS=$as_save_IFS
4989
4990 ;;
4991esac
4992fi
4993ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4994if test -n "$ac_pt_CXX"; then
4995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4996$as_echo "$ac_pt_CXX" >&6; }
4997else
4998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4999$as_echo "no" >&6; }
5000fi
5001
5002 if test "x$ac_pt_CXX" = x; then
5003 CXX="icpc"
5004 else
5005 case $cross_compiling:$ac_tool_warned in
5006yes:)
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5009ac_tool_warned=yes ;;
5010esac
5011 CXX=$ac_pt_CXX
5012 fi
5013else
5014 CXX="$ac_cv_path_CXX"
5015fi
5016 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005017 esac
5018 if test "$CXX" = "notfound"
5019 then
5020 CXX=""
5021 fi
5022fi
5023if test -z "$CXX"
5024then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005025 if test -n "$ac_tool_prefix"; then
5026 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5027 do
5028 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5029set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5031$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005032if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005034else
5035 if test -n "$CXX"; then
5036 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5037else
5038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5039for as_dir in $PATH
5040do
5041 IFS=$as_save_IFS
5042 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005044 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005045 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005046 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047 break 2
5048 fi
5049done
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005052
5053fi
5054fi
5055CXX=$ac_cv_prog_CXX
5056if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5058$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005059else
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5061$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005062fi
5063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005065 test -n "$CXX" && break
5066 done
5067fi
5068if test -z "$CXX"; then
5069 ac_ct_CXX=$CXX
5070 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5071do
5072 # Extract the first word of "$ac_prog", so it can be a program name with args.
5073set dummy $ac_prog; ac_word=$2
5074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075$as_echo_n "checking for $ac_word... " >&6; }
5076if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5077 $as_echo_n "(cached) " >&6
5078else
5079 if test -n "$ac_ct_CXX"; then
5080 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5081else
5082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085 IFS=$as_save_IFS
5086 test -z "$as_dir" && as_dir=.
5087 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005089 ac_cv_prog_ac_ct_CXX="$ac_prog"
5090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091 break 2
5092 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005093done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005094 done
5095IFS=$as_save_IFS
5096
5097fi
5098fi
5099ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5100if test -n "$ac_ct_CXX"; then
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5102$as_echo "$ac_ct_CXX" >&6; }
5103else
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5105$as_echo "no" >&6; }
5106fi
5107
5108
5109 test -n "$ac_ct_CXX" && break
5110done
5111
5112 if test "x$ac_ct_CXX" = x; then
5113 CXX="notfound"
5114 else
5115 case $cross_compiling:$ac_tool_warned in
5116yes:)
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5119ac_tool_warned=yes ;;
5120esac
5121 CXX=$ac_ct_CXX
5122 fi
5123fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005124
5125 if test "$CXX" = "notfound"
5126 then
5127 CXX=""
5128 fi
5129fi
5130if test "$preset_cxx" != "$CXX"
5131then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 By default, distutils will build C++ extension modules with \"$CXX\".
5135 If this is not intended, then set CXX on the configure command line.
5136 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005137$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005138
5139 By default, distutils will build C++ extension modules with \"$CXX\".
5140 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005141 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005142fi
5143
5144
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005145MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5146
5147
5148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5149$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5150cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005151#undef bfin
5152#undef cris
5153#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005154#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef hppa
5156#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005157#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005158#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005159#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005160#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005161#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005162#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005163 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005164#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005165# if defined(__x86_64__) && defined(__LP64__)
5166 x86_64-linux-gnu
5167# elif defined(__x86_64__) && defined(__ILP32__)
5168 x86_64-linux-gnux32
5169# elif defined(__i386__)
5170 i386-linux-gnu
5171# elif defined(__aarch64__) && defined(__AARCH64EL__)
5172# if defined(__ILP32__)
5173 aarch64_ilp32-linux-gnu
5174# else
5175 aarch64-linux-gnu
5176# endif
5177# elif defined(__aarch64__) && defined(__AARCH64EB__)
5178# if defined(__ILP32__)
5179 aarch64_be_ilp32-linux-gnu
5180# else
5181 aarch64_be-linux-gnu
5182# endif
5183# elif defined(__alpha__)
5184 alpha-linux-gnu
5185# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5186# if defined(__ARMEL__)
5187 arm-linux-gnueabihf
5188# else
5189 armeb-linux-gnueabihf
5190# endif
5191# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5192# if defined(__ARMEL__)
5193 arm-linux-gnueabi
5194# else
5195 armeb-linux-gnueabi
5196# endif
5197# elif defined(__hppa__)
5198 hppa-linux-gnu
5199# elif defined(__ia64__)
5200 ia64-linux-gnu
5201# elif defined(__m68k__) && !defined(__mcoldfire__)
5202 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005203# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5204# if _MIPS_SIM == _ABIO32
5205 mipsisa32r6el-linux-gnu
5206# elif _MIPS_SIM == _ABIN32
5207 mipsisa64r6el-linux-gnuabin32
5208# elif _MIPS_SIM == _ABI64
5209 mipsisa64r6el-linux-gnuabi64
5210# else
5211# error unknown platform triplet
5212# endif
5213# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5214# if _MIPS_SIM == _ABIO32
5215 mipsisa32r6-linux-gnu
5216# elif _MIPS_SIM == _ABIN32
5217 mipsisa64r6-linux-gnuabin32
5218# elif _MIPS_SIM == _ABI64
5219 mipsisa64r6-linux-gnuabi64
5220# else
5221# error unknown platform triplet
5222# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005223# elif defined(__mips_hard_float) && defined(_MIPSEL)
5224# if _MIPS_SIM == _ABIO32
5225 mipsel-linux-gnu
5226# elif _MIPS_SIM == _ABIN32
5227 mips64el-linux-gnuabin32
5228# elif _MIPS_SIM == _ABI64
5229 mips64el-linux-gnuabi64
5230# else
5231# error unknown platform triplet
5232# endif
5233# elif defined(__mips_hard_float)
5234# if _MIPS_SIM == _ABIO32
5235 mips-linux-gnu
5236# elif _MIPS_SIM == _ABIN32
5237 mips64-linux-gnuabin32
5238# elif _MIPS_SIM == _ABI64
5239 mips64-linux-gnuabi64
5240# else
5241# error unknown platform triplet
5242# endif
5243# elif defined(__or1k__)
5244 or1k-linux-gnu
5245# elif defined(__powerpc__) && defined(__SPE__)
5246 powerpc-linux-gnuspe
5247# elif defined(__powerpc64__)
5248# if defined(__LITTLE_ENDIAN__)
5249 powerpc64le-linux-gnu
5250# else
5251 powerpc64-linux-gnu
5252# endif
5253# elif defined(__powerpc__)
5254 powerpc-linux-gnu
5255# elif defined(__s390x__)
5256 s390x-linux-gnu
5257# elif defined(__s390__)
5258 s390-linux-gnu
5259# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5260 sh4-linux-gnu
5261# elif defined(__sparc__) && defined(__arch64__)
5262 sparc64-linux-gnu
5263# elif defined(__sparc__)
5264 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005265# elif defined(__riscv)
5266# if __riscv_xlen == 32
5267 riscv32-linux-gnu
5268# elif __riscv_xlen == 64
5269 riscv64-linux-gnu
5270# else
5271# error unknown platform triplet
5272# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005273# else
5274# error unknown platform triplet
5275# endif
5276#elif defined(__FreeBSD_kernel__)
5277# if defined(__LP64__)
5278 x86_64-kfreebsd-gnu
5279# elif defined(__i386__)
5280 i386-kfreebsd-gnu
5281# else
5282# error unknown platform triplet
5283# endif
5284#elif defined(__gnu_hurd__)
5285 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005286#elif defined(__APPLE__)
5287 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005288#elif defined(__VXWORKS__)
5289 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005290#else
5291# error unknown platform triplet
5292#endif
5293
5294EOF
5295
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005296if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005297 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5299$as_echo "$PLATFORM_TRIPLET" >&6; }
5300else
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5302$as_echo "none" >&6; }
5303fi
5304rm -f conftest.c conftest.out
5305
5306if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5307 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5308 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5309 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005310elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5311 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005313
doko@ubuntu.com55532312016-06-14 08:55:19 +02005314if test x$MULTIARCH != x; then
5315 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5316fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005317
5318
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5320$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5321save_LDFLAGS="$LDFLAGS"
5322LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005323
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5325/* end confdefs.h. */
5326
5327int
5328main ()
5329{
5330
5331 ;
5332 return 0;
5333}
5334_ACEOF
5335if ac_fn_c_try_link "$LINENO"; then :
5336 NO_AS_NEEDED="-Wl,--no-as-needed"
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5338$as_echo "yes" >&6; }
5339else
5340 NO_AS_NEEDED=""
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5342$as_echo "no" >&6; }
5343fi
5344rm -f core conftest.err conftest.$ac_objext \
5345 conftest$ac_exeext conftest.$ac_ext
5346LDFLAGS="$save_LDFLAGS"
5347
5348
5349
5350# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005351
Matthias Kloseb9621712010-04-24 17:59:49 +00005352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5353$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005354if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005356else
5357 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5358 then ac_cv_path_EGREP="$GREP -E"
5359 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 # Loop through the user's path and test for each of PROGNAME-LIST
5363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005364for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5365do
5366 IFS=$as_save_IFS
5367 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005368 for ac_prog in egrep; do
5369 for ac_exec_ext in '' $ac_executable_extensions; do
5370 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005371 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005372# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 # Check for GNU $ac_path_EGREP
5374case `"$ac_path_EGREP" --version 2>&1` in
5375*GNU*)
5376 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5377*)
5378 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380 while :
5381 do
5382 cat "conftest.in" "conftest.in" >"conftest.tmp"
5383 mv "conftest.tmp" "conftest.in"
5384 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005385 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005386 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5387 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005388 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5390 # Best one so far, save it but keep looking for a better one
5391 ac_cv_path_EGREP="$ac_path_EGREP"
5392 ac_path_EGREP_max=$ac_count
5393 fi
5394 # 10*(2^10) chars as input seems more than enough
5395 test $ac_count -gt 10 && break
5396 done
5397 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5398esac
5399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400 $ac_path_EGREP_found && break 3
5401 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005402 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005406 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 +00005407 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408else
5409 ac_cv_path_EGREP=$EGREP
5410fi
5411
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005412 fi
5413fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5415$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005417
5418
Matthias Kloseb9621712010-04-24 17:59:49 +00005419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5420$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005421if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n "(cached) " >&6
5423else
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005425/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005426#include <stdlib.h>
5427#include <stdarg.h>
5428#include <string.h>
5429#include <float.h>
5430
5431int
5432main ()
5433{
5434
5435 ;
5436 return 0;
5437}
5438_ACEOF
5439if ac_fn_c_try_compile "$LINENO"; then :
5440 ac_cv_header_stdc=yes
5441else
5442 ac_cv_header_stdc=no
5443fi
5444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5445
5446if test $ac_cv_header_stdc = yes; then
5447 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5449/* end confdefs.h. */
5450#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005451
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005452_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005456else
Matthias Kloseb9621712010-04-24 17:59:49 +00005457 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005459rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005460
Matthias Kloseb9621712010-04-24 17:59:49 +00005461fi
5462
5463if test $ac_cv_header_stdc = yes; then
5464 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5466/* end confdefs.h. */
5467#include <stdlib.h>
5468
5469_ACEOF
5470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5471 $EGREP "free" >/dev/null 2>&1; then :
5472
5473else
5474 ac_cv_header_stdc=no
5475fi
5476rm -f conftest*
5477
5478fi
5479
5480if test $ac_cv_header_stdc = yes; then
5481 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5482 if test "$cross_compiling" = yes; then :
5483 :
5484else
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486/* end confdefs.h. */
5487#include <ctype.h>
5488#include <stdlib.h>
5489#if ((' ' & 0x0FF) == 0x020)
5490# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5491# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5492#else
5493# define ISLOWER(c) \
5494 (('a' <= (c) && (c) <= 'i') \
5495 || ('j' <= (c) && (c) <= 'r') \
5496 || ('s' <= (c) && (c) <= 'z'))
5497# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5498#endif
5499
5500#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5501int
5502main ()
5503{
5504 int i;
5505 for (i = 0; i < 256; i++)
5506 if (XOR (islower (i), ISLOWER (i))
5507 || toupper (i) != TOUPPER (i))
5508 return 2;
5509 return 0;
5510}
5511_ACEOF
5512if ac_fn_c_try_run "$LINENO"; then :
5513
5514else
5515 ac_cv_header_stdc=no
5516fi
5517rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5518 conftest.$ac_objext conftest.beam conftest.$ac_ext
5519fi
5520
5521fi
5522fi
5523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5524$as_echo "$ac_cv_header_stdc" >&6; }
5525if test $ac_cv_header_stdc = yes; then
5526
5527$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5528
5529fi
5530
5531# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5532for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5533 inttypes.h stdint.h unistd.h
5534do :
5535 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5536ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5537"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005538if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005539 cat >>confdefs.h <<_ACEOF
5540#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5541_ACEOF
5542
5543fi
5544
5545done
5546
5547
5548
5549 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 +02005550if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005551 MINIX=yes
5552else
5553 MINIX=
5554fi
5555
5556
5557 if test "$MINIX" = yes; then
5558
5559$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5560
5561
5562$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5563
5564
5565$as_echo "#define _MINIX 1" >>confdefs.h
5566
5567 fi
5568
5569
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5571$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005572if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005573 $as_echo_n "(cached) " >&6
5574else
5575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5576/* end confdefs.h. */
5577
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005578# define __EXTENSIONS__ 1
5579 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005580int
5581main ()
5582{
5583
5584 ;
5585 return 0;
5586}
5587_ACEOF
5588if ac_fn_c_try_compile "$LINENO"; then :
5589 ac_cv_safe_to_define___extensions__=yes
5590else
5591 ac_cv_safe_to_define___extensions__=no
5592fi
5593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5594fi
5595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5596$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5597 test $ac_cv_safe_to_define___extensions__ = yes &&
5598 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5599
5600 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5601
5602 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5603
5604 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5605
5606 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5607
5608
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005609
Xavier de Gaye95750b12016-07-09 11:05:42 +02005610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5611$as_echo_n "checking for the Android API level... " >&6; }
5612cat >> conftest.c <<EOF
5613#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005614android_api = __ANDROID_API__
5615arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005616#else
5617#error not Android
5618#endif
5619EOF
5620
5621if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005622 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5623 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5625$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005626 if test -z "$ANDROID_API_LEVEL"; then
5627 echo 'Fatal: you must define __ANDROID_API__'
5628 exit 1
5629 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005630
5631cat >>confdefs.h <<_ACEOF
5632#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5633_ACEOF
5634
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005635
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5637$as_echo_n "checking for the Android arm ABI... " >&6; }
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5639$as_echo "$_arm_arch" >&6; }
5640 if test "$_arm_arch" = 7; then
5641 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5642 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5643 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005644else
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5646$as_echo "not Android" >&6; }
5647fi
5648rm -f conftest.c conftest.out
5649
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650# Check for unsupported systems
5651case $ac_sys_system/$ac_sys_release in
5652atheos*|Linux*/1*)
5653 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5654 echo See README for details.
5655 exit 1;;
5656esac
5657
5658
Matthias Kloseb9621712010-04-24 17:59:49 +00005659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5660$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005661
5662# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005663if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005664 withval=$with_suffix;
5665 case $withval in
5666 no) EXEEXT=;;
5667 yes) EXEEXT=.exe;;
5668 *) EXEEXT=$withval;;
5669 esac
5670fi
5671
Matthias Kloseb9621712010-04-24 17:59:49 +00005672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5673$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674
5675# Test whether we're running on a non-case-sensitive system, in which
5676# case we give a warning if no ext is given
5677
Matthias Kloseb9621712010-04-24 17:59:49 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5679$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680if test ! -d CaseSensitiveTestDir; then
5681mkdir CaseSensitiveTestDir
5682fi
5683
5684if test -d casesensitivetestdir
5685then
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5687$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005688 BUILDEXEEXT=.exe
5689else
Matthias Kloseb9621712010-04-24 17:59:49 +00005690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692 BUILDEXEEXT=$EXEEXT
5693fi
5694rmdir CaseSensitiveTestDir
5695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005696case $ac_sys_system in
5697hp*|HP*)
5698 case $CC in
5699 cc|*/cc) CC="$CC -Ae";;
5700 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701esac
5702
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703
Matthias Kloseb9621712010-04-24 17:59:49 +00005704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5705$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706if test -z "$LIBRARY"
5707then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005708 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5711$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712
5713# LDLIBRARY is the name of the library to link against (as opposed to the
5714# name of the library into which to insert object files). BLDLIBRARY is also
5715# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5716# is blank as the main program is not linked directly against LDLIBRARY.
5717# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5718# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5719# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5720# DLLLIBRARY is the shared (i.e., DLL) library.
5721#
5722# RUNSHARED is used to run shared python without installed libraries
5723#
5724# INSTSONAME is the name of the shared library that will be use to install
5725# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005726#
5727# LDVERSION is the shared library version number, normally the Python version
5728# with the ABI build flags appended.
5729
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731
5732
5733
5734
5735
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005736
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005737LDLIBRARY="$LIBRARY"
5738BLDLIBRARY='$(LDLIBRARY)'
5739INSTSONAME='$(LDLIBRARY)'
5740DLLLIBRARY=''
5741LDLIBRARYDIR=''
5742RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005743LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005744
5745# LINKCC is the command that links the python executable -- default is $(CC).
5746# If CXX is set, and if it is needed to link a main function that was
5747# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5748# python might then depend on the C++ runtime
5749# This is altered for AIX in order to build the export list before
5750# linking.
5751
Matthias Kloseb9621712010-04-24 17:59:49 +00005752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5753$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754if test -z "$LINKCC"
5755then
5756 LINKCC='$(PURIFY) $(MAINCC)'
5757 case $ac_sys_system in
5758 AIX*)
5759 exp_extra="\"\""
5760 if test $ac_sys_release -ge 5 -o \
5761 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5762 exp_extra="."
5763 fi
5764 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765 QNX*)
5766 # qcc must be used because the other compilers do not
5767 # support -N.
5768 LINKCC=qcc;;
5769 esac
5770fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5772$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005773
5774# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5775# make sure we default having it set to "no": this is used by
5776# distutils.unixccompiler to know if it should add --enable-new-dtags
5777# to linker command lines, and failing to detect GNU ld simply results
5778# in the same bahaviour as before.
5779
Matthias Kloseb9621712010-04-24 17:59:49 +00005780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5781$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782ac_prog=ld
5783if test "$GCC" = yes; then
5784 ac_prog=`$CC -print-prog-name=ld`
5785fi
5786case `"$ac_prog" -V 2>&1 < /dev/null` in
5787 *GNU*)
5788 GNULD=yes;;
5789 *)
5790 GNULD=no;;
5791esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5793$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5796$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005798if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799 enableval=$enable_shared;
5800fi
5801
5802
5803if test -z "$enable_shared"
5804then
5805 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005806 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005807 enable_shared="yes";;
5808 *)
5809 enable_shared="no";;
5810 esac
5811fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5813$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005814
Matthias Kloseb9621712010-04-24 17:59:49 +00005815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5816$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005817# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005818if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005819 enableval=$enable_profiling;
5820fi
5821
5822if test "x$enable_profiling" = xyes; then
5823 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005824 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826/* end confdefs.h. */
5827int main() { return 0; }
5828_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005829if ac_fn_c_try_link "$LINENO"; then :
5830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005832 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834rm -f core conftest.err conftest.$ac_objext \
5835 conftest$ac_exeext conftest.$ac_ext
5836 CC="$ac_save_cc"
5837else
5838 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5841$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005842
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843if test "x$enable_profiling" = xyes; then
5844 BASECFLAGS="-pg $BASECFLAGS"
5845 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846fi
5847
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5849$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
5851# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5852# library that we build, but we do not want to link against it (we
5853# will find it with a -framework option). For this reason there is an
5854# extra variable BLDLIBRARY against which Python and the extension
5855# modules are linked, BLDLIBRARY. This is normally the same as
5856# LDLIBRARY, but empty for MacOSX framework builds.
5857if test "$enable_framework"
5858then
5859 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005860 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861 BLDLIBRARY=''
5862else
5863 BLDLIBRARY='$(LDLIBRARY)'
5864fi
5865
5866# Other platforms follow
5867if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005868 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869
Matthias Kloseb9621712010-04-24 17:59:49 +00005870$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
5872 case $ac_sys_system in
5873 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005874 LDLIBRARY='libpython$(LDVERSION).dll.a'
5875 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005876 ;;
5877 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005878 LDLIBRARY='libpython$(LDVERSION).so'
5879 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005880 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005881 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005882 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005883 then
5884 PY3LIBRARY=libpython3.so
5885 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005887 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005888 LDLIBRARY='libpython$(LDVERSION).so'
5889 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005890 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005891 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005892 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005893 then
5894 PY3LIBRARY=libpython3.so
5895 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896 ;;
5897 hp*|HP*)
5898 case `uname -m` in
5899 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005900 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005901 ;;
5902 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005903 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005904 ;;
5905 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005906 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005909 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dylib'
5911 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005912 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005913 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005914 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005915 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005917 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 esac
5920else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005921 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 case $ac_sys_system in
5923 CYGWIN*)
5924 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 ;;
5927 esac
5928fi
5929
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005930if test "$cross_compiling" = yes; then
5931 RUNSHARED=
5932fi
5933
Matthias Kloseb9621712010-04-24 17:59:49 +00005934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5935$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005936
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005938if test -n "$ac_tool_prefix"; then
5939 for ac_prog in ar aal
5940 do
5941 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5942set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005945if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005946 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005947else
5948 if test -n "$AR"; then
5949 ac_cv_prog_AR="$AR" # Let the user override the test.
5950else
5951as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5952for as_dir in $PATH
5953do
5954 IFS=$as_save_IFS
5955 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005956 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005957 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005958 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005959 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 break 2
5961 fi
5962done
Matthias Kloseb9621712010-04-24 17:59:49 +00005963 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964IFS=$as_save_IFS
5965
5966fi
5967fi
5968AR=$ac_cv_prog_AR
5969if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5971$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972else
Matthias Kloseb9621712010-04-24 17:59:49 +00005973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5974$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005975fi
5976
5977
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005978 test -n "$AR" && break
5979 done
5980fi
5981if test -z "$AR"; then
5982 ac_ct_AR=$AR
5983 for ac_prog in ar aal
5984do
5985 # Extract the first word of "$ac_prog", so it can be a program name with args.
5986set dummy $ac_prog; ac_word=$2
5987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
5989if ${ac_cv_prog_ac_ct_AR+:} false; then :
5990 $as_echo_n "(cached) " >&6
5991else
5992 if test -n "$ac_ct_AR"; then
5993 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5994else
5995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998 IFS=$as_save_IFS
5999 test -z "$as_dir" && as_dir=.
6000 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006002 ac_cv_prog_ac_ct_AR="$ac_prog"
6003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6004 break 2
6005 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006007 done
6008IFS=$as_save_IFS
6009
6010fi
6011fi
6012ac_ct_AR=$ac_cv_prog_ac_ct_AR
6013if test -n "$ac_ct_AR"; then
6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6015$as_echo "$ac_ct_AR" >&6; }
6016else
6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
6019fi
6020
6021
6022 test -n "$ac_ct_AR" && break
6023done
6024
6025 if test "x$ac_ct_AR" = x; then
6026 AR="ar"
6027 else
6028 case $cross_compiling:$ac_tool_warned in
6029yes:)
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6031$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6032ac_tool_warned=yes ;;
6033esac
6034 AR=$ac_ct_AR
6035 fi
6036fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037
6038
6039# tweak ARFLAGS only if the user didn't set it on the command line
6040
6041if test -z "$ARFLAGS"
6042then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006043 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044fi
6045
doko@ubuntu.com58844492012-06-30 18:25:32 +02006046if test -n "$ac_tool_prefix"; then
6047 for ac_prog in readelf
6048 do
6049 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6050set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6052$as_echo_n "checking for $ac_word... " >&6; }
6053if ${ac_cv_prog_READELF+:} false; then :
6054 $as_echo_n "(cached) " >&6
6055else
6056 if test -n "$READELF"; then
6057 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6058else
6059as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6060for as_dir in $PATH
6061do
6062 IFS=$as_save_IFS
6063 test -z "$as_dir" && as_dir=.
6064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006065 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006066 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6067 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6068 break 2
6069 fi
6070done
6071 done
6072IFS=$as_save_IFS
6073
6074fi
6075fi
6076READELF=$ac_cv_prog_READELF
6077if test -n "$READELF"; then
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6079$as_echo "$READELF" >&6; }
6080else
6081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082$as_echo "no" >&6; }
6083fi
6084
6085
6086 test -n "$READELF" && break
6087 done
6088fi
6089if test -z "$READELF"; then
6090 ac_ct_READELF=$READELF
6091 for ac_prog in readelf
6092do
6093 # Extract the first word of "$ac_prog", so it can be a program name with args.
6094set dummy $ac_prog; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6098 $as_echo_n "(cached) " >&6
6099else
6100 if test -n "$ac_ct_READELF"; then
6101 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6102else
6103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6104for as_dir in $PATH
6105do
6106 IFS=$as_save_IFS
6107 test -z "$as_dir" && as_dir=.
6108 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006110 ac_cv_prog_ac_ct_READELF="$ac_prog"
6111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6112 break 2
6113 fi
6114done
6115 done
6116IFS=$as_save_IFS
6117
6118fi
6119fi
6120ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6121if test -n "$ac_ct_READELF"; then
6122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6123$as_echo "$ac_ct_READELF" >&6; }
6124else
6125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
6127fi
6128
6129
6130 test -n "$ac_ct_READELF" && break
6131done
6132
6133 if test "x$ac_ct_READELF" = x; then
6134 READELF=":"
6135 else
6136 case $cross_compiling:$ac_tool_warned in
6137yes:)
6138{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6139$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6140ac_tool_warned=yes ;;
6141esac
6142 READELF=$ac_ct_READELF
6143 fi
6144fi
6145
6146if test "$cross_compiling" = yes; then
6147 case "$READELF" in
6148 readelf|:)
6149 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6150 ;;
6151 esac
6152fi
6153
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006157hp*|HP*)
6158 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006159 if test -z "$INSTALL"
6160 then
6161 INSTALL="${srcdir}/install-sh -c"
6162 fi
6163esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006164# Find a good install program. We prefer a C program (faster),
6165# so one script is as good as another. But avoid the broken or
6166# incompatible versions:
6167# SysV /etc/install, /usr/sbin/install
6168# SunOS /usr/etc/install
6169# IRIX /sbin/install
6170# AIX /bin/install
6171# AmigaOS /C/install, which installs bootblocks on floppy discs
6172# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6173# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6174# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6175# OS/2's system install, which has a completely different semantic
6176# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006177# Reject install programs that cannot install multiple files.
6178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6179$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006181if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006182 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183else
6184 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6185for as_dir in $PATH
6186do
6187 IFS=$as_save_IFS
6188 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 # Account for people who put trailing slashes in PATH elements.
6190case $as_dir/ in #((
6191 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 /usr/ucb/* ) ;;
6195 *)
6196 # OSF1 and SCO ODT 3.0 have their own names for install.
6197 # Don't use installbsd from OSF since it installs stuff as root
6198 # by default.
6199 for ac_prog in ginstall scoinst install; do
6200 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006201 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202 if test $ac_prog = install &&
6203 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6204 # AIX install. It has an incompatible calling convention.
6205 :
6206 elif test $ac_prog = install &&
6207 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6208 # program-specific install script used by HP pwplus--don't use.
6209 :
6210 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006211 rm -rf conftest.one conftest.two conftest.dir
6212 echo one > conftest.one
6213 echo two > conftest.two
6214 mkdir conftest.dir
6215 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6216 test -s conftest.one && test -s conftest.two &&
6217 test -s conftest.dir/conftest.one &&
6218 test -s conftest.dir/conftest.two
6219 then
6220 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6221 break 3
6222 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223 fi
6224 fi
6225 done
6226 done
6227 ;;
6228esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006229
6230 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231IFS=$as_save_IFS
6232
Matthias Kloseb9621712010-04-24 17:59:49 +00006233rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234
6235fi
6236 if test "${ac_cv_path_install+set}" = set; then
6237 INSTALL=$ac_cv_path_install
6238 else
6239 # As a last resort, use the slow shell script. Don't cache a
6240 # value for INSTALL within a source directory, because that will
6241 # break other packages using the cache if that directory is
6242 # removed, or if the value is a relative name.
6243 INSTALL=$ac_install_sh
6244 fi
6245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6247$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006248
6249# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6250# It thinks the first close brace ends the variable substitution.
6251test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6252
6253test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6254
6255test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6256
Matthias Klose93a0ef12012-03-15 18:08:34 +01006257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6258$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6259if test -z "$MKDIR_P"; then
6260 if ${ac_cv_path_mkdir+:} false; then :
6261 $as_echo_n "(cached) " >&6
6262else
6263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6264for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6265do
6266 IFS=$as_save_IFS
6267 test -z "$as_dir" && as_dir=.
6268 for ac_prog in mkdir gmkdir; do
6269 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006270 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006271 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6272 'mkdir (GNU coreutils) '* | \
6273 'mkdir (coreutils) '* | \
6274 'mkdir (fileutils) '4.1*)
6275 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6276 break 3;;
6277 esac
6278 done
6279 done
6280 done
6281IFS=$as_save_IFS
6282
6283fi
6284
6285 test -d ./--version && rmdir ./--version
6286 if test "${ac_cv_path_mkdir+set}" = set; then
6287 MKDIR_P="$ac_cv_path_mkdir -p"
6288 else
6289 # As a last resort, use the slow shell script. Don't cache a
6290 # value for MKDIR_P within a source directory, because that will
6291 # break other packages using the cache if that directory is
6292 # removed, or if the value is a relative name.
6293 MKDIR_P="$ac_install_sh -d"
6294 fi
6295fi
6296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6297$as_echo "$MKDIR_P" >&6; }
6298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299
6300# Not every filesystem supports hard links
6301
6302if test -z "$LN" ; then
6303 case $ac_sys_system in
6304 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006305 *) LN=ln;;
6306 esac
6307fi
6308
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006309# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006310
6311ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006312
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006313# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6315$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006316
6317# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006318if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319 withval=$with_pydebug;
6320if test "$withval" != no
6321then
6322
Matthias Kloseb9621712010-04-24 17:59:49 +00006323$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6326$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006327 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006328 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006329else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331fi
6332else
Matthias Kloseb9621712010-04-24 17:59:49 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006335fi
6336
6337
Victor Stinnerf4e47032019-04-25 00:56:28 +02006338# Check for --with-trace-refs
6339# --with-trace-refs
6340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6341$as_echo_n "checking for --with-trace-refs... " >&6; }
6342
6343# Check whether --with-trace-refs was given.
6344if test "${with_trace_refs+set}" = set; then :
6345 withval=$with_trace_refs;
6346else
6347 with_trace_refs=no
6348fi
6349
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6351$as_echo "$with_trace_refs" >&6; }
6352
6353if test "$with_trace_refs" = "yes"
6354then
6355
6356$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6357
6358fi
6359
6360# Check for --with-assertions.
6361# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006362assertions='false'
6363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6364$as_echo_n "checking for --with-assertions... " >&6; }
6365
6366# Check whether --with-assertions was given.
6367if test "${with_assertions+set}" = set; then :
6368 withval=$with_assertions;
6369if test "$withval" != no
6370then
6371 assertions='true'
6372fi
6373fi
6374
6375if test "$assertions" = 'true'; then
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6377$as_echo "yes" >&6; }
6378elif test "$Py_DEBUG" = 'true'; then
6379 assertions='true'
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6381$as_echo "implied by --with-pydebug" >&6; }
6382else
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385fi
6386
Brett Cannon63d98bc2016-09-06 17:12:40 -07006387# Enable optimization flags
6388
6389
6390Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6392$as_echo_n "checking for --enable-optimizations... " >&6; }
6393# Check whether --enable-optimizations was given.
6394if test "${enable_optimizations+set}" = set; then :
6395 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006396if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006397then
6398 Py_OPT='true'
6399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6400$as_echo "yes" >&6; };
6401else
6402 Py_OPT='false'
6403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6404$as_echo "no" >&6; };
6405fi
6406else
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6408$as_echo "no" >&6; }
6409fi
6410
6411if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006412 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6413 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006414 # 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 +00006415 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006416 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006417 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006418 DEF_MAKE_RULE="build_all"
6419else
6420 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006421 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006422 DEF_MAKE_RULE="all"
6423fi
6424
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006425# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6426# normal names in the default $PATH (ie: Ubuntu). They exist under the
6427# non-suffixed name in their versioned llvm directory.
6428
6429llvm_bin_dir=''
6430llvm_path="${PATH}"
6431if test "${CC}" = "clang"
6432then
6433 clang_bin=`which clang`
6434 # Some systems install clang elsewhere as a symlink to the real path
6435 # which is where the related llvm tools are located.
6436 if test -L "${clang_bin}"
6437 then
6438 clang_dir=`dirname "${clang_bin}"`
6439 clang_bin=`readlink "${clang_bin}"`
6440 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6441 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6442 fi
6443fi
6444
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006445# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6447$as_echo_n "checking for --with-lto... " >&6; }
6448
6449# Check whether --with-lto was given.
6450if test "${with_lto+set}" = set; then :
6451 withval=$with_lto;
6452if test "$withval" != no
6453then
6454 Py_LTO='true'
6455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6456$as_echo "yes" >&6; };
6457else
6458 Py_LTO='false'
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6460$as_echo "no" >&6; };
6461fi
6462else
6463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6464$as_echo "no" >&6; }
6465fi
6466
6467if test "$Py_LTO" = 'true' ; then
6468 case $CC in
6469 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006470
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006472$as_echo_n "checking target system type... " >&6; }
6473if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006474 $as_echo_n "(cached) " >&6
6475else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006476 if test "x$target_alias" = x; then
6477 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006478else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006479 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6480 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6481fi
6482
6483fi
6484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6485$as_echo "$ac_cv_target" >&6; }
6486case $ac_cv_target in
6487*-*-*) ;;
6488*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6489esac
6490target=$ac_cv_target
6491ac_save_IFS=$IFS; IFS='-'
6492set x $ac_cv_target
6493shift
6494target_cpu=$1
6495target_vendor=$2
6496shift; shift
6497# Remember, the first character of IFS is used to create $*,
6498# except with old shells:
6499target_os=$*
6500IFS=$ac_save_IFS
6501case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6502
6503
6504# The aliases save the names the user supplied, while $host etc.
6505# will get canonicalized.
6506test -n "$target_alias" &&
6507 test "$program_prefix$program_suffix$program_transform_name" = \
6508 NONENONEs,x,x, &&
6509 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006510# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6511set dummy $target_alias-llvm-ar; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if ${ac_cv_path_LLVM_AR+:} false; then :
6515 $as_echo_n "(cached) " >&6
6516else
6517 case $LLVM_AR in
6518 [\\/]* | ?:[\\/]*)
6519 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6520 ;;
6521 *)
6522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6523for as_dir in ${llvm_path}
6524do
6525 IFS=$as_save_IFS
6526 test -z "$as_dir" && as_dir=.
6527 for ac_exec_ext in '' $ac_executable_extensions; do
6528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6529 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6531 break 2
6532 fi
6533done
6534 done
6535IFS=$as_save_IFS
6536
6537 ;;
6538esac
6539fi
6540LLVM_AR=$ac_cv_path_LLVM_AR
6541if test -n "$LLVM_AR"; then
6542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6543$as_echo "$LLVM_AR" >&6; }
6544else
6545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
6547fi
6548
6549
6550if test -z "$ac_cv_path_LLVM_AR"; then
6551 if test "$build" = "$target"; then
6552 ac_pt_LLVM_AR=$LLVM_AR
6553 # Extract the first word of "llvm-ar", so it can be a program name with args.
6554set dummy llvm-ar; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6558 $as_echo_n "(cached) " >&6
6559else
6560 case $ac_pt_LLVM_AR in
6561 [\\/]* | ?:[\\/]*)
6562 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6563 ;;
6564 *)
6565 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in ${llvm_path}
6567do
6568 IFS=$as_save_IFS
6569 test -z "$as_dir" && as_dir=.
6570 for ac_exec_ext in '' $ac_executable_extensions; do
6571 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6573 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574 break 2
6575 fi
6576done
6577 done
6578IFS=$as_save_IFS
6579
6580 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6581 ;;
6582esac
6583fi
6584ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6585if test -n "$ac_pt_LLVM_AR"; then
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6587$as_echo "$ac_pt_LLVM_AR" >&6; }
6588else
6589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6590$as_echo "no" >&6; }
6591fi
6592
6593 LLVM_AR=$ac_pt_LLVM_AR
6594 else
6595 LLVM_AR="''"
6596 fi
6597else
6598 LLVM_AR="$ac_cv_path_LLVM_AR"
6599fi
6600
6601
6602 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6603 then
6604 LLVM_AR_FOUND="found"
6605 else
6606 LLVM_AR_FOUND="not-found"
6607 fi
6608 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6609 then
6610 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6611 if test -n "${found_llvm_ar}"
6612 then
6613 LLVM_AR='/usr/bin/xcrun llvm-ar'
6614 LLVM_AR_FOUND=found
6615 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6616$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6617 fi
6618 fi
6619 if test $LLVM_AR_FOUND = not-found
6620 then
6621 LLVM_PROFR_ERR=yes
6622 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6623 else
6624 LLVM_AR_ERR=no
6625 fi
6626 AR="${LLVM_AR}"
6627 case $ac_sys_system in
6628 Darwin*)
6629 # Any changes made here should be reflected in the GCC+Darwin case below
6630 LTOFLAGS="-flto -Wl,-export_dynamic"
6631 ;;
6632 *)
6633 LTOFLAGS="-flto"
6634 ;;
6635 esac
6636 ;;
6637 *gcc*)
6638 case $ac_sys_system in
6639 Darwin*)
6640 LTOFLAGS="-flto -Wl,-export_dynamic"
6641 ;;
6642 *)
6643 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6644 ;;
6645 esac
6646 ;;
6647 esac
6648
6649 if test "$ac_cv_prog_cc_g" = "yes"
6650 then
6651 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6652 # to get debug symbols.
6653 LTOFLAGS="$LTOFLAGS -g"
6654 fi
6655
stratakisf92c7aa2018-12-04 15:54:01 +01006656 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006657 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006658fi
6659
6660# Enable PGO flags.
6661
6662
6663
6664
6665
6666
Gregory P. Smith799520c2016-09-07 16:10:00 -07006667# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6668set dummy $target_alias-llvm-profdata; ac_word=$2
6669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6670$as_echo_n "checking for $ac_word... " >&6; }
6671if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6672 $as_echo_n "(cached) " >&6
6673else
6674 case $LLVM_PROFDATA in
6675 [\\/]* | ?:[\\/]*)
6676 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6677 ;;
6678 *)
6679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6680for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006681do
6682 IFS=$as_save_IFS
6683 test -z "$as_dir" && as_dir=.
6684 for ac_exec_ext in '' $ac_executable_extensions; do
6685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006686 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6688 break 2
6689 fi
6690done
6691 done
6692IFS=$as_save_IFS
6693
Gregory P. Smith799520c2016-09-07 16:10:00 -07006694 ;;
6695esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006696fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006697LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6698if test -n "$LLVM_PROFDATA"; then
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6700$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006701else
6702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6703$as_echo "no" >&6; }
6704fi
6705
6706
Gregory P. Smith799520c2016-09-07 16:10:00 -07006707if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6708 if test "$build" = "$target"; then
6709 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6710 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6711set dummy llvm-profdata; ac_word=$2
6712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6713$as_echo_n "checking for $ac_word... " >&6; }
6714if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6715 $as_echo_n "(cached) " >&6
6716else
6717 case $ac_pt_LLVM_PROFDATA in
6718 [\\/]* | ?:[\\/]*)
6719 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6720 ;;
6721 *)
6722 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6723for as_dir in ${llvm_path}
6724do
6725 IFS=$as_save_IFS
6726 test -z "$as_dir" && as_dir=.
6727 for ac_exec_ext in '' $ac_executable_extensions; do
6728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6729 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6731 break 2
6732 fi
6733done
6734 done
6735IFS=$as_save_IFS
6736
6737 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6738 ;;
6739esac
6740fi
6741ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6742if test -n "$ac_pt_LLVM_PROFDATA"; then
6743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6744$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6745else
6746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6747$as_echo "no" >&6; }
6748fi
6749
6750 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6751 else
6752 LLVM_PROFDATA="''"
6753 fi
6754else
6755 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6756fi
6757
6758
6759if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6760then
6761 LLVM_PROF_FOUND="found"
6762else
6763 LLVM_PROF_FOUND="not-found"
6764fi
6765if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6766then
6767 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6768 if test -n "${found_llvm_profdata}"
6769 then
6770 # llvm-profdata isn't directly in $PATH in some cases.
6771 # https://apple.stackexchange.com/questions/197053/
6772 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6773 LLVM_PROF_FOUND=found
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6775$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6776 fi
6777fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006778LLVM_PROF_ERR=no
6779case $CC in
6780 *clang*)
6781 # Any changes made here should be reflected in the GCC+Darwin case below
6782 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6783 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006784 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006785 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6786 if test $LLVM_PROF_FOUND = not-found
6787 then
6788 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006789 if test "${REQUIRE_PGO}" = "yes"
6790 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006791 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 -07006792 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006793 fi
6794 ;;
6795 *gcc*)
6796 case $ac_sys_system in
6797 Darwin*)
6798 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6799 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006800 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006801 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 then
6804 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006805 if test "${REQUIRE_PGO}" = "yes"
6806 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006807 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 -07006808 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006809 fi
6810 ;;
6811 *)
6812 PGO_PROF_GEN_FLAG="-fprofile-generate"
6813 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6814 LLVM_PROF_MERGER="true"
6815 LLVM_PROF_FILE=""
6816 ;;
6817 esac
6818 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006819 *icc*)
6820 PGO_PROF_GEN_FLAG="-prof-gen"
6821 PGO_PROF_USE_FLAG="-prof-use"
6822 LLVM_PROF_MERGER="true"
6823 LLVM_PROF_FILE=""
6824 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006825esac
6826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6828# merged with this chunk of code?
6829
6830# Optimizer/debugger flags
6831# ------------------------
6832# (The following bit of code is complicated enough - please keep things
6833# indented properly. Just pretend you're editing Python code. ;-)
6834
6835# There are two parallel sets of case statements below, one that checks to
6836# see if OPT was set and one that does BASECFLAGS setting based upon
6837# compiler and platform. BASECFLAGS tweaks need to be made even if the
6838# user set OPT.
6839
Victor Stinner23a683a2019-04-12 21:27:37 +02006840case $CC in
6841 *clang*)
6842 cc_is_clang=1
6843 ;;
6844 *)
6845 if $CC --version 2>&1 | grep -q clang
6846 then
6847 cc_is_clang=1
6848 else
6849 cc_is_clang=
6850 fi
6851esac
6852
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853# tweak OPT based on compiler and platform, only if the user didn't set
6854# it on the command line
6855
Victor Stinner9ed34a82017-05-02 22:35:58 +02006856
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006857if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858then
6859 case $GCC in
6860 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006861 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6862 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6863 WRAP="-fwrapv"
6864 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006865
Victor Stinner35f3d242017-04-21 12:35:24 +02006866 if test -n "${cc_is_clang}"
6867 then
6868 # Clang also needs -fwrapv
6869 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006870 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6871 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006872 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006873 fi
6874
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006875 case $ac_cv_prog_cc_g in
6876 yes)
6877 if test "$Py_DEBUG" = 'true' ; then
6878 # Optimization messes up debuggers, so turn it off for
6879 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006880 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006881 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 else
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 else
Victor Stinner28205b22017-04-21 11:24:34 +02006886 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 fi
6888 ;;
6889 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006890 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891 ;;
6892 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006894 case $ac_sys_system in
6895 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6896 ;;
6897 esac
6898 ;;
6899
6900 *)
6901 OPT="-O"
6902 ;;
6903 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905
Victor Stinner23a683a2019-04-12 21:27:37 +02006906if test -n "${cc_is_clang}"
6907then
6908 # bpo-36618: Add -fmax-type-align=8 to CFLAGS when clang compiler is
6909 # detected. The pymalloc memory allocator aligns memory on 8 bytes. On
6910 # x86-64, clang expects alignment on 16 bytes by default and so uses MOVAPS
6911 # instruction which can lead to segmentation fault. Instruct clang that
6912 # Python is limited to alignemnt on 8 bytes to use MOVUPS instruction
6913 # instead: slower but don't trigger a SIGSEGV if the memory is not aligned
6914 # on 16 bytes.
6915 #
Victor Stinnera304b132019-04-13 00:51:07 +02006916 # Sadly, the flag must be added to CFLAGS and not just CFLAGS_NODIST,
Victor Stinner23a683a2019-04-12 21:27:37 +02006917 # since third party C extensions can have the same issue.
Victor Stinnera304b132019-04-13 00:51:07 +02006918 #
6919 # Check if -fmax-type-align flag is supported (it's not supported by old
6920 # clang versions):
6921 if "$CC" -v --help 2>/dev/null |grep -- -fmax-type-align > /dev/null; then
6922 CFLAGS="$CFLAGS -fmax-type-align=8"
6923 fi
Victor Stinner23a683a2019-04-12 21:27:37 +02006924fi
6925
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006926
6927
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006928
stratakiscf10a752018-12-19 18:19:01 +01006929
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930# The -arch flags for universal builds on OSX
6931UNIVERSAL_ARCH_FLAGS=
6932
6933
6934# tweak BASECFLAGS based on compiler and platform
6935case $GCC in
6936yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006937 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006938
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6940$as_echo_n "checking for -Wextra... " >&6; }
6941 ac_save_cc="$CC"
6942 CC="$CC -Wextra -Werror"
6943 if ${ac_cv_extra_warnings+:} false; then :
6944 $as_echo_n "(cached) " >&6
6945else
6946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6947/* end confdefs.h. */
6948
6949
6950int
6951main ()
6952{
6953
6954 ;
6955 return 0;
6956}
6957
6958_ACEOF
6959if ac_fn_c_try_compile "$LINENO"; then :
6960
6961 ac_cv_extra_warnings=yes
6962
6963else
6964
6965 ac_cv_extra_warnings=no
6966
6967fi
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6969fi
6970
6971 CC="$ac_save_cc"
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6973$as_echo "$ac_cv_extra_warnings" >&6; }
6974
6975 if test $ac_cv_extra_warnings = yes
6976 then
6977 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6978 fi
6979
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006980 # Python doesn't violate C99 aliasing rules, but older versions of
6981 # GCC produce warnings for legal Python code. Enable
6982 # -fno-strict-aliasing on versions of GCC that support but produce
6983 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6985$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986 ac_save_cc="$CC"
6987 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006988 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006989 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006990 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006991else
Matthias Kloseb9621712010-04-24 17:59:49 +00006992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006993/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006994
Matthias Kloseb159a552010-04-25 21:00:44 +00006995
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006996int
6997main ()
6998{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006999
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007000 ;
7001 return 0;
7002}
Matthias Kloseb159a552010-04-25 21:00:44 +00007003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007005if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007006
7007 CC="$ac_save_cc -fstrict-aliasing"
7008 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
7009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007010/* end confdefs.h. */
7011
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007012 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013int
7014main ()
7015{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00007016double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007017 ;
7018 return 0;
7019}
Matthias Kloseb159a552010-04-25 21:00:44 +00007020
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007022if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007023
7024 ac_cv_no_strict_aliasing=no
7025
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007026else
Matthias Kloseb159a552010-04-25 21:00:44 +00007027
7028 ac_cv_no_strict_aliasing=yes
7029
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007030fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007032
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007033else
Matthias Kloseb159a552010-04-25 21:00:44 +00007034
7035 ac_cv_no_strict_aliasing=no
7036
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007037fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007039fi
7040
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007041 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007042 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7044$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007045 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007046 then
7047 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7048 fi
7049
Zachary Ware5af85642015-12-21 12:09:17 -06007050 # ICC doesn't recognize the option, but only emits a warning
7051 ## XXX does it emit an unused result warning and can it be disabled?
7052 case "$CC" in
7053 *icc*)
7054 ac_cv_disable_unused_result_warning=no
7055 ;;
7056 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7058$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7059 ac_save_cc="$CC"
7060 CC="$CC -Wunused-result -Werror"
7061 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007062 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007063 $as_echo_n "(cached) " >&6
7064else
7065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7066/* end confdefs.h. */
7067
7068
7069int
7070main ()
7071{
7072
7073 ;
7074 return 0;
7075}
7076
7077_ACEOF
7078if ac_fn_c_try_compile "$LINENO"; then :
7079
7080 ac_cv_disable_unused_result_warning=yes
7081
7082else
7083
7084 ac_cv_disable_unused_result_warning=no
7085
7086fi
7087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7088fi
7089
7090 CFLAGS="$save_CFLAGS"
7091 CC="$ac_save_cc"
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7093$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007094 ;;
7095 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007096
7097 if test $ac_cv_disable_unused_result_warning = yes
7098 then
7099 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007100 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7101 fi
7102
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7104$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7105 ac_save_cc="$CC"
7106 CC="$CC -Wunused-parameter -Werror"
7107 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7108 $as_echo_n "(cached) " >&6
7109else
7110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7111/* end confdefs.h. */
7112
7113
7114int
7115main ()
7116{
7117
7118 ;
7119 return 0;
7120}
7121
7122_ACEOF
7123if ac_fn_c_try_compile "$LINENO"; then :
7124
7125 ac_cv_disable_unused_parameter_warning=yes
7126
7127else
7128
7129 ac_cv_disable_unused_parameter_warning=no
7130
7131fi
7132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7133fi
7134
7135 CC="$ac_save_cc"
7136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7137$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7138
7139 if test $ac_cv_disable_unused_parameter_warning = yes
7140 then
7141 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7142 fi
7143
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7145$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7146 ac_save_cc="$CC"
7147 CC="$CC -Wmissing-field-initializers -Werror"
7148 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7149 $as_echo_n "(cached) " >&6
7150else
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152/* end confdefs.h. */
7153
7154
7155int
7156main ()
7157{
7158
7159 ;
7160 return 0;
7161}
7162
7163_ACEOF
7164if ac_fn_c_try_compile "$LINENO"; then :
7165
7166 ac_cv_disable_missing_field_initializers=yes
7167
7168else
7169
7170 ac_cv_disable_missing_field_initializers=no
7171
7172fi
7173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7174fi
7175
7176 CC="$ac_save_cc"
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7178$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7179
7180 if test $ac_cv_disable_missing_field_initializers = yes
7181 then
7182 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007183 fi
7184
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7186$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7187 ac_save_cc="$CC"
7188 CC="$CC -Wsign-compare"
7189 save_CFLAGS="$CFLAGS"
7190 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7191 $as_echo_n "(cached) " >&6
7192else
7193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7194/* end confdefs.h. */
7195
7196
7197int
7198main ()
7199{
7200
7201 ;
7202 return 0;
7203}
7204
7205_ACEOF
7206if ac_fn_c_try_compile "$LINENO"; then :
7207
7208 ac_cv_enable_sign_compare_warning=yes
7209
7210else
7211
7212 ac_cv_enable_sign_compare_warning=no
7213
7214fi
7215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7216fi
7217
7218 CFLAGS="$save_CFLAGS"
7219 CC="$ac_save_cc"
7220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7221$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7222
7223 if test $ac_cv_enable_sign_compare_warning = yes
7224 then
7225 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7226 fi
7227
7228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7229$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7230 ac_save_cc="$CC"
7231 CC="$CC -Wunreachable-code"
7232 save_CFLAGS="$CFLAGS"
7233 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7234 $as_echo_n "(cached) " >&6
7235else
7236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237/* end confdefs.h. */
7238
7239
7240int
7241main ()
7242{
7243
7244 ;
7245 return 0;
7246}
7247
7248_ACEOF
7249if ac_fn_c_try_compile "$LINENO"; then :
7250
7251 ac_cv_enable_unreachable_code_warning=yes
7252
7253else
7254
7255 ac_cv_enable_unreachable_code_warning=no
7256
7257fi
7258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259fi
7260
7261 CFLAGS="$save_CFLAGS"
7262 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007263
7264 # Don't enable unreachable code warning in debug mode, since it usually
7265 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007266 # Issue #24324: Unfortunately, the unreachable code warning does not work
7267 # correctly on gcc and has been silently removed from the compiler.
7268 # It is supported on clang but on OS X systems gcc may be an alias
7269 # for clang. Try to determine if the compiler is not really gcc and,
7270 # if so, only then enable the warning.
7271 if test $ac_cv_enable_unreachable_code_warning = yes && \
7272 test "$Py_DEBUG" != "true" && \
7273 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007274 then
7275 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007276 else
7277 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007278 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7280$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007281
INADA Naokie3364842018-06-05 20:40:53 +09007282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7283$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7284 ac_save_cc="$CC"
7285 CC="$CC -Werror -Wstrict-prototypes"
7286 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7287 $as_echo_n "(cached) " >&6
7288else
7289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7290/* end confdefs.h. */
7291
7292
7293int
7294main ()
7295{
7296
7297 ;
7298 return 0;
7299}
7300
7301_ACEOF
7302if ac_fn_c_try_compile "$LINENO"; then :
7303
7304 ac_cv_enable_strict_prototypes_warning=yes
7305
7306else
7307
7308 ac_cv_enable_strict_prototypes_warning=no
7309
7310fi
7311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7312fi
7313
7314 CC="$ac_save_cc"
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7316$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7317
7318 if test $ac_cv_enable_strict_prototypes_warning = yes
7319 then
7320 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7321 fi
7322
Victor Stinner193ee0a2017-02-06 14:24:00 +01007323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7324$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7325 ac_save_cc="$CC"
7326 CC="$CC -Werror=implicit-function-declaration"
7327 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7328 $as_echo_n "(cached) " >&6
7329else
7330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331/* end confdefs.h. */
7332
7333
7334int
7335main ()
7336{
7337
7338 ;
7339 return 0;
7340}
7341
7342_ACEOF
7343if ac_fn_c_try_compile "$LINENO"; then :
7344
7345 ac_cv_enable_implicit_function_declaration_error=yes
7346
7347else
7348
7349 ac_cv_enable_implicit_function_declaration_error=no
7350
7351fi
7352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7353fi
7354
7355 CC="$ac_save_cc"
7356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7357$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7358
7359 if test $ac_cv_enable_implicit_function_declaration_error = yes
7360 then
7361 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7362 fi
7363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7365 # support. Without this, treatment of subnormals doesn't follow
7366 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007367 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368 alpha*)
7369 BASECFLAGS="$BASECFLAGS -mieee"
7370 ;;
7371 esac
7372
7373 case $ac_sys_system in
7374 SCO_SV*)
7375 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7376 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007377
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 Darwin*)
7379 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7380 # used to be here, but non-Apple gcc doesn't accept them.
7381 if test "${CC}" = gcc
7382 then
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007384$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007385 case "${UNIVERSALSDK}" in
7386 */MacOSX10.4u.sdk)
7387 # Build using 10.4 SDK, force usage of gcc when the
7388 # compiler is gcc, otherwise the user will get very
7389 # confusing error messages when building on OSX 10.6
7390 CC=gcc-4.0
7391 CPP=cpp-4.0
7392 ;;
7393 esac
7394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007395$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007396 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397
Ned Deily87adb6e2013-10-18 21:09:56 -07007398 if test "${enable_universalsdk}"
7399 then
7400 case "$UNIVERSAL_ARCHS" in
7401 32-bit)
7402 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7403 LIPO_32BIT_FLAGS=""
7404 ARCH_RUN_32BIT=""
7405 ;;
7406 64-bit)
7407 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7408 LIPO_32BIT_FLAGS=""
7409 ARCH_RUN_32BIT="true"
7410 ;;
7411 all)
7412 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7413 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7414 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7415 ;;
7416 intel)
7417 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7418 LIPO_32BIT_FLAGS="-extract i386"
7419 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7420 ;;
7421 intel-32)
7422 UNIVERSAL_ARCH_FLAGS="-arch i386"
7423 LIPO_32BIT_FLAGS=""
7424 ARCH_RUN_32BIT=""
7425 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007426 intel-64)
7427 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7428 LIPO_32BIT_FLAGS=""
7429 ARCH_RUN_32BIT="true"
7430 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 3-way)
7432 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7433 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7434 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7435 ;;
7436 *)
7437 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7438 ;;
7439 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007440
Ned Deily87adb6e2013-10-18 21:09:56 -07007441 if test "${UNIVERSALSDK}" != "/"
7442 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007443 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7444 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007445 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007446 else
7447 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7448 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007449 fi
7450 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007451
Ned Deily87adb6e2013-10-18 21:09:56 -07007452 # Calculate an appropriate deployment target for this build:
7453 # The deployment target value is used explicitly to enable certain
7454 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007455 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007456 # component of the string returned by distutils.get_platform().
7457 #
7458 # Use the value from:
7459 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7460 # 2. the operating system version of the build machine if >= 10.6
7461 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7462 # below to pick either 10.3, 10.4, or 10.5 as the target.
7463 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464
Ned Deily87adb6e2013-10-18 21:09:56 -07007465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7466$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007467 cur_target_major=`sw_vers -productVersion | \
7468 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7469 cur_target_minor=`sw_vers -productVersion | \
7470 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7471 cur_target="${cur_target_major}.${cur_target_minor}"
7472 if test ${cur_target_major} -eq 10 && \
7473 test ${cur_target_minor} -ge 3 && \
7474 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007475 then
Ned Deily36820b62014-06-25 13:44:22 -07007476 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007477 cur_target=10.3
7478 if test ${enable_universalsdk}
7479 then
7480 case "$UNIVERSAL_ARCHS" in
7481 all|3-way|intel|64-bit)
7482 # These configurations were first supported in 10.5
7483 cur_target='10.5'
7484 ;;
7485 esac
7486 else
7487 if test `/usr/bin/arch` = "i386"
7488 then
7489 # 10.4 was the first release to support Intel archs
7490 cur_target="10.4"
7491 fi
7492 fi
7493 fi
7494 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007495
Ned Deily87adb6e2013-10-18 21:09:56 -07007496 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7497 # environment with a value that is the same as what we'll use
7498 # in the Makefile to ensure that we'll get the same compiler
7499 # environment during configure and build time.
7500 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7501 export MACOSX_DEPLOYMENT_TARGET
7502 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7504$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007505
Ned Deily87adb6e2013-10-18 21:09:56 -07007506 # end of Darwin* tests
7507 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508 esac
7509 ;;
7510
7511*)
7512 case $ac_sys_system in
7513 OpenUNIX*|UnixWare*)
7514 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7515 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007516 SCO_SV*)
7517 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7518 ;;
7519 esac
7520 ;;
7521esac
7522
Zachary Ware5af85642015-12-21 12:09:17 -06007523# ICC needs -fp-model strict or floats behave badly
7524case "$CC" in
7525*icc*)
7526 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7527 ;;
7528esac
7529
T. Woutersddbfa2c2017-05-23 01:30:49 +02007530if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007531 :
7532else
7533 OPT="-DNDEBUG $OPT"
7534fi
7535
7536if test "$ac_arch_flags"
7537then
7538 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7539fi
7540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541# On some compilers, pthreads are available without further options
7542# (e.g. MacOS X). On some of these systems, the compiler will not
7543# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7544# So we have to see first whether pthreads are available without
7545# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7547$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007548if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007549 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550else
Matthias Kloseb9621712010-04-24 17:59:49 +00007551 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 ac_cv_pthread_is_default=no
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555/* end confdefs.h. */
7556
Stefan Krah7dba5942012-11-22 22:49:11 +01007557#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558#include <pthread.h>
7559
7560void* routine(void* p){return NULL;}
7561
7562int main(){
7563 pthread_t p;
7564 if(pthread_create(&p,NULL,routine,NULL)!=0)
7565 return 1;
7566 (void)pthread_detach(p);
7567 return 0;
7568}
7569
7570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007571if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572
7573 ac_cv_pthread_is_default=yes
7574 ac_cv_kthread=no
7575 ac_cv_pthread=no
7576
7577else
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007579fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007582fi
7583
7584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
7586
Matthias Kloseb9621712010-04-24 17:59:49 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7588$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007589
7590
7591if test $ac_cv_pthread_is_default = yes
7592then
7593 ac_cv_kpthread=no
7594else
7595# -Kpthread, if available, provides the right #defines
7596# and linker options to make pthread_create available
7597# Some compilers won't report that they do not support -Kpthread,
7598# so we need to run a program to see whether it really made the
7599# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7601$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007602if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007603 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007604else
7605 ac_save_cc="$CC"
7606CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007607if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608 ac_cv_kpthread=no
7609else
Matthias Kloseb9621712010-04-24 17:59:49 +00007610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007611/* end confdefs.h. */
7612
Stefan Krah7dba5942012-11-22 22:49:11 +01007613#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007614#include <pthread.h>
7615
7616void* routine(void* p){return NULL;}
7617
7618int main(){
7619 pthread_t p;
7620 if(pthread_create(&p,NULL,routine,NULL)!=0)
7621 return 1;
7622 (void)pthread_detach(p);
7623 return 0;
7624}
7625
7626_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007627if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628 ac_cv_kpthread=yes
7629else
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7633 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007634fi
7635
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636CC="$ac_save_cc"
7637fi
7638
Matthias Kloseb9621712010-04-24 17:59:49 +00007639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7640$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007641fi
7642
7643if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7644then
7645# -Kthread, if available, provides the right #defines
7646# and linker options to make pthread_create available
7647# Some compilers won't report that they do not support -Kthread,
7648# so we need to run a program to see whether it really made the
7649# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7651$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007652if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007653 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007654else
7655 ac_save_cc="$CC"
7656CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007657if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007658 ac_cv_kthread=no
7659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661/* end confdefs.h. */
7662
Stefan Krah7dba5942012-11-22 22:49:11 +01007663#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007664#include <pthread.h>
7665
7666void* routine(void* p){return NULL;}
7667
7668int main(){
7669 pthread_t p;
7670 if(pthread_create(&p,NULL,routine,NULL)!=0)
7671 return 1;
7672 (void)pthread_detach(p);
7673 return 0;
7674}
7675
7676_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007677if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007678 ac_cv_kthread=yes
7679else
Matthias Kloseb9621712010-04-24 17:59:49 +00007680 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7683 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684fi
7685
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686CC="$ac_save_cc"
7687fi
7688
Matthias Kloseb9621712010-04-24 17:59:49 +00007689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7690$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007691fi
7692
7693if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7694then
7695# -pthread, if available, provides the right #defines
7696# and linker options to make pthread_create available
7697# Some compilers won't report that they do not support -pthread,
7698# so we need to run a program to see whether it really made the
7699# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7701$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007702if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704else
7705 ac_save_cc="$CC"
7706CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007707if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007708 ac_cv_pthread=no
7709else
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007711/* end confdefs.h. */
7712
Stefan Krah7dba5942012-11-22 22:49:11 +01007713#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007714#include <pthread.h>
7715
7716void* routine(void* p){return NULL;}
7717
7718int main(){
7719 pthread_t p;
7720 if(pthread_create(&p,NULL,routine,NULL)!=0)
7721 return 1;
7722 (void)pthread_detach(p);
7723 return 0;
7724}
7725
7726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007727if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728 ac_cv_pthread=yes
7729else
Matthias Kloseb9621712010-04-24 17:59:49 +00007730 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7733 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734fi
7735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007736CC="$ac_save_cc"
7737fi
7738
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7740$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007741fi
7742
7743# If we have set a CC compiler flag for thread support then
7744# check if it works for CXX, too.
7745ac_cv_cxx_thread=no
7746if test ! -z "$CXX"
7747then
Matthias Kloseb9621712010-04-24 17:59:49 +00007748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7749$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007750ac_save_cxx="$CXX"
7751
7752if test "$ac_cv_kpthread" = "yes"
7753then
7754 CXX="$CXX -Kpthread"
7755 ac_cv_cxx_thread=yes
7756elif test "$ac_cv_kthread" = "yes"
7757then
7758 CXX="$CXX -Kthread"
7759 ac_cv_cxx_thread=yes
7760elif test "$ac_cv_pthread" = "yes"
7761then
7762 CXX="$CXX -pthread"
7763 ac_cv_cxx_thread=yes
7764fi
7765
7766if test $ac_cv_cxx_thread = yes
7767then
7768 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7769 $CXX -c conftest.$ac_ext 2>&5
7770 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7771 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7772 then
7773 ac_cv_cxx_thread=yes
7774 else
7775 ac_cv_cxx_thread=no
7776 fi
7777 rm -fr conftest*
7778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7780$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007781fi
7782CXX="$ac_save_cxx"
7783
7784
7785# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7787$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007788if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792/* end confdefs.h. */
7793#include <stdlib.h>
7794#include <stdarg.h>
7795#include <string.h>
7796#include <float.h>
7797
7798int
7799main ()
7800{
7801
7802 ;
7803 return 0;
7804}
7805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007806if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007807 ac_cv_header_stdc=yes
7808else
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007810fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7812
7813if test $ac_cv_header_stdc = yes; then
7814 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007816/* end confdefs.h. */
7817#include <string.h>
7818
7819_ACEOF
7820if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007821 $EGREP "memchr" >/dev/null 2>&1; then :
7822
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823else
7824 ac_cv_header_stdc=no
7825fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007826rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007827
7828fi
7829
7830if test $ac_cv_header_stdc = yes; then
7831 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007833/* end confdefs.h. */
7834#include <stdlib.h>
7835
7836_ACEOF
7837if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 $EGREP "free" >/dev/null 2>&1; then :
7839
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007840else
7841 ac_cv_header_stdc=no
7842fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007843rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844
7845fi
7846
7847if test $ac_cv_header_stdc = yes; then
7848 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007849 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007850 :
7851else
Matthias Kloseb9621712010-04-24 17:59:49 +00007852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007853/* end confdefs.h. */
7854#include <ctype.h>
7855#include <stdlib.h>
7856#if ((' ' & 0x0FF) == 0x020)
7857# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7858# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7859#else
7860# define ISLOWER(c) \
7861 (('a' <= (c) && (c) <= 'i') \
7862 || ('j' <= (c) && (c) <= 'r') \
7863 || ('s' <= (c) && (c) <= 'z'))
7864# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7865#endif
7866
7867#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7868int
7869main ()
7870{
7871 int i;
7872 for (i = 0; i < 256; i++)
7873 if (XOR (islower (i), ISLOWER (i))
7874 || toupper (i) != TOUPPER (i))
7875 return 2;
7876 return 0;
7877}
7878_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007879if ac_fn_c_try_run "$LINENO"; then :
7880
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007881else
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007884rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7885 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007886fi
7887
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007888fi
7889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7891$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007892if test $ac_cv_header_stdc = yes; then
7893
Matthias Kloseb9621712010-04-24 17:59:49 +00007894$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007895
7896fi
7897
stratakise768c862018-01-23 16:11:24 +01007898for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007899fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007900ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007901sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007902utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007903poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007904sys/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 +01007905sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007906sys/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 +01007907sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007908sys/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 -07007909libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007910linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007911sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007912do :
7913 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7914ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007915if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007916 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007917#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007918_ACEOF
7919
7920fi
7921
Guido van Rossum627b2d71993-12-24 10:39:16 +00007922done
7923
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007924ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007925for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007926 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7928$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007929if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007930 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007931else
Matthias Kloseb9621712010-04-24 17:59:49 +00007932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007933/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007934#include <sys/types.h>
7935#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007936
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
7940if ((DIR *) 0)
7941return 0;
7942 ;
7943 return 0;
7944}
7945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007946if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007947 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007948else
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007952fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007953eval ac_res=\$$as_ac_Header
7954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7955$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007956if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007957 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007958#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007959_ACEOF
7960
7961ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007962fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007963
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007964done
7965# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7966if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7968$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007969if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007970 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007971else
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007973cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007976/* Override any GCC internal prototype to avoid an error.
7977 Use char because int might match the return type of a GCC
7978 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007979#ifdef __cplusplus
7980extern "C"
7981#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007982char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007983int
7984main ()
7985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 ;
7988 return 0;
7989}
7990_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991for ac_lib in '' dir; do
7992 if test -z "$ac_lib"; then
7993 ac_res="none required"
7994 else
7995 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007996 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007998 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001rm -f core conftest.err conftest.$ac_objext \
8002 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008003 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008006done
Victor Stinnere0be4232011-10-25 13:06:09 +02008007if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008008
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009else
8010 ac_cv_search_opendir=no
8011fi
8012rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013LIBS=$ac_func_search_save_LIBS
8014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8016$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008017ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008018if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008020
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008021fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008022
Michael W. Hudson54241132001-12-07 15:38:26 +00008023else
Matthias Kloseb9621712010-04-24 17:59:49 +00008024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8025$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008028else
8029 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033/* Override any GCC internal prototype to avoid an error.
8034 Use char because int might match the return type of a GCC
8035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036#ifdef __cplusplus
8037extern "C"
8038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008039char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008040int
8041main ()
8042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008044 ;
8045 return 0;
8046}
8047_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048for ac_lib in '' x; do
8049 if test -z "$ac_lib"; then
8050 ac_res="none required"
8051 else
8052 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008053 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008058rm -f core conftest.err conftest.$ac_objext \
8059 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008060 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063done
Victor Stinnere0be4232011-10-25 13:06:09 +02008064if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066else
8067 ac_cv_search_opendir=no
8068fi
8069rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008070LIBS=$ac_func_search_save_LIBS
8071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8073$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008075if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008078fi
8079
8080fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008081
Matthias Kloseb9621712010-04-24 17:59:49 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8083$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008084if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008085 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008086else
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008088/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008089#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008090int
8091main ()
8092{
8093return makedev(0, 0);
8094 ;
8095 return 0;
8096}
8097_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008098if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008099 ac_cv_header_sys_types_h_makedev=yes
8100else
Matthias Kloseb9621712010-04-24 17:59:49 +00008101 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008102fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008103rm -f core conftest.err conftest.$ac_objext \
8104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008105
8106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8108$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008109
8110if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008111ac_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 +02008112if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008113
Matthias Kloseb9621712010-04-24 17:59:49 +00008114$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008115
8116fi
8117
8118
8119
8120 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008121 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 +02008122if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008125
8126fi
8127
8128
8129 fi
8130fi
8131
Michael W. Hudson54241132001-12-07 15:38:26 +00008132
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008133# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8134# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8135SAVE_CFLAGS=$CFLAGS
8136CFLAGS="-std=c99 $CFLAGS"
8137for ac_header in bluetooth/bluetooth.h
8138do :
8139 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8140if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8141 cat >>confdefs.h <<_ACEOF
8142#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8143_ACEOF
8144
8145fi
8146
8147done
8148
8149CFLAGS=$SAVE_CFLAGS
8150
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008151# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8152for ac_header in net/if.h
8153do :
8154 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8155#ifdef STDC_HEADERS
8156# include <stdlib.h>
8157# include <stddef.h>
8158#else
8159# ifdef HAVE_STDLIB_H
8160# include <stdlib.h>
8161# endif
8162#endif
8163#ifdef HAVE_SYS_SOCKET_H
8164# include <sys/socket.h>
8165#endif
8166
8167"
Victor Stinnere0be4232011-10-25 13:06:09 +02008168if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008169 cat >>confdefs.h <<_ACEOF
8170#define HAVE_NET_IF_H 1
8171_ACEOF
8172
8173fi
8174
8175done
8176
8177
Martin v. Löwis11017b12006-01-14 18:12:57 +00008178# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008179for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008180do :
8181 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 +00008182#ifdef HAVE_ASM_TYPES_H
8183#include <asm/types.h>
8184#endif
8185#ifdef HAVE_SYS_SOCKET_H
8186#include <sys/socket.h>
8187#endif
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189"
Victor Stinnere0be4232011-10-25 13:06:09 +02008190if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008191 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008192#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008193_ACEOF
8194
8195fi
8196
8197done
8198
8199
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008200# On Linux, qrtr.h requires asm/types.h
8201for ac_header in linux/qrtr.h
8202do :
8203 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8204#ifdef HAVE_ASM_TYPES_H
8205#include <asm/types.h>
8206#endif
8207#ifdef HAVE_SYS_SOCKET_H
8208#include <sys/socket.h>
8209#endif
8210
8211"
8212if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8213 cat >>confdefs.h <<_ACEOF
8214#define HAVE_LINUX_QRTR_H 1
8215_ACEOF
8216
8217fi
8218
8219done
8220
8221
caaveryeffc12f2017-09-06 18:18:10 -04008222for ac_header in linux/vm_sockets.h
8223do :
8224 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8225#ifdef HAVE_SYS_SOCKET_H
8226#include <sys/socket.h>
8227#endif
8228
8229"
8230if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8231 cat >>confdefs.h <<_ACEOF
8232#define HAVE_LINUX_VM_SOCKETS_H 1
8233_ACEOF
8234
8235fi
8236
8237done
8238
8239
Charles-François Natali47413c12011-10-06 19:47:44 +02008240# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008241for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008242do :
8243 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8244ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8245#ifdef HAVE_SYS_SOCKET_H
8246#include <sys/socket.h>
8247#endif
8248
8249"
8250if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8251 cat >>confdefs.h <<_ACEOF
8252#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8253_ACEOF
8254
8255fi
8256
8257done
8258
8259
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008261was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8263$as_echo_n "checking for clock_t in time.h... " >&6; }
8264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
8268_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008271 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008272else
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
8274
Matthias Kloseb9621712010-04-24 17:59:49 +00008275$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008276
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008277
Guido van Rossum627b2d71993-12-24 10:39:16 +00008278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008279rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008280
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8282$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008283
Matthias Kloseb9621712010-04-24 17:59:49 +00008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8285$as_echo_n "checking for makedev... " >&6; }
8286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008287/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008288
Jesus Cea740f53a2010-04-28 11:35:30 +00008289#if defined(MAJOR_IN_MKDEV)
8290#include <sys/mkdev.h>
8291#elif defined(MAJOR_IN_SYSMACROS)
8292#include <sys/sysmacros.h>
8293#else
8294#include <sys/types.h>
8295#endif
8296
Neal Norwitz11690112002-07-30 01:08:28 +00008297int
8298main ()
8299{
Jesus Cea740f53a2010-04-28 11:35:30 +00008300
8301 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008302 ;
8303 return 0;
8304}
Matthias Kloseb159a552010-04-25 21:00:44 +00008305
Neal Norwitz11690112002-07-30 01:08:28 +00008306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008307if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008308 ac_cv_has_makedev=yes
8309else
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312rm -f core conftest.err conftest.$ac_objext \
8313 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8315$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008316if test "$ac_cv_has_makedev" = "yes"; then
8317
Matthias Kloseb9621712010-04-24 17:59:49 +00008318$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008319
8320fi
8321
Christian Heimes985ecdc2013-11-20 11:46:18 +01008322# byte swapping
8323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8324$as_echo_n "checking for le64toh... " >&6; }
8325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8326/* end confdefs.h. */
8327
8328#ifdef HAVE_ENDIAN_H
8329#include <endian.h>
8330#elif defined(HAVE_SYS_ENDIAN_H)
8331#include <sys/endian.h>
8332#endif
8333
8334int
8335main ()
8336{
8337
8338 le64toh(1)
8339 ;
8340 return 0;
8341}
8342
8343_ACEOF
8344if ac_fn_c_try_link "$LINENO"; then :
8345 ac_cv_has_le64toh=yes
8346else
8347 ac_cv_has_le64toh=no
8348fi
8349rm -f core conftest.err conftest.$ac_objext \
8350 conftest$ac_exeext conftest.$ac_ext
8351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8352$as_echo "$ac_cv_has_le64toh" >&6; }
8353if test "$ac_cv_has_le64toh" = "yes"; then
8354
8355$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8356
8357fi
8358
Martin v. Löwis399a6892002-10-04 10:22:02 +00008359use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008360# Don't use largefile support for GNU/Hurd
8361case $ac_sys_system in GNU*)
8362 use_lfs=no
8363esac
8364
Martin v. Löwis399a6892002-10-04 10:22:02 +00008365if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008366# Two defines needed to enable largefile support on various platforms
8367# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008368case $ac_sys_system/$ac_sys_release in
8369AIX*)
8370
8371$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8372
8373 ;;
8374esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
8378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008380
Martin v. Löwis399a6892002-10-04 10:22:02 +00008381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008382
Guido van Rossum84e7b241996-08-19 21:59:00 +00008383# Add some code to confdefs.h so that the test for off_t works on SCO
8384cat >> confdefs.h <<\EOF
8385#if defined(SCO_DS)
8386#undef _OFF_T
8387#endif
8388EOF
8389
Guido van Rossumef2255b2000-03-10 22:30:29 +00008390# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008391ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008392if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008394else
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396cat >>confdefs.h <<_ACEOF
8397#define mode_t int
8398_ACEOF
8399
8400fi
8401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008403if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008404
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008405else
Martin v. Löwis11437992002-04-12 09:54:03 +00008406
8407cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
8410
8411fi
8412
Matthias Kloseb9621712010-04-24 17:59:49 +00008413ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008414if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008415
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008416else
Martin v. Löwis11437992002-04-12 09:54:03 +00008417
8418cat >>confdefs.h <<_ACEOF
8419#define pid_t int
8420_ACEOF
8421
8422fi
8423
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008424
Martin v. Löwis11437992002-04-12 09:54:03 +00008425cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008426#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008427_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008428
Matthias Kloseb9621712010-04-24 17:59:49 +00008429ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008430if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432else
Martin v. Löwis11437992002-04-12 09:54:03 +00008433
8434cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008436_ACEOF
8437
8438fi
8439
Matthias Kloseb9621712010-04-24 17:59:49 +00008440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8441$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008442if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008443 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008444else
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008446/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008447#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008448
8449_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008450if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008452 ac_cv_type_uid_t=yes
8453else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008454 ac_cv_type_uid_t=no
8455fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008456rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008457
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008458fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8460$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008461if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008462
Matthias Kloseb9621712010-04-24 17:59:49 +00008463$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008464
8465
Matthias Kloseb9621712010-04-24 17:59:49 +00008466$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008467
8468fi
8469
Mark Dickinson983bc162012-12-02 12:11:38 +00008470
Matthias Kloseb9621712010-04-24 17:59:49 +00008471ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008473
Matthias Kloseb9621712010-04-24 17:59:49 +00008474$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008475
8476fi
8477
Stefan Krah1919b7e2012-03-21 18:25:23 +01008478ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8479if test "x$ac_cv_type___uint128_t" = xyes; then :
8480
8481$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8482
8483fi
8484
Jack Jansendd19cf82001-12-06 22:36:17 +00008485
Michael W. Hudson54241132001-12-07 15:38:26 +00008486# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008487# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488# The cast to long int works around a bug in the HP C Compiler
8489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8491# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8493$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008494if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008495 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008496else
Matthias Kloseb9621712010-04-24 17:59:49 +00008497 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499else
Matthias Kloseb9621712010-04-24 17:59:49 +00008500 if test "$ac_cv_type_int" = yes; then
8501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008503as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008504See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008505 else
8506 ac_cv_sizeof_int=0
8507 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008508fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008509
Martin v. Löwis11437992002-04-12 09:54:03 +00008510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8512$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513
8514
8515
Martin v. Löwis11437992002-04-12 09:54:03 +00008516cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008517#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008518_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008519
8520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521# The cast to long int works around a bug in the HP C Compiler
8522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8524# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8526$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008527if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008528 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008529else
Matthias Kloseb9621712010-04-24 17:59:49 +00008530 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 +00008531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532else
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 if test "$ac_cv_type_long" = yes; then
8534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008536as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008537See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008538 else
8539 ac_cv_sizeof_long=0
8540 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8545$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546
8547
8548
Martin v. Löwis11437992002-04-12 09:54:03 +00008549cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008550#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008551_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008552
8553
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554# The cast to long int works around a bug in the HP C Compiler
8555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8557# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8559$as_echo_n "checking size of long long... " >&6; }
8560if ${ac_cv_sizeof_long_long+:} false; then :
8561 $as_echo_n "(cached) " >&6
8562else
8563 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8564
8565else
8566 if test "$ac_cv_type_long_long" = yes; then
8567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8569as_fn_error 77 "cannot compute sizeof (long long)
8570See \`config.log' for more details" "$LINENO" 5; }
8571 else
8572 ac_cv_sizeof_long_long=0
8573 fi
8574fi
8575
8576fi
8577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8578$as_echo "$ac_cv_sizeof_long_long" >&6; }
8579
8580
8581
8582cat >>confdefs.h <<_ACEOF
8583#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8584_ACEOF
8585
8586
8587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8592$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_void_p" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008604 else
8605 ac_cv_sizeof_void_p=0
8606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Martin v. Löwis11437992002-04-12 09:54:03 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8611$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008612
8613
8614
Martin v. Löwis11437992002-04-12 09:54:03 +00008615cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008616#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008617_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008618
8619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620# The cast to long int works around a bug in the HP C Compiler
8621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8625$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008626if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008628else
Matthias Kloseb9621712010-04-24 17:59:49 +00008629 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008630
Martin v. Löwis11437992002-04-12 09:54:03 +00008631else
Matthias Kloseb9621712010-04-24 17:59:49 +00008632 if test "$ac_cv_type_short" = yes; then
8633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008635as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637 else
8638 ac_cv_sizeof_short=0
8639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008641
Martin v. Löwis11437992002-04-12 09:54:03 +00008642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8644$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645
8646
8647
Martin v. Löwis11437992002-04-12 09:54:03 +00008648cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008649#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008650_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008651
8652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653# The cast to long int works around a bug in the HP C Compiler
8654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8658$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008659if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008661else
Matthias Kloseb9621712010-04-24 17:59:49 +00008662 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008663
Martin v. Löwis11437992002-04-12 09:54:03 +00008664else
Matthias Kloseb9621712010-04-24 17:59:49 +00008665 if test "$ac_cv_type_float" = yes; then
8666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008668as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 else
8671 ac_cv_sizeof_float=0
8672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008674
Martin v. Löwis11437992002-04-12 09:54:03 +00008675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8677$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008678
8679
8680
Martin v. Löwis11437992002-04-12 09:54:03 +00008681cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008682#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008683_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008684
8685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686# The cast to long int works around a bug in the HP C Compiler
8687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8691$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008692if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008694else
Matthias Kloseb9621712010-04-24 17:59:49 +00008695 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008696
Martin v. Löwis11437992002-04-12 09:54:03 +00008697else
Matthias Kloseb9621712010-04-24 17:59:49 +00008698 if test "$ac_cv_type_double" = yes; then
8699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008701as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703 else
8704 ac_cv_sizeof_double=0
8705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8710$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008711
8712
8713
Martin v. Löwis11437992002-04-12 09:54:03 +00008714cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008715#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008716_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008717
8718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008719# The cast to long int works around a bug in the HP C Compiler
8720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8724$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008725if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008727else
Matthias Kloseb9621712010-04-24 17:59:49 +00008728 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 +00008729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730else
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 if test "$ac_cv_type_fpos_t" = yes; then
8732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008734as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008736 else
8737 ac_cv_sizeof_fpos_t=0
8738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740
Martin v. Löwis11437992002-04-12 09:54:03 +00008741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8743$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008744
8745
8746
Martin v. Löwis11437992002-04-12 09:54:03 +00008747cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008748#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008749_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008750
Michael W. Hudson54241132001-12-07 15:38:26 +00008751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008752# The cast to long int works around a bug in the HP C Compiler
8753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8757$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 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 +00008762
Martin v. Löwis18e16552006-02-15 17:27:45 +00008763else
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 if test "$ac_cv_type_size_t" = yes; then
8765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008767as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008768See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008769 else
8770 ac_cv_sizeof_size_t=0
8771 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008773
Martin v. Löwis18e16552006-02-15 17:27:45 +00008774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8776$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777
8778
8779
Martin v. Löwis18e16552006-02-15 17:27:45 +00008780cat >>confdefs.h <<_ACEOF
8781#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8782_ACEOF
8783
8784
Christian Heimes400adb02008-02-01 08:12:03 +00008785# The cast to long int works around a bug in the HP C Compiler
8786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8790$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008791if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008793else
Matthias Kloseb9621712010-04-24 17:59:49 +00008794 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 +00008795
Christian Heimes400adb02008-02-01 08:12:03 +00008796else
Matthias Kloseb9621712010-04-24 17:59:49 +00008797 if test "$ac_cv_type_pid_t" = yes; then
8798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008800as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008801See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008802 else
8803 ac_cv_sizeof_pid_t=0
8804 fi
8805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008806
Christian Heimes400adb02008-02-01 08:12:03 +00008807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8809$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008810
8811
8812
8813cat >>confdefs.h <<_ACEOF
8814#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8815_ACEOF
8816
8817
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008818# The cast to long int works around a bug in the HP C Compiler
8819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8821# This bug is HP SR number 8606223364.
8822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8823$as_echo_n "checking size of uintptr_t... " >&6; }
8824if ${ac_cv_sizeof_uintptr_t+:} false; then :
8825 $as_echo_n "(cached) " >&6
8826else
8827 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8828
8829else
8830 if test "$ac_cv_type_uintptr_t" = yes; then
8831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8833as_fn_error 77 "cannot compute sizeof (uintptr_t)
8834See \`config.log' for more details" "$LINENO" 5; }
8835 else
8836 ac_cv_sizeof_uintptr_t=0
8837 fi
8838fi
8839
8840fi
8841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8842$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8843
8844
8845
8846cat >>confdefs.h <<_ACEOF
8847#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8848_ACEOF
8849
8850
Michael W. Hudson54241132001-12-07 15:38:26 +00008851
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008852
Eitan Adler3055c942018-05-15 22:58:09 -07008853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8854$as_echo_n "checking for long double... " >&6; }
8855if ${ac_cv_type_long_double+:} false; then :
8856 $as_echo_n "(cached) " >&6
8857else
8858 if test "$GCC" = yes; then
8859 ac_cv_type_long_double=yes
8860 else
8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862/* end confdefs.h. */
8863/* The Stardent Vistra knows sizeof (long double), but does
8864 not support it. */
8865 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008866int
8867main ()
8868{
Eitan Adler3055c942018-05-15 22:58:09 -07008869static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8870 sizeof (double) <= sizeof (long double))];
8871test_array [0] = 0;
8872return test_array [0];
8873
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008874 ;
8875 return 0;
8876}
8877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008878if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008879 ac_cv_type_long_double=yes
8880else
8881 ac_cv_type_long_double=no
8882fi
8883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8884 fi
8885fi
8886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8887$as_echo "$ac_cv_type_long_double" >&6; }
8888 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008889
Matthias Kloseb9621712010-04-24 17:59:49 +00008890$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008891
Eitan Adler3055c942018-05-15 22:58:09 -07008892 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008893
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008894# The cast to long int works around a bug in the HP C Compiler
8895# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8896# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8897# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8899$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008900if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008901 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008902else
Matthias Kloseb9621712010-04-24 17:59:49 +00008903 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 +00008904
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008905else
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 if test "$ac_cv_type_long_double" = yes; then
8907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008909as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008910See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008911 else
8912 ac_cv_sizeof_long_double=0
8913 fi
8914fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008915
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8918$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008919
8920
8921
8922cat >>confdefs.h <<_ACEOF
8923#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8924_ACEOF
8925
8926
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928# The cast to long int works around a bug in the HP C Compiler
8929# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8930# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8931# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8933$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008934if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008935 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008936else
Matthias Kloseb9621712010-04-24 17:59:49 +00008937 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 +00008938
Thomas Woutersb2137042007-02-01 18:02:27 +00008939else
Matthias Kloseb9621712010-04-24 17:59:49 +00008940 if test "$ac_cv_type__Bool" = yes; then
8941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008943as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008944See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945 else
8946 ac_cv_sizeof__Bool=0
8947 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008948fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008949
Thomas Woutersb2137042007-02-01 18:02:27 +00008950fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8952$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953
8954
8955
Thomas Woutersb2137042007-02-01 18:02:27 +00008956cat >>confdefs.h <<_ACEOF
8957#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8958_ACEOF
8959
8960
Thomas Woutersb2137042007-02-01 18:02:27 +00008961
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008962# The cast to long int works around a bug in the HP C Compiler
8963# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8964# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8965# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8967$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008968if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008970else
Matthias Kloseb9621712010-04-24 17:59:49 +00008971 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008972#ifdef HAVE_SYS_TYPES_H
8973#include <sys/types.h>
8974#endif
8975
Matthias Kloseb9621712010-04-24 17:59:49 +00008976"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008977
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008978else
Matthias Kloseb9621712010-04-24 17:59:49 +00008979 if test "$ac_cv_type_off_t" = yes; then
8980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008982as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008983See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008984 else
8985 ac_cv_sizeof_off_t=0
8986 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008988
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8991$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008993
8994
Martin v. Löwis11437992002-04-12 09:54:03 +00008995cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008996#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008997_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008998
Michael W. Hudson54241132001-12-07 15:38:26 +00008999
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009000
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
9002$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00009003if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009004 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009005
Matthias Kloseb9621712010-04-24 17:59:49 +00009006$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009007
Matthias Kloseb9621712010-04-24 17:59:49 +00009008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9009$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009010else
Matthias Kloseb9621712010-04-24 17:59:49 +00009011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009013fi
9014
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015# The cast to long int works around a bug in the HP C Compiler
9016# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9017# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9018# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9020$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009021if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009022 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009025#ifdef HAVE_SYS_TYPES_H
9026#include <sys/types.h>
9027#endif
9028#ifdef HAVE_TIME_H
9029#include <time.h>
9030#endif
9031
Matthias Kloseb9621712010-04-24 17:59:49 +00009032"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009033
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009034else
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 if test "$ac_cv_type_time_t" = yes; then
9036 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9037$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009038as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009039See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009040 else
9041 ac_cv_sizeof_time_t=0
9042 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009044
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009045fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9047$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009048
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009049
9050
Martin v. Löwis11437992002-04-12 09:54:03 +00009051cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009052#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009053_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009054
Michael W. Hudson54241132001-12-07 15:38:26 +00009055
9056
Trent Mick635f6fb2000-08-23 21:33:05 +00009057# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009058ac_save_cc="$CC"
9059if test "$ac_cv_kpthread" = "yes"
9060then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009061elif test "$ac_cv_kthread" = "yes"
9062then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009063elif test "$ac_cv_pthread" = "yes"
9064then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009065fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009066
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9068$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009069have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009071/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009072
9073 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009074int
9075main ()
9076{
Guido van Rossum12580492000-09-24 16:47:19 +00009077pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 ;
9079 return 0;
9080}
Matthias Kloseb159a552010-04-25 21:00:44 +00009081
Martin v. Löwis11437992002-04-12 09:54:03 +00009082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009083if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009084 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9088$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009089if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009090 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009091# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9092# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9093# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9095$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009096if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009097 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009098else
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009100#ifdef HAVE_PTHREAD_H
9101#include <pthread.h>
9102#endif
9103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009105
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009106else
Matthias Kloseb9621712010-04-24 17:59:49 +00009107 if test "$ac_cv_type_pthread_t" = yes; then
9108 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9109$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009110as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009111See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009112 else
9113 ac_cv_sizeof_pthread_t=0
9114 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009116
Trent Mick635f6fb2000-08-23 21:33:05 +00009117fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9119$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009120
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009121
9122
Martin v. Löwis11437992002-04-12 09:54:03 +00009123cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009124#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009125_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009126
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009127
Trent Mick635f6fb2000-08-23 21:33:05 +00009128fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009129
9130# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9131# This checking will be unnecessary after removing deprecated TLS API.
9132# The cast to long int works around a bug in the HP C Compiler
9133# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9134# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9135# This bug is HP SR number 8606223364.
9136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9137$as_echo_n "checking size of pthread_key_t... " >&6; }
9138if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9139 $as_echo_n "(cached) " >&6
9140else
9141 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9142"; then :
9143
9144else
9145 if test "$ac_cv_type_pthread_key_t" = yes; then
9146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9148as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9149See \`config.log' for more details" "$LINENO" 5; }
9150 else
9151 ac_cv_sizeof_pthread_key_t=0
9152 fi
9153fi
9154
9155fi
9156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9157$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9158
9159
9160
9161cat >>confdefs.h <<_ACEOF
9162#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9163_ACEOF
9164
9165
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9167$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9168if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9170/* end confdefs.h. */
9171#include <pthread.h>
9172int
9173main ()
9174{
9175pthread_key_t k; k * 1;
9176 ;
9177 return 0;
9178}
9179_ACEOF
9180if ac_fn_c_try_compile "$LINENO"; then :
9181 ac_pthread_key_t_is_arithmetic_type=yes
9182else
9183 ac_pthread_key_t_is_arithmetic_type=no
9184
9185fi
9186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9188$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9189 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9190
9191$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9192
9193 fi
9194else
9195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9196$as_echo "no" >&6; }
9197fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009198CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009199
Michael W. Hudson54241132001-12-07 15:38:26 +00009200
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009201case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009202 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009203 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9204 ;;
9205 Darwin/*)
9206 OTHER_LIBTOOL_OPT=""
9207 ;;
9208esac
9209
9210
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009211
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009212case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009213 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009214 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9215 if test "${enable_universalsdk}"; then
9216 :
9217 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009218 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009219 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009220 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009222 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009223 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009224 if test ${gcc_version} '<' 4.0
9225 then
9226 LIBTOOL_CRUFT="-lcc_dynamic"
9227 else
9228 LIBTOOL_CRUFT=""
9229 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009230 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009231 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009232else
Matthias Kloseb9621712010-04-24 17:59:49 +00009233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009234/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009235
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236 #include <unistd.h>
9237 int main(int argc, char*argv[])
9238 {
9239 if (sizeof(long) == 4) {
9240 return 0;
9241 } else {
9242 return 1;
9243 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009244 }
9245
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009247if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009248 ac_osx_32bit=yes
9249else
Matthias Kloseb9621712010-04-24 17:59:49 +00009250 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009254fi
9255
9256
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009257 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009258 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009259 i386)
9260 MACOSX_DEFAULT_ARCH="i386"
9261 ;;
9262 ppc)
9263 MACOSX_DEFAULT_ARCH="ppc"
9264 ;;
9265 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009266 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009267 ;;
9268 esac
9269 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009270 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009271 i386)
9272 MACOSX_DEFAULT_ARCH="x86_64"
9273 ;;
9274 ppc)
9275 MACOSX_DEFAULT_ARCH="ppc64"
9276 ;;
9277 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009278 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009279 ;;
9280 esac
9281
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009282 fi
9283
9284 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009287esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9289$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009290if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009291then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009292 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009294 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009297
Matthias Kloseb9621712010-04-24 17:59:49 +00009298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9299$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009300 if test $enable_shared = "yes"
9301 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009302 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 +00009303 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009304else
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009307fi
9308
Matthias Kloseb9621712010-04-24 17:59:49 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9310$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009311case $ac_sys_system/$ac_sys_release in
9312 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009313
Matthias Kloseb9621712010-04-24 17:59:49 +00009314$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009315
Matthias Kloseb9621712010-04-24 17:59:49 +00009316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9317$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009318 ;;
9319 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009322 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009323esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009324
Guido van Rossum0a516c91994-09-12 10:58:40 +00009325# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009326
Michael W. Hudson54241132001-12-07 15:38:26 +00009327
9328
9329
9330
Benjamin Peterson99f03762010-04-11 22:15:28 +00009331
Thomas Wouters477c8d52006-05-27 19:21:47 +00009332
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009333# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9334# -- usually .so, .sl on HP-UX, .dll on Cygwin
9335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9336$as_echo_n "checking the extension of shared libraries... " >&6; }
9337if test -z "$SHLIB_SUFFIX"; then
9338 case $ac_sys_system in
9339 hp*|HP*)
9340 case `uname -m` in
9341 ia64) SHLIB_SUFFIX=.so;;
9342 *) SHLIB_SUFFIX=.sl;;
9343 esac
9344 ;;
9345 CYGWIN*) SHLIB_SUFFIX=.dll;;
9346 *) SHLIB_SUFFIX=.so;;
9347 esac
9348fi
9349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9350$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009351
Guido van Rossum0a516c91994-09-12 10:58:40 +00009352# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009353# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009354# (Shared libraries in this instance are shared modules to be loaded into
9355# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9357$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009358if test -z "$LDSHARED"
9359then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009360 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009361 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009362 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009363 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009364 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009366 if test "$GCC" = "yes" ; then
9367 LDSHARED='$(CC) -shared'
9368 LDCXXSHARED='$(CXX) -shared'
9369 else
9370 LDSHARED='$(CC) -G'
9371 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009372 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009373 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009374 if test "$GCC" = "yes" ; then
9375 LDSHARED='$(CC) -shared'
9376 LDCXXSHARED='$(CXX) -shared'
9377 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009378 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009379 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009380 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009381 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009382 LDSHARED='$(CC) -bundle'
9383 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009384 if test "$enable_framework" ; then
9385 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009386 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9387 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009388 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009389 else
9390 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009391 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009392 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009393 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009394 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009395 LDSHARED='$(CC) -bundle'
9396 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009397 if test "$enable_framework" ; then
9398 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009399 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9400 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009401 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009402 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009403 # No framework, use the Python app as bundle-loader
9404 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009405 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009406 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009407 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009408 Darwin/*)
9409 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9410 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009411
Ned Deily36820b62014-06-25 13:44:22 -07009412 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9413 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9414 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9415 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9416 if test ${dep_target_major} -eq 10 && \
9417 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009418 then
Ned Deily36820b62014-06-25 13:44:22 -07009419 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009420 LDSHARED='$(CC) -bundle'
9421 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009422 if test "$enable_framework" ; then
9423 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009424 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9425 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009426 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009427 else
9428 # No framework, use the Python app as bundle-loader
9429 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9430 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009431 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009432 fi
Ned Deily36820b62014-06-25 13:44:22 -07009433 else
9434 # building for OS X 10.3 and later
9435 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9436 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9437 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009438 fi
9439 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009440 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009441 LDSHARED='$(CC) -shared'
9442 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009443 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009444 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009445 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009446 LDSHARED='$(CC) -shared'
9447 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009448 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009449 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009450 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009451 OpenBSD*)
9452 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9453 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009454 LDSHARED='$(CC) -shared $(CCSHARED)'
9455 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009456 else
9457 case `uname -r` in
9458 [01].* | 2.[0-7] | 2.[0-7].*)
9459 LDSHARED="ld -Bshareable ${LDFLAGS}"
9460 ;;
9461 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009462 LDSHARED='$(CC) -shared $(CCSHARED)'
9463 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009464 ;;
9465 esac
9466 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009467 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009468 LDSHARED='$(CC) -shared'
9469 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009470 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009471 if test "$GCC" = "yes" ; then
9472 LDSHARED='$(CC) -shared'
9473 LDCXXSHARED='$(CXX) -shared'
9474 else
9475 LDSHARED='$(CC) -G'
9476 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009477 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009478 SCO_SV*)
9479 LDSHARED='$(CC) -Wl,-G,-Bexport'
9480 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9481 CYGWIN*)
9482 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9483 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009484 *) LDSHARED="ld";;
9485 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9488$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009489LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009490BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009491# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009492# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9494$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009495if test -z "$CCSHARED"
9496then
Guido van Rossum07397971997-04-29 21:49:50 +00009497 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009498 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009499 then CCSHARED="-fPIC";
9500 elif test `uname -p` = sparc;
9501 then CCSHARED="-xcode=pic32";
9502 else CCSHARED="-Kpic";
9503 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009504 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009505 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009506 else CCSHARED="+z";
9507 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009508 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009509 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009510 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009511 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009512 if test "$GCC" = "yes"
9513 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009514 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009515 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009516 SCO_SV*)
9517 if test "$GCC" = "yes"
9518 then CCSHARED="-fPIC"
9519 else CCSHARED="-Kpic -belf"
9520 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009521 VxWorks*)
9522 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009523 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9526$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009527# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009528# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9530$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009531if test -z "$LINKFORSHARED"
9532then
Guido van Rossum07397971997-04-29 21:49:50 +00009533 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009534 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009535 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009536 LINKFORSHARED="-Wl,-E -Wl,+s";;
9537# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009538 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009539 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009540 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009542 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009543
9544 # Issue #18075: the default maximum stack size (8MBytes) is too
9545 # small for the default recursion limit. Increase the stack size
9546 # to ensure that tests don't crash
9547 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9548
Jack Jansene578a632001-08-15 01:27:14 +00009549 if test "$enable_framework"
9550 then
Jack Jansenda49e192005-01-07 13:08:22 +00009551 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009552 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009553 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009554 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009555 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009556 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009557 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009558 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9559 then
9560 LINKFORSHARED="-Wl,--export-dynamic"
9561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009562 SunOS/5*) case $CC in
9563 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009564 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009565 then
9566 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009567 fi;;
9568 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009569 CYGWIN*)
9570 if test $enable_shared = "no"
9571 then
9572 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9573 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009574 QNX*)
9575 # -Wl,-E causes the symbols to be added to the dynamic
9576 # symbol table so that they can be found when a module
9577 # is loaded. -N 2048K causes the stack size to be set
9578 # to 2048 kilobytes so that the stack doesn't overflow
9579 # when running test_compile.py.
9580 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009581 VxWorks*)
9582 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009583 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9586$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009587
Michael W. Hudson54241132001-12-07 15:38:26 +00009588
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009589
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9591$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009592if test ! "$LIBRARY" = "$LDLIBRARY"
9593then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009594 case $ac_sys_system in
9595 CYGWIN*)
9596 # Cygwin needs CCSHARED when building extension DLLs
9597 # but not when building the interpreter DLL.
9598 CFLAGSFORSHARED='';;
9599 *)
9600 CFLAGSFORSHARED='$(CCSHARED)'
9601 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9604$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009605
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009606# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9607# library (with --enable-shared).
9608# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009609# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9610# if it is not required, since it creates a dependency of the shared library
9611# to LIBS. This, in turn, means that applications linking the shared libpython
9612# don't need to link LIBS explicitly. The default should be only changed
9613# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009614
Matthias Kloseb9621712010-04-24 17:59:49 +00009615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9616$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009617case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009618 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009619 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009620esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9622$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009623
9624
Guido van Rossum627b2d71993-12-24 10:39:16 +00009625# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9627$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009628if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009629 $as_echo_n "(cached) " >&6
9630else
9631 ac_check_lib_save_LIBS=$LIBS
9632LIBS="-lsendfile $LIBS"
9633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635
9636/* Override any GCC internal prototype to avoid an error.
9637 Use char because int might match the return type of a GCC
9638 builtin and then its argument prototype would still apply. */
9639#ifdef __cplusplus
9640extern "C"
9641#endif
9642char sendfile ();
9643int
9644main ()
9645{
9646return sendfile ();
9647 ;
9648 return 0;
9649}
9650_ACEOF
9651if ac_fn_c_try_link "$LINENO"; then :
9652 ac_cv_lib_sendfile_sendfile=yes
9653else
9654 ac_cv_lib_sendfile_sendfile=no
9655fi
9656rm -f core conftest.err conftest.$ac_objext \
9657 conftest$ac_exeext conftest.$ac_ext
9658LIBS=$ac_check_lib_save_LIBS
9659fi
9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9661$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009662if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009663 cat >>confdefs.h <<_ACEOF
9664#define HAVE_LIBSENDFILE 1
9665_ACEOF
9666
9667 LIBS="-lsendfile $LIBS"
9668
9669fi
9670
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9672$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009674 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009675else
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009677LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009681/* Override any GCC internal prototype to avoid an error.
9682 Use char because int might match the return type of a GCC
9683 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009684#ifdef __cplusplus
9685extern "C"
9686#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009687char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009688int
9689main ()
9690{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ;
9693 return 0;
9694}
9695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009696if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009698else
Matthias Kloseb9621712010-04-24 17:59:49 +00009699 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009701rm -f core conftest.err conftest.$ac_objext \
9702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009703LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9706$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009707if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 cat >>confdefs.h <<_ACEOF
9709#define HAVE_LIBDL 1
9710_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009711
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009712 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009713
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009714fi
9715 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9717$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009718if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009722LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009729#ifdef __cplusplus
9730extern "C"
9731#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009732char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009733int
9734main ()
9735{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009736return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009737 ;
9738 return 0;
9739}
9740_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009741if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009745fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009746rm -f core conftest.err conftest.$ac_objext \
9747 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009748LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9751$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009752if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 cat >>confdefs.h <<_ACEOF
9754#define HAVE_LIBDLD 1
9755_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009757 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009758
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759fi
9760 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009761
Michael Felt0d3ccb42017-12-30 22:39:20 +01009762# checks for uuid.h location
9763for ac_header in uuid/uuid.h uuid.h
9764do :
9765 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9766ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9767if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9768 cat >>confdefs.h <<_ACEOF
9769#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9770_ACEOF
9771
9772fi
9773
9774done
9775
9776
Berker Peksag9a10ff42017-11-08 23:09:16 +03009777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9778$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9780/* end confdefs.h. */
9781#include <uuid/uuid.h>
9782int
9783main ()
9784{
9785
9786#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009787void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009788#endif
9789
9790 ;
9791 return 0;
9792}
9793_ACEOF
9794if ac_fn_c_try_compile "$LINENO"; then :
9795
9796$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9797
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9799$as_echo "yes" >&6; }
9800else
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9802$as_echo "no" >&6; }
9803
9804fi
9805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9806
Michael Felt0d3ccb42017-12-30 22:39:20 +01009807# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009808# FreeBSD and OpenBSD provides support as well
9809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9810$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9812/* end confdefs.h. */
9813#include <uuid.h>
9814int
9815main ()
9816{
9817
9818#ifndef uuid_create
9819void *x = uuid_create
9820#endif
9821
9822 ;
9823 return 0;
9824}
9825_ACEOF
9826if ac_fn_c_try_compile "$LINENO"; then :
9827
9828$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9829
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9831$as_echo "yes" >&6; }
9832else
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9834$as_echo "no" >&6; }
9835
9836fi
9837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9838
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009839# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9840# stream in big-endian byte-order
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9842$as_echo_n "checking for uuid_enc_be... " >&6; }
9843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9844/* end confdefs.h. */
9845#include <uuid.h>
9846int
9847main ()
9848{
9849
9850#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009851void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009852#endif
9853
9854 ;
9855 return 0;
9856}
9857_ACEOF
9858if ac_fn_c_try_compile "$LINENO"; then :
9859
9860$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9861
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863$as_echo "yes" >&6; }
9864else
9865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867
9868fi
9869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9870
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009871# 'Real Time' functions on Solaris
9872# posix4 on Solaris 2.6
9873# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009875$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009876if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009877 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009878else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009879 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883/* Override any GCC internal prototype to avoid an error.
9884 Use char because int might match the return type of a GCC
9885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009886#ifdef __cplusplus
9887extern "C"
9888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009889char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009890int
9891main ()
9892{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ;
9895 return 0;
9896}
9897_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898for ac_lib in '' pthread rt posix4; do
9899 if test -z "$ac_lib"; then
9900 ac_res="none required"
9901 else
9902 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009904 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009907fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009908rm -f core conftest.err conftest.$ac_objext \
9909 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009910 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913done
Victor Stinnere0be4232011-10-25 13:06:09 +02009914if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009915
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009916else
9917 ac_cv_search_sem_init=no
9918fi
9919rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009920LIBS=$ac_func_search_save_LIBS
9921fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9923$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009925if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009927
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009928fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009929
Martin v. Löwis519adae2003-09-20 10:47:47 +00009930
Martin v. Löwis19d17342003-06-14 21:03:05 +00009931# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9933$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009934if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009935 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009936else
9937 ac_check_lib_save_LIBS=$LIBS
9938LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009940/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942/* Override any GCC internal prototype to avoid an error.
9943 Use char because int might match the return type of a GCC
9944 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945#ifdef __cplusplus
9946extern "C"
9947#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009948char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949int
9950main ()
9951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009953 ;
9954 return 0;
9955}
9956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009957if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009958 ac_cv_lib_intl_textdomain=yes
9959else
Matthias Kloseb9621712010-04-24 17:59:49 +00009960 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962rm -f core conftest.err conftest.$ac_objext \
9963 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009964LIBS=$ac_check_lib_save_LIBS
9965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9967$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009968if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009969
Matthias Kloseb9621712010-04-24 17:59:49 +00009970$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009971
Brett Cannonc6d936e2009-06-07 20:09:53 +00009972 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009973fi
9974
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009975
9976# checks for system dependent C++ extensions support
9977case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009978 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9979$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009982
Georg Brandl59e87bd2011-02-15 19:48:59 +00009983 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009984int
9985main ()
9986{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009987loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 ;
9989 return 0;
9990}
Matthias Kloseb159a552010-04-25 21:00:44 +00009991
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009993if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009994
Matthias Kloseb159a552010-04-25 21:00:44 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
Matthias Kloseb159a552010-04-25 21:00:44 +00009998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009999$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010000
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010001else
Matthias Kloseb159a552010-04-25 21:00:44 +000010002
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010004$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010005
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010007rm -f core conftest.err conftest.$ac_objext \
10008 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010009 *) ;;
10010esac
10011
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012# check for systems that require aligned memory access
10013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
10014$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010015if ${ac_cv_aligned_required+:} false; then :
10016 $as_echo_n "(cached) " >&6
10017else
10018 if test "$cross_compiling" = yes; then :
10019 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010020else
10021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10022/* end confdefs.h. */
10023
10024int main()
10025{
10026 char s[16];
10027 int i, *p1, *p2;
10028 for (i=0; i < 16; i++)
10029 s[i] = i;
10030 p1 = (int*)(s+1);
10031 p2 = (int*)(s+2);
10032 if (*p1 == *p2)
10033 return 1;
10034 return 0;
10035}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010036_ACEOF
10037if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010038 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010039else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010040 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010041fi
10042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10043 conftest.$ac_objext conftest.beam conftest.$ac_ext
10044fi
10045
10046
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010047fi
10048
10049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10050$as_echo "$ac_cv_aligned_required" >&6; }
10051if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010052
10053$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10054
10055fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010056
10057# str, bytes and memoryview hash algorithm
10058
10059
10060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10061$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10062
10063# Check whether --with-hash_algorithm was given.
10064if test "${with_hash_algorithm+set}" = set; then :
10065 withval=$with_hash_algorithm;
10066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10067$as_echo "$withval" >&6; }
10068case "$withval" in
10069 siphash24)
10070 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10071
10072 ;;
10073 fnv)
10074 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10075
10076 ;;
10077 *)
10078 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10079 ;;
10080esac
10081
10082else
10083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10084$as_echo "default" >&6; }
10085fi
10086
10087
Charles-François Natalid30b0222014-05-08 23:08:51 +010010088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10089$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10090
10091# Check whether --with-address_sanitizer was given.
10092if test "${with_address_sanitizer+set}" = set; then :
10093 withval=$with_address_sanitizer;
10094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10095$as_echo "$withval" >&6; }
10096BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10097LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010098# ASan works by controlling memory allocation, our own malloc interferes.
10099with_pymalloc="no"
10100
10101else
10102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10103$as_echo "no" >&6; }
10104fi
10105
10106
10107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10108$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10109
10110# Check whether --with-memory_sanitizer was given.
10111if test "${with_memory_sanitizer+set}" = set; then :
10112 withval=$with_memory_sanitizer;
10113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10114$as_echo "$withval" >&6; }
10115BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10116LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10117# MSan works by controlling memory allocation, our own malloc interferes.
10118with_pymalloc="no"
10119
10120else
10121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10122$as_echo "no" >&6; }
10123fi
10124
10125
10126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10127$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10128
10129# Check whether --with-undefined_behavior_sanitizer was given.
10130if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10131 withval=$with_undefined_behavior_sanitizer;
10132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10133$as_echo "$withval" >&6; }
10134BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10135LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010136
10137else
10138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
Guido van Rossum70c7f481998-03-26 18:44:10 +000010143# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10145$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010146if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010147 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010148else
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010150LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154/* Override any GCC internal prototype to avoid an error.
10155 Use char because int might match the return type of a GCC
10156 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157#ifdef __cplusplus
10158extern "C"
10159#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010160char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010161int
10162main ()
10163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ;
10166 return 0;
10167}
10168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010170 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010171else
Matthias Kloseb9621712010-04-24 17:59:49 +000010172 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010174rm -f core conftest.err conftest.$ac_objext \
10175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010176LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10179$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010180if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010181 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010182fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010183 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10185$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010186if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010188else
Martin v. Löwis11437992002-04-12 09:54:03 +000010189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010190LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010193
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194/* Override any GCC internal prototype to avoid an error.
10195 Use char because int might match the return type of a GCC
10196 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010197#ifdef __cplusplus
10198extern "C"
10199#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010200char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010201int
10202main ()
10203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ;
10206 return 0;
10207}
10208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010209if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010214rm -f core conftest.err conftest.$ac_objext \
10215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010216LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010217fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10219$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010220if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010221 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010222fi
10223 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10226$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010229if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10232$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010233LIBS="$withval $LIBS"
10234
10235else
Matthias Kloseb9621712010-04-24 17:59:49 +000010236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010238fi
10239
Guido van Rossum7f43da71994-08-01 12:15:30 +000010240
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010241
10242
10243
10244
10245
10246
Victor Stinner23a683a2019-04-12 21:27:37 +020010247
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010248if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10249 if test -n "$ac_tool_prefix"; then
10250 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10251set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10253$as_echo_n "checking for $ac_word... " >&6; }
10254if ${ac_cv_path_PKG_CONFIG+:} false; then :
10255 $as_echo_n "(cached) " >&6
10256else
10257 case $PKG_CONFIG in
10258 [\\/]* | ?:[\\/]*)
10259 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10260 ;;
10261 *)
10262 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10263for as_dir in $PATH
10264do
10265 IFS=$as_save_IFS
10266 test -z "$as_dir" && as_dir=.
10267 for ac_exec_ext in '' $ac_executable_extensions; do
10268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10269 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10271 break 2
10272 fi
10273done
10274 done
10275IFS=$as_save_IFS
10276
10277 ;;
10278esac
10279fi
10280PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10281if test -n "$PKG_CONFIG"; then
10282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10283$as_echo "$PKG_CONFIG" >&6; }
10284else
10285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10286$as_echo "no" >&6; }
10287fi
10288
10289
10290fi
10291if test -z "$ac_cv_path_PKG_CONFIG"; then
10292 ac_pt_PKG_CONFIG=$PKG_CONFIG
10293 # Extract the first word of "pkg-config", so it can be a program name with args.
10294set dummy pkg-config; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10298 $as_echo_n "(cached) " >&6
10299else
10300 case $ac_pt_PKG_CONFIG in
10301 [\\/]* | ?:[\\/]*)
10302 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10303 ;;
10304 *)
10305 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308 IFS=$as_save_IFS
10309 test -z "$as_dir" && as_dir=.
10310 for ac_exec_ext in '' $ac_executable_extensions; do
10311 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10312 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10313 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314 break 2
10315 fi
10316done
10317 done
10318IFS=$as_save_IFS
10319
10320 ;;
10321esac
10322fi
10323ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10324if test -n "$ac_pt_PKG_CONFIG"; then
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10326$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10327else
10328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332 if test "x$ac_pt_PKG_CONFIG" = x; then
10333 PKG_CONFIG=""
10334 else
10335 case $cross_compiling:$ac_tool_warned in
10336yes:)
10337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10339ac_tool_warned=yes ;;
10340esac
10341 PKG_CONFIG=$ac_pt_PKG_CONFIG
10342 fi
10343else
10344 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10345fi
10346
10347fi
10348if test -n "$PKG_CONFIG"; then
10349 _pkg_min_version=0.9.0
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10351$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10352 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10354$as_echo "yes" >&6; }
10355 else
10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10357$as_echo "no" >&6; }
10358 PKG_CONFIG=""
10359 fi
10360fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010361
10362# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10364$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010365
10366# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010367if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010368 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010369else
10370 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010371fi
10372
10373
Matthias Kloseb9621712010-04-24 17:59:49 +000010374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10375$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010376
10377# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10379$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010380
10381# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010382if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010383 withval=$with_system_ffi;
10384fi
10385
10386
Zachary Waref40d4dd2016-09-17 01:25:24 -050010387if test "$ac_sys_system" = "Darwin"
10388then
10389 case "$with_system_ffi" in
10390 "")
10391 with_system_ffi="no"
10392 ;;
10393 yes|no)
10394 ;;
10395 *)
10396 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10397 ;;
10398 esac
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10400$as_echo "$with_system_ffi" >&6; }
10401else
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10403$as_echo "yes" >&6; }
10404 if test "$with_system_ffi" != ""
10405 then
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10407$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10408 fi
10409 with_system_ffi="yes"
10410fi
Zachary Ware935043d2016-09-09 17:01:21 -070010411
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010412if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010413 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10414else
10415 LIBFFI_INCLUDEDIR=""
10416fi
10417
10418
Stefan Krah60187b52012-03-23 19:06:27 +010010419# Check for use of the system libmpdec library
10420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10421$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10422
10423# Check whether --with-system_libmpdec was given.
10424if test "${with_system_libmpdec+set}" = set; then :
10425 withval=$with_system_libmpdec;
10426else
10427 with_system_libmpdec="no"
10428fi
10429
10430
10431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10432$as_echo "$with_system_libmpdec" >&6; }
10433
Benjamin Peterson076ed002010-10-31 17:11:02 +000010434# Check for support for loadable sqlite extensions
10435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10436$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10437# Check whether --enable-loadable-sqlite-extensions was given.
10438if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10439 enableval=$enable_loadable_sqlite_extensions;
10440else
10441 enable_loadable_sqlite_extensions="no"
10442fi
10443
10444
10445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10446$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10447
Ned Deilyd819b932013-09-06 01:07:05 -070010448# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10449
10450
10451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10452$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10453
10454# Check whether --with-tcltk-includes was given.
10455if test "${with_tcltk_includes+set}" = set; then :
10456 withval=$with_tcltk_includes;
10457else
10458 with_tcltk_includes="default"
10459fi
10460
10461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10462$as_echo "$with_tcltk_includes" >&6; }
10463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10464$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10465
10466# Check whether --with-tcltk-libs was given.
10467if test "${with_tcltk_libs+set}" = set; then :
10468 withval=$with_tcltk_libs;
10469else
10470 with_tcltk_libs="default"
10471fi
10472
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10474$as_echo "$with_tcltk_libs" >&6; }
10475if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10476then
10477 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10478 then
10479 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10480 fi
10481 TCLTK_INCLUDES=""
10482 TCLTK_LIBS=""
10483else
10484 TCLTK_INCLUDES="$with_tcltk_includes"
10485 TCLTK_LIBS="$with_tcltk_libs"
10486fi
10487
Matthias Klose55708cc2009-04-30 08:06:49 +000010488# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10490$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010491
10492# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010494 withval=$with_dbmliborder;
10495if test x$with_dbmliborder = xyes
10496then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010497as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010498else
10499 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10500 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10501 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010502 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010503 fi
10504 done
10505fi
10506fi
10507
Matthias Kloseb9621712010-04-24 17:59:49 +000010508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10509$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010510
Martin v. Löwis11437992002-04-12 09:54:03 +000010511# Templates for things AC_DEFINEd more than once.
10512# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010513
10514
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010515if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010516then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010517 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010518 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010519
10520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010521elif test "$ac_cv_kpthread" = "yes"
10522then
10523 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010524 if test "$ac_cv_cxx_thread" = "yes"; then
10525 CXX="$CXX -Kpthread"
10526 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010527 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010528elif test "$ac_cv_kthread" = "yes"
10529then
10530 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010531 if test "$ac_cv_cxx_thread" = "yes"; then
10532 CXX="$CXX -Kthread"
10533 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010534 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535elif test "$ac_cv_pthread" = "yes"
10536then
10537 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010538 if test "$ac_cv_cxx_thread" = "yes"; then
10539 CXX="$CXX -pthread"
10540 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010542else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010543 if test ! -z "$withval" -a -d "$withval"
10544 then LDFLAGS="$LDFLAGS -L$withval"
10545 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010546
10547 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010548 # define _POSIX_THREADS in unistd.h. Some apparently don't
10549 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10551$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010554
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010555#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010556#ifdef _POSIX_THREADS
10557yes
10558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010559
10560_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010563 unistd_defines_pthreads=yes
10564else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010565 unistd_defines_pthreads=no
10566fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010567rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010568
Matthias Kloseb9621712010-04-24 17:59:49 +000010569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10570$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010571
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010573
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010574 # Just looking for pthread_create in libpthread is not enough:
10575 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10576 # So we really have to include pthread.h, and then link.
10577 _libs=$LIBS
10578 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10580$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010582/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010583
10584#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010585#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010586
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010587void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010588int
10589main ()
10590{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010591
10592pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010593 ;
10594 return 0;
10595}
10596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10600$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010601 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010602
Guido van Rossum02a1c402000-02-25 19:26:31 +000010603else
Martin v. Löwis11437992002-04-12 09:54:03 +000010604
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010605 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010606 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010607if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010608
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010609 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010610
Guido van Rossumad678af1998-10-02 14:42:15 +000010611else
Guido van Rossumad678af1998-10-02 14:42:15 +000010612
Matthias Kloseb9621712010-04-24 17:59:49 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10614$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010615if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010616 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010617else
Martin v. Löwis11437992002-04-12 09:54:03 +000010618 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010619LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010622
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623/* Override any GCC internal prototype to avoid an error.
10624 Use char because int might match the return type of a GCC
10625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010626#ifdef __cplusplus
10627extern "C"
10628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010629char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 ;
10635 return 0;
10636}
10637_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010638if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010639 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010640else
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010643rm -f core conftest.err conftest.$ac_objext \
10644 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010645LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010646fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10648$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010649if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010650
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010651 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010652 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010653
Greg Steinadf63d62000-07-05 10:38:09 +000010654else
Greg Steinadf63d62000-07-05 10:38:09 +000010655
Matthias Kloseb9621712010-04-24 17:59:49 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10657$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010658if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010659 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010660else
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010662LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010664/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010665
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010669#ifdef __cplusplus
10670extern "C"
10671#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010672char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010673int
10674main ()
10675{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010677 ;
10678 return 0;
10679}
10680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010681if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010683else
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010688LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10691$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010694 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010695 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010696
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010697else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010698
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10700$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010701if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010703else
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010705LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709/* Override any GCC internal prototype to avoid an error.
10710 Use char because int might match the return type of a GCC
10711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010712#ifdef __cplusplus
10713extern "C"
10714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010715char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010716int
10717main ()
10718{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ;
10721 return 0;
10722}
10723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010726else
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010728fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010729rm -f core conftest.err conftest.$ac_objext \
10730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010731LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010732fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10734$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010735if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010736
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010737 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010738 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010739
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010740else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010741
Matthias Kloseb9621712010-04-24 17:59:49 +000010742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10743$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010744if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010748LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010752/* Override any GCC internal prototype to avoid an error.
10753 Use char because int might match the return type of a GCC
10754 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010755#ifdef __cplusplus
10756extern "C"
10757#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010758char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010759int
10760main ()
10761{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010767if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010768 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010769else
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010771fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010772rm -f core conftest.err conftest.$ac_objext \
10773 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010774LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10777$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010778if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010779
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010780 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010781 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010782
Guido van Rossumb93a8621998-05-07 13:27:32 +000010783else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010784
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010785 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10786
Guido van Rossum2d38f911996-06-26 19:47:01 +000010787fi
10788
Guido van Rossum627b2d71993-12-24 10:39:16 +000010789
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010790fi
10791
Guido van Rossum0be3e491997-05-22 20:33:33 +000010792fi
10793
Guido van Rossum49545951997-12-02 19:28:29 +000010794fi
10795
Guido van Rossumb93a8621998-05-07 13:27:32 +000010796fi
10797
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010799rm -f core conftest.err conftest.$ac_objext \
10800 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010801
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10803$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010804if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010806else
Martin v. Löwis11437992002-04-12 09:54:03 +000010807 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010808LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812/* Override any GCC internal prototype to avoid an error.
10813 Use char because int might match the return type of a GCC
10814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010815#ifdef __cplusplus
10816extern "C"
10817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010818char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010819int
10820main ()
10821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010822return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ;
10824 return 0;
10825}
10826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010829else
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010832rm -f core conftest.err conftest.$ac_objext \
10833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010834LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10837$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010838if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010839
Martin v. Löwis130fb172001-07-19 11:00:41 +000010840 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010841
Guido van Rossum627b2d71993-12-24 10:39:16 +000010842fi
10843
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010844
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010845fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847if test "$posix_threads" = "yes"; then
10848 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010849
Matthias Kloseb9621712010-04-24 17:59:49 +000010850$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010851
10852 fi
10853
10854 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10855 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010856 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010857$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010858
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 ;;
10860 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010862
10863 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010864 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010865$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010866
10867 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010868 esac
10869
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10871$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010872 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010874else
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010876 ac_cv_pthread_system_supported=no
10877else
Matthias Kloseb9621712010-04-24 17:59:49 +000010878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010879/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010880
10881 #include <stdio.h>
10882 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010883 void *foo(void *parm) {
10884 return NULL;
10885 }
10886 main() {
10887 pthread_attr_t attr;
10888 pthread_t id;
10889 if (pthread_attr_init(&attr)) exit(-1);
10890 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10891 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10892 exit(0);
10893 }
10894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896 ac_cv_pthread_system_supported=yes
10897else
Matthias Kloseb9621712010-04-24 17:59:49 +000010898 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010902fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010904
Guido van Rossum627b2d71993-12-24 10:39:16 +000010905fi
10906
Matthias Kloseb9621712010-04-24 17:59:49 +000010907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10908$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010909 if test "$ac_cv_pthread_system_supported" = "yes"; then
10910
Matthias Kloseb9621712010-04-24 17:59:49 +000010911$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010912
10913 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010914 for ac_func in pthread_sigmask
10915do :
10916 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010917if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010919#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010920_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010921 case $ac_sys_system in
10922 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010923
Matthias Kloseb9621712010-04-24 17:59:49 +000010924$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010925
10926 ;;
10927 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010928fi
10929done
10930
pdoxe14679c2017-10-05 00:01:56 -070010931 for ac_func in pthread_getcpuclockid
10932do :
10933 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10934if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10935 cat >>confdefs.h <<_ACEOF
10936#define HAVE_PTHREAD_GETCPUCLOCKID 1
10937_ACEOF
10938
10939fi
10940done
10941
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010942fi
10943
10944
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010945# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10948$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010949# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010951 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010952 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010955 ipv6=no
10956 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
10959 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010960
10961 ipv6=yes
10962 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010964else
Martin v. Löwis11437992002-04-12 09:54:03 +000010965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010968 /* AF_INET6 available check */
10969#include <sys/types.h>
10970#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010971int
10972main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010973{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010974int domain = AF_INET6;
10975 ;
10976 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010977}
Martin v. Löwis11437992002-04-12 09:54:03 +000010978_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010979if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010980
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10982$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010983 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010985else
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Matthias Kloseb9621712010-04-24 17:59:49 +000010987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10988$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010989 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010991fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010993
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010994if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10996$as_echo_n "checking if RFC2553 API is available... " >&6; }
10997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010999
11000 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011001#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011002int
11003main ()
11004{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011005struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000011006 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011007 ;
11008 return 0;
11009}
Matthias Kloseb159a552010-04-25 21:00:44 +000011010
Martin v. Löwis11437992002-04-12 09:54:03 +000011011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011012if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000011013
11014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011016 ipv6=yes
11017
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011018else
Matthias Kloseb159a552010-04-25 21:00:44 +000011019
11020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000011022 ipv6=no
11023
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011026fi
11027
11028if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011029 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011030
11031fi
11032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033fi
11034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011035
11036ipv6type=unknown
11037ipv6lib=none
11038ipv6trylibc=no
11039
11040if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11042$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011043 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11044 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011045 case $i in
11046 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011050#include <netinet/in.h>
11051#ifdef IPV6_INRIA_VERSION
11052yes
11053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011057 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011058fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011059rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011060
11061 ;;
11062 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011064/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011065
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066#include <netinet/in.h>
11067#ifdef __KAME__
11068yes
11069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011070_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011071if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011072 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011073 ipv6type=$i;
11074 ipv6lib=inet6
11075 ipv6libdir=/usr/local/v6/lib
11076 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011077fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011078rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011079
11080 ;;
11081 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011083/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011084
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085#include <features.h>
11086#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11087yes
11088#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011089_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011090if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011092 ipv6type=$i;
11093 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011096
11097 ;;
11098 linux-inet6)
11099 if test -d /usr/inet6; then
11100 ipv6type=$i
11101 ipv6lib=inet6
11102 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011103 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104 fi
11105 ;;
11106 solaris)
11107 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011108 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011109 ipv6type=$i
11110 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011111 fi
11112 fi
11113 ;;
11114 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011118#include <sys/param.h>
11119#ifdef _TOSHIBA_INET6
11120yes
11121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125 ipv6type=$i;
11126 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011127 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011128fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011129rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011130
11131 ;;
11132 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136#include </usr/local/v6/include/sys/v6config.h>
11137#ifdef __V6D__
11138yes
11139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011142 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143 ipv6type=$i;
11144 ipv6lib=v6;
11145 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011146 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011147fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011148rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011149
11150 ;;
11151 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011153/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011154
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011155#include <sys/param.h>
11156#ifdef _ZETA_MINAMI_INET6
11157yes
11158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011161 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011162 ipv6type=$i;
11163 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011164 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011165fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011166rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011167
11168 ;;
11169 esac
11170 if test "$ipv6type" != "unknown"; then
11171 break
11172 fi
11173 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11175$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011176fi
11177
11178if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11179 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11180 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11181 echo "using lib$ipv6lib"
11182 else
11183 if test $ipv6trylibc = "yes"; then
11184 echo "using libc"
11185 else
11186 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11187 echo "You need to fetch lib$ipv6lib.a from appropriate"
11188 echo 'ipv6 kit and compile beforehand.'
11189 exit 1
11190 fi
11191 fi
11192fi
11193
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11195$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11197/* end confdefs.h. */
11198 /* CAN_RAW_FD_FRAMES available check */
11199#include <linux/can/raw.h>
11200int
11201main ()
11202{
11203int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11204 ;
11205 return 0;
11206}
11207_ACEOF
11208if ac_fn_c_try_compile "$LINENO"; then :
11209
11210
11211$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11212
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11214$as_echo "yes" >&6; }
11215
11216else
11217
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11219$as_echo "no" >&6; }
11220
11221fi
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011224# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11226$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230 withval=$with_doc_strings;
11231fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011232
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011233
11234if test -z "$with_doc_strings"
11235then with_doc_strings="yes"
11236fi
11237if test "$with_doc_strings" != "no"
11238then
11239
Matthias Kloseb9621712010-04-24 17:59:49 +000011240$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011241
11242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11244$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011245
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011246# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11248$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011250# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011251if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011252 withval=$with_pymalloc;
11253fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011254
Neil Schemenauera35c6882001-02-27 04:45:05 +000011255
Neil Schemenauer16c22972002-03-22 15:34:49 +000011256if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011257then
11258 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011259fi
11260if test "$with_pymalloc" != "no"
11261then
Martin v. Löwis11437992002-04-12 09:54:03 +000011262
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011264
11265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11267$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011268
Nick Coghlan6ea41862017-06-11 13:16:15 +100011269# Check for --with-c-locale-coercion
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11271$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11272
11273# Check whether --with-c-locale-coercion was given.
11274if test "${with_c_locale_coercion+set}" = set; then :
11275 withval=$with_c_locale_coercion;
11276fi
11277
11278
11279if test -z "$with_c_locale_coercion"
11280then
11281 with_c_locale_coercion="yes"
11282fi
11283if test "$with_c_locale_coercion" != "no"
11284then
11285
11286$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11287
11288fi
11289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11290$as_echo "$with_c_locale_coercion" >&6; }
11291
Benjamin Peterson05159c42009-12-03 03:01:27 +000011292# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11294$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011295
11296# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011297if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011298 withval=$with_valgrind;
11299else
11300 with_valgrind=no
11301fi
11302
Matthias Kloseb9621712010-04-24 17:59:49 +000011303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11304$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011305if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 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 +020011307if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011308
Matthias Kloseb9621712010-04-24 17:59:49 +000011309$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011310
11311else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011312 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011313
11314fi
11315
11316
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011317 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011318fi
11319
Łukasz Langaa785c872016-09-09 17:37:37 -070011320# Check for DTrace support
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11322$as_echo_n "checking for --with-dtrace... " >&6; }
11323
11324# Check whether --with-dtrace was given.
11325if test "${with_dtrace+set}" = set; then :
11326 withval=$with_dtrace;
11327else
11328 with_dtrace=no
11329fi
11330
11331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11332$as_echo "$with_dtrace" >&6; }
11333
11334
11335
11336
11337
11338DTRACE=
11339DFLAGS=
11340DTRACE_HEADERS=
11341DTRACE_OBJS=
11342
11343if test "$with_dtrace" = "yes"
11344then
11345 # Extract the first word of "dtrace", so it can be a program name with args.
11346set dummy dtrace; ac_word=$2
11347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11348$as_echo_n "checking for $ac_word... " >&6; }
11349if ${ac_cv_path_DTRACE+:} false; then :
11350 $as_echo_n "(cached) " >&6
11351else
11352 case $DTRACE in
11353 [\\/]* | ?:[\\/]*)
11354 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11355 ;;
11356 *)
11357 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11358for as_dir in $PATH
11359do
11360 IFS=$as_save_IFS
11361 test -z "$as_dir" && as_dir=.
11362 for ac_exec_ext in '' $ac_executable_extensions; do
11363 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11364 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11366 break 2
11367 fi
11368done
11369 done
11370IFS=$as_save_IFS
11371
11372 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11373 ;;
11374esac
11375fi
11376DTRACE=$ac_cv_path_DTRACE
11377if test -n "$DTRACE"; then
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11379$as_echo "$DTRACE" >&6; }
11380else
11381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11382$as_echo "no" >&6; }
11383fi
11384
11385
11386 if test "$DTRACE" = "not found"; then
11387 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11388 fi
11389
11390$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11391
11392 DTRACE_HEADERS="Include/pydtrace_probes.h"
11393
11394 # On OS X, DTrace providers do not need to be explicitly compiled and
11395 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11396 # generation flag '-G'. We check for presence of this flag, rather than
11397 # hardcoding support by OS, in the interest of robustness.
11398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11399$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11400if ${ac_cv_dtrace_link+:} false; then :
11401 $as_echo_n "(cached) " >&6
11402else
11403 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011404 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011405 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11406 ac_cv_dtrace_link=yes
11407
11408fi
11409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11410$as_echo "$ac_cv_dtrace_link" >&6; }
11411 if test "$ac_cv_dtrace_link" = "yes"; then
11412 DTRACE_OBJS="Python/pydtrace.o"
11413 fi
11414fi
11415
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011416# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011417
Guido van Rossum98935bf2001-09-05 19:13:16 +000011418DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011419
Guido van Rossume97ee181999-12-20 21:27:22 +000011420# the dlopen() function means we might want to use dynload_shlib.o. some
11421# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011422for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011423do :
11424 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011425if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011426 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011427#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011428_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011429
Guido van Rossume97ee181999-12-20 21:27:22 +000011430fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011431done
Guido van Rossume97ee181999-12-20 21:27:22 +000011432
Michael W. Hudson54241132001-12-07 15:38:26 +000011433
Guido van Rossume97ee181999-12-20 21:27:22 +000011434# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11435# loading of modules.
11436
Matthias Kloseb9621712010-04-24 17:59:49 +000011437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11438$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011439if test -z "$DYNLOADFILE"
11440then
11441 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011442 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11443 if test "$ac_cv_func_dlopen" = yes
11444 then DYNLOADFILE="dynload_shlib.o"
11445 else DYNLOADFILE="dynload_aix.o"
11446 fi
11447 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011448 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011449 *)
11450 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11451 # out any dynamic loading
11452 if test "$ac_cv_func_dlopen" = yes
11453 then DYNLOADFILE="dynload_shlib.o"
11454 else DYNLOADFILE="dynload_stub.o"
11455 fi
11456 ;;
11457 esac
11458fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11460$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011461if test "$DYNLOADFILE" != "dynload_stub.o"
11462then
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011465
11466fi
11467
Neil Schemenauer4e425612001-06-19 15:44:15 +000011468# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11469
Michael W. Hudson54241132001-12-07 15:38:26 +000011470
Matthias Kloseb9621712010-04-24 17:59:49 +000011471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11472$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011473if test -z "$MACHDEP_OBJS"
11474then
Jack Jansene578a632001-08-15 01:27:14 +000011475 MACHDEP_OBJS=$extra_machdep_objs
11476else
11477 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011478fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011479if test -z "$MACHDEP_OBJS"; then
11480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11481$as_echo "none" >&6; }
11482else
11483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11484$as_echo "$MACHDEP_OBJS" >&6; }
11485fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011486
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011488for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011489 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011490 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011491 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011492 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011493 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011494 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011495 if_nameindex \
Benjamin Petersoned709d52018-09-12 17:22:11 -070011496 initgroups kill killpg lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011497 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011498 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011499 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011500 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11501 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011502 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011503 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011504 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011505 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11506 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011507 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011508 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011509 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011510 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011511 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011512do :
11513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011515if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011516 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011518_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011520fi
11521done
11522
Michael W. Hudson54241132001-12-07 15:38:26 +000011523
Benjamin Peterson40caa052018-09-12 15:52:40 -070011524# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11525# links. Some libc implementations have a stub lchmod implementation that always
11526# returns an error.
11527if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011528 for ac_func in lchmod
11529do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011530 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11531if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011532 cat >>confdefs.h <<_ACEOF
11533#define HAVE_LCHMOD 1
11534_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011535
11536fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011537done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011538
11539fi
11540
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011541ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11542 #include <dirent.h>
11543"
11544if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11545
11546$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11547
11548fi
11549
11550
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551# For some functions, having a definition is not sufficient, since
11552# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11554$as_echo_n "checking for chroot... " >&6; }
11555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011557#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558int
11559main ()
11560{
11561void *x=chroot
11562 ;
11563 return 0;
11564}
11565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011566if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011569
Matthias Kloseb159a552010-04-25 21:00:44 +000011570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011571$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011572else
Matthias Kloseb9621712010-04-24 17:59:49 +000011573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11574$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011575
11576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11579$as_echo_n "checking for link... " >&6; }
11580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011581/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011582#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583int
11584main ()
11585{
11586void *x=link
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011592
Matthias Kloseb9621712010-04-24 17:59:49 +000011593$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011594
Matthias Kloseb159a552010-04-25 21:00:44 +000011595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011596$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011597else
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011600
11601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11604$as_echo_n "checking for symlink... " >&6; }
11605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011606/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011607#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011608int
11609main ()
11610{
11611void *x=symlink
11612 ;
11613 return 0;
11614}
11615_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011616if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011617
Matthias Kloseb9621712010-04-24 17:59:49 +000011618$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011619
Matthias Kloseb159a552010-04-25 21:00:44 +000011620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011621$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011622else
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011625
11626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11629$as_echo_n "checking for fchdir... " >&6; }
11630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011632#include <unistd.h>
11633int
11634main ()
11635{
11636void *x=fchdir
11637 ;
11638 return 0;
11639}
11640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011642
Matthias Kloseb9621712010-04-24 17:59:49 +000011643$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011644
Matthias Kloseb159a552010-04-25 21:00:44 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011646$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011647else
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11649$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011650
11651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11654$as_echo_n "checking for fsync... " >&6; }
11655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011657#include <unistd.h>
11658int
11659main ()
11660{
11661void *x=fsync
11662 ;
11663 return 0;
11664}
11665_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011666if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011669
Matthias Kloseb159a552010-04-25 21:00:44 +000011670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011671$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011672else
Matthias Kloseb9621712010-04-24 17:59:49 +000011673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11674$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011675
11676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11679$as_echo_n "checking for fdatasync... " >&6; }
11680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011682#include <unistd.h>
11683int
11684main ()
11685{
11686void *x=fdatasync
11687 ;
11688 return 0;
11689}
11690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011691if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011694
Matthias Kloseb159a552010-04-25 21:00:44 +000011695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011696$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011697else
Matthias Kloseb9621712010-04-24 17:59:49 +000011698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11699$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011700
11701fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11704$as_echo_n "checking for epoll... " >&6; }
11705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011706/* end confdefs.h. */
11707#include <sys/epoll.h>
11708int
11709main ()
11710{
11711void *x=epoll_create
11712 ;
11713 return 0;
11714}
11715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011717
Matthias Kloseb9621712010-04-24 17:59:49 +000011718$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011719
Matthias Kloseb159a552010-04-25 21:00:44 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011721$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11724$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011725
11726fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11729$as_echo_n "checking for epoll_create1... " >&6; }
11730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11731/* end confdefs.h. */
11732#include <sys/epoll.h>
11733int
11734main ()
11735{
11736void *x=epoll_create1
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741if ac_fn_c_try_compile "$LINENO"; then :
11742
11743$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11744
11745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11746$as_echo "yes" >&6; }
11747else
11748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750
11751fi
11752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11754$as_echo_n "checking for kqueue... " >&6; }
11755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011756/* end confdefs.h. */
11757
11758#include <sys/types.h>
11759#include <sys/event.h>
11760
11761int
11762main ()
11763{
11764int x=kqueue()
11765 ;
11766 return 0;
11767}
11768_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011769if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011772
Matthias Kloseb159a552010-04-25 21:00:44 +000011773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011774$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011775else
Matthias Kloseb9621712010-04-24 17:59:49 +000011776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11777$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011778
11779fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11782$as_echo_n "checking for prlimit... " >&6; }
11783cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784/* end confdefs.h. */
11785
11786#include <sys/time.h>
11787#include <sys/resource.h>
11788
11789int
11790main ()
11791{
11792void *x=prlimit
11793 ;
11794 return 0;
11795}
11796_ACEOF
11797if ac_fn_c_try_compile "$LINENO"; then :
11798
11799$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11800
11801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11802$as_echo "yes" >&6; }
11803else
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11805$as_echo "no" >&6; }
11806
11807fi
11808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11809
Martin v. Löwisd5843682002-11-21 20:41:28 +000011810# On some systems (eg. FreeBSD 5), we would find a definition of the
11811# functions ctermid_r, setgroups in the library, but no prototype
11812# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11813# address to avoid compiler warnings and potential miscompilations
11814# because of the missing prototypes.
11815
Matthias Kloseb9621712010-04-24 17:59:49 +000011816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11817$as_echo_n "checking for ctermid_r... " >&6; }
11818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011819/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011820
Martin v. Löwisd5843682002-11-21 20:41:28 +000011821#include <stdio.h>
11822
Martin v. Löwisd5843682002-11-21 20:41:28 +000011823int
11824main ()
11825{
11826void* p = ctermid_r
11827 ;
11828 return 0;
11829}
11830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011834
Matthias Kloseb159a552010-04-25 21:00:44 +000011835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011836$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11839$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011840
11841fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11843
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11845$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011846if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011847 $as_echo_n "(cached) " >&6
11848else
11849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011850/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011851#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011852int
11853main ()
11854{
11855void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011856
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011861if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011862 ac_cv_flock_decl=yes
11863else
11864 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011865
11866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011868
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011869fi
11870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11871$as_echo "$ac_cv_flock_decl" >&6; }
11872if test "x${ac_cv_flock_decl}" = xyes; then
11873 for ac_func in flock
11874do :
11875 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011877 cat >>confdefs.h <<_ACEOF
11878#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011879_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011880
Antoine Pitroua3000072010-09-07 14:52:42 +000011881else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011883$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011884if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011885 $as_echo_n "(cached) " >&6
11886else
11887 ac_check_lib_save_LIBS=$LIBS
11888LIBS="-lbsd $LIBS"
11889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11890/* end confdefs.h. */
11891
11892/* Override any GCC internal prototype to avoid an error.
11893 Use char because int might match the return type of a GCC
11894 builtin and then its argument prototype would still apply. */
11895#ifdef __cplusplus
11896extern "C"
11897#endif
11898char flock ();
11899int
11900main ()
11901{
11902return flock ();
11903 ;
11904 return 0;
11905}
11906_ACEOF
11907if ac_fn_c_try_link "$LINENO"; then :
11908 ac_cv_lib_bsd_flock=yes
11909else
11910 ac_cv_lib_bsd_flock=no
11911fi
11912rm -f core conftest.err conftest.$ac_objext \
11913 conftest$ac_exeext conftest.$ac_ext
11914LIBS=$ac_check_lib_save_LIBS
11915fi
11916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11917$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011918if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011919 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011920
11921
11922$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11923
11924
11925fi
11926
11927
11928fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011929done
11930
Antoine Pitroua3000072010-09-07 14:52:42 +000011931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11934$as_echo_n "checking for getpagesize... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011936/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011937
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011938#include <unistd.h>
11939
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011940int
11941main ()
11942{
11943void* p = getpagesize
11944 ;
11945 return 0;
11946}
11947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011948if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011949
Matthias Kloseb9621712010-04-24 17:59:49 +000011950$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011951
Matthias Kloseb159a552010-04-25 21:00:44 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11956$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011957
11958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011960
Victor Stinner984890f2011-11-24 13:53:38 +010011961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11962$as_echo_n "checking for broken unsetenv... " >&6; }
11963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11964/* end confdefs.h. */
11965
11966#include <stdlib.h>
11967
11968int
11969main ()
11970{
11971int res = unsetenv("DUMMY")
11972 ;
11973 return 0;
11974}
11975_ACEOF
11976if ac_fn_c_try_compile "$LINENO"; then :
11977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11978$as_echo "no" >&6; }
11979else
11980
11981$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11982
11983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11984$as_echo "yes" >&6; }
11985
11986fi
11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011989for ac_prog in true
11990do
11991 # Extract the first word of "$ac_prog", so it can be a program name with args.
11992set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11994$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011995if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011997else
11998 if test -n "$TRUE"; then
11999 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12000else
12001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12002for as_dir in $PATH
12003do
12004 IFS=$as_save_IFS
12005 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000012006 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012008 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000012009 $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 +000012010 break 2
12011 fi
12012done
Matthias Kloseb9621712010-04-24 17:59:49 +000012013 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012014IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012015
12016fi
12017fi
12018TRUE=$ac_cv_prog_TRUE
12019if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
12021$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012022else
Matthias Kloseb9621712010-04-24 17:59:49 +000012023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12024$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012025fi
12026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012028 test -n "$TRUE" && break
12029done
12030test -n "$TRUE" || TRUE="/bin/true"
12031
12032
Matthias Kloseb9621712010-04-24 17:59:49 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12034$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012035if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012037else
12038 ac_check_lib_save_LIBS=$LIBS
12039LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012041/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012043/* Override any GCC internal prototype to avoid an error.
12044 Use char because int might match the return type of a GCC
12045 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012046#ifdef __cplusplus
12047extern "C"
12048#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012049char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012050int
12051main ()
12052{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012054 ;
12055 return 0;
12056}
12057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012058if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012059 ac_cv_lib_c_inet_aton=yes
12060else
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012062fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012063rm -f core conftest.err conftest.$ac_objext \
12064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065LIBS=$ac_check_lib_save_LIBS
12066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12068$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012069if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012070 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012071else
Matthias Kloseb9621712010-04-24 17:59:49 +000012072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12073$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012074if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012076else
12077 ac_check_lib_save_LIBS=$LIBS
12078LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012080/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012082/* Override any GCC internal prototype to avoid an error.
12083 Use char because int might match the return type of a GCC
12084 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085#ifdef __cplusplus
12086extern "C"
12087#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012088char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012089int
12090main ()
12091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012092return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012093 ;
12094 return 0;
12095}
12096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012098 ac_cv_lib_resolv_inet_aton=yes
12099else
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012102rm -f core conftest.err conftest.$ac_objext \
12103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012104LIBS=$ac_check_lib_save_LIBS
12105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12107$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012108if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012109 cat >>confdefs.h <<_ACEOF
12110#define HAVE_LIBRESOLV 1
12111_ACEOF
12112
12113 LIBS="-lresolv $LIBS"
12114
12115fi
12116
12117
12118fi
12119
12120
Christian Heimesd0764e22007-12-04 15:00:33 +000012121# On Tru64, chflags seems to be present, but calling it will
12122# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12124$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012125if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012129 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012132/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012133
Christian Heimesd0764e22007-12-04 15:00:33 +000012134#include <sys/stat.h>
12135#include <unistd.h>
12136int main(int argc, char*argv[])
12137{
12138 if(chflags(argv[0], 0) != 0)
12139 return 1;
12140 return 0;
12141}
Ned Deily3eb67d52011-06-28 00:00:28 -070012142
Christian Heimesd0764e22007-12-04 15:00:33 +000012143_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012144if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012146else
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12150 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012151fi
12152
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012153
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012154fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12156$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012157if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012159if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012160 ac_cv_have_chflags="yes"
12161else
12162 ac_cv_have_chflags="no"
12163fi
12164
12165fi
12166if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012167
Matthias Kloseb9621712010-04-24 17:59:49 +000012168$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012169
12170fi
12171
Matthias Kloseb9621712010-04-24 17:59:49 +000012172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12173$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012174if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012176else
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012178 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012179else
Matthias Kloseb9621712010-04-24 17:59:49 +000012180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012181/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012182
Christian Heimesd0764e22007-12-04 15:00:33 +000012183#include <sys/stat.h>
12184#include <unistd.h>
12185int main(int argc, char*argv[])
12186{
12187 if(lchflags(argv[0], 0) != 0)
12188 return 1;
12189 return 0;
12190}
Ned Deily3eb67d52011-06-28 00:00:28 -070012191
Christian Heimesd0764e22007-12-04 15:00:33 +000012192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012193if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012194 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012195else
Matthias Kloseb9621712010-04-24 17:59:49 +000012196 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012200fi
12201
12202
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12205$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012206if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012207 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012209 ac_cv_have_lchflags="yes"
12210else
12211 ac_cv_have_lchflags="no"
12212fi
12213
12214fi
12215if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012216
Matthias Kloseb9621712010-04-24 17:59:49 +000012217$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012218
12219fi
12220
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012221case $ac_sys_system/$ac_sys_release in
12222Darwin/*)
12223 _CUR_CFLAGS="${CFLAGS}"
12224 _CUR_LDFLAGS="${LDFLAGS}"
12225 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12226 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12227 ;;
12228esac
12229
Matthias Kloseb9621712010-04-24 17:59:49 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12231$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012233 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012234else
12235 ac_check_lib_save_LIBS=$LIBS
12236LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012238/* end confdefs.h. */
12239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240/* Override any GCC internal prototype to avoid an error.
12241 Use char because int might match the return type of a GCC
12242 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012243#ifdef __cplusplus
12244extern "C"
12245#endif
12246char inflateCopy ();
12247int
12248main ()
12249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012250return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012251 ;
12252 return 0;
12253}
12254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012256 ac_cv_lib_z_inflateCopy=yes
12257else
Matthias Kloseb9621712010-04-24 17:59:49 +000012258 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012259fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012260rm -f core conftest.err conftest.$ac_objext \
12261 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012262LIBS=$ac_check_lib_save_LIBS
12263fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12265$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012266if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012267
Matthias Kloseb9621712010-04-24 17:59:49 +000012268$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012269
12270fi
12271
12272
12273case $ac_sys_system/$ac_sys_release in
12274Darwin/*)
12275 CFLAGS="${_CUR_CFLAGS}"
12276 LDFLAGS="${_CUR_LDFLAGS}"
12277 ;;
12278esac
12279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12281$as_echo_n "checking for hstrerror... " >&6; }
12282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012284
Martin v. Löwise9416172003-05-03 10:12:45 +000012285#include <netdb.h>
12286
Martin v. Löwise9416172003-05-03 10:12:45 +000012287int
12288main ()
12289{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012290void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012291 ;
12292 return 0;
12293}
12294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012295if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012296
Matthias Kloseb9621712010-04-24 17:59:49 +000012297$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012298
Matthias Kloseb159a552010-04-25 21:00:44 +000012299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012300$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012301else
Matthias Kloseb9621712010-04-24 17:59:49 +000012302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012304
12305fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012306rm -f core conftest.err conftest.$ac_objext \
12307 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12310$as_echo_n "checking for inet_aton... " >&6; }
12311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012312/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012313
Martin v. Löwis86d66262006-02-17 08:40:11 +000012314#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012315#include <sys/socket.h>
12316#include <netinet/in.h>
12317#include <arpa/inet.h>
12318
Martin v. Löwise9416172003-05-03 10:12:45 +000012319int
12320main ()
12321{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012322void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012323 ;
12324 return 0;
12325}
12326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012327if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012328
Matthias Kloseb9621712010-04-24 17:59:49 +000012329$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012330
Matthias Kloseb159a552010-04-25 21:00:44 +000012331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012332$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012333else
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12335$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
12337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012338rm -f core conftest.err conftest.$ac_objext \
12339 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340
Matthias Kloseb9621712010-04-24 17:59:49 +000012341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12342$as_echo_n "checking for inet_pton... " >&6; }
12343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012344/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012345
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012346#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012347#include <sys/socket.h>
12348#include <netinet/in.h>
12349#include <arpa/inet.h>
12350
Martin v. Löwise9416172003-05-03 10:12:45 +000012351int
12352main ()
12353{
12354void* p = inet_pton
12355 ;
12356 return 0;
12357}
12358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012359if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012360
Matthias Kloseb9621712010-04-24 17:59:49 +000012361$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012362
Matthias Kloseb159a552010-04-25 21:00:44 +000012363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012364$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012365else
Matthias Kloseb9621712010-04-24 17:59:49 +000012366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12367$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012368
12369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012371
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012372# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12374$as_echo_n "checking for setgroups... " >&6; }
12375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012376/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012377
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012378#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012379#ifdef HAVE_GRP_H
12380#include <grp.h>
12381#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012382
Martin v. Löwisd5843682002-11-21 20:41:28 +000012383int
12384main ()
12385{
12386void* p = setgroups
12387 ;
12388 return 0;
12389}
12390_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012391if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012392
Matthias Kloseb9621712010-04-24 17:59:49 +000012393$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012394
Matthias Kloseb159a552010-04-25 21:00:44 +000012395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012396$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012397else
Matthias Kloseb9621712010-04-24 17:59:49 +000012398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012400
12401fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012403
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012404# check for openpty and forkpty
12405
12406for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012407do :
12408 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012409if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012411#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012412_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012413
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012414else
Matthias Kloseb9621712010-04-24 17:59:49 +000012415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12416$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012417if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012418 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012419else
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012421LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425/* Override any GCC internal prototype to avoid an error.
12426 Use char because int might match the return type of a GCC
12427 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012428#ifdef __cplusplus
12429extern "C"
12430#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012431char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012432int
12433main ()
12434{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012436 ;
12437 return 0;
12438}
12439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012441 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012445rm -f core conftest.err conftest.$ac_objext \
12446 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012447LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012448fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12450$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012451if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012453 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012454else
Matthias Kloseb9621712010-04-24 17:59:49 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12456$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012459else
12460 ac_check_lib_save_LIBS=$LIBS
12461LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012463/* end confdefs.h. */
12464
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012465/* Override any GCC internal prototype to avoid an error.
12466 Use char because int might match the return type of a GCC
12467 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012468#ifdef __cplusplus
12469extern "C"
12470#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012471char openpty ();
12472int
12473main ()
12474{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012475return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012481 ac_cv_lib_bsd_openpty=yes
12482else
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012484fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012485rm -f core conftest.err conftest.$ac_objext \
12486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012487LIBS=$ac_check_lib_save_LIBS
12488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12490$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012491if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012492 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012493 LIBS="$LIBS -lbsd"
12494fi
12495
12496
12497fi
12498
Fred Drake8cef4cf2000-06-28 16:40:38 +000012499
12500fi
12501done
12502
12503for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012504do :
12505 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012506if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012507 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012508#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012509_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012510
Fred Drake8cef4cf2000-06-28 16:40:38 +000012511else
Matthias Kloseb9621712010-04-24 17:59:49 +000012512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12513$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012514if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012515 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012516else
Martin v. Löwis11437992002-04-12 09:54:03 +000012517 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012518LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012522/* Override any GCC internal prototype to avoid an error.
12523 Use char because int might match the return type of a GCC
12524 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012525#ifdef __cplusplus
12526extern "C"
12527#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012528char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012529int
12530main ()
12531{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ;
12534 return 0;
12535}
12536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012537if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012538 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012539else
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542rm -f core conftest.err conftest.$ac_objext \
12543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012544LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012545fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12547$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012548if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012549 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012550 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012551else
Matthias Kloseb9621712010-04-24 17:59:49 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12553$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012554if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012556else
12557 ac_check_lib_save_LIBS=$LIBS
12558LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560/* end confdefs.h. */
12561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562/* Override any GCC internal prototype to avoid an error.
12563 Use char because int might match the return type of a GCC
12564 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012565#ifdef __cplusplus
12566extern "C"
12567#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012568char forkpty ();
12569int
12570main ()
12571{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012573 ;
12574 return 0;
12575}
12576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012577if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012578 ac_cv_lib_bsd_forkpty=yes
12579else
Matthias Kloseb9621712010-04-24 17:59:49 +000012580 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012582rm -f core conftest.err conftest.$ac_objext \
12583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012584LIBS=$ac_check_lib_save_LIBS
12585fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12587$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012588if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012590 LIBS="$LIBS -lbsd"
12591fi
12592
12593
12594fi
12595
Fred Drake8cef4cf2000-06-28 16:40:38 +000012596
12597fi
12598done
12599
Jack Jansendd19cf82001-12-06 22:36:17 +000012600
Michael W. Hudson54241132001-12-07 15:38:26 +000012601# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012602for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012603do :
12604 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12605ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012606if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012608#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012609_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012610
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012611fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012612done
12613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012615ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012616if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012617 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012618
Martin v. Löwis1142de32002-03-29 16:28:31 +000012619else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012621 *" dup2.$ac_objext "* ) ;;
12622 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012623 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012624esac
12625
Martin v. Löwis1142de32002-03-29 16:28:31 +000012626fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012627
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012628ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012629if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012630 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12631
12632else
12633 case " $LIBOBJS " in
12634 *" strdup.$ac_objext "* ) ;;
12635 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12636 ;;
12637esac
12638
12639fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012640
12641
12642for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012643do :
12644 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012645if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012647#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012651#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012652int
12653main ()
12654{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012655getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ;
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 GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012663
Guido van Rossum627b2d71993-12-24 10:39:16 +000012664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012666
Guido van Rossum627b2d71993-12-24 10:39:16 +000012667fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012668done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012669
Jack Jansen150753c2003-03-29 22:07:47 +000012670for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012671do :
12672 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012673if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012674 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012675#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +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. */
Jack Jansen150753c2003-03-29 22:07:47 +000012679#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012680int
12681main ()
12682{
12683setpgrp(0,0);
12684 ;
12685 return 0;
12686}
12687_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012689
Matthias Kloseb9621712010-04-24 17:59:49 +000012690$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012691
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012692fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012694
12695fi
12696done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012697
Thomas Wouters3a584202000-08-05 23:28:51 +000012698for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012699do :
12700 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012701if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012703#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012706/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012707#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012708int
12709main ()
12710{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012711gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012712 ;
12713 return 0;
12714}
12715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012716if ac_fn_c_try_compile "$LINENO"; then :
12717
Guido van Rossum627b2d71993-12-24 10:39:16 +000012718else
Skip Montanaro6dead952003-09-25 14:50:04 +000012719
Matthias Kloseb9621712010-04-24 17:59:49 +000012720$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012721
Martin v. Löwis11437992002-04-12 09:54:03 +000012722
Guido van Rossum627b2d71993-12-24 10:39:16 +000012723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012725
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012727done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012728
Michael W. Hudson54241132001-12-07 15:38:26 +000012729
Gregory P. Smith387512c2018-12-30 15:42:32 -080012730# We search for both crypt and crypt_r as one or the other may be defined
12731# This gets us our -lcrypt in LIBS when required on the target platform.
12732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12733$as_echo_n "checking for library containing crypt... " >&6; }
12734if ${ac_cv_search_crypt+:} false; then :
12735 $as_echo_n "(cached) " >&6
12736else
12737 ac_func_search_save_LIBS=$LIBS
12738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12739/* end confdefs.h. */
12740
12741/* Override any GCC internal prototype to avoid an error.
12742 Use char because int might match the return type of a GCC
12743 builtin and then its argument prototype would still apply. */
12744#ifdef __cplusplus
12745extern "C"
12746#endif
12747char crypt ();
12748int
12749main ()
12750{
12751return crypt ();
12752 ;
12753 return 0;
12754}
12755_ACEOF
12756for ac_lib in '' crypt; do
12757 if test -z "$ac_lib"; then
12758 ac_res="none required"
12759 else
12760 ac_res=-l$ac_lib
12761 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12762 fi
12763 if ac_fn_c_try_link "$LINENO"; then :
12764 ac_cv_search_crypt=$ac_res
12765fi
12766rm -f core conftest.err conftest.$ac_objext \
12767 conftest$ac_exeext
12768 if ${ac_cv_search_crypt+:} false; then :
12769 break
12770fi
12771done
12772if ${ac_cv_search_crypt+:} false; then :
12773
12774else
12775 ac_cv_search_crypt=no
12776fi
12777rm conftest.$ac_ext
12778LIBS=$ac_func_search_save_LIBS
12779fi
12780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12781$as_echo "$ac_cv_search_crypt" >&6; }
12782ac_res=$ac_cv_search_crypt
12783if test "$ac_res" != no; then :
12784 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12785
12786fi
12787
12788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12789$as_echo_n "checking for library containing crypt_r... " >&6; }
12790if ${ac_cv_search_crypt_r+:} false; then :
12791 $as_echo_n "(cached) " >&6
12792else
12793 ac_func_search_save_LIBS=$LIBS
12794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12795/* end confdefs.h. */
12796
12797/* Override any GCC internal prototype to avoid an error.
12798 Use char because int might match the return type of a GCC
12799 builtin and then its argument prototype would still apply. */
12800#ifdef __cplusplus
12801extern "C"
12802#endif
12803char crypt_r ();
12804int
12805main ()
12806{
12807return crypt_r ();
12808 ;
12809 return 0;
12810}
12811_ACEOF
12812for ac_lib in '' crypt; do
12813 if test -z "$ac_lib"; then
12814 ac_res="none required"
12815 else
12816 ac_res=-l$ac_lib
12817 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12818 fi
12819 if ac_fn_c_try_link "$LINENO"; then :
12820 ac_cv_search_crypt_r=$ac_res
12821fi
12822rm -f core conftest.err conftest.$ac_objext \
12823 conftest$ac_exeext
12824 if ${ac_cv_search_crypt_r+:} false; then :
12825 break
12826fi
12827done
12828if ${ac_cv_search_crypt_r+:} false; then :
12829
12830else
12831 ac_cv_search_crypt_r=no
12832fi
12833rm conftest.$ac_ext
12834LIBS=$ac_func_search_save_LIBS
12835fi
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12837$as_echo "$ac_cv_search_crypt_r" >&6; }
12838ac_res=$ac_cv_search_crypt_r
12839if test "$ac_res" != no; then :
12840 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12841
12842fi
12843
12844
12845ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12846if test "x$ac_cv_func_crypt_r" = xyes; then :
12847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12848/* end confdefs.h. */
12849
12850#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12851#include <crypt.h>
12852
12853int
12854main ()
12855{
12856
12857struct crypt_data d;
12858char *r = crypt_r("", "", &d);
12859
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864if ac_fn_c_try_compile "$LINENO"; then :
12865
12866$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12867
12868fi
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12870
12871fi
12872
12873
Victor Stinnere0be4232011-10-25 13:06:09 +020012874for ac_func in clock_gettime
12875do :
12876 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12877if test "x$ac_cv_func_clock_gettime" = xyes; then :
12878 cat >>confdefs.h <<_ACEOF
12879#define HAVE_CLOCK_GETTIME 1
12880_ACEOF
12881
12882else
12883
12884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12885$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12886if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12887 $as_echo_n "(cached) " >&6
12888else
12889 ac_check_lib_save_LIBS=$LIBS
12890LIBS="-lrt $LIBS"
12891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12892/* end confdefs.h. */
12893
12894/* Override any GCC internal prototype to avoid an error.
12895 Use char because int might match the return type of a GCC
12896 builtin and then its argument prototype would still apply. */
12897#ifdef __cplusplus
12898extern "C"
12899#endif
12900char clock_gettime ();
12901int
12902main ()
12903{
12904return clock_gettime ();
12905 ;
12906 return 0;
12907}
12908_ACEOF
12909if ac_fn_c_try_link "$LINENO"; then :
12910 ac_cv_lib_rt_clock_gettime=yes
12911else
12912 ac_cv_lib_rt_clock_gettime=no
12913fi
12914rm -f core conftest.err conftest.$ac_objext \
12915 conftest$ac_exeext conftest.$ac_ext
12916LIBS=$ac_check_lib_save_LIBS
12917fi
12918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12919$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12920if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12921
Victor Stinner7efb8332014-08-29 15:41:08 +020012922 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012923 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12924
12925
12926$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12927
12928
12929fi
12930
12931
12932fi
12933done
12934
12935
12936for ac_func in clock_getres
12937do :
12938 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12939if test "x$ac_cv_func_clock_getres" = xyes; then :
12940 cat >>confdefs.h <<_ACEOF
12941#define HAVE_CLOCK_GETRES 1
12942_ACEOF
12943
12944else
12945
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12947$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12948if ${ac_cv_lib_rt_clock_getres+:} false; then :
12949 $as_echo_n "(cached) " >&6
12950else
12951 ac_check_lib_save_LIBS=$LIBS
12952LIBS="-lrt $LIBS"
12953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12954/* end confdefs.h. */
12955
12956/* Override any GCC internal prototype to avoid an error.
12957 Use char because int might match the return type of a GCC
12958 builtin and then its argument prototype would still apply. */
12959#ifdef __cplusplus
12960extern "C"
12961#endif
12962char clock_getres ();
12963int
12964main ()
12965{
12966return clock_getres ();
12967 ;
12968 return 0;
12969}
12970_ACEOF
12971if ac_fn_c_try_link "$LINENO"; then :
12972 ac_cv_lib_rt_clock_getres=yes
12973else
12974 ac_cv_lib_rt_clock_getres=no
12975fi
12976rm -f core conftest.err conftest.$ac_objext \
12977 conftest$ac_exeext conftest.$ac_ext
12978LIBS=$ac_check_lib_save_LIBS
12979fi
12980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12981$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12982if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12983
12984 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12985
12986
12987fi
12988
12989
12990fi
12991done
12992
12993
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012994for ac_func in clock_settime
12995do :
12996 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12997if test "x$ac_cv_func_clock_settime" = xyes; then :
12998 cat >>confdefs.h <<_ACEOF
12999#define HAVE_CLOCK_SETTIME 1
13000_ACEOF
13001
13002else
13003
13004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
13005$as_echo_n "checking for clock_settime in -lrt... " >&6; }
13006if ${ac_cv_lib_rt_clock_settime+:} false; then :
13007 $as_echo_n "(cached) " >&6
13008else
13009 ac_check_lib_save_LIBS=$LIBS
13010LIBS="-lrt $LIBS"
13011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012/* end confdefs.h. */
13013
13014/* Override any GCC internal prototype to avoid an error.
13015 Use char because int might match the return type of a GCC
13016 builtin and then its argument prototype would still apply. */
13017#ifdef __cplusplus
13018extern "C"
13019#endif
13020char clock_settime ();
13021int
13022main ()
13023{
13024return clock_settime ();
13025 ;
13026 return 0;
13027}
13028_ACEOF
13029if ac_fn_c_try_link "$LINENO"; then :
13030 ac_cv_lib_rt_clock_settime=yes
13031else
13032 ac_cv_lib_rt_clock_settime=no
13033fi
13034rm -f core conftest.err conftest.$ac_objext \
13035 conftest$ac_exeext conftest.$ac_ext
13036LIBS=$ac_check_lib_save_LIBS
13037fi
13038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13039$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13040if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13041
13042 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13043
13044
13045fi
13046
13047
13048fi
13049done
13050
13051
Matthias Kloseb9621712010-04-24 17:59:49 +000013052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13053$as_echo_n "checking for major... " >&6; }
13054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013055/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013056
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013057#if defined(MAJOR_IN_MKDEV)
13058#include <sys/mkdev.h>
13059#elif defined(MAJOR_IN_SYSMACROS)
13060#include <sys/sysmacros.h>
13061#else
13062#include <sys/types.h>
13063#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013064
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013065int
13066main ()
13067{
13068
13069 makedev(major(0),minor(0));
13070
13071 ;
13072 return 0;
13073}
13074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013076
13077
Matthias Kloseb9621712010-04-24 17:59:49 +000013078$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013079
Matthias Kloseb9621712010-04-24 17:59:49 +000013080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13081$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013082
13083else
Skip Montanaro6dead952003-09-25 14:50:04 +000013084
Matthias Kloseb9621712010-04-24 17:59:49 +000013085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13086$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013087
13088fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013089rm -f core conftest.err conftest.$ac_objext \
13090 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013091
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013092# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013093# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13095$as_echo_n "checking for getaddrinfo... " >&6; }
13096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013098
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013099#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013100#include <sys/socket.h>
13101#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013102#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013103
Martin v. Löwis11437992002-04-12 09:54:03 +000013104int
13105main ()
13106{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013107getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013108 ;
13109 return 0;
13110}
13111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013112if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013113 have_getaddrinfo=yes
13114else
Matthias Kloseb9621712010-04-24 17:59:49 +000013115 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013117rm -f core conftest.err conftest.$ac_objext \
13118 conftest$ac_exeext conftest.$ac_ext
13119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13120$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013121if test $have_getaddrinfo = yes
13122then
Matthias Kloseb9621712010-04-24 17:59:49 +000013123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13124$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013125 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013127else
Matthias Kloseb9621712010-04-24 17:59:49 +000013128 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013129
13130if test "${enable_ipv6+set}" = set; then
13131 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13132else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013133 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013134fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013135else
Matthias Kloseb9621712010-04-24 17:59:49 +000013136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013137/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013138
Stefan Krah19c21392012-11-22 23:47:32 +010013139#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013140#include <sys/types.h>
13141#include <netdb.h>
13142#include <string.h>
13143#include <sys/socket.h>
13144#include <netinet/in.h>
13145
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013146int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013147{
13148 int passive, gaierr, inet4 = 0, inet6 = 0;
13149 struct addrinfo hints, *ai, *aitop;
13150 char straddr[INET6_ADDRSTRLEN], strport[16];
13151
13152 for (passive = 0; passive <= 1; passive++) {
13153 memset(&hints, 0, sizeof(hints));
13154 hints.ai_family = AF_UNSPEC;
13155 hints.ai_flags = passive ? AI_PASSIVE : 0;
13156 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013157 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13159 (void)gai_strerror(gaierr);
13160 goto bad;
13161 }
13162 for (ai = aitop; ai; ai = ai->ai_next) {
13163 if (ai->ai_addr == NULL ||
13164 ai->ai_addrlen == 0 ||
13165 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13166 straddr, sizeof(straddr), strport, sizeof(strport),
13167 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13168 goto bad;
13169 }
13170 switch (ai->ai_family) {
13171 case AF_INET:
13172 if (strcmp(strport, "54321") != 0) {
13173 goto bad;
13174 }
13175 if (passive) {
13176 if (strcmp(straddr, "0.0.0.0") != 0) {
13177 goto bad;
13178 }
13179 } else {
13180 if (strcmp(straddr, "127.0.0.1") != 0) {
13181 goto bad;
13182 }
13183 }
13184 inet4++;
13185 break;
13186 case AF_INET6:
13187 if (strcmp(strport, "54321") != 0) {
13188 goto bad;
13189 }
13190 if (passive) {
13191 if (strcmp(straddr, "::") != 0) {
13192 goto bad;
13193 }
13194 } else {
13195 if (strcmp(straddr, "::1") != 0) {
13196 goto bad;
13197 }
13198 }
13199 inet6++;
13200 break;
13201 case AF_UNSPEC:
13202 goto bad;
13203 break;
13204 default:
13205 /* another family support? */
13206 break;
13207 }
13208 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013209 freeaddrinfo(aitop);
13210 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013211 }
13212
13213 if (!(inet4 == 0 || inet4 == 2))
13214 goto bad;
13215 if (!(inet6 == 0 || inet6 == 2))
13216 goto bad;
13217
13218 if (aitop)
13219 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013221
13222 bad:
13223 if (aitop)
13224 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013225 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013226}
13227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013229if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013230 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013231else
Matthias Kloseb9621712010-04-24 17:59:49 +000013232 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013236fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013237
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013238fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013239
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13243$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13244
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013245if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013246then
13247 if test $ipv6 = yes
13248 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013249 echo 'Fatal: You must get working getaddrinfo() function.'
13250 echo ' or you can specify "--disable-ipv6"'.
13251 exit 1
13252 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013253else
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
Matthias Kloseb9621712010-04-24 17:59:49 +000013255$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013256
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013258
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013259for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013260do :
13261 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013262if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013264#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013265_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013267fi
13268done
13269
Michael W. Hudson54241132001-12-07 15:38:26 +000013270
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013271# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13273$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013274if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013275 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013276else
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013278/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279#include <sys/types.h>
13280#include <sys/time.h>
13281#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013282
Martin v. Löwis11437992002-04-12 09:54:03 +000013283int
13284main ()
13285{
13286if ((struct tm *) 0)
13287return 0;
13288 ;
13289 return 0;
13290}
13291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013292if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013293 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013294else
Matthias Kloseb9621712010-04-24 17:59:49 +000013295 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13300$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013301if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013302
Matthias Kloseb9621712010-04-24 17:59:49 +000013303$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304
13305fi
13306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13308$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013309if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013311else
Matthias Kloseb9621712010-04-24 17:59:49 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013314#include <sys/types.h>
13315#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013316
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013320struct tm tm;
13321 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013322 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013323 ;
13324 return 0;
13325}
13326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013327if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013328 ac_cv_struct_tm=time.h
13329else
Matthias Kloseb9621712010-04-24 17:59:49 +000013330 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013333fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13335$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013336if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013337
Matthias Kloseb9621712010-04-24 17:59:49 +000013338$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013339
13340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342ac_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 +000013343#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345"
Victor Stinnere0be4232011-10-25 13:06:09 +020013346if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013347
13348cat >>confdefs.h <<_ACEOF
13349#define HAVE_STRUCT_TM_TM_ZONE 1
13350_ACEOF
13351
13352
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013353fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013354
Martin v. Löwis11437992002-04-12 09:54:03 +000013355if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13356
Matthias Kloseb9621712010-04-24 17:59:49 +000013357$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013358
13359else
Matthias Kloseb9621712010-04-24 17:59:49 +000013360 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13361"
Victor Stinnere0be4232011-10-25 13:06:09 +020013362if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013363 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364else
Matthias Kloseb9621712010-04-24 17:59:49 +000013365 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013366fi
13367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013368cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013369#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013370_ACEOF
13371
Matthias Kloseb9621712010-04-24 17:59:49 +000013372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13373$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013374if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013376else
Matthias Kloseb9621712010-04-24 17:59:49 +000013377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013379#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013380#if !HAVE_DECL_TZNAME
13381extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Martin v. Löwis11437992002-04-12 09:54:03 +000013384int
13385main ()
13386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013387return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 ;
13389 return 0;
13390}
13391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013393 ac_cv_var_tzname=yes
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013397rm -f core conftest.err conftest.$ac_objext \
13398 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013399fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13401$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013402 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Matthias Kloseb9621712010-04-24 17:59:49 +000013404$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013405
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013406 fi
13407fi
13408
Matthias Kloseb9621712010-04-24 17:59:49 +000013409ac_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 +020013410if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013411
13412cat >>confdefs.h <<_ACEOF
13413#define HAVE_STRUCT_STAT_ST_RDEV 1
13414_ACEOF
13415
13416
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013417fi
13418
Matthias Kloseb9621712010-04-24 17:59:49 +000013419ac_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 +020013420if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422cat >>confdefs.h <<_ACEOF
13423#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13424_ACEOF
13425
13426
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013427fi
13428
Matthias Kloseb9621712010-04-24 17:59:49 +000013429ac_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 +020013430if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013431
13432cat >>confdefs.h <<_ACEOF
13433#define HAVE_STRUCT_STAT_ST_FLAGS 1
13434_ACEOF
13435
13436
13437fi
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439ac_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 +020013440if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013441
13442cat >>confdefs.h <<_ACEOF
13443#define HAVE_STRUCT_STAT_ST_GEN 1
13444_ACEOF
13445
13446
13447fi
13448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449ac_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 +020013450if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13454_ACEOF
13455
13456
13457fi
13458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459ac_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 +020013460if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462cat >>confdefs.h <<_ACEOF
13463#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13464_ACEOF
13465
13466
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013467fi
13468
Stefan Krah267b6392016-04-26 01:09:18 +020013469ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13470 #include <sys/types.h>
13471 #include <pwd.h>
13472
13473"
13474if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13475
13476cat >>confdefs.h <<_ACEOF
13477#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13478_ACEOF
13479
13480
13481fi
13482ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13483 #include <sys/types.h>
13484 #include <pwd.h>
13485
13486"
13487if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13488
13489cat >>confdefs.h <<_ACEOF
13490#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13491_ACEOF
13492
13493
13494fi
13495
Zachary Ware6a6967e2016-10-01 00:47:27 -050013496# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13497ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13498"
13499if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13500
13501cat >>confdefs.h <<_ACEOF
13502#define HAVE_SIGINFO_T_SI_BAND 1
13503_ACEOF
13504
13505
13506fi
13507
Michael W. Hudson54241132001-12-07 15:38:26 +000013508
Matthias Kloseb9621712010-04-24 17:59:49 +000013509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13510$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013511if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013512 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013513else
Matthias Kloseb159a552010-04-25 21:00:44 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013516/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013517#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013521return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013522 ;
13523 return 0;
13524}
13525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013526if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013527 ac_cv_header_time_altzone=yes
13528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13536$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
Matthias Kloseb9621712010-04-24 17:59:49 +000013539$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013540
13541fi
13542
Guido van Rossumda88dad1995-01-26 00:46:29 +000013543was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13545$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013548
13549#include <sys/types.h>
13550#include <sys/select.h>
13551#include <sys/time.h>
13552
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013556;
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öwis11437992002-04-12 09:54:03 +000013562
13563
Matthias Kloseb9621712010-04-24 17:59:49 +000013564$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013566 was_it_defined=yes
13567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13571$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13574$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013575if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013576 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013577else
Matthias Kloseb9621712010-04-24 17:59:49 +000013578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013579/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013580#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013581int
13582main ()
13583{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013584struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 ;
13586 return 0;
13587}
13588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013590 ac_cv_struct_addrinfo=yes
13591else
Matthias Kloseb9621712010-04-24 17:59:49 +000013592 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13595fi
13596
Matthias Kloseb9621712010-04-24 17:59:49 +000013597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13598$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013599if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013600
Matthias Kloseb9621712010-04-24 17:59:49 +000013601$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013602
13603fi
13604
Matthias Kloseb9621712010-04-24 17:59:49 +000013605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13606$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013607if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013608 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609else
Matthias Kloseb9621712010-04-24 17:59:49 +000013610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013611/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612
13613# include <sys/types.h>
13614# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013615int
13616main ()
13617{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013618struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013624 ac_cv_struct_sockaddr_storage=yes
13625else
Matthias Kloseb9621712010-04-24 17:59:49 +000013626 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13629fi
13630
Matthias Kloseb9621712010-04-24 17:59:49 +000013631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13632$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013633if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013636
13637fi
13638
Christian Heimesdffa3942016-09-05 23:54:41 +020013639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13640$as_echo_n "checking for sockaddr_alg... " >&6; }
13641if ${ac_cv_struct_sockaddr_alg+:} false; then :
13642 $as_echo_n "(cached) " >&6
13643else
13644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13645/* end confdefs.h. */
13646
13647# include <sys/types.h>
13648# include <sys/socket.h>
13649# include <linux/if_alg.h>
13650int
13651main ()
13652{
13653struct sockaddr_alg s
13654 ;
13655 return 0;
13656}
13657_ACEOF
13658if ac_fn_c_try_compile "$LINENO"; then :
13659 ac_cv_struct_sockaddr_alg=yes
13660else
13661 ac_cv_struct_sockaddr_alg=no
13662fi
13663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13664fi
13665
13666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13667$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13668if test $ac_cv_struct_sockaddr_alg = yes; then
13669
13670$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13671
13672fi
13673
Guido van Rossum627b2d71993-12-24 10:39:16 +000013674# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13677$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013678if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013679 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013680else
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013682/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013683$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013684int
13685main ()
13686{
13687static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013688test_array [0] = 0;
13689return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
13691 ;
13692 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013693}
Martin v. Löwis11437992002-04-12 09:54:03 +000013694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013696 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13703$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013706
13707fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013708
Matthias Kloseb9621712010-04-24 17:59:49 +000013709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13710$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013711if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013713else
Matthias Kloseb9621712010-04-24 17:59:49 +000013714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013716
Martin v. Löwis11437992002-04-12 09:54:03 +000013717int
13718main ()
13719{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013720
Martin v. Löwis11437992002-04-12 09:54:03 +000013721#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013722 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013723 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013724 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013726 char const *const *pcpcc;
13727 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 /* NEC SVR4.0.2 mips cc rejects this. */
13729 struct point {int x, y;};
13730 static struct point const zero = {0,0};
13731 /* AIX XL C 1.02.0.0 rejects this.
13732 It does not let you subtract one const X* pointer from another in
13733 an arm of an if-expression whose if-part is not a constant
13734 expression */
13735 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013736 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013737 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013738 ++pcpcc;
13739 ppc = (char**) pcpcc;
13740 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013741 { /* SCO 3.2v4 cc rejects this sort of thing. */
13742 char tx;
13743 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013744 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013745
Martin v. Löwis11437992002-04-12 09:54:03 +000013746 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013747 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 }
13749 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13750 int x[] = {25, 17};
13751 const int *foo = &x[0];
13752 ++foo;
13753 }
13754 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13755 typedef const int *iptr;
13756 iptr p = 0;
13757 ++p;
13758 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013759 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013761 struct s { int j; const int *ap[3]; } bx;
13762 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013763 }
13764 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13765 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013766 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013767 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013768 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013769#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013770
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 ;
13772 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013773}
Martin v. Löwis11437992002-04-12 09:54:03 +000013774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013775if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776 ac_cv_c_const=yes
13777else
Matthias Kloseb9621712010-04-24 17:59:49 +000013778 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13783$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013784if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013785
Matthias Kloseb9621712010-04-24 17:59:49 +000013786$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013787
13788fi
13789
Michael W. Hudson54241132001-12-07 15:38:26 +000013790
Guido van Rossumda88dad1995-01-26 00:46:29 +000013791works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13793$as_echo_n "checking for working signed char... " >&6; }
13794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013795/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013796
Martin v. Löwis11437992002-04-12 09:54:03 +000013797int
13798main ()
13799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013800signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013801 ;
13802 return 0;
13803}
13804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013805if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013806 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013807else
Skip Montanaro6dead952003-09-25 14:50:04 +000013808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013810
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013811
Guido van Rossum7f43da71994-08-01 12:15:30 +000013812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13815$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013816
Guido van Rossumda88dad1995-01-26 00:46:29 +000013817have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13819$as_echo_n "checking for prototypes... " >&6; }
13820cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013821/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013822int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823int
13824main ()
13825{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013826return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013827 ;
13828 return 0;
13829}
13830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013831if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013832
Matthias Kloseb9621712010-04-24 17:59:49 +000013833$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Matthias Kloseb159a552010-04-25 21:00:44 +000013835 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013836fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13839$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840
Guido van Rossumda88dad1995-01-26 00:46:29 +000013841works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13843$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13844cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013845/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013846
13847#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013848int foo(int x, ...) {
13849 va_list va;
13850 va_start(va, x);
13851 va_arg(va, int);
13852 va_arg(va, char *);
13853 va_arg(va, double);
13854 return 0;
13855}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013856
Martin v. Löwis11437992002-04-12 09:54:03 +000013857int
13858main ()
13859{
Guido van Rossum90eea071996-08-30 20:58:57 +000013860return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 ;
13862 return 0;
13863}
13864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013865if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013866
13867
Matthias Kloseb9621712010-04-24 17:59:49 +000013868$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013869
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013870 works=yes
13871
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13875$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013876
Martin v. Löwisd6320502004-08-12 13:45:08 +000013877# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13879$as_echo_n "checking for socketpair... " >&6; }
13880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013881/* end confdefs.h. */
13882
13883#include <sys/types.h>
13884#include <sys/socket.h>
13885
13886int
13887main ()
13888{
13889void *x=socketpair
13890 ;
13891 return 0;
13892}
13893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013895
Matthias Kloseb9621712010-04-24 17:59:49 +000013896$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013897
Matthias Kloseb159a552010-04-25 21:00:44 +000013898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013900else
Matthias Kloseb9621712010-04-24 17:59:49 +000013901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13902$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013903
13904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013906
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013907# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13909$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013911/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013912#include <sys/types.h>
13913#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013914int
13915main ()
13916{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013917struct sockaddr x;
13918x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013919 ;
13920 return 0;
13921}
13922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013923if ac_fn_c_try_compile "$LINENO"; then :
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13925$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013926
Matthias Kloseb9621712010-04-24 17:59:49 +000013927$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013928
13929else
Matthias Kloseb9621712010-04-24 17:59:49 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13931$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013932
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013936# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
13938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013940if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013941
Matthias Kloseb9621712010-04-24 17:59:49 +000013942 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013943
Matthias Kloseb9621712010-04-24 17:59:49 +000013944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13945$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013946 OLD_CFLAGS=$CFLAGS
13947 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013949/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013950
13951# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013952
Martin v. Löwis11437992002-04-12 09:54:03 +000013953int
13954main ()
13955{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013956
13957 char *name;
13958 struct hostent *he, *res;
13959 char buffer[2048];
13960 int buflen = 2048;
13961 int h_errnop;
13962
13963 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013964
13965 ;
13966 return 0;
13967}
13968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013969if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013970
Matthias Kloseb9621712010-04-24 17:59:49 +000013971 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013972
Martin v. Löwis11437992002-04-12 09:54:03 +000013973
Matthias Kloseb9621712010-04-24 17:59:49 +000013974$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
Matthias Kloseb9621712010-04-24 17:59:49 +000013976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13977$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013978
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013979else
Skip Montanaro6dead952003-09-25 14:50:04 +000013980
Matthias Kloseb9621712010-04-24 17:59:49 +000013981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13982$as_echo "no" >&6; }
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13984$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013987
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013989
Martin v. Löwis11437992002-04-12 09:54:03 +000013990int
13991main ()
13992{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013993
13994 char *name;
13995 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013996 char buffer[2048];
13997 int buflen = 2048;
13998 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013999
Matthias Kloseb159a552010-04-25 21:00:44 +000014000 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000014001
14002 ;
14003 return 0;
14004}
14005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000014009
Martin v. Löwis11437992002-04-12 09:54:03 +000014010
Matthias Kloseb159a552010-04-25 21:00:44 +000014011$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014012
Matthias Kloseb9621712010-04-24 17:59:49 +000014013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14014$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014016else
Skip Montanaro6dead952003-09-25 14:50:04 +000014017
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14019$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000014020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
14021$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
14022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14023/* end confdefs.h. */
14024
14025# include <netdb.h>
14026
14027int
14028main ()
14029{
14030
14031 char *name;
14032 struct hostent *he;
14033 struct hostent_data data;
14034
14035 (void) gethostbyname_r(name, he, &data);
14036
14037 ;
14038 return 0;
14039}
14040_ACEOF
14041if ac_fn_c_try_compile "$LINENO"; then :
14042
14043 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14044
14045
14046$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14047
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14049$as_echo "yes" >&6; }
14050
14051else
14052
14053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14054$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014055
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014058
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014061
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014064 CFLAGS=$OLD_CFLAGS
14065
14066else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014067
Matthias Kloseb9621712010-04-24 17:59:49 +000014068 for ac_func in gethostbyname
14069do :
14070 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014071if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014072 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014073#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014074_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014076fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014077done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014078
Michael W. Hudson54241132001-12-07 15:38:26 +000014079
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014080fi
14081
Michael W. Hudson54241132001-12-07 15:38:26 +000014082
14083
14084
14085
14086
14087
Guido van Rossum627b2d71993-12-24 10:39:16 +000014088# checks for system services
14089# (none yet)
14090
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014091# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014092ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014093if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014094
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014095else
Matthias Kloseb9621712010-04-24 17:59:49 +000014096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14097$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014098if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014099 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014102LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014106/* Override any GCC internal prototype to avoid an error.
14107 Use char because int might match the return type of a GCC
14108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014109#ifdef __cplusplus
14110extern "C"
14111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014112char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014113int
14114main ()
14115{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014116return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014117 ;
14118 return 0;
14119}
14120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014123else
Matthias Kloseb9621712010-04-24 17:59:49 +000014124 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014125fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014126rm -f core conftest.err conftest.$ac_objext \
14127 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014128LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14131$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014132if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 cat >>confdefs.h <<_ACEOF
14134#define HAVE_LIBIEEE 1
14135_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014136
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014137 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014138
Guido van Rossum627b2d71993-12-24 10:39:16 +000014139fi
14140
Michael W. Hudson54241132001-12-07 15:38:26 +000014141
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014142fi
14143
Michael W. Hudson54241132001-12-07 15:38:26 +000014144
Guido van Rossum7f43da71994-08-01 12:15:30 +000014145# check for --with-libm=...
14146
Guido van Rossum563e7081996-09-10 18:20:48 +000014147case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014148Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014149*) LIBM=-lm
14150esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14152$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014155if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014157if test "$withval" = no
14158then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14160$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014161elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14164$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014165else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014166fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14169$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
14171
Guido van Rossum7f43da71994-08-01 12:15:30 +000014172
14173# check for --with-libc=...
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14176$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014177
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014179if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014181if test "$withval" = no
14182then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14184$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014185elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014186then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14188$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014189else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014190fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
14193$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194fi
14195
Guido van Rossum7f43da71994-08-01 12:15:30 +000014196
Stefan Krah1919b7e2012-03-21 18:25:23 +010014197# **************************************
14198# * Check for gcc x64 inline assembler *
14199# **************************************
14200
14201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14202$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14203cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14204/* end confdefs.h. */
14205
14206int
14207main ()
14208{
14209
14210 __asm__ __volatile__ ("movq %rcx, %rax");
14211
14212 ;
14213 return 0;
14214}
14215_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014216if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014217 have_gcc_asm_for_x64=yes
14218else
14219 have_gcc_asm_for_x64=no
14220fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014221rm -f core conftest.err conftest.$ac_objext \
14222 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14224$as_echo "$have_gcc_asm_for_x64" >&6; }
14225if test "$have_gcc_asm_for_x64" = yes
14226then
14227
14228$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14229
14230fi
14231
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014232# **************************************************
14233# * Check for various properties of floating point *
14234# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014235
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14237$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14238if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014240else
14241
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014242
14243ax_cv_c_float_words_bigendian=unknown
14244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014245/* end confdefs.h. */
14246
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014247
14248double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14249
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014250
14251_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014252if ac_fn_c_try_compile "$LINENO"; then :
14253
14254
14255if grep noonsees conftest.$ac_objext >/dev/null ; then
14256 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014257fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014258if grep seesnoon conftest.$ac_objext >/dev/null ; then
14259 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14260 ax_cv_c_float_words_bigendian=no
14261 else
14262 ax_cv_c_float_words_bigendian=unknown
14263 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014264fi
14265
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014266
14267fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014269fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14271$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014272
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014273case $ax_cv_c_float_words_bigendian in
14274 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014275
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014276$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14277 ;;
14278 no)
14279 ;;
14280 *)
14281 as_fn_error $? "
14282
14283Unknown float word ordering. You need to manually preset
14284ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14285
14286 " "$LINENO" 5 ;;
14287esac
14288
14289
14290if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014291then
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014294
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014295elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014296then
14297
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014298$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14299
14300else
14301 # Some ARM platforms use a mixed-endian representation for doubles.
14302 # While Python doesn't currently have full support for these platforms
14303 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14304 # conversions work.
14305 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14306 # or little, then it must be this?
14307
Matthias Kloseb9621712010-04-24 17:59:49 +000014308$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014309
14310fi
14311
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014312# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014313# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014314# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014315# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014316# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014317# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014318
14319# This inline assembler syntax may also work for suncc and icc,
14320# so we try it on all platforms.
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14323$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014325/* end confdefs.h. */
14326
14327int
14328main ()
14329{
14330
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014331 unsigned short cw;
14332 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14333 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014334
14335 ;
14336 return 0;
14337}
14338_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014339if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014340 have_gcc_asm_for_x87=yes
14341else
Matthias Kloseb9621712010-04-24 17:59:49 +000014342 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014343fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014344rm -f core conftest.err conftest.$ac_objext \
14345 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14347$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014348if test "$have_gcc_asm_for_x87" = yes
14349then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014350
Matthias Kloseb9621712010-04-24 17:59:49 +000014351$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014352
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014353fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14356$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14357cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14358/* end confdefs.h. */
14359
14360int
14361main ()
14362{
14363
14364 unsigned int fpcr;
14365 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14366 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14367
14368 ;
14369 return 0;
14370}
14371_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014372if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014373 have_gcc_asm_for_mc68881=yes
14374else
14375 have_gcc_asm_for_mc68881=no
14376fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014377rm -f core conftest.err conftest.$ac_objext \
14378 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14380$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14381if test "$have_gcc_asm_for_mc68881" = yes
14382then
14383
14384$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14385
14386fi
14387
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014388# Detect whether system arithmetic is subject to x87-style double
14389# rounding issues. The result of this test has little meaning on non
14390# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14391# mode is round-to-nearest and double rounding issues are present, and
14392# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14394$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014395# $BASECFLAGS may affect the result
14396ac_save_cc="$CC"
14397CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014399 ac_cv_x87_double_rounding=no
14400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014402/* end confdefs.h. */
14403
14404#include <stdlib.h>
14405#include <math.h>
14406int main() {
14407 volatile double x, y, z;
14408 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14409 x = 0.99999999999999989; /* 1-2**-53 */
14410 y = 1./x;
14411 if (y != 1.)
14412 exit(0);
14413 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14414 x = 1e16;
14415 y = 2.99999;
14416 z = x + y;
14417 if (z != 1e16+4.)
14418 exit(0);
14419 /* both tests show evidence of double rounding */
14420 exit(1);
14421}
14422
14423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014424if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014425 ac_cv_x87_double_rounding=no
14426else
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14430 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014431fi
14432
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014433CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14435$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014436if test "$ac_cv_x87_double_rounding" = yes
14437then
14438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014440
14441fi
14442
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014443# ************************************
14444# * Check for mathematical functions *
14445# ************************************
14446
14447LIBS_SAVE=$LIBS
14448LIBS="$LIBS $LIBM"
14449
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014450for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14451do :
14452 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14453ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014454if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014455 cat >>confdefs.h <<_ACEOF
14456#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14457_ACEOF
14458
14459fi
14460done
14461
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014462for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014463do :
14464 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14465ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014466if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014467 cat >>confdefs.h <<_ACEOF
14468#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14469_ACEOF
14470
14471fi
14472done
14473
14474ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14475"
Victor Stinnere0be4232011-10-25 13:06:09 +020014476if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014477 ac_have_decl=1
14478else
14479 ac_have_decl=0
14480fi
14481
14482cat >>confdefs.h <<_ACEOF
14483#define HAVE_DECL_ISINF $ac_have_decl
14484_ACEOF
14485ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14486"
Victor Stinnere0be4232011-10-25 13:06:09 +020014487if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014488 ac_have_decl=1
14489else
14490 ac_have_decl=0
14491fi
14492
14493cat >>confdefs.h <<_ACEOF
14494#define HAVE_DECL_ISNAN $ac_have_decl
14495_ACEOF
14496ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14497"
Victor Stinnere0be4232011-10-25 13:06:09 +020014498if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014499 ac_have_decl=1
14500else
14501 ac_have_decl=0
14502fi
14503
14504cat >>confdefs.h <<_ACEOF
14505#define HAVE_DECL_ISFINITE $ac_have_decl
14506_ACEOF
14507
14508
Mark Dickinsona614f042009-11-28 12:48:43 +000014509# For multiprocessing module, check that sem_open
14510# actually works. For FreeBSD versions <= 7.2,
14511# the kernel module that provides POSIX semaphores
14512# isn't loaded by default, so an attempt to call
14513# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14515$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014516if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014518else
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014520 ac_cv_posix_semaphores_enabled=yes
14521else
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014523/* end confdefs.h. */
14524
14525#include <unistd.h>
14526#include <fcntl.h>
14527#include <stdio.h>
14528#include <semaphore.h>
14529#include <sys/stat.h>
14530
14531int main(void) {
14532 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14533 if (a == SEM_FAILED) {
14534 perror("sem_open");
14535 return 1;
14536 }
14537 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014538 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014539 return 0;
14540}
14541
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014544 ac_cv_posix_semaphores_enabled=yes
14545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014547fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14549 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014550fi
14551
14552
Mark Dickinsona614f042009-11-28 12:48:43 +000014553fi
14554
Matthias Kloseb9621712010-04-24 17:59:49 +000014555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14556$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014557if test $ac_cv_posix_semaphores_enabled = no
14558then
14559
Matthias Kloseb9621712010-04-24 17:59:49 +000014560$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014561
14562fi
14563
Mark Dickinson10683072009-04-18 21:18:19 +000014564# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14566$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014567if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014568 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014571 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014574/* end confdefs.h. */
14575
14576#include <unistd.h>
14577#include <fcntl.h>
14578#include <stdio.h>
14579#include <semaphore.h>
14580#include <sys/stat.h>
14581
14582int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014583 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014584 int count;
14585 int res;
14586 if(a==SEM_FAILED){
14587 perror("sem_open");
14588 return 1;
14589
14590 }
14591 res = sem_getvalue(a, &count);
14592 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014593 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014594 return res==-1 ? 1 : 0;
14595}
14596
Mark Dickinson10683072009-04-18 21:18:19 +000014597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014598if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014599 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014600else
Matthias Kloseb9621712010-04-24 17:59:49 +000014601 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014602fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14604 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014605fi
14606
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014607
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014608fi
14609
Matthias Kloseb9621712010-04-24 17:59:49 +000014610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14611$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014612if test $ac_cv_broken_sem_getvalue = yes
14613then
14614
Matthias Kloseb9621712010-04-24 17:59:49 +000014615$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014616
14617fi
14618
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014619ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14620"
14621if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14622 ac_have_decl=1
14623else
14624 ac_have_decl=0
14625fi
14626
14627cat >>confdefs.h <<_ACEOF
14628#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14629_ACEOF
14630ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14631"
14632if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14633 ac_have_decl=1
14634else
14635 ac_have_decl=0
14636fi
14637
14638cat >>confdefs.h <<_ACEOF
14639#define HAVE_DECL_RTLD_NOW $ac_have_decl
14640_ACEOF
14641ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14642"
14643if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14644 ac_have_decl=1
14645else
14646 ac_have_decl=0
14647fi
14648
14649cat >>confdefs.h <<_ACEOF
14650#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14651_ACEOF
14652ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14653"
14654if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14655 ac_have_decl=1
14656else
14657 ac_have_decl=0
14658fi
14659
14660cat >>confdefs.h <<_ACEOF
14661#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14662_ACEOF
14663ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14664"
14665if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14666 ac_have_decl=1
14667else
14668 ac_have_decl=0
14669fi
14670
14671cat >>confdefs.h <<_ACEOF
14672#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14673_ACEOF
14674ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14675"
14676if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14677 ac_have_decl=1
14678else
14679 ac_have_decl=0
14680fi
14681
14682cat >>confdefs.h <<_ACEOF
14683#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14684_ACEOF
14685ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14686"
14687if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14688 ac_have_decl=1
14689else
14690 ac_have_decl=0
14691fi
14692
14693cat >>confdefs.h <<_ACEOF
14694#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14695_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014696ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14697"
14698if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14699 ac_have_decl=1
14700else
14701 ac_have_decl=0
14702fi
14703
14704cat >>confdefs.h <<_ACEOF
14705#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14706_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014707
14708
Mark Dickinsonbd792642009-03-18 20:06:12 +000014709# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14711$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014712# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014713if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014714 enableval=$enable_big_digits; case $enable_big_digits in
14715yes)
14716 enable_big_digits=30 ;;
14717no)
14718 enable_big_digits=15 ;;
1471915|30)
14720 ;;
14721*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014722 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 +000014723esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14725$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014726
14727cat >>confdefs.h <<_ACEOF
14728#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14729_ACEOF
14730
14731
14732else
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14734$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014735fi
14736
14737
Guido van Rossumef2255b2000-03-10 22:30:29 +000014738# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014739ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014740if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014741
14742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014745 wchar_h="yes"
14746
Guido van Rossumef2255b2000-03-10 22:30:29 +000014747else
Martin v. Löwis11437992002-04-12 09:54:03 +000014748 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014749
14750fi
14751
Michael W. Hudson54241132001-12-07 15:38:26 +000014752
Martin v. Löwis11437992002-04-12 09:54:03 +000014753
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014754# determine wchar_t size
14755if test "$wchar_h" = yes
14756then
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014758# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14759# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14760# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14762$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014763if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014765else
Matthias Kloseb9621712010-04-24 17:59:49 +000014766 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14767"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769else
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 if test "$ac_cv_type_wchar_t" = yes; then
14771 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14772$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014773as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014774See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014775 else
14776 ac_cv_sizeof_wchar_t=0
14777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014778fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014779
Martin v. Löwis11437992002-04-12 09:54:03 +000014780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14782$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014783
14784
14785
Martin v. Löwis11437992002-04-12 09:54:03 +000014786cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014787#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014788_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014789
Michael W. Hudson54241132001-12-07 15:38:26 +000014790
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014791fi
14792
Matthias Kloseb9621712010-04-24 17:59:49 +000014793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14794$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014795have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014797/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014798
14799#include <tcl.h>
14800#if TCL_UTF_MAX != 6
14801# error "NOT UCS4_TCL"
14802#endif
14803int
14804main ()
14805{
14806
14807 ;
14808 return 0;
14809}
14810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014811if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014812
14813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014815
14816 have_ucs4_tcl=yes
14817
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14821$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014822
Skip Montanaro6dead952003-09-25 14:50:04 +000014823# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014824if test "$wchar_h" = yes
14825then
14826 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14828$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014829 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014830 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014831else
14832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014834 ac_cv_wchar_t_signed=yes
14835else
Matthias Kloseb9621712010-04-24 17:59:49 +000014836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014837/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014838
14839 #include <wchar.h>
14840 int main()
14841 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014842 /* Success: exit code 0 */
14843 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014844 }
14845
14846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014847if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014848 ac_cv_wchar_t_signed=yes
14849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14853 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014854fi
14855
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014856fi
14857
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14859$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014860fi
14861
Michael Osipov3738fad2018-08-24 18:17:19 +020014862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14863$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014864# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014865if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014866 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014867then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014868
Matthias Kloseb9621712010-04-24 17:59:49 +000014869$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014870
Michael Osipov3738fad2018-08-24 18:17:19 +020014871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14872$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014873else
Michael Osipov3738fad2018-08-24 18:17:19 +020014874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14875$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014876fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014877
14878# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14880$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014881if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014882 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014883else
Matthias Kloseb9621712010-04-24 17:59:49 +000014884 ac_cv_c_bigendian=unknown
14885 # See if we're dealing with a universal compiler.
14886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14887/* end confdefs.h. */
14888#ifndef __APPLE_CC__
14889 not a universal capable compiler
14890 #endif
14891 typedef int dummy;
14892
Skip Montanaro6dead952003-09-25 14:50:04 +000014893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014894if ac_fn_c_try_compile "$LINENO"; then :
14895
14896 # Check for potential -arch flags. It is not universal unless
14897 # there are at least two -arch flags with different values.
14898 ac_arch=
14899 ac_prev=
14900 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14901 if test -n "$ac_prev"; then
14902 case $ac_word in
14903 i?86 | x86_64 | ppc | ppc64)
14904 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14905 ac_arch=$ac_word
14906 else
14907 ac_cv_c_bigendian=universal
14908 break
14909 fi
14910 ;;
14911 esac
14912 ac_prev=
14913 elif test "x$ac_word" = "x-arch"; then
14914 ac_prev=arch
14915 fi
14916 done
14917fi
14918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14919 if test $ac_cv_c_bigendian = unknown; then
14920 # See if sys/param.h defines the BYTE_ORDER macro.
14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014922/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014923#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014924 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925
Martin v. Löwis11437992002-04-12 09:54:03 +000014926int
14927main ()
14928{
Matthias Kloseb9621712010-04-24 17:59:49 +000014929#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14930 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14931 && LITTLE_ENDIAN)
14932 bogus endian macros
14933 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
14935 ;
14936 return 0;
14937}
14938_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014939if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014940 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014942/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014943#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014945
Martin v. Löwis11437992002-04-12 09:54:03 +000014946int
14947main ()
14948{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014949#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014950 not big endian
14951 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014952
14953 ;
14954 return 0;
14955}
14956_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014957if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014958 ac_cv_c_bigendian=yes
14959else
Matthias Kloseb9621712010-04-24 17:59:49 +000014960 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014963fi
14964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14965 fi
14966 if test $ac_cv_c_bigendian = unknown; then
14967 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014969/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014970#include <limits.h>
14971
Martin v. Löwis11437992002-04-12 09:54:03 +000014972int
14973main ()
14974{
Matthias Kloseb9621712010-04-24 17:59:49 +000014975#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14976 bogus endian macros
14977 #endif
14978
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 ;
14980 return 0;
14981}
14982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014983if ac_fn_c_try_compile "$LINENO"; then :
14984 # It does; now see whether it defined to _BIG_ENDIAN or not.
14985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14986/* end confdefs.h. */
14987#include <limits.h>
14988
14989int
14990main ()
14991{
14992#ifndef _BIG_ENDIAN
14993 not big endian
14994 #endif
14995
14996 ;
14997 return 0;
14998}
14999_ACEOF
15000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015001 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015002else
Matthias Kloseb9621712010-04-24 17:59:49 +000015003 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15006fi
15007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15008 fi
15009 if test $ac_cv_c_bigendian = unknown; then
15010 # Compile a test program.
15011 if test "$cross_compiling" = yes; then :
15012 # Try to guess by grepping values from an object file.
15013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15014/* end confdefs.h. */
15015short int ascii_mm[] =
15016 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
15017 short int ascii_ii[] =
15018 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
15019 int use_ascii (int i) {
15020 return ascii_mm[i] + ascii_ii[i];
15021 }
15022 short int ebcdic_ii[] =
15023 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15024 short int ebcdic_mm[] =
15025 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15026 int use_ebcdic (int i) {
15027 return ebcdic_mm[i] + ebcdic_ii[i];
15028 }
15029 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030
Matthias Kloseb9621712010-04-24 17:59:49 +000015031int
15032main ()
15033{
15034return use_ascii (foo) == use_ebcdic (foo);
15035 ;
15036 return 0;
15037}
15038_ACEOF
15039if ac_fn_c_try_compile "$LINENO"; then :
15040 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15041 ac_cv_c_bigendian=yes
15042 fi
15043 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15044 if test "$ac_cv_c_bigendian" = unknown; then
15045 ac_cv_c_bigendian=no
15046 else
15047 # finding both strings is unlikely to happen, but who knows?
15048 ac_cv_c_bigendian=unknown
15049 fi
15050 fi
15051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015055/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015056$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015057int
15058main ()
15059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061 /* Are we little or big endian? From Harbison&Steele. */
15062 union
15063 {
15064 long int l;
15065 char c[sizeof (long int)];
15066 } u;
15067 u.l = 1;
15068 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015069
15070 ;
15071 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015072}
Martin v. Löwis11437992002-04-12 09:54:03 +000015073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015074if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015075 ac_cv_c_bigendian=no
15076else
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015084fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15086$as_echo "$ac_cv_c_bigendian" >&6; }
15087 case $ac_cv_c_bigendian in #(
15088 yes)
15089 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15090;; #(
15091 no)
15092 ;; #(
15093 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015094
Matthias Kloseb9621712010-04-24 17:59:49 +000015095$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015096
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 ;; #(
15098 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015099 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015100 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015101 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015102
Michael W. Hudson54241132001-12-07 15:38:26 +000015103
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015104# ABI version string for Python extension modules. This appears between the
15105# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15106# from the following attributes which affect the ABI of this Python build (in
15107# this order):
15108#
15109# * The Python implementation (always 'cpython-' for us)
15110# * The major and minor version numbers
15111# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015112#
15113# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015114# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15115# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015116#
15117# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15118# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015119
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15121$as_echo_n "checking ABIFLAGS... " >&6; }
15122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15123$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15125$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015126SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15128$as_echo "$SOABI" >&6; }
15129
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015130
15131case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015132 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015133 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15134 *)
15135 EXT_SUFFIX=${SHLIB_SUFFIX};;
15136esac
15137
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15139$as_echo_n "checking LDVERSION... " >&6; }
15140LDVERSION='$(VERSION)$(ABIFLAGS)'
15141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15142$as_echo "$LDVERSION" >&6; }
15143
doko@python.org87421192013-01-26 11:39:31 +010015144
doko@ubuntu.com55532312016-06-14 08:55:19 +020015145if test x$PLATFORM_TRIPLET = x; then
15146 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15147else
15148 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15149fi
doko@python.org87421192013-01-26 11:39:31 +010015150
15151
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015152# Check whether right shifting a negative integer extends the sign bit
15153# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15155$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015158else
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
Matthias Kloseb9621712010-04-24 17:59:49 +000015160if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015161 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015164/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015165
15166int main()
15167{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015168 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015169}
15170
Martin v. Löwis11437992002-04-12 09:54:03 +000015171_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015172if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015173 ac_cv_rshift_extends_sign=yes
15174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015176fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015177rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15178 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015179fi
15180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181fi
15182
Matthias Kloseb9621712010-04-24 17:59:49 +000015183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15184$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015185if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015186then
Martin v. Löwis11437992002-04-12 09:54:03 +000015187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015189
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015190fi
15191
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015192# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15194$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015195if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015197else
Martin v. Löwis11437992002-04-12 09:54:03 +000015198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015200/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015201#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015202int
15203main ()
15204{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015205
15206 FILE *f = fopen("/dev/null", "r");
15207 flockfile(f);
15208 getc_unlocked(f);
15209 funlockfile(f);
15210
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ;
15212 return 0;
15213}
15214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015215if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015216 ac_cv_have_getc_unlocked=yes
15217else
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 ac_cv_have_getc_unlocked=no
15219fi
15220rm -f core conftest.err conftest.$ac_objext \
15221 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015223
Matthias Kloseb9621712010-04-24 17:59:49 +000015224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15225$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015226if test "$ac_cv_have_getc_unlocked" = yes
15227then
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Matthias Kloseb9621712010-04-24 17:59:49 +000015229$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015230
15231fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015232
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015233# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015234# save the value of LIBS so we don't actually link Python with readline
15235LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015236
Gregory P. Smith18820942008-09-07 06:24:49 +000015237# On some systems we need to link readline to a termcap compatible
15238# library. NOTE: Keep the precedence of listed libraries synchronised
15239# with setup.py.
15240py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15242$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015243for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015244 if test -z "$py_libtermcap"; then
15245 READLINE_LIBS="-lreadline"
15246 else
15247 READLINE_LIBS="-lreadline -l$py_libtermcap"
15248 fi
15249 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015251/* end confdefs.h. */
15252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253/* Override any GCC internal prototype to avoid an error.
15254 Use char because int might match the return type of a GCC
15255 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015256#ifdef __cplusplus
15257extern "C"
15258#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015259char readline ();
15260int
15261main ()
15262{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015264 ;
15265 return 0;
15266}
15267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015268if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015269 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015271rm -f core conftest.err conftest.$ac_objext \
15272 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015273 if test $py_cv_lib_readline = yes; then
15274 break
15275 fi
15276done
15277# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15278#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015279if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15281$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015282else
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15284$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015285
Matthias Kloseb9621712010-04-24 17:59:49 +000015286$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015287
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015288fi
15289
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015290# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015292/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015293#include <readline/readline.h>
15294_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015295if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015296 have_readline=yes
15297else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015298 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015299
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015300fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015301rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015302if test $have_readline = yes
15303then
Matthias Kloseb9621712010-04-24 17:59:49 +000015304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015305/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015306#include <readline/readline.h>
15307
15308_ACEOF
15309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015310 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015311
Matthias Kloseb9621712010-04-24 17:59:49 +000015312$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015313
15314fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015315rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015318/* end confdefs.h. */
15319#include <readline/readline.h>
15320
15321_ACEOF
15322if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015323 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015326
15327fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015328rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015329
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015330fi
15331
Martin v. Löwis0daad592001-09-30 21:09:59 +000015332# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15334$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015335if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015337else
Martin v. Löwis11437992002-04-12 09:54:03 +000015338 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015339LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343/* Override any GCC internal prototype to avoid an error.
15344 Use char because int might match the return type of a GCC
15345 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015346#ifdef __cplusplus
15347extern "C"
15348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015349char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015350int
15351main ()
15352{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 ;
15355 return 0;
15356}
15357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015358if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015360else
Matthias Kloseb9621712010-04-24 17:59:49 +000015361 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363rm -f core conftest.err conftest.$ac_objext \
15364 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015365LIBS=$ac_check_lib_save_LIBS
15366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15368$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015369if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015370
Matthias Kloseb9621712010-04-24 17:59:49 +000015371$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015372
Martin v. Löwis0daad592001-09-30 21:09:59 +000015373fi
15374
Michael W. Hudson54241132001-12-07 15:38:26 +000015375
Thomas Wouters89d996e2007-09-08 17:39:28 +000015376# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15378$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015379if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015380 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015381else
15382 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015383LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015385/* end confdefs.h. */
15386
15387/* Override any GCC internal prototype to avoid an error.
15388 Use char because int might match the return type of a GCC
15389 builtin and then its argument prototype would still apply. */
15390#ifdef __cplusplus
15391extern "C"
15392#endif
15393char rl_completion_display_matches_hook ();
15394int
15395main ()
15396{
15397return rl_completion_display_matches_hook ();
15398 ;
15399 return 0;
15400}
15401_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015402if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015403 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15404else
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015407rm -f core conftest.err conftest.$ac_objext \
15408 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015409LIBS=$ac_check_lib_save_LIBS
15410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15412$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015413if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015414
Matthias Kloseb9621712010-04-24 17:59:49 +000015415$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015416
15417fi
15418
15419
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015420# also in 4.0, but not in editline
15421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15422$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15423if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15424 $as_echo_n "(cached) " >&6
15425else
15426 ac_check_lib_save_LIBS=$LIBS
15427LIBS="-lreadline $READLINE_LIBS $LIBS"
15428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15429/* end confdefs.h. */
15430
15431/* Override any GCC internal prototype to avoid an error.
15432 Use char because int might match the return type of a GCC
15433 builtin and then its argument prototype would still apply. */
15434#ifdef __cplusplus
15435extern "C"
15436#endif
15437char rl_resize_terminal ();
15438int
15439main ()
15440{
15441return rl_resize_terminal ();
15442 ;
15443 return 0;
15444}
15445_ACEOF
15446if ac_fn_c_try_link "$LINENO"; then :
15447 ac_cv_lib_readline_rl_resize_terminal=yes
15448else
15449 ac_cv_lib_readline_rl_resize_terminal=no
15450fi
15451rm -f core conftest.err conftest.$ac_objext \
15452 conftest$ac_exeext conftest.$ac_ext
15453LIBS=$ac_check_lib_save_LIBS
15454fi
15455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15456$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15457if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15458
15459$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15460
15461fi
15462
15463
Martin v. Löwis0daad592001-09-30 21:09:59 +000015464# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15466$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015467if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015469else
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015471LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015472cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015475/* Override any GCC internal prototype to avoid an error.
15476 Use char because int might match the return type of a GCC
15477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015478#ifdef __cplusplus
15479extern "C"
15480#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015481char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015482int
15483main ()
15484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ;
15487 return 0;
15488}
15489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015490if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015491 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015492else
Matthias Kloseb9621712010-04-24 17:59:49 +000015493 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015495rm -f core conftest.err conftest.$ac_objext \
15496 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015497LIBS=$ac_check_lib_save_LIBS
15498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15500$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015501if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015502
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015504
Guido van Rossum353ae582001-07-10 16:45:32 +000015505fi
15506
Jack Jansendd19cf82001-12-06 22:36:17 +000015507
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015508# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015510/* end confdefs.h. */
15511#include <readline/readline.h>
15512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015513if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015514 have_readline=yes
15515else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015516 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015517
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015518fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015519rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015520if test $have_readline = yes
15521then
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015523/* end confdefs.h. */
15524#include <readline/readline.h>
15525
15526_ACEOF
15527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015531
15532fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015533rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015534
15535fi
15536
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15538$as_echo_n "checking for append_history in -lreadline... " >&6; }
15539if ${ac_cv_lib_readline_append_history+:} false; then :
15540 $as_echo_n "(cached) " >&6
15541else
15542 ac_check_lib_save_LIBS=$LIBS
15543LIBS="-lreadline $READLINE_LIBS $LIBS"
15544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15545/* end confdefs.h. */
15546
15547/* Override any GCC internal prototype to avoid an error.
15548 Use char because int might match the return type of a GCC
15549 builtin and then its argument prototype would still apply. */
15550#ifdef __cplusplus
15551extern "C"
15552#endif
15553char append_history ();
15554int
15555main ()
15556{
15557return append_history ();
15558 ;
15559 return 0;
15560}
15561_ACEOF
15562if ac_fn_c_try_link "$LINENO"; then :
15563 ac_cv_lib_readline_append_history=yes
15564else
15565 ac_cv_lib_readline_append_history=no
15566fi
15567rm -f core conftest.err conftest.$ac_objext \
15568 conftest$ac_exeext conftest.$ac_ext
15569LIBS=$ac_check_lib_save_LIBS
15570fi
15571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15572$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15573if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15574
15575$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15576
15577fi
15578
15579
Martin v. Löwis82bca632006-02-10 20:49:30 +000015580# End of readline checks: restore LIBS
15581LIBS=$LIBS_no_readline
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15584$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015585if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015587else
Martin v. Löwis11437992002-04-12 09:54:03 +000015588
Matthias Kloseb9621712010-04-24 17:59:49 +000015589if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015590 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015591else
Matthias Kloseb9621712010-04-24 17:59:49 +000015592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015593/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015594
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015595#include <stdlib.h>
15596#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015597int main()
15598{
15599 int val1 = nice(1);
15600 if (val1 != -1 && val1 == nice(2))
15601 exit(0);
15602 exit(1);
15603}
15604
Martin v. Löwis11437992002-04-12 09:54:03 +000015605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015606if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015607 ac_cv_broken_nice=yes
15608else
Matthias Kloseb9621712010-04-24 17:59:49 +000015609 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015613fi
15614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015615fi
15616
Matthias Kloseb9621712010-04-24 17:59:49 +000015617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15618$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015619if test "$ac_cv_broken_nice" = yes
15620then
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015623
15624fi
15625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15627$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015628if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015629 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015632 ac_cv_broken_poll=no
15633else
Matthias Kloseb9621712010-04-24 17:59:49 +000015634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015635/* end confdefs.h. */
15636
15637#include <poll.h>
15638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015639int main()
15640{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015641 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015642 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015643
15644 close (42);
15645
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015646 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015647 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015648 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015649 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015650 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015651 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015652 return 1;
15653}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015654
15655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015656if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015657 ac_cv_broken_poll=yes
15658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015660fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015664
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015665fi
15666
Matthias Kloseb9621712010-04-24 17:59:49 +000015667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15668$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669if test "$ac_cv_broken_poll" = yes
15670then
15671
Matthias Kloseb9621712010-04-24 17:59:49 +000015672$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015673
15674fi
15675
Martin v. Löwis1d459062005-03-14 21:23:33 +000015676# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15678$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015679if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015680 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015681else
15682
Matthias Kloseb9621712010-04-24 17:59:49 +000015683if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015684 ac_cv_working_tzset=no
15685else
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015687/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015688
15689#include <stdlib.h>
15690#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015691#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015692
15693#if HAVE_TZNAME
15694extern char *tzname[];
15695#endif
15696
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015697int main()
15698{
Brett Cannon18367812003-09-19 00:59:16 +000015699 /* Note that we need to ensure that not only does tzset(3)
15700 do 'something' with localtime, but it works as documented
15701 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015702 This includes making sure that tzname is set properly if
15703 tm->tm_zone does not exist since it is the alternative way
15704 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015705
15706 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015707 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015708 */
15709
Martin v. Löwis1d459062005-03-14 21:23:33 +000015710 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015711 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15712
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015713 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015714 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015715 if (localtime(&groundhogday)->tm_hour != 0)
15716 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015717#if HAVE_TZNAME
15718 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15719 if (strcmp(tzname[0], "UTC") ||
15720 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15721 exit(1);
15722#endif
Brett Cannon18367812003-09-19 00:59:16 +000015723
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015724 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015725 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015726 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015727 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015728#if HAVE_TZNAME
15729 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15730 exit(1);
15731#endif
Brett Cannon18367812003-09-19 00:59:16 +000015732
15733 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15734 tzset();
15735 if (localtime(&groundhogday)->tm_hour != 11)
15736 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015737#if HAVE_TZNAME
15738 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15739 exit(1);
15740#endif
15741
15742#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015743 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15744 exit(1);
15745 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15746 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015747#endif
Brett Cannon18367812003-09-19 00:59:16 +000015748
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015749 exit(0);
15750}
15751
15752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015753if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015754 ac_cv_working_tzset=yes
15755else
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15759 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015760fi
15761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762fi
15763
Matthias Kloseb9621712010-04-24 17:59:49 +000015764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15765$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015766if test "$ac_cv_working_tzset" = yes
15767then
15768
Matthias Kloseb9621712010-04-24 17:59:49 +000015769$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015770
15771fi
15772
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015773# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15775$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015776if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015777 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778else
Matthias Kloseb9621712010-04-24 17:59:49 +000015779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015780/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015781#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015782int
15783main ()
15784{
15785
15786struct stat st;
15787st.st_mtim.tv_nsec = 1;
15788
15789 ;
15790 return 0;
15791}
15792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015793if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015794 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015795else
Matthias Kloseb9621712010-04-24 17:59:49 +000015796 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015798rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15799fi
15800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15802$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015803if test "$ac_cv_stat_tv_nsec" = yes
15804then
15805
Matthias Kloseb9621712010-04-24 17:59:49 +000015806$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015807
15808fi
15809
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015810# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15812$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015813if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015815else
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015817/* end confdefs.h. */
15818#include <sys/stat.h>
15819int
15820main ()
15821{
15822
15823struct stat st;
15824st.st_mtimespec.tv_nsec = 1;
15825
15826 ;
15827 return 0;
15828}
15829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015830if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015831 ac_cv_stat_tv_nsec2=yes
15832else
Matthias Kloseb9621712010-04-24 17:59:49 +000015833 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15836fi
15837
Matthias Kloseb9621712010-04-24 17:59:49 +000015838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15839$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015840if test "$ac_cv_stat_tv_nsec2" = yes
15841then
15842
Matthias Kloseb9621712010-04-24 17:59:49 +000015843$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015844
15845fi
15846
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015847# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015848ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015849if test "$cross_compiling" = no; then
15850 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15851fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015852
15853for ac_header in curses.h ncurses.h
15854do :
15855 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15856ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15857if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15858 cat >>confdefs.h <<_ACEOF
15859#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15860_ACEOF
15861
15862fi
15863
15864done
15865
15866
15867# On Solaris, term.h requires curses.h
15868for ac_header in term.h
15869do :
15870 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15871#ifdef HAVE_CURSES_H
15872#include <curses.h>
15873#endif
15874
15875"
15876if test "x$ac_cv_header_term_h" = xyes; then :
15877 cat >>confdefs.h <<_ACEOF
15878#define HAVE_TERM_H 1
15879_ACEOF
15880
15881fi
15882
15883done
15884
15885
Jack Jansen666b1e72001-10-31 12:11:48 +000015886# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15888$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015889if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015890 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015891else
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015893/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015894#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015895int
15896main ()
15897{
Jack Jansen666b1e72001-10-31 12:11:48 +000015898
15899 int rtn;
15900 rtn = mvwdelch(0,0,0);
15901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902 ;
15903 return 0;
15904}
15905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015906if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015907 ac_cv_mvwdelch_is_expression=yes
15908else
Matthias Kloseb9621712010-04-24 17:59:49 +000015909 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15912fi
15913
Matthias Kloseb9621712010-04-24 17:59:49 +000015914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15915$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015916
15917if test "$ac_cv_mvwdelch_is_expression" = yes
15918then
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
Matthias Kloseb9621712010-04-24 17:59:49 +000015920$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015921
15922fi
15923
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015924# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15925# structs since version 5.7. If the macro is defined as zero before including
15926# [n]curses.h, ncurses will expose fields of the structs regardless of the
15927# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15929$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015930if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015931 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015932else
Matthias Kloseb9621712010-04-24 17:59:49 +000015933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015934/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015935
15936 #define NCURSES_OPAQUE 0
15937 #include <curses.h>
15938
Martin v. Löwis11437992002-04-12 09:54:03 +000015939int
15940main ()
15941{
Jack Jansen666b1e72001-10-31 12:11:48 +000015942
15943 WINDOW *w;
15944 w->_flags = 0;
15945
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 ;
15947 return 0;
15948}
15949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015950if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015951 ac_cv_window_has_flags=yes
15952else
Matthias Kloseb9621712010-04-24 17:59:49 +000015953 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015954fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15956fi
15957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15959$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015960
Jack Jansen666b1e72001-10-31 12:11:48 +000015961
15962if test "$ac_cv_window_has_flags" = yes
15963then
Martin v. Löwis11437992002-04-12 09:54:03 +000015964
Matthias Kloseb9621712010-04-24 17:59:49 +000015965$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015966
15967fi
15968
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15970$as_echo_n "checking for is_pad... " >&6; }
15971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15972/* end confdefs.h. */
15973#include <curses.h>
15974int
15975main ()
15976{
15977
15978#ifndef is_pad
15979void *x=is_pad
15980#endif
15981
15982 ;
15983 return 0;
15984}
15985_ACEOF
15986if ac_fn_c_try_compile "$LINENO"; then :
15987
15988$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15989
15990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15991$as_echo "yes" >&6; }
15992else
15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15994$as_echo "no" >&6; }
15995
15996fi
15997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15998
Matthias Kloseb9621712010-04-24 17:59:49 +000015999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
16000$as_echo_n "checking for is_term_resized... " >&6; }
16001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016002/* end confdefs.h. */
16003#include <curses.h>
16004int
16005main ()
16006{
16007void *x=is_term_resized
16008 ;
16009 return 0;
16010}
16011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016013
Matthias Kloseb9621712010-04-24 17:59:49 +000016014$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016015
Matthias Kloseb159a552010-04-25 21:00:44 +000016016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016017$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016018else
Matthias Kloseb9621712010-04-24 17:59:49 +000016019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016021
16022fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16024
Matthias Kloseb9621712010-04-24 17:59:49 +000016025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16026$as_echo_n "checking for resize_term... " >&6; }
16027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016028/* end confdefs.h. */
16029#include <curses.h>
16030int
16031main ()
16032{
16033void *x=resize_term
16034 ;
16035 return 0;
16036}
16037_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016038if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016039
Matthias Kloseb9621712010-04-24 17:59:49 +000016040$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016041
Matthias Kloseb159a552010-04-25 21:00:44 +000016042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016043$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016044else
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16046$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016047
16048fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16050
Matthias Kloseb9621712010-04-24 17:59:49 +000016051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16052$as_echo_n "checking for resizeterm... " >&6; }
16053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016054/* end confdefs.h. */
16055#include <curses.h>
16056int
16057main ()
16058{
16059void *x=resizeterm
16060 ;
16061 return 0;
16062}
16063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016064if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016065
Matthias Kloseb9621712010-04-24 17:59:49 +000016066$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016067
Matthias Kloseb159a552010-04-25 21:00:44 +000016068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016069$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016070else
Matthias Kloseb9621712010-04-24 17:59:49 +000016071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16072$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016073
16074fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016076
16077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16078$as_echo_n "checking for immedok... " >&6; }
16079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16080/* end confdefs.h. */
16081#include <curses.h>
16082int
16083main ()
16084{
16085
16086#ifndef immedok
16087void *x=immedok
16088#endif
16089
16090 ;
16091 return 0;
16092}
16093_ACEOF
16094if ac_fn_c_try_compile "$LINENO"; then :
16095
16096$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16097
16098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16099$as_echo "yes" >&6; }
16100else
16101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16102$as_echo "no" >&6; }
16103
16104fi
16105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16106
16107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16108$as_echo_n "checking for syncok... " >&6; }
16109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16110/* end confdefs.h. */
16111#include <curses.h>
16112int
16113main ()
16114{
16115
16116#ifndef syncok
16117void *x=syncok
16118#endif
16119
16120 ;
16121 return 0;
16122}
16123_ACEOF
16124if ac_fn_c_try_compile "$LINENO"; then :
16125
16126$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16127
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16129$as_echo "yes" >&6; }
16130else
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16132$as_echo "no" >&6; }
16133
16134fi
16135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16136
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16138$as_echo_n "checking for wchgat... " >&6; }
16139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16140/* end confdefs.h. */
16141#include <curses.h>
16142int
16143main ()
16144{
16145
16146#ifndef wchgat
16147void *x=wchgat
16148#endif
16149
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154if ac_fn_c_try_compile "$LINENO"; then :
16155
16156$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16157
16158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16159$as_echo "yes" >&6; }
16160else
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16162$as_echo "no" >&6; }
16163
16164fi
16165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16166
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16168$as_echo_n "checking for filter... " >&6; }
16169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16170/* end confdefs.h. */
16171#include <curses.h>
16172int
16173main ()
16174{
16175
16176#ifndef filter
16177void *x=filter
16178#endif
16179
16180 ;
16181 return 0;
16182}
16183_ACEOF
16184if ac_fn_c_try_compile "$LINENO"; then :
16185
16186$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16187
16188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16189$as_echo "yes" >&6; }
16190else
16191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16192$as_echo "no" >&6; }
16193
16194fi
16195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16196
16197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16198$as_echo_n "checking for has_key... " >&6; }
16199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16200/* end confdefs.h. */
16201#include <curses.h>
16202int
16203main ()
16204{
16205
16206#ifndef has_key
16207void *x=has_key
16208#endif
16209
16210 ;
16211 return 0;
16212}
16213_ACEOF
16214if ac_fn_c_try_compile "$LINENO"; then :
16215
16216$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16217
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16219$as_echo "yes" >&6; }
16220else
16221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16222$as_echo "no" >&6; }
16223
16224fi
16225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16226
16227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16228$as_echo_n "checking for typeahead... " >&6; }
16229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16230/* end confdefs.h. */
16231#include <curses.h>
16232int
16233main ()
16234{
16235
16236#ifndef typeahead
16237void *x=typeahead
16238#endif
16239
16240 ;
16241 return 0;
16242}
16243_ACEOF
16244if ac_fn_c_try_compile "$LINENO"; then :
16245
16246$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16247
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16249$as_echo "yes" >&6; }
16250else
16251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16252$as_echo "no" >&6; }
16253
16254fi
16255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16256
16257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16258$as_echo_n "checking for use_env... " >&6; }
16259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16260/* end confdefs.h. */
16261#include <curses.h>
16262int
16263main ()
16264{
16265
16266#ifndef use_env
16267void *x=use_env
16268#endif
16269
16270 ;
16271 return 0;
16272}
16273_ACEOF
16274if ac_fn_c_try_compile "$LINENO"; then :
16275
16276$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16277
16278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16279$as_echo "yes" >&6; }
16280else
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16282$as_echo "no" >&6; }
16283
16284fi
16285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016286# last curses configure check
16287CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16290$as_echo "$as_me: checking for device files" >&6;}
16291
16292if test "x$cross_compiling" = xyes; then
16293 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16295$as_echo_n "checking for /dev/ptmx... " >&6; }
16296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16297$as_echo "not set" >&6; }
16298 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16299 fi
16300 if test "${ac_cv_file__dev_ptc+set}" != set; then
16301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16302$as_echo_n "checking for /dev/ptc... " >&6; }
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16304$as_echo "not set" >&6; }
16305 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16306 fi
16307fi
16308
Matthias Kloseb9621712010-04-24 17:59:49 +000016309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16310$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016311if ${ac_cv_file__dev_ptmx+:} false; then :
16312 $as_echo_n "(cached) " >&6
16313else
16314 test "$cross_compiling" = yes &&
16315 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16316if test -r "/dev/ptmx"; then
16317 ac_cv_file__dev_ptmx=yes
16318else
16319 ac_cv_file__dev_ptmx=no
16320fi
16321fi
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16323$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16324if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016325
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016326fi
16327
16328if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016329
Matthias Kloseb9621712010-04-24 17:59:49 +000016330$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016331
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16334$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016335if ${ac_cv_file__dev_ptc+:} false; then :
16336 $as_echo_n "(cached) " >&6
16337else
16338 test "$cross_compiling" = yes &&
16339 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16340if test -r "/dev/ptc"; then
16341 ac_cv_file__dev_ptc=yes
16342else
16343 ac_cv_file__dev_ptc=no
16344fi
16345fi
16346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16347$as_echo "$ac_cv_file__dev_ptc" >&6; }
16348if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016349
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016350fi
16351
16352if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016353
Matthias Kloseb9621712010-04-24 17:59:49 +000016354$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016355
Neal Norwitz865400f2003-03-21 01:42:58 +000016356fi
16357
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016358if test $ac_sys_system = Darwin
16359then
16360 LIBS="$LIBS -framework CoreFoundation"
16361fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016362
Matthias Kloseb9621712010-04-24 17:59:49 +000016363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16364$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016365if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016366 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016367else
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016369 ac_cv_have_size_t_format="cross -- assuming yes"
16370
Thomas Wouters477c8d52006-05-27 19:21:47 +000016371else
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016373/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016374
Thomas Wouters477c8d52006-05-27 19:21:47 +000016375#include <stdio.h>
16376#include <stddef.h>
16377#include <string.h>
16378
Christian Heimes2c181612007-12-17 20:04:13 +000016379#ifdef HAVE_SYS_TYPES_H
16380#include <sys/types.h>
16381#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016382
16383#ifdef HAVE_SSIZE_T
16384typedef ssize_t Py_ssize_t;
16385#elif SIZEOF_VOID_P == SIZEOF_LONG
16386typedef long Py_ssize_t;
16387#else
16388typedef int Py_ssize_t;
16389#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016390
Christian Heimes2c181612007-12-17 20:04:13 +000016391int main()
16392{
16393 char buffer[256];
16394
Thomas Wouters477c8d52006-05-27 19:21:47 +000016395 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16396 return 1;
16397
Thomas Wouters89f507f2006-12-13 04:49:30 +000016398 if (strcmp(buffer, "123"))
16399 return 1;
16400
16401 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16402 return 1;
16403
16404 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016405 return 1;
16406
16407 return 0;
16408}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016409
Thomas Wouters477c8d52006-05-27 19:21:47 +000016410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016411if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016412 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016413else
Matthias Kloseb9621712010-04-24 17:59:49 +000016414 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016415fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16417 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016418fi
16419
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16422$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016423if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016424
Matthias Kloseb9621712010-04-24 17:59:49 +000016425$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016426
16427fi
16428
Matthias Kloseb9621712010-04-24 17:59:49 +000016429ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016430#ifdef HAVE_SYS_TYPES_H
16431#include <sys/types.h>
16432#endif
16433#ifdef HAVE_SYS_SOCKET_H
16434#include <sys/socket.h>
16435#endif
16436
Matthias Kloseb9621712010-04-24 17:59:49 +000016437"
Victor Stinnere0be4232011-10-25 13:06:09 +020016438if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016439
Martin v. Löwis11437992002-04-12 09:54:03 +000016440else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016441
Matthias Kloseb9621712010-04-24 17:59:49 +000016442$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016443
16444fi
16445
Michael W. Hudson54241132001-12-07 15:38:26 +000016446
Matthias Kloseb9621712010-04-24 17:59:49 +000016447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16448$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016449if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016450 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016451else
Matthias Kloseb9621712010-04-24 17:59:49 +000016452 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016453 ac_cv_broken_mbstowcs=no
16454else
Matthias Kloseb9621712010-04-24 17:59:49 +000016455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016456/* end confdefs.h. */
16457
Stefan Krah19c21392012-11-22 23:47:32 +010016458#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016459#include<stdlib.h>
16460int main() {
16461 size_t len = -1;
16462 const char *str = "text";
16463 len = mbstowcs(NULL, str, 0);
16464 return (len != 4);
16465}
16466
16467_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016468if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016469 ac_cv_broken_mbstowcs=no
16470else
Matthias Kloseb9621712010-04-24 17:59:49 +000016471 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016472fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16474 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016475fi
16476
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016477fi
16478
Matthias Kloseb9621712010-04-24 17:59:49 +000016479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16480$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016481if test "$ac_cv_broken_mbstowcs" = yes
16482then
16483
Matthias Kloseb9621712010-04-24 17:59:49 +000016484$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016485
16486fi
16487
Antoine Pitroub52ec782009-01-25 16:34:23 +000016488# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16490$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016491
16492# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016493if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016494 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016495if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016496then
16497
Matthias Kloseb9621712010-04-24 17:59:49 +000016498$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016499
Matthias Kloseb9621712010-04-24 17:59:49 +000016500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16501$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016502fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016503if test "$withval" = no
16504then
16505
16506$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16507
Matthias Kloseb9621712010-04-24 17:59:49 +000016508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16509$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016510fi
16511
Antoine Pitrou042b1282010-08-13 21:15:58 +000016512else
16513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16514$as_echo "no value specified" >&6; }
16515fi
16516
Antoine Pitroub52ec782009-01-25 16:34:23 +000016517
Matthias Kloseb17289e2012-03-15 19:51:34 +010016518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16519$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16520if ${ac_cv_computed_gotos+:} false; then :
16521 $as_echo_n "(cached) " >&6
16522else
16523 if test "$cross_compiling" = yes; then :
16524 if test "${with_computed_gotos+set}" = set; then
16525 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16526 else
16527 ac_cv_computed_gotos=no
16528 fi
16529else
16530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16531/* end confdefs.h. */
16532
16533int main(int argc, char **argv)
16534{
16535 static void *targets[1] = { &&LABEL1 };
16536 goto LABEL2;
16537LABEL1:
16538 return 0;
16539LABEL2:
16540 goto *targets[0];
16541 return 1;
16542}
16543
16544_ACEOF
16545if ac_fn_c_try_run "$LINENO"; then :
16546 ac_cv_computed_gotos=yes
16547else
16548 ac_cv_computed_gotos=no
16549fi
16550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16551 conftest.$ac_objext conftest.beam conftest.$ac_ext
16552fi
16553
16554fi
16555
16556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16557$as_echo "$ac_cv_computed_gotos" >&6; }
16558case "$ac_cv_computed_gotos" in yes*)
16559
16560$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16561
16562esac
16563
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016564case $ac_sys_system in
16565AIX*)
16566
16567$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16568 ;;
16569esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016570
Michael W. Hudson54241132001-12-07 15:38:26 +000016571
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016572
16573
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016574for h in `(cd $srcdir;echo Python/thread_*.h)`
16575do
16576 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16577done
16578
Michael W. Hudson54241132001-12-07 15:38:26 +000016579
Victor Stinner21a74a92019-04-11 22:28:12 +020016580SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16582$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016583for dir in $SRCDIRS; do
16584 if test ! -d $dir; then
16585 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016586 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016587done
Matthias Kloseb9621712010-04-24 17:59:49 +000016588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16589$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016590
Stefan Krah1919b7e2012-03-21 18:25:23 +010016591# Availability of -O2:
16592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16593$as_echo_n "checking for -O2... " >&6; }
16594saved_cflags="$CFLAGS"
16595CFLAGS="-O2"
16596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597/* end confdefs.h. */
16598
16599int
16600main ()
16601{
16602
16603
16604 ;
16605 return 0;
16606}
16607_ACEOF
16608if ac_fn_c_try_compile "$LINENO"; then :
16609 have_O2=yes
16610else
16611 have_O2=no
16612fi
16613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16615$as_echo "$have_O2" >&6; }
16616CFLAGS="$saved_cflags"
16617
16618# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16619# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16621$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16622saved_cflags="$CFLAGS"
16623CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16624if test "$have_O2" = no; then
16625 CFLAGS=""
16626fi
16627if test "$cross_compiling" = yes; then :
16628 have_glibc_memmove_bug=undefined
16629else
16630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16631/* end confdefs.h. */
16632
16633#include <stdio.h>
16634#include <stdlib.h>
16635#include <string.h>
16636void foo(void *p, void *q) { memmove(p, q, 19); }
16637int main() {
16638 char a[32] = "123456789000000000";
16639 foo(&a[9], a);
16640 if (strcmp(a, "123456789123456789000000000") != 0)
16641 return 1;
16642 foo(a, &a[9]);
16643 if (strcmp(a, "123456789000000000") != 0)
16644 return 1;
16645 return 0;
16646}
16647
16648_ACEOF
16649if ac_fn_c_try_run "$LINENO"; then :
16650 have_glibc_memmove_bug=no
16651else
16652 have_glibc_memmove_bug=yes
16653fi
16654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16655 conftest.$ac_objext conftest.beam conftest.$ac_ext
16656fi
16657
16658CFLAGS="$saved_cflags"
16659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16660$as_echo "$have_glibc_memmove_bug" >&6; }
16661if test "$have_glibc_memmove_bug" = yes; then
16662
16663$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16664
16665fi
16666
16667if test "$have_gcc_asm_for_x87" = yes; then
16668 # Some versions of gcc miscompile inline asm:
16669 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16670 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16671 case $CC in
16672 *gcc*)
16673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16674$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16675 saved_cflags="$CFLAGS"
16676 CFLAGS="-O2"
16677 if test "$cross_compiling" = yes; then :
16678 have_ipa_pure_const_bug=undefined
16679else
16680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16681/* end confdefs.h. */
16682
16683 __attribute__((noinline)) int
16684 foo(int *p) {
16685 int r;
16686 asm ( "movl \$6, (%1)\n\t"
16687 "xorl %0, %0\n\t"
16688 : "=r" (r) : "r" (p) : "memory"
16689 );
16690 return r;
16691 }
16692 int main() {
16693 int p = 8;
16694 if ((foo(&p) ? : p) != 6)
16695 return 1;
16696 return 0;
16697 }
16698
16699_ACEOF
16700if ac_fn_c_try_run "$LINENO"; then :
16701 have_ipa_pure_const_bug=no
16702else
16703 have_ipa_pure_const_bug=yes
16704fi
16705rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16706 conftest.$ac_objext conftest.beam conftest.$ac_ext
16707fi
16708
16709 CFLAGS="$saved_cflags"
16710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16711$as_echo "$have_ipa_pure_const_bug" >&6; }
16712 if test "$have_ipa_pure_const_bug" = yes; then
16713
16714$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16715
16716 fi
16717 ;;
16718 esac
16719fi
16720
Victor Stinner4f5366e2015-01-09 02:13:19 +010016721# Check for stdatomic.h
16722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16723$as_echo_n "checking for stdatomic.h... " >&6; }
16724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16725/* end confdefs.h. */
16726
16727
16728 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016729 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016730 int main() {
16731 int loaded_value = atomic_load(&value);
16732 return 0;
16733 }
16734
16735
16736_ACEOF
16737if ac_fn_c_try_link "$LINENO"; then :
16738 have_stdatomic_h=yes
16739else
16740 have_stdatomic_h=no
16741fi
16742rm -f core conftest.err conftest.$ac_objext \
16743 conftest$ac_exeext conftest.$ac_ext
16744
16745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16746$as_echo "$have_stdatomic_h" >&6; }
16747
16748if test "$have_stdatomic_h" = yes; then
16749
16750$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16751
16752fi
16753
16754# Check for GCC >= 4.7 __atomic builtins
16755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16756$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16758/* end confdefs.h. */
16759
16760
16761 volatile int val = 1;
16762 int main() {
16763 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16764 return 0;
16765 }
16766
16767
16768_ACEOF
16769if ac_fn_c_try_link "$LINENO"; then :
16770 have_builtin_atomic=yes
16771else
16772 have_builtin_atomic=no
16773fi
16774rm -f core conftest.err conftest.$ac_objext \
16775 conftest$ac_exeext conftest.$ac_ext
16776
16777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16778$as_echo "$have_builtin_atomic" >&6; }
16779
16780if test "$have_builtin_atomic" = yes; then
16781
16782$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16783
16784fi
16785
Ned Deily322f5ba2013-11-21 23:01:59 -080016786# ensurepip option
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16788$as_echo_n "checking for ensurepip... " >&6; }
16789
16790# Check whether --with-ensurepip was given.
16791if test "${with_ensurepip+set}" = set; then :
16792 withval=$with_ensurepip;
16793else
16794 with_ensurepip=upgrade
16795fi
16796
16797case $with_ensurepip in #(
16798 yes|upgrade) :
16799 ENSUREPIP=upgrade ;; #(
16800 install) :
16801 ENSUREPIP=install ;; #(
16802 no) :
16803 ENSUREPIP=no ;; #(
16804 *) :
16805 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16806esac
16807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16808$as_echo "$ENSUREPIP" >&6; }
16809
16810
Victor Stinner35a97c02015-03-08 02:59:09 +010016811# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16813$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16815/* end confdefs.h. */
16816
16817
16818 #include <dirent.h>
16819
16820 int main() {
16821 struct dirent entry;
16822 return entry.d_type == DT_UNKNOWN;
16823 }
16824
16825
16826_ACEOF
16827if ac_fn_c_try_link "$LINENO"; then :
16828 have_dirent_d_type=yes
16829else
16830 have_dirent_d_type=no
16831fi
16832rm -f core conftest.err conftest.$ac_objext \
16833 conftest$ac_exeext conftest.$ac_ext
16834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16835$as_echo "$have_dirent_d_type" >&6; }
16836
16837if test "$have_dirent_d_type" = yes; then
16838
16839$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16840
16841fi
16842
Victor Stinner9eb57c52015-03-19 22:21:49 +010016843# check if the Linux getrandom() syscall is available
16844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16845$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16847/* end confdefs.h. */
16848
16849
Victor Stinner1b80b242016-04-12 22:34:58 +020016850 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016851 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016852 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016853
16854 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016855 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016856 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016857 const int flags = GRND_NONBLOCK;
16858 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016859 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016860 return 0;
16861 }
16862
16863
16864_ACEOF
16865if ac_fn_c_try_link "$LINENO"; then :
16866 have_getrandom_syscall=yes
16867else
16868 have_getrandom_syscall=no
16869fi
16870rm -f core conftest.err conftest.$ac_objext \
16871 conftest$ac_exeext conftest.$ac_ext
16872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16873$as_echo "$have_getrandom_syscall" >&6; }
16874
16875if test "$have_getrandom_syscall" = yes; then
16876
16877$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16878
16879fi
16880
Victor Stinner3abf44e2015-09-18 15:38:37 +020016881# check if the getrandom() function is available
16882# the test was written for the Solaris function of <sys/random.h>
16883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16884$as_echo_n "checking for the getrandom() function... " >&6; }
16885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16886/* end confdefs.h. */
16887
16888
16889 #include <sys/random.h>
16890
16891 int main() {
16892 char buffer[1];
16893 const size_t buflen = sizeof(buffer);
16894 const int flags = 0;
16895 /* ignore the result, Python checks for ENOSYS at runtime */
16896 (void)getrandom(buffer, buflen, flags);
16897 return 0;
16898 }
16899
16900
16901_ACEOF
16902if ac_fn_c_try_link "$LINENO"; then :
16903 have_getrandom=yes
16904else
16905 have_getrandom=no
16906fi
16907rm -f core conftest.err conftest.$ac_objext \
16908 conftest$ac_exeext conftest.$ac_ext
16909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16910$as_echo "$have_getrandom" >&6; }
16911
16912if test "$have_getrandom" = yes; then
16913
16914$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16915
16916fi
16917
Neil Schemenauer5741c452019-02-08 10:48:46 -080016918# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16919# shm_* may only be available if linking against librt
16920save_LIBS="$LIBS"
16921save_includes_default="$ac_includes_default"
16922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16923$as_echo_n "checking for library containing shm_open... " >&6; }
16924if ${ac_cv_search_shm_open+:} false; then :
16925 $as_echo_n "(cached) " >&6
16926else
16927 ac_func_search_save_LIBS=$LIBS
16928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16929/* end confdefs.h. */
16930
16931/* Override any GCC internal prototype to avoid an error.
16932 Use char because int might match the return type of a GCC
16933 builtin and then its argument prototype would still apply. */
16934#ifdef __cplusplus
16935extern "C"
16936#endif
16937char shm_open ();
16938int
16939main ()
16940{
16941return shm_open ();
16942 ;
16943 return 0;
16944}
16945_ACEOF
16946for ac_lib in '' rt; do
16947 if test -z "$ac_lib"; then
16948 ac_res="none required"
16949 else
16950 ac_res=-l$ac_lib
16951 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16952 fi
16953 if ac_fn_c_try_link "$LINENO"; then :
16954 ac_cv_search_shm_open=$ac_res
16955fi
16956rm -f core conftest.err conftest.$ac_objext \
16957 conftest$ac_exeext
16958 if ${ac_cv_search_shm_open+:} false; then :
16959 break
16960fi
16961done
16962if ${ac_cv_search_shm_open+:} false; then :
16963
16964else
16965 ac_cv_search_shm_open=no
16966fi
16967rm conftest.$ac_ext
16968LIBS=$ac_func_search_save_LIBS
16969fi
16970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16971$as_echo "$ac_cv_search_shm_open" >&6; }
16972ac_res=$ac_cv_search_shm_open
16973if test "$ac_res" != no; then :
16974 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16975
16976fi
16977
16978if test "$ac_cv_search_shm_open" = "-lrt"; then
16979
16980$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16981
16982fi
16983for ac_header in sys/mman.h
16984do :
16985 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16986if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16987 cat >>confdefs.h <<_ACEOF
16988#define HAVE_SYS_MMAN_H 1
16989_ACEOF
16990
16991fi
16992
16993done
16994
16995# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16996ac_includes_default="\
16997${ac_includes_default}
16998#ifndef __cplusplus
16999# ifdef HAVE_SYS_MMAN_H
17000# include <sys/mman.h>
17001# endif
17002#endif
17003"
17004for ac_func in shm_open shm_unlink
17005do :
17006 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17007ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17008if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17009 cat >>confdefs.h <<_ACEOF
17010#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17011_ACEOF
17012
17013fi
17014done
17015
17016# we don't want to link with librt always, restore LIBS
17017LIBS="$save_LIBS"
17018ac_includes_default="$save_includes_default"
17019
Christian Heimesff5be6e2018-01-20 13:19:21 +010017020# Check for usable OpenSSL
17021
17022 found=false
17023
17024# Check whether --with-openssl was given.
17025if test "${with_openssl+set}" = set; then :
17026 withval=$with_openssl;
17027 case "$withval" in
17028 "" | y | ye | yes | n | no)
17029 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17030 ;;
17031 *) ssldirs="$withval"
17032 ;;
17033 esac
17034
17035else
17036
17037 # if pkg-config is installed and openssl has installed a .pc file,
17038 # then use that information and don't search ssldirs
17039 if test -n "$ac_tool_prefix"; then
17040 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17041set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17043$as_echo_n "checking for $ac_word... " >&6; }
17044if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17045 $as_echo_n "(cached) " >&6
17046else
17047 if test -n "$PKG_CONFIG"; then
17048 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17049else
17050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17051for as_dir in $PATH
17052do
17053 IFS=$as_save_IFS
17054 test -z "$as_dir" && as_dir=.
17055 for ac_exec_ext in '' $ac_executable_extensions; do
17056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17057 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17059 break 2
17060 fi
17061done
17062 done
17063IFS=$as_save_IFS
17064
17065fi
17066fi
17067PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17068if test -n "$PKG_CONFIG"; then
17069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17070$as_echo "$PKG_CONFIG" >&6; }
17071else
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17073$as_echo "no" >&6; }
17074fi
17075
17076
17077fi
17078if test -z "$ac_cv_prog_PKG_CONFIG"; then
17079 ac_ct_PKG_CONFIG=$PKG_CONFIG
17080 # Extract the first word of "pkg-config", so it can be a program name with args.
17081set dummy pkg-config; ac_word=$2
17082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17083$as_echo_n "checking for $ac_word... " >&6; }
17084if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17085 $as_echo_n "(cached) " >&6
17086else
17087 if test -n "$ac_ct_PKG_CONFIG"; then
17088 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17089else
17090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17091for as_dir in $PATH
17092do
17093 IFS=$as_save_IFS
17094 test -z "$as_dir" && as_dir=.
17095 for ac_exec_ext in '' $ac_executable_extensions; do
17096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17097 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17099 break 2
17100 fi
17101done
17102 done
17103IFS=$as_save_IFS
17104
17105fi
17106fi
17107ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17108if test -n "$ac_ct_PKG_CONFIG"; then
17109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17110$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17111else
17112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17113$as_echo "no" >&6; }
17114fi
17115
17116 if test "x$ac_ct_PKG_CONFIG" = x; then
17117 PKG_CONFIG=""
17118 else
17119 case $cross_compiling:$ac_tool_warned in
17120yes:)
17121{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17122$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17123ac_tool_warned=yes ;;
17124esac
17125 PKG_CONFIG=$ac_ct_PKG_CONFIG
17126 fi
17127else
17128 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17129fi
17130
17131 if test x"$PKG_CONFIG" != x""; then
17132 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17133 if test $? = 0; then
17134 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17135 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17136 found=true
17137 fi
17138 fi
17139
17140 # no such luck; use some default ssldirs
17141 if ! $found; then
17142 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17143 fi
17144
17145
17146fi
17147
17148
17149
17150 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17151 # an 'openssl' subdirectory
17152
17153 if ! $found; then
17154 OPENSSL_INCLUDES=
17155 for ssldir in $ssldirs; do
17156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17157$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17158 if test -f "$ssldir/include/openssl/ssl.h"; then
17159 OPENSSL_INCLUDES="-I$ssldir/include"
17160 OPENSSL_LDFLAGS="-L$ssldir/lib"
17161 OPENSSL_LIBS="-lssl -lcrypto"
17162 found=true
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17164$as_echo "yes" >&6; }
17165 break
17166 else
17167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17168$as_echo "no" >&6; }
17169 fi
17170 done
17171
17172 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17173 # it will just work!
17174 fi
17175
17176 # try the preprocessor and linker with our new flags,
17177 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17178
17179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17180$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17181 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17182 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17183
17184 save_LIBS="$LIBS"
17185 save_LDFLAGS="$LDFLAGS"
17186 save_CPPFLAGS="$CPPFLAGS"
17187 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17188 LIBS="$OPENSSL_LIBS $LIBS"
17189 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17191/* end confdefs.h. */
17192#include <openssl/ssl.h>
17193int
17194main ()
17195{
17196SSL_new(NULL)
17197 ;
17198 return 0;
17199}
17200_ACEOF
17201if ac_fn_c_try_link "$LINENO"; then :
17202
17203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17204$as_echo "yes" >&6; }
17205 have_openssl=yes
17206
17207else
17208
17209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17210$as_echo "no" >&6; }
17211 have_openssl=no
17212
17213fi
17214rm -f core conftest.err conftest.$ac_objext \
17215 conftest$ac_exeext conftest.$ac_ext
17216 CPPFLAGS="$save_CPPFLAGS"
17217 LDFLAGS="$save_LDFLAGS"
17218 LIBS="$save_LIBS"
17219
17220
17221
17222
17223
17224
17225if test "$have_openssl" = yes; then
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17227$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17228
17229 save_LIBS="$LIBS"
17230 save_LDFLAGS="$LDFLAGS"
17231 save_CPPFLAGS="$CPPFLAGS"
17232 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17233 LIBS="$OPENSSL_LIBS $LIBS"
17234 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17235
17236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17237/* end confdefs.h. */
17238
17239 #include <openssl/x509_vfy.h>
17240
17241int
17242main ()
17243{
17244
17245 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17246 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17247 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17248 X509_VERIFY_PARAM_set_hostflags(p, 0);
17249
17250 ;
17251 return 0;
17252}
17253
17254_ACEOF
17255if ac_fn_c_try_link "$LINENO"; then :
17256
17257 ac_cv_has_x509_verify_param_set1_host=yes
17258
17259else
17260
17261 ac_cv_has_x509_verify_param_set1_host=no
17262
17263fi
17264rm -f core conftest.err conftest.$ac_objext \
17265 conftest$ac_exeext conftest.$ac_ext
17266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17267$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17268 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17269
17270$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17271
17272 fi
17273
17274 CPPFLAGS="$save_CPPFLAGS"
17275 LDFLAGS="$save_LDFLAGS"
17276 LIBS="$save_LIBS"
17277fi
17278
Christian Heimes892d66e2018-01-29 14:10:18 +010017279# ssl module default cipher suite string
17280
17281
17282
17283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17284$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17285
17286# Check whether --with-ssl-default-suites was given.
17287if test "${with_ssl_default_suites+set}" = set; then :
17288 withval=$with_ssl_default_suites;
17289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17290$as_echo "$withval" >&6; }
17291case "$withval" in
17292 python)
17293 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17294
17295 ;;
17296 openssl)
17297 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17298
17299 ;;
17300 *)
17301 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17302
17303 cat >>confdefs.h <<_ACEOF
17304#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17305_ACEOF
17306
17307 ;;
17308esac
17309
17310else
17311
17312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17313$as_echo "python" >&6; }
17314$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17315
17316
17317fi
17318
17319
17320
Guido van Rossum627b2d71993-12-24 10:39:16 +000017321# generate output files
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020017322ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017323
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017324ac_config_files="$ac_config_files Modules/ld_so_aix"
17325
Martin v. Löwis11437992002-04-12 09:54:03 +000017326cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017327# This file is a shell script that caches the results of configure
17328# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017329# scripts and configure runs, see configure's option --config-cache.
17330# It is not useful on other systems. If it contains results you don't
17331# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017332#
Martin v. Löwis11437992002-04-12 09:54:03 +000017333# config.status only pays attention to the cache file if you give it
17334# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017335#
Skip Montanaro6dead952003-09-25 14:50:04 +000017336# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017337# loading this file, other *unset* `ac_cv_foo' will be assigned the
17338# following values.
17339
17340_ACEOF
17341
Guido van Rossumf78abae1997-01-21 22:02:36 +000017342# The following way of writing the cache mishandles newlines in values,
17343# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017345# Ultrix sh set writes to stderr and can't be redirected directly,
17346# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347(
17348 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17349 eval ac_val=\$$ac_var
17350 case $ac_val in #(
17351 *${as_nl}*)
17352 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017353 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17354$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017355 esac
17356 case $ac_var in #(
17357 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017358 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17359 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 esac ;;
17361 esac
17362 done
17363
Martin v. Löwis11437992002-04-12 09:54:03 +000017364 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017365 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17366 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017367 # `set' does not quote correctly, so add quotes: double-quote
17368 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017369 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017370 "s/'/'\\\\''/g;
17371 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017373 *)
17374 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 esac |
17378 sort
17379) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017383 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017384 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17385 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17387 :end' >>confcache
17388if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17389 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017390 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017391 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17392$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017393 if test ! -f "$cache_file" || test -h "$cache_file"; then
17394 cat confcache >"$cache_file"
17395 else
17396 case $cache_file in #(
17397 */* | ?:*)
17398 mv -f confcache "$cache_file"$$ &&
17399 mv -f "$cache_file"$$ "$cache_file" ;; #(
17400 *)
17401 mv -f confcache "$cache_file" ;;
17402 esac
17403 fi
17404 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017405 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017406 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17407$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017408 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017409fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017410rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017412test "x$prefix" = xNONE && prefix=$ac_default_prefix
17413# Let make expand exec_prefix.
17414test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017416DEFS=-DHAVE_CONFIG_H
17417
Skip Montanaro6dead952003-09-25 14:50:04 +000017418ac_libobjs=
17419ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017420U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017421for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17422 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017424 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17426 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017427 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17428 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017429done
17430LIBOBJS=$ac_libobjs
17431
17432LTLIBOBJS=$ac_ltlibobjs
17433
17434
Martin v. Löwis11437992002-04-12 09:54:03 +000017435
Matthias Kloseb9621712010-04-24 17:59:49 +000017436
Victor Stinnere0be4232011-10-25 13:06:09 +020017437: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017438ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017439ac_clean_files_save=$ac_clean_files
17440ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017441{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17442$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17443as_write_fail=0
17444cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017445#! $SHELL
17446# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017447# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017448# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017449# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017452ac_cs_recheck=false
17453ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017454
Matthias Kloseb9621712010-04-24 17:59:49 +000017455SHELL=\${CONFIG_SHELL-$SHELL}
17456export SHELL
17457_ASEOF
17458cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17459## -------------------- ##
17460## M4sh Initialization. ##
17461## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017462
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017463# Be more Bourne compatible
17464DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017465if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017466 emulate sh
17467 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017468 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017469 # is contrary to our usage. Disable this feature.
17470 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017472else
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 case `(set -o) 2>/dev/null` in #(
17474 *posix*) :
17475 set -o posix ;; #(
17476 *) :
17477 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017478esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017479fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017480
17481
Matthias Kloseb9621712010-04-24 17:59:49 +000017482as_nl='
17483'
17484export as_nl
17485# Printing a long string crashes Solaris 7 /usr/bin/printf.
17486as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17487as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17488as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17489# Prefer a ksh shell builtin over an external printf program on Solaris,
17490# but without wasting forks for bash or zsh.
17491if test -z "$BASH_VERSION$ZSH_VERSION" \
17492 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17493 as_echo='print -r --'
17494 as_echo_n='print -rn --'
17495elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17496 as_echo='printf %s\n'
17497 as_echo_n='printf %s'
17498else
17499 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17500 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17501 as_echo_n='/usr/ucb/echo -n'
17502 else
17503 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17504 as_echo_n_body='eval
17505 arg=$1;
17506 case $arg in #(
17507 *"$as_nl"*)
17508 expr "X$arg" : "X\\(.*\\)$as_nl";
17509 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17510 esac;
17511 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17512 '
17513 export as_echo_n_body
17514 as_echo_n='sh -c $as_echo_n_body as_echo'
17515 fi
17516 export as_echo_body
17517 as_echo='sh -c $as_echo_body as_echo'
17518fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017519
17520# The user is always right.
17521if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017522 PATH_SEPARATOR=:
17523 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17524 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17525 PATH_SEPARATOR=';'
17526 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529
17530# IFS
17531# We need space, tab and new line, in precisely that order. Quoting is
17532# there to prevent editors from complaining about space-tab.
17533# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17534# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017535IFS=" "" $as_nl"
17536
17537# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017538as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017539case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017540 *[\\/]* ) as_myself=$0 ;;
17541 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017542for as_dir in $PATH
17543do
17544 IFS=$as_save_IFS
17545 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017546 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17547 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017548IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017550 ;;
17551esac
17552# We did not find ourselves, most probably we were run as `sh COMMAND'
17553# in which case we are not to be found in the path.
17554if test "x$as_myself" = x; then
17555 as_myself=$0
17556fi
17557if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017558 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17559 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017560fi
17561
Matthias Kloseb9621712010-04-24 17:59:49 +000017562# Unset variables that we do not need and which cause bugs (e.g. in
17563# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17564# suppresses any "Segmentation fault" message there. '((' could
17565# trigger a bug in pdksh 5.2.14.
17566for as_var in BASH_ENV ENV MAIL MAILPATH
17567do eval test x\${$as_var+set} = xset \
17568 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569done
17570PS1='$ '
17571PS2='> '
17572PS4='+ '
17573
17574# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017575LC_ALL=C
17576export LC_ALL
17577LANGUAGE=C
17578export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579
Matthias Kloseb9621712010-04-24 17:59:49 +000017580# CDPATH.
17581(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17582
17583
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017584# as_fn_error STATUS ERROR [LINENO LOG_FD]
17585# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017586# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17587# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017588# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017589as_fn_error ()
17590{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017591 as_status=$1; test $as_status -eq 0 && as_status=1
17592 if test "$4"; then
17593 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17594 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017595 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017596 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017597 as_fn_exit $as_status
17598} # as_fn_error
17599
17600
17601# as_fn_set_status STATUS
17602# -----------------------
17603# Set $? to STATUS, without forking.
17604as_fn_set_status ()
17605{
17606 return $1
17607} # as_fn_set_status
17608
17609# as_fn_exit STATUS
17610# -----------------
17611# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17612as_fn_exit ()
17613{
17614 set +e
17615 as_fn_set_status $1
17616 exit $1
17617} # as_fn_exit
17618
17619# as_fn_unset VAR
17620# ---------------
17621# Portably unset VAR.
17622as_fn_unset ()
17623{
17624 { eval $1=; unset $1;}
17625}
17626as_unset=as_fn_unset
17627# as_fn_append VAR VALUE
17628# ----------------------
17629# Append the text in VALUE to the end of the definition contained in VAR. Take
17630# advantage of any shell optimizations that allow amortized linear growth over
17631# repeated appends, instead of the typical quadratic growth present in naive
17632# implementations.
17633if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17634 eval 'as_fn_append ()
17635 {
17636 eval $1+=\$2
17637 }'
17638else
17639 as_fn_append ()
17640 {
17641 eval $1=\$$1\$2
17642 }
17643fi # as_fn_append
17644
17645# as_fn_arith ARG...
17646# ------------------
17647# Perform arithmetic evaluation on the ARGs, and store the result in the
17648# global $as_val. Take advantage of shells that can avoid forks. The arguments
17649# must be portable across $(()) and expr.
17650if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17651 eval 'as_fn_arith ()
17652 {
17653 as_val=$(( $* ))
17654 }'
17655else
17656 as_fn_arith ()
17657 {
17658 as_val=`expr "$@" || test $? -eq 1`
17659 }
17660fi # as_fn_arith
17661
17662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663if expr a : '\(a\)' >/dev/null 2>&1 &&
17664 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17665 as_expr=expr
17666else
17667 as_expr=false
17668fi
17669
17670if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17671 as_basename=basename
17672else
17673 as_basename=false
17674fi
17675
Matthias Kloseb9621712010-04-24 17:59:49 +000017676if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17677 as_dirname=dirname
17678else
17679 as_dirname=false
17680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017682as_me=`$as_basename -- "$0" ||
17683$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17684 X"$0" : 'X\(//\)$' \| \
17685 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017686$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 sed '/^.*\/\([^/][^/]*\)\/*$/{
17688 s//\1/
17689 q
17690 }
17691 /^X\/\(\/\/\)$/{
17692 s//\1/
17693 q
17694 }
17695 /^X\/\(\/\).*/{
17696 s//\1/
17697 q
17698 }
17699 s/.*/./; q'`
17700
Matthias Kloseb9621712010-04-24 17:59:49 +000017701# Avoid depending upon Character Ranges.
17702as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17703as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17704as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17705as_cr_digits='0123456789'
17706as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017707
17708ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017709case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017710-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 xy) ECHO_C='\c';;
17714 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17715 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716 esac;;
17717*)
17718 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017719esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017720
Martin v. Löwis11437992002-04-12 09:54:03 +000017721rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722if test -d conf$$.dir; then
17723 rm -f conf$$.dir/conf$$.file
17724else
17725 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017726 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017728if (echo >conf$$.file) 2>/dev/null; then
17729 if ln -s conf$$.file conf$$ 2>/dev/null; then
17730 as_ln_s='ln -s'
17731 # ... but there are two gotchas:
17732 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17733 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017734 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017735 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017736 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 elif ln conf$$.file conf$$ 2>/dev/null; then
17738 as_ln_s=ln
17739 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017740 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017741 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017742else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017743 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017745rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17746rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017747
Matthias Kloseb9621712010-04-24 17:59:49 +000017748
17749# as_fn_mkdir_p
17750# -------------
17751# Create "$as_dir" as a directory, including parents if necessary.
17752as_fn_mkdir_p ()
17753{
17754
17755 case $as_dir in #(
17756 -*) as_dir=./$as_dir;;
17757 esac
17758 test -d "$as_dir" || eval $as_mkdir_p || {
17759 as_dirs=
17760 while :; do
17761 case $as_dir in #(
17762 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17763 *) as_qdir=$as_dir;;
17764 esac
17765 as_dirs="'$as_qdir' $as_dirs"
17766 as_dir=`$as_dirname -- "$as_dir" ||
17767$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17768 X"$as_dir" : 'X\(//\)[^/]' \| \
17769 X"$as_dir" : 'X\(//\)$' \| \
17770 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17771$as_echo X"$as_dir" |
17772 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17773 s//\1/
17774 q
17775 }
17776 /^X\(\/\/\)[^/].*/{
17777 s//\1/
17778 q
17779 }
17780 /^X\(\/\/\)$/{
17781 s//\1/
17782 q
17783 }
17784 /^X\(\/\).*/{
17785 s//\1/
17786 q
17787 }
17788 s/.*/./; q'`
17789 test -d "$as_dir" && break
17790 done
17791 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017792 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017793
17794
17795} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017796if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017797 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017798else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017799 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017800 as_mkdir_p=false
17801fi
17802
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017803
17804# as_fn_executable_p FILE
17805# -----------------------
17806# Test if FILE is an executable regular file.
17807as_fn_executable_p ()
17808{
17809 test -f "$1" && test -x "$1"
17810} # as_fn_executable_p
17811as_test_x='test -x'
17812as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017813
17814# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017815as_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 +000017816
17817# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017818as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017819
17820
Martin v. Löwis11437992002-04-12 09:54:03 +000017821exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017822## ----------------------------------- ##
17823## Main body of $CONFIG_STATUS script. ##
17824## ----------------------------------- ##
17825_ASEOF
17826test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017827
Matthias Kloseb9621712010-04-24 17:59:49 +000017828cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17829# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017830# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831# values after options handling.
17832ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017833This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017834generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017835
17836 CONFIG_FILES = $CONFIG_FILES
17837 CONFIG_HEADERS = $CONFIG_HEADERS
17838 CONFIG_LINKS = $CONFIG_LINKS
17839 CONFIG_COMMANDS = $CONFIG_COMMANDS
17840 $ $0 $@
17841
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017842on `(hostname || uname -n) 2>/dev/null | sed 1q`
17843"
17844
Martin v. Löwis11437992002-04-12 09:54:03 +000017845_ACEOF
17846
Matthias Kloseb9621712010-04-24 17:59:49 +000017847case $ac_config_files in *"
17848"*) set x $ac_config_files; shift; ac_config_files=$*;;
17849esac
17850
17851case $ac_config_headers in *"
17852"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17853esac
17854
17855
17856cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017857# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017858config_files="$ac_config_files"
17859config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017862
Matthias Kloseb9621712010-04-24 17:59:49 +000017863cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017864ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017865\`$as_me' instantiates files and other configuration actions
17866from templates according to the current configuration. Unless the files
17867and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017868
Matthias Kloseb9621712010-04-24 17:59:49 +000017869Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017870
17871 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017872 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017873 --config print configuration, then exit
17874 -q, --quiet, --silent
17875 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 -d, --debug don't remove temporary files
17877 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017878 --file=FILE[:TEMPLATE]
17879 instantiate the configuration file FILE
17880 --header=FILE[:TEMPLATE]
17881 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017882
17883Configuration files:
17884$config_files
17885
17886Configuration headers:
17887$config_headers
17888
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017889Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17893ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017894ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017895python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017896configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017897 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017898
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017899Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017900This config.status script is free software; the Free Software Foundation
17901gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902
17903ac_pwd='$ac_pwd'
17904srcdir='$srcdir'
17905INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017906MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017907test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017908_ACEOF
17909
Matthias Kloseb9621712010-04-24 17:59:49 +000017910cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17911# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017912ac_need_defaults=:
17913while test $# != 0
17914do
17915 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017916 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017917 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17918 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017919 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017920 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017921 --*=)
17922 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17923 ac_optarg=
17924 ac_shift=:
17925 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017927 ac_option=$1
17928 ac_optarg=$2
17929 ac_shift=shift
17930 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017931 esac
17932
Skip Montanaro6dead952003-09-25 14:50:04 +000017933 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017934 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017935 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17936 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017938 $as_echo "$ac_cs_version"; exit ;;
17939 --config | --confi | --conf | --con | --co | --c )
17940 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017941 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017942 debug=: ;;
17943 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017944 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017945 case $ac_optarg in
17946 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017947 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017948 esac
17949 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 ac_need_defaults=false;;
17951 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017952 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017953 case $ac_optarg in
17954 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17955 esac
17956 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017957 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 --he | --h)
17959 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017960 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017961Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017962 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017963 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017964 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17965 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17966 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017967
17968 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017969 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017970Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017971
Matthias Kloseb9621712010-04-24 17:59:49 +000017972 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017973 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017974
17975 esac
17976 shift
17977done
17978
Skip Montanaro6dead952003-09-25 14:50:04 +000017979ac_configure_extra_args=
17980
17981if $ac_cs_silent; then
17982 exec 6>/dev/null
17983 ac_configure_extra_args="$ac_configure_extra_args --silent"
17984fi
17985
17986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017988if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017989 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017990 shift
17991 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17992 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017993 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017994 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017995fi
17996
Martin v. Löwis11437992002-04-12 09:54:03 +000017997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017999exec 5>>config.log
18000{
18001 echo
18002 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18003## Running $as_me. ##
18004_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018005 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018010_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018011
Matthias Kloseb9621712010-04-24 17:59:49 +000018012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013
18014# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018015for ac_config_target in $ac_config_targets
18016do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017 case $ac_config_target in
18018 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18019 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18020 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018021 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18022 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018023 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018024 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018025 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018026 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018027
Victor Stinnere0be4232011-10-25 13:06:09 +020018028 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 esac
18030done
18031
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018032
Martin v. Löwis11437992002-04-12 09:54:03 +000018033# If the user did not use the arguments to specify the items to instantiate,
18034# then the envvar interface is used. Set only those that are not.
18035# We use the long form for the default assignment because of an extremely
18036# bizarre bug on SunOS 4.1.3.
18037if $ac_need_defaults; then
18038 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18039 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18040fi
18041
Skip Montanaro6dead952003-09-25 14:50:04 +000018042# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018043# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018044# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018045# Hook for its removal unless debugging.
18046# Note that there is a small window in which the directory will not be cleaned:
18047# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018048$debug ||
18049{
Victor Stinnere0be4232011-10-25 13:06:09 +020018050 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018052 : "${ac_tmp:=$tmp}"
18053 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018054' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018055 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018056}
Martin v. Löwis11437992002-04-12 09:54:03 +000018057# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018058
Martin v. Löwis11437992002-04-12 09:54:03 +000018059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018060 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018061 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018062} ||
18063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018064 tmp=./conf$$-$RANDOM
18065 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018066} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018067ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018068
Matthias Kloseb9621712010-04-24 17:59:49 +000018069# Set up the scripts for CONFIG_FILES section.
18070# No need to generate them if there are no CONFIG_FILES.
18071# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018072if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018073
Matthias Kloseb9621712010-04-24 17:59:49 +000018074
18075ac_cr=`echo X | tr X '\015'`
18076# On cygwin, bash can eat \r inside `` if the user requested igncr.
18077# But we know of no other shell where ac_cr would be empty at this
18078# point, so we can use a bashism as a fallback.
18079if test "x$ac_cr" = x; then
18080 eval ac_cr=\$\'\\r\'
18081fi
18082ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18083if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018084 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018085else
18086 ac_cs_awk_cr=$ac_cr
18087fi
18088
Victor Stinnere0be4232011-10-25 13:06:09 +020018089echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018090_ACEOF
18091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018092
Matthias Kloseb9621712010-04-24 17:59:49 +000018093{
18094 echo "cat >conf$$subs.awk <<_ACEOF" &&
18095 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18096 echo "_ACEOF"
18097} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018098 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18099ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018100ac_delim='%!_!# '
18101for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018102 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018103 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104
Matthias Kloseb9621712010-04-24 17:59:49 +000018105 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18106 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107 break
18108 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018109 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110 else
18111 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018113done
Matthias Kloseb9621712010-04-24 17:59:49 +000018114rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115
Matthias Kloseb9621712010-04-24 17:59:49 +000018116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018117cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018119sed -n '
18120h
18121s/^/S["/; s/!.*/"]=/
18122p
18123g
18124s/^[^!]*!//
18125:repl
18126t repl
18127s/'"$ac_delim"'$//
18128t delim
18129:nl
18130h
18131s/\(.\{148\}\)..*/\1/
18132t more1
18133s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18134p
18135n
18136b repl
18137:more1
18138s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18139p
18140g
18141s/.\{148\}//
18142t nl
18143:delim
18144h
18145s/\(.\{148\}\)..*/\1/
18146t more2
18147s/["\\]/\\&/g; s/^/"/; s/$/"/
18148p
18149b
18150:more2
18151s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18152p
18153g
18154s/.\{148\}//
18155t delim
18156' <conf$$subs.awk | sed '
18157/^[^""]/{
18158 N
18159 s/\n//
18160}
18161' >>$CONFIG_STATUS || ac_write_fail=1
18162rm -f conf$$subs.awk
18163cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18164_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018165cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018166 for (key in S) S_is_set[key] = 1
18167 FS = ""
18168
18169}
18170{
18171 line = $ 0
18172 nfields = split(line, field, "@")
18173 substed = 0
18174 len = length(field[1])
18175 for (i = 2; i < nfields; i++) {
18176 key = field[i]
18177 keylen = length(key)
18178 if (S_is_set[key]) {
18179 value = S[key]
18180 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18181 len += length(value) + length(field[++i])
18182 substed = 1
18183 } else
18184 len += 1 + keylen
18185 }
18186
18187 print line
18188}
18189
18190_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018192cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18193if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18194 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18195else
18196 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018197fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018198 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018199_ACEOF
18200
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018201# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18202# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203# trailing colons and then remove the whole line if VPATH becomes empty
18204# (actually we leave an empty line to preserve line numbers).
18205if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018206 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18207h
18208s///
18209s/^/:/
18210s/[ ]*$/:/
18211s/:\$(srcdir):/:/g
18212s/:\${srcdir}:/:/g
18213s/:@srcdir@:/:/g
18214s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018215s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018216x
18217s/\(=[ ]*\).*/\1/
18218G
18219s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018220s/^[^=]*=[ ]*$//
18221}'
18222fi
18223
Matthias Kloseb9621712010-04-24 17:59:49 +000018224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018225fi # test -n "$CONFIG_FILES"
18226
Matthias Kloseb9621712010-04-24 17:59:49 +000018227# Set up the scripts for CONFIG_HEADERS section.
18228# No need to generate them if there are no CONFIG_HEADERS.
18229# This happens for instance with `./config.status Makefile'.
18230if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018231cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018232BEGIN {
18233_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018234
Matthias Kloseb9621712010-04-24 17:59:49 +000018235# Transform confdefs.h into an awk script `defines.awk', embedded as
18236# here-document in config.status, that substitutes the proper values into
18237# config.h.in to produce config.h.
18238
18239# Create a delimiter string that does not exist in confdefs.h, to ease
18240# handling of long lines.
18241ac_delim='%!_!# '
18242for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018243 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18244 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018245 break
18246 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018247 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018248 else
18249 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18250 fi
18251done
18252
18253# For the awk script, D is an array of macro values keyed by name,
18254# likewise P contains macro parameters if any. Preserve backslash
18255# newline sequences.
18256
18257ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18258sed -n '
18259s/.\{148\}/&'"$ac_delim"'/g
18260t rset
18261:rset
18262s/^[ ]*#[ ]*define[ ][ ]*/ /
18263t def
18264d
18265:def
18266s/\\$//
18267t bsnl
18268s/["\\]/\\&/g
18269s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18270D["\1"]=" \3"/p
18271s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18272d
18273:bsnl
18274s/["\\]/\\&/g
18275s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18276D["\1"]=" \3\\\\\\n"\\/p
18277t cont
18278s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18279t cont
18280d
18281:cont
18282n
18283s/.\{148\}/&'"$ac_delim"'/g
18284t clear
18285:clear
18286s/\\$//
18287t bsnlc
18288s/["\\]/\\&/g; s/^/"/; s/$/"/p
18289d
18290:bsnlc
18291s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18292b cont
18293' <confdefs.h | sed '
18294s/'"$ac_delim"'/"\\\
18295"/g' >>$CONFIG_STATUS || ac_write_fail=1
18296
18297cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18298 for (key in D) D_is_set[key] = 1
18299 FS = ""
18300}
18301/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18302 line = \$ 0
18303 split(line, arg, " ")
18304 if (arg[1] == "#") {
18305 defundef = arg[2]
18306 mac1 = arg[3]
18307 } else {
18308 defundef = substr(arg[1], 2)
18309 mac1 = arg[2]
18310 }
18311 split(mac1, mac2, "(") #)
18312 macro = mac2[1]
18313 prefix = substr(line, 1, index(line, defundef) - 1)
18314 if (D_is_set[macro]) {
18315 # Preserve the white space surrounding the "#".
18316 print prefix "define", macro P[macro] D[macro]
18317 next
18318 } else {
18319 # Replace #undef with comments. This is necessary, for example,
18320 # in the case of _POSIX_SOURCE, which is predefined and required
18321 # on some systems where configure will not decide to define it.
18322 if (defundef == "undef") {
18323 print "/*", prefix defundef, macro, "*/"
18324 next
18325 }
18326 }
18327}
18328{ print }
18329_ACAWK
18330_ACEOF
18331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018332 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018333fi # test -n "$CONFIG_HEADERS"
18334
18335
18336eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18337shift
18338for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018339do
18340 case $ac_tag in
18341 :[FHLC]) ac_mode=$ac_tag; continue;;
18342 esac
18343 case $ac_mode$ac_tag in
18344 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018345 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018346 :[FH]-) ac_tag=-:-;;
18347 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18348 esac
18349 ac_save_IFS=$IFS
18350 IFS=:
18351 set x $ac_tag
18352 IFS=$ac_save_IFS
18353 shift
18354 ac_file=$1
18355 shift
18356
18357 case $ac_mode in
18358 :L) ac_source=$1;;
18359 :[FH])
18360 ac_file_inputs=
18361 for ac_f
18362 do
18363 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018364 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365 *) # Look for the file first in the build tree, then in the source tree
18366 # (if the path is not absolute). The absolute path cannot be DOS-style,
18367 # because $ac_f cannot contain `:'.
18368 test -f "$ac_f" ||
18369 case $ac_f in
18370 [\\/$]*) false;;
18371 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18372 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018373 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018375 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18376 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018377 done
18378
18379 # Let's still pretend it is `configure' which instantiates (i.e., don't
18380 # use $as_me), people would be surprised to read:
18381 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018382 configure_input='Generated from '`
18383 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18384 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 if test x"$ac_file" != x-; then
18386 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018387 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18388$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018390 # Neutralize special characters interpreted by sed in replacement strings.
18391 case $configure_input in #(
18392 *\&* | *\|* | *\\* )
18393 ac_sed_conf_input=`$as_echo "$configure_input" |
18394 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18395 *) ac_sed_conf_input=$configure_input;;
18396 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018397
18398 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018399 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18400 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018401 esac
18402 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 esac
18404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018405 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018406$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018407 X"$ac_file" : 'X\(//\)[^/]' \| \
18408 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018409 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018410$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18412 s//\1/
18413 q
18414 }
18415 /^X\(\/\/\)[^/].*/{
18416 s//\1/
18417 q
18418 }
18419 /^X\(\/\/\)$/{
18420 s//\1/
18421 q
18422 }
18423 /^X\(\/\).*/{
18424 s//\1/
18425 q
18426 }
18427 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018428 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 ac_builddir=.
18430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431case "$ac_dir" in
18432.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18433*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018434 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018435 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018436 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018437 case $ac_top_builddir_sub in
18438 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18439 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18440 esac ;;
18441esac
18442ac_abs_top_builddir=$ac_pwd
18443ac_abs_builddir=$ac_pwd$ac_dir_suffix
18444# for backward compatibility:
18445ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018446
18447case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018448 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018450 ac_top_srcdir=$ac_top_builddir_sub
18451 ac_abs_top_srcdir=$ac_pwd ;;
18452 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018453 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454 ac_top_srcdir=$srcdir
18455 ac_abs_top_srcdir=$srcdir ;;
18456 *) # Relative name.
18457 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18458 ac_top_srcdir=$ac_top_build_prefix$srcdir
18459 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018460esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018462
Martin v. Löwis11437992002-04-12 09:54:03 +000018463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018464 case $ac_mode in
18465 :F)
18466 #
18467 # CONFIG_FILE
18468 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018469
18470 case $INSTALL in
18471 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018472 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018473 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018474 ac_MKDIR_P=$MKDIR_P
18475 case $MKDIR_P in
18476 [\\/$]* | ?:[\\/]* ) ;;
18477 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18478 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018479_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018480
Matthias Kloseb9621712010-04-24 17:59:49 +000018481cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482# If the template does not know about datarootdir, expand it.
18483# FIXME: This hack should be removed a few years after 2.60.
18484ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018485ac_sed_dataroot='
18486/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018487 p
18488 q
18489}
18490/@datadir@/p
18491/@docdir@/p
18492/@infodir@/p
18493/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018494/@mandir@/p'
18495case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496*datarootdir*) ac_datarootdir_seen=yes;;
18497*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18499$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018501cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502 ac_datarootdir_hack='
18503 s&@datadir@&$datadir&g
18504 s&@docdir@&$docdir&g
18505 s&@infodir@&$infodir&g
18506 s&@localedir@&$localedir&g
18507 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018508 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018509esac
18510_ACEOF
18511
18512# Neutralize VPATH when `$srcdir' = `.'.
18513# Shell code in configure.ac might set extrasub.
18514# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018515cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18516ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018517$extrasub
18518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018520:t
18521/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018522s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018524s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525s&@srcdir@&$ac_srcdir&;t t
18526s&@abs_srcdir@&$ac_abs_srcdir&;t t
18527s&@top_srcdir@&$ac_top_srcdir&;t t
18528s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18529s&@builddir@&$ac_builddir&;t t
18530s&@abs_builddir@&$ac_abs_builddir&;t t
18531s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18532s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018533s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018535"
Victor Stinnere0be4232011-10-25 13:06:09 +020018536eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18537 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018539test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018540 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18541 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18542 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018544which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018545$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018546which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018547
Victor Stinnere0be4232011-10-25 13:06:09 +020018548 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018549 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018550 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18551 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018552 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018553 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554 ;;
18555 :H)
18556 #
18557 # CONFIG_HEADER
18558 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018559 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018560 {
18561 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018562 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18563 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018564 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018565 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018566 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18567$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018569 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018570 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018571 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018572 fi
18573 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018574 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018575 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018576 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018577 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018580
18581 esac
18582
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018583
18584 case $ac_file$ac_mode in
18585 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18586
18587 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018588done # for ac_tag
18589
Guido van Rossum627b2d71993-12-24 10:39:16 +000018590
Matthias Kloseb9621712010-04-24 17:59:49 +000018591as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018592_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018593ac_clean_files=$ac_clean_files_save
18594
Matthias Kloseb9621712010-04-24 17:59:49 +000018595test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018596 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018597
Martin v. Löwis11437992002-04-12 09:54:03 +000018598
18599# configure is writing to config.log, and then calls config.status.
18600# config.status does its own redirection, appending to config.log.
18601# Unfortunately, on DOS this fails, as config.log is still kept open
18602# by configure, so config.status won't be able to write to it; its
18603# output is simply discarded. So we exec the FD to /dev/null,
18604# effectively closing config.log, so it can be properly (re)opened and
18605# appended to by config.status. When coming back to configure, we
18606# need to make the FD available again.
18607if test "$no_create" != yes; then
18608 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018609 ac_config_status_args=
18610 test "$silent" = yes &&
18611 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018613 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 exec 5>>config.log
18615 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18616 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018617 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018618fi
18619if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18621$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018622fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018623
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018624
Christian Heimes75ed8902013-11-20 01:11:18 +010018625echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018626if test ! -f Modules/Setup.local
18627then
18628 echo "# Edit this file for local setup changes" >Modules/Setup.local
18629fi
18630
Christian Heimes75ed8902013-11-20 01:11:18 +010018631echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018632$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018633 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018634 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018635mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018636
18637if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18638 echo "" >&6
18639 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018640 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 +000018641 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018642 echo "" >&6
18643 echo "" >&6
18644fi
18645