blob: c76eb7affe54be2c4c29d452362e05939e7e9831 [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
xdegaye254b3092019-04-29 09:27:40 +0200634LIBPYTHON
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700635EXT_SUFFIX
Victor Stinner5422e3c2019-04-26 01:40:00 +0200636ALT_SOABI
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000637SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000638LIBC
639LIBM
640HAVE_GETHOSTBYNAME
641HAVE_GETHOSTBYNAME_R
642HAVE_GETHOSTBYNAME_R_3_ARG
643HAVE_GETHOSTBYNAME_R_5_ARG
644HAVE_GETHOSTBYNAME_R_6_ARG
645LIBOBJS
646TRUE
647MACHDEP_OBJS
648DYNLOADFILE
649DLINCLDIR
Łukasz Langaa785c872016-09-09 17:37:37 -0700650DTRACE_OBJS
651DTRACE_HEADERS
652DFLAGS
653DTRACE
Ned Deilyd819b932013-09-06 01:07:05 -0700654TCLTK_LIBS
655TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000656LIBFFI_INCLUDEDIR
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800657PKG_CONFIG_LIBDIR
658PKG_CONFIG_PATH
659PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000660SHLIBS
661CFLAGSFORSHARED
662LINKFORSHARED
663CCSHARED
664BLDSHARED
665LDCXXSHARED
666LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700667SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
stratakiscf10a752018-12-19 18:19:01 +0100671LDFLAGS_NODIST
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700672CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000673BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200674CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000675OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700676LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700677LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700678LLVM_PROF_ERR
679LLVM_PROF_FILE
680LLVM_PROF_MERGER
681PGO_PROF_USE_FLAG
682PGO_PROF_GEN_FLAG
serge-sans-paille5ad36f92018-10-25 01:54:22 +0200683LLVM_AR_FOUND
684target_os
685target_vendor
686target_cpu
687target
688LLVM_AR
Brett Cannon63d98bc2016-09-06 17:12:40 -0700689DEF_MAKE_RULE
690DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000691ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000692LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100693MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000694INSTALL_DATA
695INSTALL_SCRIPT
696INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200697ac_ct_READELF
698READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000699ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200700ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000701AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000702GNULD
703LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000704LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000705RUNSHARED
706INSTSONAME
707LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000708PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000709BLDLIBRARY
710DLLLIBRARY
711LDLIBRARY
712LIBRARY
713BUILDEXEEXT
714EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200715NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200716MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200717PLATFORM_TRIPLET
718MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200719ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000720MAINCC
721CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700722SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200723GREP
724CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732EXPORT_MACOSX_DEPLOYMENT_TARGET
733CONFIGURE_MACOSX_DEPLOYMENT_TARGET
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200734_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000735MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000736FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800738FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000739FRAMEWORKALTINSTALLLAST
740FRAMEWORKALTINSTALLFIRST
741FRAMEWORKINSTALLLAST
742FRAMEWORKINSTALLFIRST
743PYTHONFRAMEWORKINSTALLDIR
744PYTHONFRAMEWORKPREFIX
745PYTHONFRAMEWORKDIR
746PYTHONFRAMEWORKIDENTIFIER
747PYTHONFRAMEWORK
748LIPO_32BIT_FLAGS
749ARCH_RUN_32BIT
750UNIVERSALSDK
751CONFIG_ARGS
752SOVERSION
753VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200754PYTHON_FOR_BUILD
Victor Stinnera5c62a82017-05-03 18:21:48 +0200755PYTHON_FOR_REGEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100756host_os
757host_vendor
758host_cpu
759host
760build_os
761build_vendor
762build_cpu
763build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500764HAS_GIT
765GITBRANCH
766GITTAG
767GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400768BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000769target_alias
770host_alias
771build_alias
772LIBS
773ECHO_T
774ECHO_N
775ECHO_C
776DEFS
777mandir
778localedir
779libdir
780psdir
781pdfdir
782dvidir
783htmldir
784infodir
785docdir
786oldincludedir
787includedir
788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_cxx_main
815with_suffix
816enable_shared
817enable_profiling
818with_pydebug
Victor Stinnerf4e47032019-04-25 00:56:28 +0200819with_trace_refs
T. Woutersddbfa2c2017-05-23 01:30:49 +0200820with_assertions
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -0800825with_memory_sanitizer
826with_undefined_behavior_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_libs
828with_system_expat
829with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100830with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000831enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700832with_tcltk_includes
833with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
Nick Coghlan6ea41862017-06-11 13:16:15 +1000838with_c_locale_coercion
Matthias Kloseb9621712010-04-24 17:59:49 +0000839with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700840with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Christian Heimesff5be6e2018-01-20 13:19:21 +0100846with_openssl
Christian Heimes892d66e2018-01-29 14:10:18 +0100847with_ssl_default_suites
Matthias Kloseb9621712010-04-24 17:59:49 +0000848'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000849 ac_precious_vars='build_alias
850host_alias
851target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100852MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853CC
854CFLAGS
855LDFLAGS
856LIBS
857CPPFLAGS
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +0800858CPP
859PKG_CONFIG
860PKG_CONFIG_PATH
861PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000865ac_init_help=
866ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000867ac_unrecognized_opts=
868ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869# The variables have the same names as the options, with
870# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000871cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874no_recursion=
875prefix=NONE
876program_prefix=NONE
877program_suffix=NONE
878program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000880site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883x_includes=NONE
884x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886# Installation directory options.
887# These are left unexpanded so users can "make install exec_prefix=/foo"
888# and all the variables that are supposed to be based on exec_prefix
889# by default will actually change.
890# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892bindir='${exec_prefix}/bin'
893sbindir='${exec_prefix}/sbin'
894libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895datarootdir='${prefix}/share'
896datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897sysconfdir='${prefix}/etc'
898sharedstatedir='${prefix}/com'
899localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900includedir='${prefix}/include'
901oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
903infodir='${datarootdir}/info'
904htmldir='${docdir}'
905dvidir='${docdir}'
906pdfdir='${docdir}'
907psdir='${docdir}'
908libdir='${exec_prefix}/lib'
909localedir='${datarootdir}/locale'
910mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000915do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916 # If the previous option needs an argument, assign it.
917 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919 ac_prev=
920 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200924 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
925 *=) ac_optarg= ;;
926 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000927 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000928
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929 # Accept the important Cygnus configure options, so we can diagnose typos.
930
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000931 case $ac_dashdash$ac_option in
932 --)
933 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -bindir | --bindir | --bindi | --bind | --bin | --bi)
936 ac_prev=bindir ;;
937 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
940 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945 -cache-file | --cache-file | --cache-fil | --cache-fi \
946 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
947 ac_prev=cache_file ;;
948 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
949 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 cache_file=$ac_optarg ;;
951
952 --config-cache | -C)
953 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000955 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000957 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000960 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
961 | --dataroo | --dataro | --datar)
962 ac_prev=datarootdir ;;
963 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
964 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
965 datarootdir=$ac_optarg ;;
966
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000968 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000969 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000970 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200971 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000972 ac_useropt_orig=$ac_useropt
973 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
974 case $ac_user_opts in
975 *"
976"enable_$ac_useropt"
977"*) ;;
978 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
979 ac_unrecognized_sep=', ';;
980 esac
981 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000982
983 -docdir | --docdir | --docdi | --doc | --do)
984 ac_prev=docdir ;;
985 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
986 docdir=$ac_optarg ;;
987
988 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
989 ac_prev=dvidir ;;
990 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
991 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000994 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000995 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000996 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200997 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000998 ac_useropt_orig=$ac_useropt
999 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1000 case $ac_user_opts in
1001 *"
1002"enable_$ac_useropt"
1003"*) ;;
1004 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1005 ac_unrecognized_sep=', ';;
1006 esac
1007 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1010 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1011 | --exec | --exe | --ex)
1012 ac_prev=exec_prefix ;;
1013 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1014 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1015 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001019 # Obsolete; use --with-gas.
1020 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 -help | --help | --hel | --he | -h)
1023 ac_init_help=long ;;
1024 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1025 ac_init_help=recursive ;;
1026 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1027 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
1029 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001031 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001034 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1035 ac_prev=htmldir ;;
1036 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1037 | --ht=*)
1038 htmldir=$ac_optarg ;;
1039
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040 -includedir | --includedir | --includedi | --included | --include \
1041 | --includ | --inclu | --incl | --inc)
1042 ac_prev=includedir ;;
1043 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1044 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -infodir | --infodir | --infodi | --infod | --info | --inf)
1048 ac_prev=infodir ;;
1049 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
1052 -libdir | --libdir | --libdi | --libd)
1053 ac_prev=libdir ;;
1054 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
1057 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1058 | --libexe | --libex | --libe)
1059 ac_prev=libexecdir ;;
1060 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1061 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 -localedir | --localedir | --localedi | --localed | --locale)
1065 ac_prev=localedir ;;
1066 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1067 localedir=$ac_optarg ;;
1068
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001070 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071 ac_prev=localstatedir ;;
1072 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001073 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075
1076 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1077 ac_prev=mandir ;;
1078 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 # Obsolete; use --without-fp.
1083 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001086 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087 no_create=yes ;;
1088
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001089 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1090 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1091 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1094 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1095 | --oldin | --oldi | --old | --ol | --o)
1096 ac_prev=oldincludedir ;;
1097 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1098 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1099 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001101
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1103 ac_prev=prefix ;;
1104 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1108 | --program-pre | --program-pr | --program-p)
1109 ac_prev=program_prefix ;;
1110 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1111 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1115 | --program-suf | --program-su | --program-s)
1116 ac_prev=program_suffix ;;
1117 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1118 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
1121 -program-transform-name | --program-transform-name \
1122 | --program-transform-nam | --program-transform-na \
1123 | --program-transform-n | --program-transform- \
1124 | --program-transform | --program-transfor \
1125 | --program-transfo | --program-transf \
1126 | --program-trans | --program-tran \
1127 | --progr-tra | --program-tr | --program-t)
1128 ac_prev=program_transform_name ;;
1129 -program-transform-name=* | --program-transform-name=* \
1130 | --program-transform-nam=* | --program-transform-na=* \
1131 | --program-transform-n=* | --program-transform-=* \
1132 | --program-transform=* | --program-transfor=* \
1133 | --program-transfo=* | --program-transf=* \
1134 | --program-trans=* | --program-tran=* \
1135 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001138 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1139 ac_prev=pdfdir ;;
1140 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1141 pdfdir=$ac_optarg ;;
1142
1143 -psdir | --psdir | --psdi | --psd | --ps)
1144 ac_prev=psdir ;;
1145 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1146 psdir=$ac_optarg ;;
1147
Guido van Rossum7f43da71994-08-01 12:15:30 +00001148 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1149 | -silent | --silent | --silen | --sile | --sil)
1150 silent=yes ;;
1151
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001152 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1153 ac_prev=sbindir ;;
1154 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1155 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
1158 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1159 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1160 | --sharedst | --shareds | --shared | --share | --shar \
1161 | --sha | --sh)
1162 ac_prev=sharedstatedir ;;
1163 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1164 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1165 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1166 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001167 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001169 -site | --site | --sit)
1170 ac_prev=site ;;
1171 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1175 ac_prev=srcdir ;;
1176 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001179 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1180 | --syscon | --sysco | --sysc | --sys | --sy)
1181 ac_prev=sysconfdir ;;
1182 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1183 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001184 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001185
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
1191 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1192 verbose=yes ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 -version | --version | --versio | --versi | --vers | -V)
1195 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001198 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001201 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt_orig=$ac_useropt
1203 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1204 case $ac_user_opts in
1205 *"
1206"with_$ac_useropt"
1207"*) ;;
1208 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1209 ac_unrecognized_sep=', ';;
1210 esac
1211 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212
1213 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001217 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 ac_useropt_orig=$ac_useropt
1219 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1220 case $ac_user_opts in
1221 *"
1222"with_$ac_useropt"
1223"*) ;;
1224 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1225 ac_unrecognized_sep=', ';;
1226 esac
1227 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229 --x)
1230 # Obsolete; use --with-x.
1231 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232
1233 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1234 | --x-incl | --x-inc | --x-in | --x-i)
1235 ac_prev=x_includes ;;
1236 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1237 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001239
1240 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1241 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1242 ac_prev=x_libraries ;;
1243 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1244 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1248Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001249 ;;
1250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 *=*)
1252 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1253 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 case $ac_envvar in #(
1255 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001256 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001258 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 export $ac_envvar ;;
1260
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001261 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001263 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001266 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 ;;
1268
1269 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270done
1271
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001274 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275fi
1276
Matthias Kloseb9621712010-04-24 17:59:49 +00001277if test -n "$ac_unrecognized_opts"; then
1278 case $enable_option_checking in
1279 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001280 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1282 esac
1283fi
1284
1285# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001286for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1287 datadir sysconfdir sharedstatedir localstatedir includedir \
1288 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Victor Stinner21a74a92019-04-11 22:28:12 +02001289 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001290do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001292 # Remove trailing slashes.
1293 case $ac_val in
1294 */ )
1295 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1296 eval $ac_var=\$ac_val;;
1297 esac
1298 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001299 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001300 [\\/$]* | ?:[\\/]* ) continue;;
1301 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001302 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001303 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001304done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001305
Martin v. Löwis11437992002-04-12 09:54:03 +00001306# There might be people who depend on the old broken behavior: `$host'
1307# used to hold the argument of --host etc.
1308# FIXME: To remove some day.
1309build=$build_alias
1310host=$host_alias
1311target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001312
Martin v. Löwis11437992002-04-12 09:54:03 +00001313# FIXME: To remove some day.
1314if test "x$host_alias" != x; then
1315 if test "x$build_alias" = x; then
1316 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001317 elif test "x$build_alias" != "x$host_alias"; then
1318 cross_compiling=yes
1319 fi
1320fi
1321
1322ac_tool_prefix=
1323test -n "$host_alias" && ac_tool_prefix=$host_alias-
1324
1325test "$silent" = yes && exec 6>/dev/null
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328ac_pwd=`pwd` && test -n "$ac_pwd" &&
1329ac_ls_di=`ls -di .` &&
1330ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001332test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334
1335
Guido van Rossum627b2d71993-12-24 10:39:16 +00001336# Find the source files, if location was not specified.
1337if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001340 ac_confdir=`$as_dirname -- "$as_myself" ||
1341$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1342 X"$as_myself" : 'X\(//\)[^/]' \| \
1343 X"$as_myself" : 'X\(//\)$' \| \
1344 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1345$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001346 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1347 s//\1/
1348 q
1349 }
1350 /^X\(\/\/\)[^/].*/{
1351 s//\1/
1352 q
1353 }
1354 /^X\(\/\/\)$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\).*/{
1359 s//\1/
1360 q
1361 }
1362 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001363 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001364 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365 srcdir=..
1366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001367else
1368 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001370if test ! -r "$srcdir/$ac_unique_file"; then
1371 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001372 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001374ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1375ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001376 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001377 pwd)`
1378# When building in place, set srcdir=.
1379if test "$ac_abs_confdir" = "$ac_pwd"; then
1380 srcdir=.
1381fi
1382# Remove unnecessary trailing slashes from srcdir.
1383# Double slashes in file names in object file debugging info
1384# mess up M-x gdb in Emacs.
1385case $srcdir in
1386*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1387esac
1388for ac_var in $ac_precious_vars; do
1389 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1390 eval ac_env_${ac_var}_value=\$${ac_var}
1391 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1393done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001394
Martin v. Löwis11437992002-04-12 09:54:03 +00001395#
1396# Report the --help message.
1397#
1398if test "$ac_init_help" = "long"; then
1399 # Omit some internal or obsolete options to make the list less imposing.
1400 # This message is too long to be a string in the A/UX 3.1 sh.
1401 cat <<_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001402\`configure' configures python 3.8 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403
1404Usage: $0 [OPTION]... [VAR=VALUE]...
1405
1406To assign environment variables (e.g., CC, CFLAGS...), specify them as
1407VAR=VALUE. See below for descriptions of some of the useful variables.
1408
1409Defaults for the options are specified in brackets.
1410
1411Configuration:
1412 -h, --help display this help and exit
1413 --help=short display options specific to this package
1414 --help=recursive display the short help of all the included packages
1415 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001416 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 --cache-file=FILE cache test results in FILE [disabled]
1418 -C, --config-cache alias for \`--cache-file=config.cache'
1419 -n, --no-create do not create output files
1420 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1421
Martin v. Löwis11437992002-04-12 09:54:03 +00001422Installation directories:
1423 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427
1428By default, \`make install' will install all the files in
1429\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1430an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1431for instance \`--prefix=\$HOME'.
1432
1433For better control, use the options below.
1434
1435Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001436 --bindir=DIR user executables [EPREFIX/bin]
1437 --sbindir=DIR system admin executables [EPREFIX/sbin]
1438 --libexecdir=DIR program executables [EPREFIX/libexec]
1439 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1440 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1441 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001462 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001463_ACEOF
1464fi
1465
1466if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001467 case $ac_init_help in
Ned Deily5489bda2018-01-31 17:44:09 -05001468 short | recursive ) echo "Configuration of python 3.8:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 cat <<\_ACEOF
1471
1472Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001473 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001474 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1475 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001476 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001477 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-framework[=INSTALLDIR]
1479 Build (MacOSX|Darwin) framework
1480 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001481 --enable-profiling enable C-level code profiling
Brett Cannonb4e5fee2017-06-09 13:56:57 -07001482 --enable-optimizations Enable expensive, stable optimizations (PGO, etc).
1483 Disabled by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily8c9bb722018-01-30 07:42:14 -05001496 "64-bit", "3-way", "intel", "intel-32", "intel-64",
1497 or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001498 --with-framework-name=FRAMEWORK
1499 specify an alternate name of the framework built
1500 with --enable-framework
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-cxx-main=<compiler>
1502 compile main() and link python executable with C++
1503 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-suffix=.exe set executable suffix
1505 --with-pydebug build with Py_DEBUG defined
Victor Stinnerf4e47032019-04-25 00:56:28 +02001506 --with-trace-refs enable tracing references for debugging purpose
T. Woutersddbfa2c2017-05-23 01:30:49 +02001507 --with-assertions build with C assertions enabled
octaviansoldea4c814012017-09-08 12:14:33 -07001508 --with-lto Enable Link Time Optimization in any build. Disabled
1509 by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001510 --with-hash-algorithm=[fnv|siphash24]
1511 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001512 --with-address-sanitizer
Gregory P. Smith1584a002018-11-12 12:07:14 -08001513 enable AddressSanitizer (asan)
1514 --with-memory-sanitizer enable MemorySanitizer (msan)
1515 --with-undefined-behavior-sanitizer
1516 enable UndefinedBehaviorSanitizer (ubsan)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001518 --with-system-expat build pyexpat module using an installed expat
1519 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001520 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001521 --with-system-libmpdec build _decimal module using an installed libmpdec
1522 library
Ned Deilyd819b932013-09-06 01:07:05 -07001523 --with-tcltk-includes='-I...'
1524 override search for Tcl and Tk include files
1525 --with-tcltk-libs='-L...'
1526 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001527 --with-dbmliborder=db1:db2:...
1528 order to check db backends for dbm. Valid value is a
1529 colon separated string with the backend names
1530 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-doc-strings disable/enable documentation strings
1532 --with(out)-pymalloc disable/enable specialized mallocs
Nick Coghlan6ea41862017-06-11 13:16:15 +10001533 --with(out)-c-locale-coercion
1534 disable/enable C locale coercion to a UTF-8 based
1535 locale
Benjamin Peterson05159c42009-12-03 03:01:27 +00001536 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001537 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-libm=STRING math library
1539 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001540 --with(out)-computed-gotos
1541 Use computed gotos in evaluation loop (enabled by
1542 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001543 --with(out)-ensurepip=[=upgrade]
1544 "install" or "upgrade" using bundled pip
Christian Heimesff5be6e2018-01-20 13:19:21 +01001545 --with-openssl=DIR root of the OpenSSL directory
Christian Heimes892d66e2018-01-29 14:10:18 +01001546 --with-ssl-default-suites=[python|openssl|STRING]
1547 Override default cipher suites string, python: use
1548 Python's preferred selection (default), openssl:
1549 leave OpenSSL's defaults untouched, STRING: use a
1550 custom string, PROTOCOL_SSLv2 ignores the setting
Martin v. Löwis11437992002-04-12 09:54:03 +00001551
1552Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001553 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001554 CC C compiler command
1555 CFLAGS C compiler flags
1556 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1557 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001559 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 CPP C preprocessor
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +08001562 PKG_CONFIG path to pkg-config utility
1563 PKG_CONFIG_PATH
1564 directories to add to pkg-config's search path
1565 PKG_CONFIG_LIBDIR
1566 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
1568Use these variables to override the choices made by `configure' or to help
1569it to find libraries and programs with nonstandard names/locations.
1570
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001571Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001572_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001574fi
1575
1576if test "$ac_init_help" = "recursive"; then
1577 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 test -d "$ac_dir" ||
1580 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1581 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001582 ac_builddir=.
1583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584case "$ac_dir" in
1585.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1586*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001588 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 case $ac_top_builddir_sub in
1591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1593 esac ;;
1594esac
1595ac_abs_top_builddir=$ac_pwd
1596ac_abs_builddir=$ac_pwd$ac_dir_suffix
1597# for backward compatibility:
1598ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001599
1600case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603 ac_top_srcdir=$ac_top_builddir_sub
1604 ac_abs_top_srcdir=$ac_pwd ;;
1605 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001607 ac_top_srcdir=$srcdir
1608 ac_abs_top_srcdir=$srcdir ;;
1609 *) # Relative name.
1610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1611 ac_top_srcdir=$ac_top_build_prefix$srcdir
1612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001613esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001615
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 cd "$ac_dir" || { ac_status=$?; continue; }
1617 # Check for guested configure.
1618 if test -f "$ac_srcdir/configure.gnu"; then
1619 echo &&
1620 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1621 elif test -f "$ac_srcdir/configure"; then
1622 echo &&
1623 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001624 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001625 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626 fi || ac_status=$?
1627 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001628 done
1629fi
1630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001632if $ac_init_version; then
1633 cat <<\_ACEOF
Ned Deily5489bda2018-01-31 17:44:09 -05001634python configure 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001635generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001636
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001637Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001638This configure script is free software; the Free Software Foundation
1639gives unlimited permission to copy, distribute and modify it.
1640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001641 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001643
1644## ------------------------ ##
1645## Autoconf initialization. ##
1646## ------------------------ ##
1647
1648# ac_fn_c_try_compile LINENO
1649# --------------------------
1650# Try to compile conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 rm -f conftest.$ac_objext
1655 if { { ac_try="$ac_compile"
1656case "(($ac_try" in
1657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1658 *) ac_try_echo=$ac_try;;
1659esac
1660eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1661$as_echo "$ac_try_echo"; } >&5
1662 (eval "$ac_compile") 2>conftest.err
1663 ac_status=$?
1664 if test -s conftest.err; then
1665 grep -v '^ *+' conftest.err >conftest.er1
1666 cat conftest.er1 >&5
1667 mv -f conftest.er1 conftest.err
1668 fi
1669 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1670 test $ac_status = 0; } && {
1671 test -z "$ac_c_werror_flag" ||
1672 test ! -s conftest.err
1673 } && test -s conftest.$ac_objext; then :
1674 ac_retval=0
1675else
1676 $as_echo "$as_me: failed program was:" >&5
1677sed 's/^/| /' conftest.$ac_ext >&5
1678
1679 ac_retval=1
1680fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001681 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 as_fn_set_status $ac_retval
1683
1684} # ac_fn_c_try_compile
1685
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001686# ac_fn_c_try_cpp LINENO
1687# ----------------------
1688# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1689ac_fn_c_try_cpp ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 if { { ac_try="$ac_cpp conftest.$ac_ext"
1693case "(($ac_try" in
1694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1695 *) ac_try_echo=$ac_try;;
1696esac
1697eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1698$as_echo "$ac_try_echo"; } >&5
1699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1700 ac_status=$?
1701 if test -s conftest.err; then
1702 grep -v '^ *+' conftest.err >conftest.er1
1703 cat conftest.er1 >&5
1704 mv -f conftest.er1 conftest.err
1705 fi
1706 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1707 test $ac_status = 0; } > conftest.i && {
1708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1709 test ! -s conftest.err
1710 }; then :
1711 ac_retval=0
1712else
1713 $as_echo "$as_me: failed program was:" >&5
1714sed 's/^/| /' conftest.$ac_ext >&5
1715
1716 ac_retval=1
1717fi
1718 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1719 as_fn_set_status $ac_retval
1720
1721} # ac_fn_c_try_cpp
1722
Matthias Kloseb9621712010-04-24 17:59:49 +00001723# ac_fn_c_try_link LINENO
1724# -----------------------
1725# Try to link conftest.$ac_ext, and return whether this succeeded.
1726ac_fn_c_try_link ()
1727{
1728 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1729 rm -f conftest.$ac_objext conftest$ac_exeext
1730 if { { ac_try="$ac_link"
1731case "(($ac_try" in
1732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1733 *) ac_try_echo=$ac_try;;
1734esac
1735eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1736$as_echo "$ac_try_echo"; } >&5
1737 (eval "$ac_link") 2>conftest.err
1738 ac_status=$?
1739 if test -s conftest.err; then
1740 grep -v '^ *+' conftest.err >conftest.er1
1741 cat conftest.er1 >&5
1742 mv -f conftest.er1 conftest.err
1743 fi
1744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1745 test $ac_status = 0; } && {
1746 test -z "$ac_c_werror_flag" ||
1747 test ! -s conftest.err
1748 } && test -s conftest$ac_exeext && {
1749 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001750 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001751 }; then :
1752 ac_retval=0
1753else
1754 $as_echo "$as_me: failed program was:" >&5
1755sed 's/^/| /' conftest.$ac_ext >&5
1756
1757 ac_retval=1
1758fi
1759 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1760 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1761 # interfere with the next link command; also delete a directory that is
1762 # left behind by Apple's compiler. We do this before executing the actions.
1763 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001764 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001765 as_fn_set_status $ac_retval
1766
1767} # ac_fn_c_try_link
1768
Matthias Kloseb9621712010-04-24 17:59:49 +00001769# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1770# -------------------------------------------------------
1771# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1772# the include files in INCLUDES and setting the cache variable VAR
1773# accordingly.
1774ac_fn_c_check_header_mongrel ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001777 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1779$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001780if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 $as_echo_n "(cached) " >&6
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786else
1787 # Is the header compilable?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1789$as_echo_n "checking $2 usability... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792$4
1793#include <$2>
1794_ACEOF
1795if ac_fn_c_try_compile "$LINENO"; then :
1796 ac_header_compiler=yes
1797else
1798 ac_header_compiler=no
1799fi
1800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1802$as_echo "$ac_header_compiler" >&6; }
1803
1804# Is the header present?
1805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1806$as_echo_n "checking $2 presence... " >&6; }
1807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1808/* end confdefs.h. */
1809#include <$2>
1810_ACEOF
1811if ac_fn_c_try_cpp "$LINENO"; then :
1812 ac_header_preproc=yes
1813else
1814 ac_header_preproc=no
1815fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001816rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1818$as_echo "$ac_header_preproc" >&6; }
1819
1820# So? What about this header?
1821case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1822 yes:no: )
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1824$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1826$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1827 ;;
1828 no:yes:* )
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1830$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1832$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1834$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1836$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1838$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001839( $as_echo "## --------------------------------------- ##
1840## Report this to https://bugs.python.org/ ##
1841## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001842 ) | sed "s/^/$as_me: WARNING: /" >&2
1843 ;;
1844esac
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001847if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 eval "$3=\$ac_header_compiler"
1851fi
1852eval ac_res=\$$3
1853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1854$as_echo "$ac_res" >&6; }
1855fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001857
1858} # ac_fn_c_check_header_mongrel
1859
1860# ac_fn_c_try_run LINENO
1861# ----------------------
1862# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1863# that executables *can* be run.
1864ac_fn_c_try_run ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 if { { ac_try="$ac_link"
1868case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_link") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1878 { { case "(($ac_try" in
1879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1880 *) ac_try_echo=$ac_try;;
1881esac
1882eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1883$as_echo "$ac_try_echo"; } >&5
1884 (eval "$ac_try") 2>&5
1885 ac_status=$?
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; }; }; then :
1888 ac_retval=0
1889else
1890 $as_echo "$as_me: program exited with status $ac_status" >&5
1891 $as_echo "$as_me: failed program was:" >&5
1892sed 's/^/| /' conftest.$ac_ext >&5
1893
1894 ac_retval=$ac_status
1895fi
1896 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001898 as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_run
1901
1902# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1903# -------------------------------------------------------
1904# Tests whether HEADER exists and can be compiled using the include files in
1905# INCLUDES, setting the cache variable VAR accordingly.
1906ac_fn_c_check_header_compile ()
1907{
1908 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1910$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001912 $as_echo_n "(cached) " >&6
1913else
1914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1915/* end confdefs.h. */
1916$4
1917#include <$2>
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 eval "$3=yes"
1921else
1922 eval "$3=no"
1923fi
1924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1925fi
1926eval ac_res=\$$3
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001930
1931} # ac_fn_c_check_header_compile
1932
Matthias Kloseb9621712010-04-24 17:59:49 +00001933# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934# -------------------------------------------
1935# Tests whether TYPE exists after having included INCLUDES, setting cache
1936# variable VAR accordingly.
1937ac_fn_c_check_type ()
1938{
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001942if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001943 $as_echo_n "(cached) " >&6
1944else
1945 eval "$3=no"
1946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947/* end confdefs.h. */
1948$4
1949int
1950main ()
1951{
1952if (sizeof ($2))
1953 return 0;
1954 ;
1955 return 0;
1956}
1957_ACEOF
1958if ac_fn_c_try_compile "$LINENO"; then :
1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960/* end confdefs.h. */
1961$4
1962int
1963main ()
1964{
1965if (sizeof (($2)))
1966 return 0;
1967 ;
1968 return 0;
1969}
1970_ACEOF
1971if ac_fn_c_try_compile "$LINENO"; then :
1972
1973else
1974 eval "$3=yes"
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979fi
1980eval ac_res=\$$3
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001983 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001984
1985} # ac_fn_c_check_type
1986
Matthias Kloseb9621712010-04-24 17:59:49 +00001987# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988# --------------------------------------------
1989# Tries to find the compile-time value of EXPR in a program that includes
1990# INCLUDES, setting VAR accordingly. Returns whether the value could be
1991# computed
1992ac_fn_c_compute_int ()
1993{
1994 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995 if test "$cross_compiling" = yes; then
1996 # Depending upon the size, compute the lo and hi bounds.
1997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_lo=0 ac_mid=0
2013 while :; do
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015/* end confdefs.h. */
2016$4
2017int
2018main ()
2019{
2020static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002021test_array [0] = 0;
2022return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002023
2024 ;
2025 return 0;
2026}
2027_ACEOF
2028if ac_fn_c_try_compile "$LINENO"; then :
2029 ac_hi=$ac_mid; break
2030else
2031 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2032 if test $ac_lo -le $ac_mid; then
2033 ac_lo= ac_hi=
2034 break
2035 fi
2036 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2037fi
2038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 done
2040else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_hi=-1 ac_mid=-1
2057 while :; do
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=$ac_mid; break
2074else
2075 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2076 if test $ac_mid -le $ac_hi; then
2077 ac_lo= ac_hi=
2078 break
2079 fi
2080 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083 done
2084else
2085 ac_lo= ac_hi=
2086fi
2087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2088fi
2089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2090# Binary search between lo and hi bounds.
2091while test "x$ac_lo" != "x$ac_hi"; do
2092 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094/* end confdefs.h. */
2095$4
2096int
2097main ()
2098{
2099static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002100test_array [0] = 0;
2101return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002102
2103 ;
2104 return 0;
2105}
2106_ACEOF
2107if ac_fn_c_try_compile "$LINENO"; then :
2108 ac_hi=$ac_mid
2109else
2110 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2111fi
2112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113done
2114case $ac_lo in #((
2115?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2116'') ac_retval=1 ;;
2117esac
2118 else
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122static long int longval () { return $2; }
2123static unsigned long int ulongval () { return $2; }
2124#include <stdio.h>
2125#include <stdlib.h>
2126int
2127main ()
2128{
2129
2130 FILE *f = fopen ("conftest.val", "w");
2131 if (! f)
2132 return 1;
2133 if (($2) < 0)
2134 {
2135 long int i = longval ();
2136 if (i != ($2))
2137 return 1;
2138 fprintf (f, "%ld", i);
2139 }
2140 else
2141 {
2142 unsigned long int i = ulongval ();
2143 if (i != ($2))
2144 return 1;
2145 fprintf (f, "%lu", i);
2146 }
2147 /* Do not output a trailing newline, as this causes \r\n confusion
2148 on some platforms. */
2149 return ferror (f) || fclose (f) != 0;
2150
2151 ;
2152 return 0;
2153}
2154_ACEOF
2155if ac_fn_c_try_run "$LINENO"; then :
2156 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2157else
2158 ac_retval=1
2159fi
2160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2161 conftest.$ac_objext conftest.beam conftest.$ac_ext
2162rm -f conftest.val
2163
2164 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002165 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002166 as_fn_set_status $ac_retval
2167
2168} # ac_fn_c_compute_int
2169
2170# ac_fn_c_check_func LINENO FUNC VAR
2171# ----------------------------------
2172# Tests whether FUNC exists, setting the cache variable VAR accordingly
2173ac_fn_c_check_func ()
2174{
2175 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2177$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002178if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002179 $as_echo_n "(cached) " >&6
2180else
2181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2182/* end confdefs.h. */
2183/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2185#define $2 innocuous_$2
2186
2187/* System header to define __stub macros and hopefully few prototypes,
2188 which can conflict with char $2 (); below.
2189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2190 <limits.h> exists even on freestanding compilers. */
2191
2192#ifdef __STDC__
2193# include <limits.h>
2194#else
2195# include <assert.h>
2196#endif
2197
2198#undef $2
2199
2200/* Override any GCC internal prototype to avoid an error.
2201 Use char because int might match the return type of a GCC
2202 builtin and then its argument prototype would still apply. */
2203#ifdef __cplusplus
2204extern "C"
2205#endif
2206char $2 ();
2207/* The GNU C library defines this for functions which it implements
2208 to always fail with ENOSYS. Some functions are actually named
2209 something starting with __ and the normal name is an alias. */
2210#if defined __stub_$2 || defined __stub___$2
2211choke me
2212#endif
2213
2214int
2215main ()
2216{
2217return $2 ();
2218 ;
2219 return 0;
2220}
2221_ACEOF
2222if ac_fn_c_try_link "$LINENO"; then :
2223 eval "$3=yes"
2224else
2225 eval "$3=no"
2226fi
2227rm -f core conftest.err conftest.$ac_objext \
2228 conftest$ac_exeext conftest.$ac_ext
2229fi
2230eval ac_res=\$$3
2231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2232$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002233 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002234
2235} # ac_fn_c_check_func
2236
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002237# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2238# ---------------------------------------------
2239# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2240# accordingly.
2241ac_fn_c_check_decl ()
2242{
2243 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244 as_decl_name=`echo $2|sed 's/ *(.*//'`
2245 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2247$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2248if eval \${$3+:} false; then :
2249 $as_echo_n "(cached) " >&6
2250else
2251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2252/* end confdefs.h. */
2253$4
2254int
2255main ()
2256{
2257#ifndef $as_decl_name
2258#ifdef __cplusplus
2259 (void) $as_decl_use;
2260#else
2261 (void) $as_decl_name;
2262#endif
2263#endif
2264
2265 ;
2266 return 0;
2267}
2268_ACEOF
2269if ac_fn_c_try_compile "$LINENO"; then :
2270 eval "$3=yes"
2271else
2272 eval "$3=no"
2273fi
2274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2275fi
2276eval ac_res=\$$3
2277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2278$as_echo "$ac_res" >&6; }
2279 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2280
2281} # ac_fn_c_check_decl
2282
Matthias Kloseb9621712010-04-24 17:59:49 +00002283# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2284# ----------------------------------------------------
2285# Tries to find if the field MEMBER exists in type AGGR, after including
2286# INCLUDES, setting cache variable VAR accordingly.
2287ac_fn_c_check_member ()
2288{
2289 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2291$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002292if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002293 $as_echo_n "(cached) " >&6
2294else
2295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2296/* end confdefs.h. */
2297$5
2298int
2299main ()
2300{
2301static $2 ac_aggr;
2302if (ac_aggr.$3)
2303return 0;
2304 ;
2305 return 0;
2306}
2307_ACEOF
2308if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$4=yes"
2310else
2311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2312/* end confdefs.h. */
2313$5
2314int
2315main ()
2316{
2317static $2 ac_aggr;
2318if (sizeof ac_aggr.$3)
2319return 0;
2320 ;
2321 return 0;
2322}
2323_ACEOF
2324if ac_fn_c_try_compile "$LINENO"; then :
2325 eval "$4=yes"
2326else
2327 eval "$4=no"
2328fi
2329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2330fi
2331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2332fi
2333eval ac_res=\$$4
2334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2335$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002336 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002337
2338} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002339cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002340This file contains any messages produced by compilers while
2341running configure, to aid debugging if configure makes a mistake.
2342
Ned Deily5489bda2018-01-31 17:44:09 -05002343It was created by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002344generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
2346 $ $0 $@
2347
2348_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002350{
2351cat <<_ASUNAME
2352## --------- ##
2353## Platform. ##
2354## --------- ##
2355
2356hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2357uname -m = `(uname -m) 2>/dev/null || echo unknown`
2358uname -r = `(uname -r) 2>/dev/null || echo unknown`
2359uname -s = `(uname -s) 2>/dev/null || echo unknown`
2360uname -v = `(uname -v) 2>/dev/null || echo unknown`
2361
2362/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2363/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2364
2365/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2366/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2367/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002369/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2370/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2371/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2372
2373_ASUNAME
2374
2375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2376for as_dir in $PATH
2377do
2378 IFS=$as_save_IFS
2379 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002380 $as_echo "PATH: $as_dir"
2381 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002382IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002383
2384} >&5
2385
2386cat >&5 <<_ACEOF
2387
2388
2389## ----------- ##
2390## Core tests. ##
2391## ----------- ##
2392
2393_ACEOF
2394
2395
2396# Keep a trace of the command line.
2397# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002398# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002399# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002400# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002401ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002402ac_configure_args0=
2403ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002404ac_must_keep_next=false
2405for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002406do
Skip Montanaro6dead952003-09-25 14:50:04 +00002407 for ac_arg
2408 do
2409 case $ac_arg in
2410 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2412 | -silent | --silent | --silen | --sile | --sil)
2413 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 esac
2417 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002418 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002419 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002420 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002421 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002422 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002423 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002424 case $ac_arg in
2425 *=* | --config-cache | -C | -disable-* | --disable-* \
2426 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2427 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2428 | -with-* | --with-* | -without-* | --without-* | --x)
2429 case "$ac_configure_args0 " in
2430 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2431 esac
2432 ;;
2433 -* ) ac_must_keep_next=true ;;
2434 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002435 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002436 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002437 ;;
2438 esac
2439 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002440done
Matthias Kloseb9621712010-04-24 17:59:49 +00002441{ ac_configure_args0=; unset ac_configure_args0;}
2442{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
2444# When interrupted or exit'd, cleanup temporary files, and complete
2445# config.log. We remove comments because anyway the quotes in there
2446# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447# WARNING: Use '\'' to represent an apostrophe within the trap.
2448# 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 +00002449trap 'exit_status=$?
2450 # Save into config.log some information that might help in debugging.
2451 {
2452 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002453
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002454 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002455## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002456## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002457 echo
2458 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459(
2460 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2461 eval ac_val=\$$ac_var
2462 case $ac_val in #(
2463 *${as_nl}*)
2464 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2466$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac
2468 case $ac_var in #(
2469 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002470 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2471 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 esac ;;
2473 esac
2474 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002475 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2477 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 "s/'\''/'\''\\\\'\'''\''/g;
2480 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2481 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002482 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002484 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 esac |
2486 sort
2487)
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002489
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002491## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002492## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 echo
2494 for ac_var in $ac_subst_vars
2495 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 eval ac_val=\$$ac_var
2497 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002499 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002501 done | sort
2502 echo
2503
2504 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002505 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002507## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 echo
2509 for ac_var in $ac_subst_files
2510 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002511 eval ac_val=\$$ac_var
2512 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002513 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002514 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002515 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 done | sort
2517 echo
2518 fi
2519
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002521 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002522## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002524 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 fi
2528 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 $as_echo "$as_me: caught signal $ac_signal"
2530 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002531 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002532 rm -f core *.core core.conftest.* &&
2533 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002535' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002536for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002537 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539ac_signal=0
2540
2541# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002542rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002543
Matthias Kloseb9621712010-04-24 17:59:49 +00002544$as_echo "/* confdefs.h */" > confdefs.h
2545
Martin v. Löwis11437992002-04-12 09:54:03 +00002546# Predefined preprocessor variables.
2547
2548cat >>confdefs.h <<_ACEOF
2549#define PACKAGE_NAME "$PACKAGE_NAME"
2550_ACEOF
2551
Martin v. Löwis11437992002-04-12 09:54:03 +00002552cat >>confdefs.h <<_ACEOF
2553#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2554_ACEOF
2555
Martin v. Löwis11437992002-04-12 09:54:03 +00002556cat >>confdefs.h <<_ACEOF
2557#define PACKAGE_VERSION "$PACKAGE_VERSION"
2558_ACEOF
2559
Martin v. Löwis11437992002-04-12 09:54:03 +00002560cat >>confdefs.h <<_ACEOF
2561#define PACKAGE_STRING "$PACKAGE_STRING"
2562_ACEOF
2563
Martin v. Löwis11437992002-04-12 09:54:03 +00002564cat >>confdefs.h <<_ACEOF
2565#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2566_ACEOF
2567
Matthias Kloseb9621712010-04-24 17:59:49 +00002568cat >>confdefs.h <<_ACEOF
2569#define PACKAGE_URL "$PACKAGE_URL"
2570_ACEOF
2571
Martin v. Löwis11437992002-04-12 09:54:03 +00002572
2573# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002574# Prefer an explicitly selected file to automatically selected ones.
2575ac_site_file1=NONE
2576ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578 # We do not want a PATH search for config.site.
2579 case $CONFIG_SITE in #((
2580 -*) ac_site_file1=./$CONFIG_SITE;;
2581 */*) ac_site_file1=$CONFIG_SITE;;
2582 *) ac_site_file1=./$CONFIG_SITE;;
2583 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 ac_site_file1=$prefix/share/config.site
2586 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587else
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 ac_site_file1=$ac_default_prefix/share/config.site
2589 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002590fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002591for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592do
Matthias Kloseb9621712010-04-24 17:59:49 +00002593 test "x$ac_site_file" = xNONE && continue
2594 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2596$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 . "$ac_site_file" \
2599 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2600$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2601as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002602See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002603 fi
2604done
2605
2606if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 # Some versions of bash will fail to source /dev/null (special files
2608 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2609 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2610 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2611$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2614 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 esac
2616 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002617else
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2619$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 >$cache_file
2621fi
2622
2623# Check that the precious variables saved in the cache have kept the same
2624# value.
2625ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002627 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2628 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002629 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2630 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002631 case $ac_old_set,$ac_new_set in
2632 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2634$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 +00002635 ac_cache_corrupted=: ;;
2636 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2638$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 ac_cache_corrupted=: ;;
2640 ,);;
2641 *)
2642 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 # differences in whitespace do not lead to failure.
2644 ac_old_val_w=`echo x $ac_old_val`
2645 ac_new_val_w=`echo x $ac_new_val`
2646 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2647 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2648$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2649 ac_cache_corrupted=:
2650 else
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2652$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2653 eval $ac_var=\$ac_old_val
2654 fi
2655 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2656$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2657 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2658$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 fi;;
2660 esac
2661 # Pass precious variables to config.status.
2662 if test "$ac_new_set" = set; then
2663 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 *) ac_arg=$ac_var=$ac_new_val ;;
2666 esac
2667 case " $ac_configure_args " in
2668 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 esac
2671 fi
2672done
2673if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002674 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2676 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2677$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002678 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002680## -------------------- ##
2681## Main body of script. ##
2682## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002683
Guido van Rossum7f43da71994-08-01 12:15:30 +00002684ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002686ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2687ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2688ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002689
Guido van Rossum627b2d71993-12-24 10:39:16 +00002690
Michael W. Hudson54241132001-12-07 15:38:26 +00002691
Trent Nelson4d4ec652012-10-16 08:51:24 -04002692
Christian Heimesff5be6e2018-01-20 13:19:21 +01002693
2694
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002695if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002696 # If we're building out-of-tree, we need to make sure the following
2697 # resources get picked up before their $srcdir counterparts.
2698 # Objects/ -> typeslots.inc
2699 # Include/ -> Python-ast.h, graminit.h
2700 # Python/ -> importlib.h
2701 # (A side effect of this is that these resources will automatically be
2702 # regenerated when building out-of-tree, regardless of whether or not
2703 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2704 # off.)
2705 BASECPPFLAGS="-IObjects -IInclude -IPython"
2706else
2707 BASECPPFLAGS=""
2708fi
2709
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002710
2711
2712
2713
Victor Stinner9ed34a82017-05-02 22:35:58 +02002714if test -e $srcdir/.git
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002715then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002716# Extract the first word of "git", so it can be a program name with args.
2717set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2719$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002720if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002721 $as_echo_n "(cached) " >&6
2722else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002723 if test -n "$HAS_GIT"; then
2724 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002725else
2726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2727for as_dir in $PATH
2728do
2729 IFS=$as_save_IFS
2730 test -z "$as_dir" && as_dir=.
2731 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002733 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2735 break 2
2736 fi
2737done
2738 done
2739IFS=$as_save_IFS
2740
Ned Deily5c4b0d02017-03-04 00:19:55 -05002741 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002742fi
2743fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002744HAS_GIT=$ac_cv_prog_HAS_GIT
2745if test -n "$HAS_GIT"; then
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2747$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002748else
2749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2750$as_echo "no" >&6; }
2751fi
2752
2753
2754else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002755HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002756fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002757if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002758then
Xiang Zhang4c855572018-08-20 22:36:19 +08002759 GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD"
2760 GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty"
2761 GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002762else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002763 GITVERSION=""
2764 GITTAG=""
2765 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766fi
2767
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002770
2771
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002772ac_aux_dir=
2773for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2774 if test -f "$ac_dir/install-sh"; then
2775 ac_aux_dir=$ac_dir
2776 ac_install_sh="$ac_aux_dir/install-sh -c"
2777 break
2778 elif test -f "$ac_dir/install.sh"; then
2779 ac_aux_dir=$ac_dir
2780 ac_install_sh="$ac_aux_dir/install.sh -c"
2781 break
2782 elif test -f "$ac_dir/shtool"; then
2783 ac_aux_dir=$ac_dir
2784 ac_install_sh="$ac_aux_dir/shtool install -c"
2785 break
2786 fi
2787done
2788if test -z "$ac_aux_dir"; then
2789 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2790fi
2791
2792# These three variables are undocumented and unsupported,
2793# and are intended to be withdrawn in a future Autoconf release.
2794# They can cause serious problems if a builder's source tree is in a directory
2795# whose full name contains unusual characters.
2796ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2797ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2798ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2799
2800
2801# Make sure we can run config.sub.
2802$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2803 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2804
2805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2806$as_echo_n "checking build system type... " >&6; }
2807if ${ac_cv_build+:} false; then :
2808 $as_echo_n "(cached) " >&6
2809else
2810 ac_build_alias=$build_alias
2811test "x$ac_build_alias" = x &&
2812 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2813test "x$ac_build_alias" = x &&
2814 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2815ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2816 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2817
2818fi
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2820$as_echo "$ac_cv_build" >&6; }
2821case $ac_cv_build in
2822*-*-*) ;;
2823*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2824esac
2825build=$ac_cv_build
2826ac_save_IFS=$IFS; IFS='-'
2827set x $ac_cv_build
2828shift
2829build_cpu=$1
2830build_vendor=$2
2831shift; shift
2832# Remember, the first character of IFS is used to create $*,
2833# except with old shells:
2834build_os=$*
2835IFS=$ac_save_IFS
2836case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2837
2838
2839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2840$as_echo_n "checking host system type... " >&6; }
2841if ${ac_cv_host+:} false; then :
2842 $as_echo_n "(cached) " >&6
2843else
2844 if test "x$host_alias" = x; then
2845 ac_cv_host=$ac_cv_build
2846else
2847 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2849fi
2850
2851fi
2852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2853$as_echo "$ac_cv_host" >&6; }
2854case $ac_cv_host in
2855*-*-*) ;;
2856*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2857esac
2858host=$ac_cv_host
2859ac_save_IFS=$IFS; IFS='-'
2860set x $ac_cv_host
2861shift
2862host_cpu=$1
2863host_vendor=$2
2864shift; shift
2865# Remember, the first character of IFS is used to create $*,
2866# except with old shells:
2867host_os=$*
2868IFS=$ac_save_IFS
2869case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2870
2871
2872
doko@python.orga10e4a92013-01-25 18:45:12 +01002873
2874
Ned Deilyfcbc2462014-08-22 13:32:49 -07002875# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2876rm -f pybuilddir.txt
2877
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002878for ac_prog in python$PACKAGE_VERSION python3 python
2879do
2880 # Extract the first word of "$ac_prog", so it can be a program name with args.
2881set dummy $ac_prog; ac_word=$2
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2883$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnera5c62a82017-05-03 18:21:48 +02002884if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then :
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002885 $as_echo_n "(cached) " >&6
2886else
Victor Stinnera5c62a82017-05-03 18:21:48 +02002887 if test -n "$PYTHON_FOR_REGEN"; then
2888 ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test.
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002889else
2890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891for as_dir in $PATH
2892do
2893 IFS=$as_save_IFS
2894 test -z "$as_dir" && as_dir=.
2895 for ac_exec_ext in '' $ac_executable_extensions; do
2896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Victor Stinnera5c62a82017-05-03 18:21:48 +02002897 ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2899 break 2
2900 fi
2901done
2902 done
2903IFS=$as_save_IFS
2904
2905fi
2906fi
Victor Stinnera5c62a82017-05-03 18:21:48 +02002907PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN
2908if test -n "$PYTHON_FOR_REGEN"; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5
2910$as_echo "$PYTHON_FOR_REGEN" >&6; }
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002911else
2912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2913$as_echo "no" >&6; }
2914fi
2915
2916
Victor Stinnera5c62a82017-05-03 18:21:48 +02002917 test -n "$PYTHON_FOR_REGEN" && break
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002918done
Victor Stinnera5c62a82017-05-03 18:21:48 +02002919test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3"
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002920
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002921
2922
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002923if test "$cross_compiling" = yes; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2925$as_echo_n "checking for python interpreter for cross build... " >&6; }
2926 if test -z "$PYTHON_FOR_BUILD"; then
2927 for interp in python$PACKAGE_VERSION python3 python; do
2928 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002929 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 +02002930 break
2931 fi
2932 interp=
2933 done
2934 if test x$interp = x; then
2935 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2936 fi
2937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2938$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002939 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 +02002940 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
Benjamin Petersond23f8222009-04-05 19:13:16 +00002949if test "$prefix" != "/"; then
2950 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2951fi
2952
2953
Martin v. Löwis11437992002-04-12 09:54:03 +00002954
2955
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002956# We don't use PACKAGE_ variables, and they cause conflicts
2957# with other autoconf-based packages that include Python.h
2958grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2959rm confdefs.h
2960mv confdefs.h.new confdefs.h
2961
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002962
Ned Deily5489bda2018-01-31 17:44:09 -05002963VERSION=3.8
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002964
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002965# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002966
2967SOVERSION=1.0
2968
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002969# The later defininition of _XOPEN_SOURCE disables certain features
2970# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2971
Matthias Kloseb9621712010-04-24 17:59:49 +00002972$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002973
2974
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2977# them.
2978
Matthias Kloseb9621712010-04-24 17:59:49 +00002979$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002980
2981
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2984# them.
2985
Matthias Kloseb9621712010-04-24 17:59:49 +00002986$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002987
2988
Martin v. Löwisd6320502004-08-12 13:45:08 +00002989# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2991# them.
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002994
2995
2996
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002997define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002998
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002999# Arguments passed to configure.
3000
3001CONFIG_ARGS="$ac_configure_args"
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3004$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003005# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003006if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003007 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003008 case $enableval in
3009 yes)
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003010 # Locate the best usable SDK, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 # information
3012 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003013 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003014 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3016 if test ! -d "${enableval}"
3017 then
3018 enableval=/
3019 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003020 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003021 ;;
3022 esac
3023 case $enableval in
3024 no)
3025 UNIVERSALSDK=
3026 enable_universalsdk=
3027 ;;
3028 *)
3029 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003030 if test ! -d "${UNIVERSALSDK}"
3031 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003032 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034 ;;
3035 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038else
3039
3040 UNIVERSALSDK=
3041 enable_universalsdk=
3042
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003043fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045if test -n "${UNIVERSALSDK}"
3046then
Matthias Kloseb9621712010-04-24 17:59:49 +00003047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3048$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003049else
Matthias Kloseb9621712010-04-24 17:59:49 +00003050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3051$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003052fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003054
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003055
Ned Deily87adb6e2013-10-18 21:09:56 -07003056ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003057
Ned Deilycbfb9a52012-06-23 16:02:19 -07003058# For backward compatibility reasons we prefer to select '32-bit' if available,
3059# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003060UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003061if test "`uname -s`" = "Darwin"
3062then
3063 if test -n "${UNIVERSALSDK}"
3064 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003065 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066 then
3067 UNIVERSAL_ARCHS="intel"
3068 fi
3069 fi
3070fi
3071
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003072
Matthias Kloseb9621712010-04-24 17:59:49 +00003073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3074$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075
3076# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003077if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003078 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003079 UNIVERSAL_ARCHS="$withval"
3080
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003081fi
3082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083if test -n "${UNIVERSALSDK}"
3084then
3085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3086$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3087else
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3089$as_echo "no" >&6; }
3090fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003092
3093# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003094if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003095 withval=$with_framework_name;
3096 PYTHONFRAMEWORK=${withval}
3097 PYTHONFRAMEWORKDIR=${withval}.framework
3098 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3099
3100else
3101
3102 PYTHONFRAMEWORK=Python
3103 PYTHONFRAMEWORKDIR=Python.framework
3104 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3105
3106fi
3107
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003108# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003109if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003111 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003112 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003113 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003114 esac
3115 case $enableval in
3116 no)
3117 PYTHONFRAMEWORK=
3118 PYTHONFRAMEWORKDIR=no-framework
3119 PYTHONFRAMEWORKPREFIX=
3120 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003121 FRAMEWORKINSTALLFIRST=
3122 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003123 FRAMEWORKALTINSTALLFIRST=
3124 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003125 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003126 if test "x${prefix}" = "xNONE"; then
3127 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3128 else
3129 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3130 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003132 ;;
3133 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003134 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003135 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003136 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003137 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003138 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3139 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003140 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003143 if test "x${prefix}" = "xNONE" ; then
3144 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003146 else
3147 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3148 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149
3150 case "${enableval}" in
3151 /System*)
3152 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3153 if test "${prefix}" = "NONE" ; then
3154 # See below
3155 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3156 fi
3157 ;;
3158
3159 /Library*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 ;;
3162
3163 */Library/Frameworks)
3164 MDIR="`dirname "${enableval}"`"
3165 MDIR="`dirname "${MDIR}"`"
3166 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3167
3168 if test "${prefix}" = "NONE"; then
3169 # User hasn't specified the
3170 # --prefix option, but wants to install
3171 # the framework in a non-default location,
3172 # ensure that the compatibility links get
3173 # installed relative to that prefix as well
3174 # instead of in /usr/local.
3175 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3176 fi
3177 ;;
3178
3179 *)
3180 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3181 ;;
3182 esac
3183
Jack Jansen127e56e2001-09-11 14:41:54 +00003184 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003186 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003188 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003189
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003190 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003191
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003192 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3193
3194 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3195
Jack Jansene578a632001-08-15 01:27:14 +00003196 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003197
Guido van Rossum563e7081996-09-10 18:20:48 +00003198else
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
Jack Jansene578a632001-08-15 01:27:14 +00003200 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003201 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003202 PYTHONFRAMEWORKPREFIX=
3203 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204 FRAMEWORKINSTALLFIRST=
3205 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003206 FRAMEWORKALTINSTALLFIRST=
3207 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003208 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003209 if test "x${prefix}" = "xNONE" ; then
3210 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3211 else
3212 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3213 fi
Jack Jansene578a632001-08-15 01:27:14 +00003214 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003215
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003216
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003217fi
3218
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219
3220
Michael W. Hudson54241132001-12-07 15:38:26 +00003221
3222
3223
3224
Jack Jansene578a632001-08-15 01:27:14 +00003225
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003226
3227
3228
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003229
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003230
Ned Deilyb8f944f2013-11-21 22:42:25 -08003231
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003232
3233cat >>confdefs.h <<_ACEOF
INADA Naoki6b42eb12017-06-29 15:31:38 +09003234#define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}"
INADA Naokia8f8d5b2017-06-29 00:31:53 +09003235_ACEOF
3236
3237
Jack Jansene578a632001-08-15 01:27:14 +00003238##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003239## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003240## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003241##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003242# Set name for machine-dependent library files
3243
Matthias Kloseb9621712010-04-24 17:59:49 +00003244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3245$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246if test -z "$MACHDEP"
3247then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003248 # avoid using uname for cross builds
3249 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003250 # ac_sys_system and ac_sys_release are used for setting
3251 # a lot of different things including 'define_xopen_source'
3252 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003253 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003254 *-*-linux-android*)
3255 ac_sys_system=Linux-android
3256 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 *-*-linux*)
3258 ac_sys_system=Linux
3259 ;;
3260 *-*-cygwin*)
3261 ac_sys_system=Cygwin
3262 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003263 *-*-vxworks*)
3264 ac_sys_system=VxWorks
3265 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003266 *)
3267 # for now, limit cross builds to known configurations
3268 MACHDEP="unknown"
3269 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3270 esac
3271 ac_sys_release=
3272 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003273 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003274 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003275 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003279 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003280 fi
3281 ac_md_system=`echo $ac_sys_system |
3282 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3283 ac_md_release=`echo $ac_sys_release |
3284 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3285 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003286
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003287 case $MACHDEP in
Michael Felt9d949f72019-04-12 16:15:32 +02003288 aix*) MACHDEP="aix";;
Victor Stinner7209ff22011-08-21 00:00:16 +02003289 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003290 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003292 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003293 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003294fi
Guido van Rossum91922671997-10-09 20:24:13 +00003295
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003296
3297if test "$cross_compiling" = yes; then
3298 case "$host" in
3299 *-*-linux*)
3300 case "$host_cpu" in
3301 arm*)
3302 _host_cpu=arm
3303 ;;
3304 *)
3305 _host_cpu=$host_cpu
3306 esac
3307 ;;
3308 *-*-cygwin*)
3309 _host_cpu=
3310 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003311 *-*-vxworks*)
3312 _host_cpu=$host_cpu
3313 ;;
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003314 *)
3315 # for now, limit cross builds to known configurations
3316 MACHDEP="unknown"
3317 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3318 esac
3319 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3320fi
3321
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003322# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3323# disable features if it is defined, without any means to access these
3324# features as extensions. For these systems, we skip the definition of
3325# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3326# some feature, make sure there is no alternative way to access this
3327# feature. Also, when using wildcards, make sure you have verified the
3328# need for not defining _XOPEN_SOURCE on all systems matching the
3329# wildcard, and that the wildcard does not include future systems
3330# (which may remove their limitations).
3331case $ac_sys_system/$ac_sys_release in
3332 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3333 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003334 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003335 # In addition, Stefan Krah confirms that issue #1244610 exists through
3336 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003337 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003338 define_xopen_source=no
3339 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3340 # also defined. This can be overridden by defining _BSD_SOURCE
3341 # As this has a different meaning on Linux, only define it on OpenBSD
3342
Matthias Kloseb9621712010-04-24 17:59:49 +00003343$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344
3345 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003346 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003352
3353 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003354 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3355 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3356 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003357 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 +00003358 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003359 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3360 # request to enable features supported by the standard as a request
3361 # to disable features not supported by the standard. The best way
3362 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3363 # entirely and define __EXTENSIONS__ instead.
3364 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003365 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3367 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003368 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003369 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003370 define_xopen_source=no;;
3371 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003373 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003375 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3376 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3377 # identifies itself as Darwin/7.*
3378 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3379 # disables platform specific features beyond repair.
3380 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # has no effect, don't bother defining them
3382 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003383 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003384 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003385 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003386 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3387 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3388 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003389 AIX/4)
3390 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003391 AIX/5)
3392 if test `uname -r` -eq 1; then
3393 define_xopen_source=no
3394 fi
3395 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003396 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3397 # defining NI_NUMERICHOST.
3398 QNX/6.3.2)
3399 define_xopen_source=no
3400 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08003401 # On VxWorks, defining _XOPEN_SOURCE causes compile failures
3402 # in network headers still using system V types.
3403 VxWorks/*)
3404 define_xopen_source=no
3405 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407esac
3408
3409if test $define_xopen_source = yes
3410then
Victor Stinner14d098d2011-09-07 22:29:43 +02003411 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Victor Stinner14d098d2011-09-07 22:29:43 +02003413$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003415
3416 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3417 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3418 # several APIs are not declared. Since this is also needed in some
3419 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Matthias Kloseb9621712010-04-24 17:59:49 +00003421$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003424
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003425$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003426
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003427fi
3428
Christian Heimes647cd872013-12-07 23:39:33 +01003429# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3430case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003431 hp*|HP*)
3432 define_stdc_a1=yes;;
3433 *)
3434 define_stdc_a1=no;;
3435esac
3436
3437if test $define_stdc_a1 = yes
3438then
Christian Heimes647cd872013-12-07 23:39:33 +01003439
3440$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3441
Christian Heimesb02bcae2013-12-08 15:21:08 +01003442fi
Christian Heimes647cd872013-12-07 23:39:33 +01003443
Jack Jansen6b08a402004-06-03 12:41:45 +00003444# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3445# it may influence the way we can build extensions, so distutils
3446# needs to check it
3447
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448
Jack Jansen6b08a402004-06-03 12:41:45 +00003449CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003450EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003453
3454# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3455# for debug/optimization stuff. BASECFLAGS is for flags that are required
3456# just to get things to compile and link. Users are free to override OPT
3457# when running configure or make. The build should not break if they do.
3458# BASECFLAGS should generally not be messed with, however.
3459
Guido van Rossum8b131c51995-03-09 14:10:13 +00003460# If the user switches compilers, we can't believe the cache
3461if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3462then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003463 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003464(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003465fi
3466
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003467# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3468# when the compiler supports them, but we don't always want -O2, and
3469# we set -g later.
3470if test -z "$CFLAGS"; then
3471 CFLAGS=
3472fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003473
3474if test "$ac_sys_system" = "Darwin"
3475then
3476 # Compiler selection on MacOSX is more complicated than
Serhiy Storchaka88cc3392018-06-04 08:20:25 +03003477 # AC_PROG_CC can handle, see Mac/README for more
Ned Deilycbfb9a52012-06-23 16:02:19 -07003478 # information
3479 if test -z "${CC}"
3480 then
3481 found_gcc=
3482 found_clang=
3483 as_save_IFS=$IFS; IFS=:
3484 for as_dir in $PATH
3485 do
3486 IFS=$as_save_IFS
Ned Deily14aa00b2017-10-09 13:53:27 -04003487 if test -x "${as_dir}/gcc"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003488 if test -z "${found_gcc}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003489 found_gcc="${as_dir}/gcc"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003490 fi
3491 fi
Ned Deily14aa00b2017-10-09 13:53:27 -04003492 if test -x "${as_dir}/clang"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003493 if test -z "${found_clang}"; then
Ned Deily14aa00b2017-10-09 13:53:27 -04003494 found_clang="${as_dir}/clang"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003495 fi
3496 fi
3497 done
3498 IFS=$as_save_IFS
3499
3500 if test -n "$found_gcc" -a -n "$found_clang"
3501 then
3502 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3503 then
3504 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3505$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3506 CC="$found_clang"
3507 CXX="$found_clang++"
3508 fi
3509
3510
3511 elif test -z "$found_gcc" -a -n "$found_clang"
3512 then
3513 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3514$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3515 CC="$found_clang"
3516 CXX="$found_clang++"
3517
3518 elif test -z "$found_gcc" -a -z "$found_clang"
3519 then
3520 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3521 if test -n "${found_clang}"
3522 then
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3524$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3525 CC="${found_clang}"
3526 CXX="`/usr/bin/xcrun -find clang++`"
3527
3528 # else: use default behaviour
3529 fi
3530 fi
3531 fi
3532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003533ac_ext=c
3534ac_cpp='$CPP $CPPFLAGS'
3535ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3536ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3537ac_compiler_gnu=$ac_cv_c_compiler_gnu
3538if test -n "$ac_tool_prefix"; then
3539 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3540set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3542$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003543if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003544 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003545else
3546 if test -n "$CC"; then
3547 ac_cv_prog_CC="$CC" # Let the user override the test.
3548else
Martin v. Löwis11437992002-04-12 09:54:03 +00003549as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3550for as_dir in $PATH
3551do
3552 IFS=$as_save_IFS
3553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003556 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003557 $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 +00003558 break 2
3559 fi
3560done
Matthias Kloseb9621712010-04-24 17:59:49 +00003561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003563
Jack Jansendd19cf82001-12-06 22:36:17 +00003564fi
3565fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003566CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003567if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3569$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003570else
Matthias Kloseb9621712010-04-24 17:59:49 +00003571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3572$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003573fi
3574
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575
Martin v. Löwis11437992002-04-12 09:54:03 +00003576fi
3577if test -z "$ac_cv_prog_CC"; then
3578 ac_ct_CC=$CC
3579 # Extract the first word of "gcc", so it can be a program name with args.
3580set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003583if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003585else
3586 if test -n "$ac_ct_CC"; then
3587 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3588else
3589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Kloseb9621712010-04-24 17:59:49 +00003601 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
3604fi
3605fi
3606ac_ct_CC=$ac_cv_prog_ac_ct_CC
3607if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3609$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610else
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003615 if test "x$ac_ct_CC" = x; then
3616 CC=""
3617 else
3618 case $cross_compiling:$ac_tool_warned in
3619yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3621$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003622ac_tool_warned=yes ;;
3623esac
3624 CC=$ac_ct_CC
3625 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003626else
3627 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003628fi
3629
Jack Jansendd19cf82001-12-06 22:36:17 +00003630if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 if test -n "$ac_tool_prefix"; then
3632 # 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 +00003633set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3635$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003636if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003638else
3639 if test -n "$CC"; then
3640 ac_cv_prog_CC="$CC" # Let the user override the test.
3641else
Martin v. Löwis11437992002-04-12 09:54:03 +00003642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3643for as_dir in $PATH
3644do
3645 IFS=$as_save_IFS
3646 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 $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 +00003651 break 2
3652 fi
3653done
Matthias Kloseb9621712010-04-24 17:59:49 +00003654 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003655IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003656
3657fi
3658fi
3659CC=$ac_cv_prog_CC
3660if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3662$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
Matthias Kloseb9621712010-04-24 17:59:49 +00003664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3665$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003666fi
3667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670fi
3671if test -z "$CC"; then
3672 # Extract the first word of "cc", so it can be a program name with args.
3673set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003676if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003682 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3684for as_dir in $PATH
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3691 ac_prog_rejected=yes
3692 continue
3693 fi
3694 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003695 $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 +00003696 break 2
3697 fi
3698done
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003700IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003701
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003702if test $ac_prog_rejected = yes; then
3703 # We found a bogon in the path, so make sure we never use it.
3704 set dummy $ac_cv_prog_CC
3705 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003707 # We chose a different compiler from the bogus one.
3708 # However, it has the same basename, so the bogon will be chosen
3709 # first if we set CC to just the basename; use the full file name.
3710 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003711 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003712 fi
3713fi
3714fi
3715fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003716CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003717if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3719$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003720else
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3722$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003723fi
3724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726fi
3727if test -z "$CC"; then
3728 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 do
3731 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3732set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3734$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003735if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003737else
3738 if test -n "$CC"; then
3739 ac_cv_prog_CC="$CC" # Let the user override the test.
3740else
Martin v. Löwis11437992002-04-12 09:54:03 +00003741as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3742for as_dir in $PATH
3743do
3744 IFS=$as_save_IFS
3745 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003746 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003748 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 $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 +00003750 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003751 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003752done
Matthias Kloseb9621712010-04-24 17:59:49 +00003753 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003755
3756fi
3757fi
3758CC=$ac_cv_prog_CC
3759if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3761$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003762else
Matthias Kloseb9621712010-04-24 17:59:49 +00003763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3764$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003765fi
3766
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003767
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 test -n "$CC" && break
3769 done
3770fi
3771if test -z "$CC"; then
3772 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003773 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003774do
3775 # Extract the first word of "$ac_prog", so it can be a program name with args.
3776set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003779if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
3782 if test -n "$ac_ct_CC"; then
3783 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3784else
3785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786for as_dir in $PATH
3787do
3788 IFS=$as_save_IFS
3789 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003793 $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 +00003794 break 2
3795 fi
3796done
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003799
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801fi
3802ac_ct_CC=$ac_cv_prog_ac_ct_CC
3803if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3805$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003809fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 test -n "$ac_ct_CC" && break
3813done
Michael W. Hudson54241132001-12-07 15:38:26 +00003814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815 if test "x$ac_ct_CC" = x; then
3816 CC=""
3817 else
3818 case $cross_compiling:$ac_tool_warned in
3819yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003820{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3821$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822ac_tool_warned=yes ;;
3823esac
3824 CC=$ac_ct_CC
3825 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
3827
3828fi
3829
3830
Matthias Kloseb9621712010-04-24 17:59:49 +00003831test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003833as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003834See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835
3836# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003837$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3838set X $ac_compile
3839ac_compiler=$2
3840for ac_option in --version -v -V -qversion; do
3841 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842case "(($ac_try" in
3843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3844 *) ac_try_echo=$ac_try;;
3845esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003846eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3847$as_echo "$ac_try_echo"; } >&5
3848 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003850 if test -s conftest.err; then
3851 sed '10a\
3852... rest of stderr output deleted ...
3853 10q' conftest.err >conftest.er1
3854 cat conftest.er1 >&5
3855 fi
3856 rm -f conftest.er1 conftest.err
3857 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3858 test $ac_status = 0; }
3859done
Martin v. Löwis11437992002-04-12 09:54:03 +00003860
Matthias Kloseb9621712010-04-24 17:59:49 +00003861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003862/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003863
Martin v. Löwis11437992002-04-12 09:54:03 +00003864int
3865main ()
3866{
3867
3868 ;
3869 return 0;
3870}
3871_ACEOF
3872ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003873ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003874# Try to create an executable without -o first, disregard a.out.
3875# It will help us diagnose broken compilers, and finding out an intuition
3876# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3878$as_echo_n "checking whether the C compiler works... " >&6; }
3879ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3880
3881# The possible output files:
3882ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_rmfiles=
3885for ac_file in $ac_files
3886do
3887 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003889 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3890 esac
3891done
3892rm -f $ac_rmfiles
3893
Matthias Kloseb9621712010-04-24 17:59:49 +00003894if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003895case "(($ac_try" in
3896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3897 *) ac_try_echo=$ac_try;;
3898esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003899eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3900$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3904 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3906# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3907# in a Makefile. We should not override ac_cv_exeext if it was cached,
3908# so that the user can short-circuit this test for compilers unknown to
3909# Autoconf.
3910for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003911do
3912 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003915 ;;
3916 [ab].out )
3917 # We found the default executable, but exeext='' is most
3918 # certainly right.
3919 break;;
3920 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003922 then :; else
3923 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3924 fi
3925 # We set ac_cv_exeext here because the later test for it is not
3926 # safe: cross compilers may not add the suffix if given an `-o'
3927 # argument, so we may need to know it at that point already.
3928 # Even if this section looks crufty: it has the advantage of
3929 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003930 break;;
3931 * )
3932 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 esac
3934done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003935test "$ac_cv_exeext" = no && ac_cv_exeext=
3936
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003937else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 ac_file=''
3939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003940if test -z "$ac_file"; then :
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3942$as_echo "no" >&6; }
3943$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003944sed 's/^/| /' conftest.$ac_ext >&5
3945
Matthias Kloseb9621712010-04-24 17:59:49 +00003946{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003948as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003949See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003950else
3951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3952$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003953fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3955$as_echo_n "checking for C compiler default output file name... " >&6; }
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3957$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003958ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959
Matthias Kloseb9621712010-04-24 17:59:49 +00003960rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003961ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3963$as_echo_n "checking for suffix of executables... " >&6; }
3964if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003965case "(($ac_try" in
3966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3967 *) ac_try_echo=$ac_try;;
3968esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003969eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3970$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003971 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3974 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003975 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3976# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3977# work properly (i.e., refer to `conftest.exe'), while it won't with
3978# `rm'.
3979for ac_file in conftest.exe conftest conftest.*; do
3980 test -f "$ac_file" || continue
3981 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003982 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003983 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3984 break;;
3985 * ) break;;
3986 esac
3987done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988else
Matthias Kloseb9621712010-04-24 17:59:49 +00003989 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3990$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003991as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02003992See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003994rm -f conftest conftest$ac_cv_exeext
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3996$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997
3998rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003999EXEEXT=$ac_cv_exeext
4000ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003#include <stdio.h>
4004int
4005main ()
4006{
4007FILE *f = fopen ("conftest.out", "w");
4008 return ferror (f) || fclose (f) != 0;
4009
4010 ;
4011 return 0;
4012}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004014ac_clean_files="$ac_clean_files conftest.out"
4015# Check that the compiler produces executables we can run. If not, either
4016# the compiler is broken, or we cross compile.
4017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4018$as_echo_n "checking whether we are cross compiling... " >&6; }
4019if test "$cross_compiling" != yes; then
4020 { { ac_try="$ac_link"
4021case "(($ac_try" in
4022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4023 *) ac_try_echo=$ac_try;;
4024esac
4025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4026$as_echo "$ac_try_echo"; } >&5
4027 (eval "$ac_link") 2>&5
4028 ac_status=$?
4029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4030 test $ac_status = 0; }
4031 if { ac_try='./conftest$ac_cv_exeext'
4032 { { case "(($ac_try" in
4033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4034 *) ac_try_echo=$ac_try;;
4035esac
4036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4037$as_echo "$ac_try_echo"; } >&5
4038 (eval "$ac_try") 2>&5
4039 ac_status=$?
4040 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4041 test $ac_status = 0; }; }; then
4042 cross_compiling=no
4043 else
4044 if test "$cross_compiling" = maybe; then
4045 cross_compiling=yes
4046 else
4047 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4048$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004049as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004050If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004051See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004052 fi
4053 fi
4054fi
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4056$as_echo "$cross_compiling" >&6; }
4057
4058rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4059ac_clean_files=$ac_clean_files_save
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4061$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004062if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004063 $as_echo_n "(cached) " >&6
4064else
4065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004066/* end confdefs.h. */
4067
4068int
4069main ()
4070{
4071
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004077if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004078case "(($ac_try" in
4079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4080 *) ac_try_echo=$ac_try;;
4081esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4083$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004084 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4087 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 for ac_file in conftest.o conftest.obj conftest.*; do
4089 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004090 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004092 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4093 break;;
4094 esac
4095done
4096else
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004098sed 's/^/| /' conftest.$ac_ext >&5
4099
Matthias Kloseb9621712010-04-24 17:59:49 +00004100{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004102as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004103See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004104fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4108$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004109OBJEXT=$ac_cv_objext
4110ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4112$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004113if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004115else
Matthias Kloseb9621712010-04-24 17:59:49 +00004116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004117/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004118
Martin v. Löwis11437992002-04-12 09:54:03 +00004119int
4120main ()
4121{
4122#ifndef __GNUC__
4123 choke me
4124#endif
4125
4126 ;
4127 return 0;
4128}
4129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_compiler_gnu=yes
4132else
Matthias Kloseb9621712010-04-24 17:59:49 +00004133 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004136ac_cv_c_compiler_gnu=$ac_compiler_gnu
4137
4138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4140$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4141if test $ac_compiler_gnu = yes; then
4142 GCC=yes
4143else
4144 GCC=
4145fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004146ac_test_CFLAGS=${CFLAGS+set}
4147ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4149$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004153 ac_save_c_werror_flag=$ac_c_werror_flag
4154 ac_c_werror_flag=yes
4155 ac_cv_prog_cc_g=no
4156 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004159
Martin v. Löwis11437992002-04-12 09:54:03 +00004160int
4161main ()
4162{
4163
4164 ;
4165 return 0;
4166}
4167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004168if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004169 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004170else
Matthias Kloseb9621712010-04-24 17:59:49 +00004171 CFLAGS=""
4172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004173/* end confdefs.h. */
4174
4175int
4176main ()
4177{
4178
4179 ;
4180 return 0;
4181}
4182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004183if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004184
Matthias Kloseb9621712010-04-24 17:59:49 +00004185else
4186 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004187 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004189/* end confdefs.h. */
4190
4191int
4192main ()
4193{
4194
4195 ;
4196 return 0;
4197}
4198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004199if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004200 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4207 ac_c_werror_flag=$ac_save_c_werror_flag
4208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4210$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004211if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004212 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004213elif test $ac_cv_prog_cc_g = yes; then
4214 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004215 CFLAGS="-g -O2"
4216 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004217 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 fi
4219else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004220 if test "$GCC" = yes; then
4221 CFLAGS="-O2"
4222 else
4223 CFLAGS=
4224 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4227$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004228if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004229 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004230else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004232ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004234/* end confdefs.h. */
4235#include <stdarg.h>
4236#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004237struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4239struct buf { int x; };
4240FILE * (*rcsopen) (struct buf *, struct stat *, int);
4241static char *e (p, i)
4242 char **p;
4243 int i;
4244{
4245 return p[i];
4246}
4247static char *f (char * (*g) (char **, int), char **p, ...)
4248{
4249 char *s;
4250 va_list v;
4251 va_start (v,p);
4252 s = g (p, va_arg (v,int));
4253 va_end (v);
4254 return s;
4255}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004256
4257/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4258 function prototypes and stuff, but not '\xHH' hex character constants.
4259 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004261 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4262 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004263 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004264int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4267 inside strings and character constants. */
4268#define FOO(x) 'x'
4269int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4270
Skip Montanaro6dead952003-09-25 14:50:04 +00004271int test (int i, double x);
4272struct s1 {int (*f) (int a);};
4273struct s2 {int (*f) (double a);};
4274int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4275int argc;
4276char **argv;
4277int
4278main ()
4279{
4280return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4281 ;
4282 return 0;
4283}
4284_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004285for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4286 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004287do
4288 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004289 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004290 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004291fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292rm -f core conftest.err conftest.$ac_objext
4293 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004294done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296CC=$ac_save_CC
4297
4298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299# AC_CACHE_VAL
4300case "x$ac_cv_prog_cc_c89" in
4301 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4303$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004304 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4306$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004307 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4310$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004311esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004312if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004313
Matthias Kloseb9621712010-04-24 17:59:49 +00004314fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004315
Martin v. Löwis11437992002-04-12 09:54:03 +00004316ac_ext=c
4317ac_cpp='$CPP $CPPFLAGS'
4318ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4319ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4320ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004321
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004322ac_ext=c
4323ac_cpp='$CPP $CPPFLAGS'
4324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4326ac_compiler_gnu=$ac_cv_c_compiler_gnu
4327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4328$as_echo_n "checking how to run the C preprocessor... " >&6; }
4329# On Suns, sometimes $CPP names a directory.
4330if test -n "$CPP" && test -d "$CPP"; then
4331 CPP=
4332fi
4333if test -z "$CPP"; then
4334 if ${ac_cv_prog_CPP+:} false; then :
4335 $as_echo_n "(cached) " >&6
4336else
4337 # Double quotes because CPP needs to be expanded
4338 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4339 do
4340 ac_preproc_ok=false
4341for ac_c_preproc_warn_flag in '' yes
4342do
4343 # Use a header file that comes with gcc, so configuring glibc
4344 # with a fresh cross-compiler works.
4345 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4346 # <limits.h> exists even on freestanding compilers.
4347 # On the NeXT, cc -E runs the code through the compiler's parser,
4348 # not just through cpp. "Syntax error" is here to catch this case.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350/* end confdefs.h. */
4351#ifdef __STDC__
4352# include <limits.h>
4353#else
4354# include <assert.h>
4355#endif
4356 Syntax error
4357_ACEOF
4358if ac_fn_c_try_cpp "$LINENO"; then :
4359
4360else
4361 # Broken: fails on valid input.
4362continue
4363fi
4364rm -f conftest.err conftest.i conftest.$ac_ext
4365
4366 # OK, works on sane cases. Now check whether nonexistent headers
4367 # can be detected and how.
4368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369/* end confdefs.h. */
4370#include <ac_nonexistent.h>
4371_ACEOF
4372if ac_fn_c_try_cpp "$LINENO"; then :
4373 # Broken: success on invalid input.
4374continue
4375else
4376 # Passes both tests.
4377ac_preproc_ok=:
4378break
4379fi
4380rm -f conftest.err conftest.i conftest.$ac_ext
4381
4382done
4383# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4384rm -f conftest.i conftest.err conftest.$ac_ext
4385if $ac_preproc_ok; then :
4386 break
4387fi
4388
4389 done
4390 ac_cv_prog_CPP=$CPP
4391
4392fi
4393 CPP=$ac_cv_prog_CPP
4394else
4395 ac_cv_prog_CPP=$CPP
4396fi
4397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4398$as_echo "$CPP" >&6; }
4399ac_preproc_ok=false
4400for ac_c_preproc_warn_flag in '' yes
4401do
4402 # Use a header file that comes with gcc, so configuring glibc
4403 # with a fresh cross-compiler works.
4404 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4405 # <limits.h> exists even on freestanding compilers.
4406 # On the NeXT, cc -E runs the code through the compiler's parser,
4407 # not just through cpp. "Syntax error" is here to catch this case.
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409/* end confdefs.h. */
4410#ifdef __STDC__
4411# include <limits.h>
4412#else
4413# include <assert.h>
4414#endif
4415 Syntax error
4416_ACEOF
4417if ac_fn_c_try_cpp "$LINENO"; then :
4418
4419else
4420 # Broken: fails on valid input.
4421continue
4422fi
4423rm -f conftest.err conftest.i conftest.$ac_ext
4424
4425 # OK, works on sane cases. Now check whether nonexistent headers
4426 # can be detected and how.
4427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4428/* end confdefs.h. */
4429#include <ac_nonexistent.h>
4430_ACEOF
4431if ac_fn_c_try_cpp "$LINENO"; then :
4432 # Broken: success on invalid input.
4433continue
4434else
4435 # Passes both tests.
4436ac_preproc_ok=:
4437break
4438fi
4439rm -f conftest.err conftest.i conftest.$ac_ext
4440
4441done
4442# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4443rm -f conftest.i conftest.err conftest.$ac_ext
4444if $ac_preproc_ok; then :
4445
4446else
4447 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4449as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4450See \`config.log' for more details" "$LINENO" 5; }
4451fi
4452
4453ac_ext=c
4454ac_cpp='$CPP $CPPFLAGS'
4455ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4456ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4457ac_compiler_gnu=$ac_cv_c_compiler_gnu
4458
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4460$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4461if ${ac_cv_path_GREP+:} false; then :
4462 $as_echo_n "(cached) " >&6
4463else
4464 if test -z "$GREP"; then
4465 ac_path_GREP_found=false
4466 # Loop through the user's path and test for each of PROGNAME-LIST
4467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4468for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4469do
4470 IFS=$as_save_IFS
4471 test -z "$as_dir" && as_dir=.
4472 for ac_prog in grep ggrep; do
4473 for ac_exec_ext in '' $ac_executable_extensions; do
4474 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4475 as_fn_executable_p "$ac_path_GREP" || continue
4476# Check for GNU ac_path_GREP and select it if it is found.
4477 # Check for GNU $ac_path_GREP
4478case `"$ac_path_GREP" --version 2>&1` in
4479*GNU*)
4480 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4481*)
4482 ac_count=0
4483 $as_echo_n 0123456789 >"conftest.in"
4484 while :
4485 do
4486 cat "conftest.in" "conftest.in" >"conftest.tmp"
4487 mv "conftest.tmp" "conftest.in"
4488 cp "conftest.in" "conftest.nl"
4489 $as_echo 'GREP' >> "conftest.nl"
4490 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4491 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4492 as_fn_arith $ac_count + 1 && ac_count=$as_val
4493 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4494 # Best one so far, save it but keep looking for a better one
4495 ac_cv_path_GREP="$ac_path_GREP"
4496 ac_path_GREP_max=$ac_count
4497 fi
4498 # 10*(2^10) chars as input seems more than enough
4499 test $ac_count -gt 10 && break
4500 done
4501 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4502esac
4503
4504 $ac_path_GREP_found && break 3
4505 done
4506 done
4507 done
4508IFS=$as_save_IFS
4509 if test -z "$ac_cv_path_GREP"; then
4510 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4511 fi
4512else
4513 ac_cv_path_GREP=$GREP
4514fi
4515
4516fi
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4518$as_echo "$ac_cv_path_GREP" >&6; }
4519 GREP="$ac_cv_path_GREP"
4520
4521
Łukasz Langaa785c872016-09-09 17:37:37 -07004522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4523$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4524if ${ac_cv_path_SED+:} false; then :
4525 $as_echo_n "(cached) " >&6
4526else
4527 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4528 for ac_i in 1 2 3 4 5 6 7; do
4529 ac_script="$ac_script$as_nl$ac_script"
4530 done
4531 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4532 { ac_script=; unset ac_script;}
4533 if test -z "$SED"; then
4534 ac_path_SED_found=false
4535 # Loop through the user's path and test for each of PROGNAME-LIST
4536 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4537for as_dir in $PATH
4538do
4539 IFS=$as_save_IFS
4540 test -z "$as_dir" && as_dir=.
4541 for ac_prog in sed gsed; do
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4544 as_fn_executable_p "$ac_path_SED" || continue
4545# Check for GNU ac_path_SED and select it if it is found.
4546 # Check for GNU $ac_path_SED
4547case `"$ac_path_SED" --version 2>&1` in
4548*GNU*)
4549 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4550*)
4551 ac_count=0
4552 $as_echo_n 0123456789 >"conftest.in"
4553 while :
4554 do
4555 cat "conftest.in" "conftest.in" >"conftest.tmp"
4556 mv "conftest.tmp" "conftest.in"
4557 cp "conftest.in" "conftest.nl"
4558 $as_echo '' >> "conftest.nl"
4559 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4560 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4561 as_fn_arith $ac_count + 1 && ac_count=$as_val
4562 if test $ac_count -gt ${ac_path_SED_max-0}; then
4563 # Best one so far, save it but keep looking for a better one
4564 ac_cv_path_SED="$ac_path_SED"
4565 ac_path_SED_max=$ac_count
4566 fi
4567 # 10*(2^10) chars as input seems more than enough
4568 test $ac_count -gt 10 && break
4569 done
4570 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4571esac
4572
4573 $ac_path_SED_found && break 3
4574 done
4575 done
4576 done
4577IFS=$as_save_IFS
4578 if test -z "$ac_cv_path_SED"; then
4579 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4580 fi
4581else
4582 ac_cv_path_SED=$SED
4583fi
4584
4585fi
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4587$as_echo "$ac_cv_path_SED" >&6; }
4588 SED="$ac_cv_path_SED"
4589 rm -f conftest.sed
4590
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004591
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592
4593
Matthias Kloseb9621712010-04-24 17:59:49 +00004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4595$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004597# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004598if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004600
4601 case $withval in
4602 no) with_cxx_main=no
4603 MAINCC='$(CC)';;
4604 yes) with_cxx_main=yes
4605 MAINCC='$(CXX)';;
4606 *) with_cxx_main=yes
4607 MAINCC=$withval
4608 if test -z "$CXX"
4609 then
4610 CXX=$withval
4611 fi;;
4612 esac
4613else
4614
4615 with_cxx_main=no
4616 MAINCC='$(CC)'
4617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004618fi
4619
Matthias Kloseb9621712010-04-24 17:59:49 +00004620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4621$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004622
4623preset_cxx="$CXX"
4624if test -z "$CXX"
4625then
4626 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004627 gcc) if test -n "$ac_tool_prefix"; then
4628 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4629set dummy ${ac_tool_prefix}g++; ac_word=$2
4630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4631$as_echo_n "checking for $ac_word... " >&6; }
4632if ${ac_cv_path_CXX+:} false; then :
4633 $as_echo_n "(cached) " >&6
4634else
4635 case $CXX in
4636 [\\/]* | ?:[\\/]*)
4637 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4638 ;;
4639 *)
4640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4641for as_dir in notfound
4642do
4643 IFS=$as_save_IFS
4644 test -z "$as_dir" && as_dir=.
4645 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004647 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4649 break 2
4650 fi
4651done
4652 done
4653IFS=$as_save_IFS
4654
4655 ;;
4656esac
4657fi
4658CXX=$ac_cv_path_CXX
4659if test -n "$CXX"; then
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4661$as_echo "$CXX" >&6; }
4662else
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4664$as_echo "no" >&6; }
4665fi
4666
4667
4668fi
4669if test -z "$ac_cv_path_CXX"; then
4670 ac_pt_CXX=$CXX
4671 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004672set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004675if ${ac_cv_path_ac_pt_CXX+:} false; then :
4676 $as_echo_n "(cached) " >&6
4677else
4678 case $ac_pt_CXX in
4679 [\\/]* | ?:[\\/]*)
4680 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4681 ;;
4682 *)
4683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4684for as_dir in notfound
4685do
4686 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004690 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2
4693 fi
4694done
4695 done
4696IFS=$as_save_IFS
4697
4698 ;;
4699esac
4700fi
4701ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4702if test -n "$ac_pt_CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4704$as_echo "$ac_pt_CXX" >&6; }
4705else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707$as_echo "no" >&6; }
4708fi
4709
4710 if test "x$ac_pt_CXX" = x; then
4711 CXX="g++"
4712 else
4713 case $cross_compiling:$ac_tool_warned in
4714yes:)
4715{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4716$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4717ac_tool_warned=yes ;;
4718esac
4719 CXX=$ac_pt_CXX
4720 fi
4721else
4722 CXX="$ac_cv_path_CXX"
4723fi
4724 ;;
4725 cc) if test -n "$ac_tool_prefix"; then
4726 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4727set dummy ${ac_tool_prefix}c++; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004730if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004732else
4733 case $CXX in
4734 [\\/]* | ?:[\\/]*)
4735 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4736 ;;
4737 *)
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in notfound
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004747 break 2
4748 fi
4749done
Matthias Kloseb9621712010-04-24 17:59:49 +00004750 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004751IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004752
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004753 ;;
4754esac
4755fi
4756CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004757if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4759$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004760else
Matthias Kloseb9621712010-04-24 17:59:49 +00004761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004763fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004764
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765
4766fi
4767if test -z "$ac_cv_path_CXX"; then
4768 ac_pt_CXX=$CXX
4769 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004773if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004775else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004776 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004778 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 +00004779 ;;
4780 *)
4781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in notfound
4783do
4784 IFS=$as_save_IFS
4785 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004788 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790 break 2
4791 fi
4792done
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004794IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004795
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796 ;;
4797esac
4798fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004799ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4800if test -n "$ac_pt_CXX"; then
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4802$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004803else
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004807
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 if test "x$ac_pt_CXX" = x; then
4809 CXX="c++"
4810 else
4811 case $cross_compiling:$ac_tool_warned in
4812yes:)
4813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4815ac_tool_warned=yes ;;
4816esac
4817 CXX=$ac_pt_CXX
4818 fi
4819else
4820 CXX="$ac_cv_path_CXX"
4821fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004823 clang|*/clang) if test -n "$ac_tool_prefix"; then
4824 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4825set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if ${ac_cv_path_CXX+:} false; then :
4829 $as_echo_n "(cached) " >&6
4830else
4831 case $CXX in
4832 [\\/]* | ?:[\\/]*)
4833 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4834 ;;
4835 *)
4836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in notfound
4838do
4839 IFS=$as_save_IFS
4840 test -z "$as_dir" && as_dir=.
4841 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004843 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845 break 2
4846 fi
4847done
4848 done
4849IFS=$as_save_IFS
4850
Ned Deilycbfb9a52012-06-23 16:02:19 -07004851 ;;
4852esac
4853fi
4854CXX=$ac_cv_path_CXX
4855if test -n "$CXX"; then
4856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4857$as_echo "$CXX" >&6; }
4858else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004863
4864fi
4865if test -z "$ac_cv_path_CXX"; then
4866 ac_pt_CXX=$CXX
4867 # Extract the first word of "clang++", so it can be a program name with args.
4868set dummy clang++; ac_word=$2
4869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4870$as_echo_n "checking for $ac_word... " >&6; }
4871if ${ac_cv_path_ac_pt_CXX+:} false; then :
4872 $as_echo_n "(cached) " >&6
4873else
4874 case $ac_pt_CXX in
4875 [\\/]* | ?:[\\/]*)
4876 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4877 ;;
4878 *)
4879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4880for as_dir in notfound
4881do
4882 IFS=$as_save_IFS
4883 test -z "$as_dir" && as_dir=.
4884 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004886 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4888 break 2
4889 fi
4890done
4891 done
4892IFS=$as_save_IFS
4893
4894 ;;
4895esac
4896fi
4897ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4898if test -n "$ac_pt_CXX"; then
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4900$as_echo "$ac_pt_CXX" >&6; }
4901else
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4903$as_echo "no" >&6; }
4904fi
4905
4906 if test "x$ac_pt_CXX" = x; then
4907 CXX="clang++"
4908 else
4909 case $cross_compiling:$ac_tool_warned in
4910yes:)
4911{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4912$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4913ac_tool_warned=yes ;;
4914esac
4915 CXX=$ac_pt_CXX
4916 fi
4917else
4918 CXX="$ac_cv_path_CXX"
4919fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004920 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004921 icc|*/icc) if test -n "$ac_tool_prefix"; then
4922 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4923set dummy ${ac_tool_prefix}icpc; ac_word=$2
4924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925$as_echo_n "checking for $ac_word... " >&6; }
4926if ${ac_cv_path_CXX+:} false; then :
4927 $as_echo_n "(cached) " >&6
4928else
4929 case $CXX in
4930 [\\/]* | ?:[\\/]*)
4931 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4932 ;;
4933 *)
4934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935for as_dir in notfound
4936do
4937 IFS=$as_save_IFS
4938 test -z "$as_dir" && as_dir=.
4939 for ac_exec_ext in '' $ac_executable_extensions; do
4940 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943 break 2
4944 fi
4945done
4946 done
4947IFS=$as_save_IFS
4948
4949 ;;
4950esac
4951fi
4952CXX=$ac_cv_path_CXX
4953if test -n "$CXX"; then
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4955$as_echo "$CXX" >&6; }
4956else
4957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958$as_echo "no" >&6; }
4959fi
4960
4961
4962fi
4963if test -z "$ac_cv_path_CXX"; then
4964 ac_pt_CXX=$CXX
4965 # Extract the first word of "icpc", so it can be a program name with args.
4966set dummy icpc; ac_word=$2
4967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4968$as_echo_n "checking for $ac_word... " >&6; }
4969if ${ac_cv_path_ac_pt_CXX+:} false; then :
4970 $as_echo_n "(cached) " >&6
4971else
4972 case $ac_pt_CXX in
4973 [\\/]* | ?:[\\/]*)
4974 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4975 ;;
4976 *)
4977 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4978for as_dir in notfound
4979do
4980 IFS=$as_save_IFS
4981 test -z "$as_dir" && as_dir=.
4982 for ac_exec_ext in '' $ac_executable_extensions; do
4983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4984 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4985 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4986 break 2
4987 fi
4988done
4989 done
4990IFS=$as_save_IFS
4991
4992 ;;
4993esac
4994fi
4995ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4996if test -n "$ac_pt_CXX"; then
4997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4998$as_echo "$ac_pt_CXX" >&6; }
4999else
5000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5001$as_echo "no" >&6; }
5002fi
5003
5004 if test "x$ac_pt_CXX" = x; then
5005 CXX="icpc"
5006 else
5007 case $cross_compiling:$ac_tool_warned in
5008yes:)
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5010$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5011ac_tool_warned=yes ;;
5012esac
5013 CXX=$ac_pt_CXX
5014 fi
5015else
5016 CXX="$ac_cv_path_CXX"
5017fi
5018 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005019 esac
5020 if test "$CXX" = "notfound"
5021 then
5022 CXX=""
5023 fi
5024fi
5025if test -z "$CXX"
5026then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005027 if test -n "$ac_tool_prefix"; then
5028 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5029 do
5030 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5031set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005034if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005036else
5037 if test -n "$CXX"; then
5038 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5039else
5040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041for as_dir in $PATH
5042do
5043 IFS=$as_save_IFS
5044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005046 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005047 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005048 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005049 break 2
5050 fi
5051done
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005053IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054
5055fi
5056fi
5057CXX=$ac_cv_prog_CXX
5058if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5060$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005061else
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005064fi
5065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005066
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005067 test -n "$CXX" && break
5068 done
5069fi
5070if test -z "$CXX"; then
5071 ac_ct_CXX=$CXX
5072 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5073do
5074 # Extract the first word of "$ac_prog", so it can be a program name with args.
5075set dummy $ac_prog; ac_word=$2
5076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077$as_echo_n "checking for $ac_word... " >&6; }
5078if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5079 $as_echo_n "(cached) " >&6
5080else
5081 if test -n "$ac_ct_CXX"; then
5082 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5083else
5084as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in $PATH
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005091 ac_cv_prog_ac_ct_CXX="$ac_prog"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005095done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005096 done
5097IFS=$as_save_IFS
5098
5099fi
5100fi
5101ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5102if test -n "$ac_ct_CXX"; then
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5104$as_echo "$ac_ct_CXX" >&6; }
5105else
5106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107$as_echo "no" >&6; }
5108fi
5109
5110
5111 test -n "$ac_ct_CXX" && break
5112done
5113
5114 if test "x$ac_ct_CXX" = x; then
5115 CXX="notfound"
5116 else
5117 case $cross_compiling:$ac_tool_warned in
5118yes:)
5119{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5120$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5121ac_tool_warned=yes ;;
5122esac
5123 CXX=$ac_ct_CXX
5124 fi
5125fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126
5127 if test "$CXX" = "notfound"
5128 then
5129 CXX=""
5130 fi
5131fi
5132if test "$preset_cxx" != "$CXX"
5133then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005134 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135
5136 By default, distutils will build C++ extension modules with \"$CXX\".
5137 If this is not intended, then set CXX on the configure command line.
5138 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005139$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005140
5141 By default, distutils will build C++ extension modules with \"$CXX\".
5142 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005143 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005144fi
5145
5146
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005147MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5148
5149
5150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5151$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5152cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef bfin
5154#undef cris
5155#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005157#undef hppa
5158#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005159#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005160#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005161#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005162#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005163#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005164#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005165 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005166#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005167# if defined(__x86_64__) && defined(__LP64__)
5168 x86_64-linux-gnu
5169# elif defined(__x86_64__) && defined(__ILP32__)
5170 x86_64-linux-gnux32
5171# elif defined(__i386__)
5172 i386-linux-gnu
5173# elif defined(__aarch64__) && defined(__AARCH64EL__)
5174# if defined(__ILP32__)
5175 aarch64_ilp32-linux-gnu
5176# else
5177 aarch64-linux-gnu
5178# endif
5179# elif defined(__aarch64__) && defined(__AARCH64EB__)
5180# if defined(__ILP32__)
5181 aarch64_be_ilp32-linux-gnu
5182# else
5183 aarch64_be-linux-gnu
5184# endif
5185# elif defined(__alpha__)
5186 alpha-linux-gnu
5187# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5188# if defined(__ARMEL__)
5189 arm-linux-gnueabihf
5190# else
5191 armeb-linux-gnueabihf
5192# endif
5193# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5194# if defined(__ARMEL__)
5195 arm-linux-gnueabi
5196# else
5197 armeb-linux-gnueabi
5198# endif
5199# elif defined(__hppa__)
5200 hppa-linux-gnu
5201# elif defined(__ia64__)
5202 ia64-linux-gnu
5203# elif defined(__m68k__) && !defined(__mcoldfire__)
5204 m68k-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005205# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL)
5206# if _MIPS_SIM == _ABIO32
5207 mipsisa32r6el-linux-gnu
5208# elif _MIPS_SIM == _ABIN32
5209 mipsisa64r6el-linux-gnuabin32
5210# elif _MIPS_SIM == _ABI64
5211 mipsisa64r6el-linux-gnuabi64
5212# else
5213# error unknown platform triplet
5214# endif
5215# elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6)
5216# if _MIPS_SIM == _ABIO32
5217 mipsisa32r6-linux-gnu
5218# elif _MIPS_SIM == _ABIN32
5219 mipsisa64r6-linux-gnuabin32
5220# elif _MIPS_SIM == _ABI64
5221 mipsisa64r6-linux-gnuabi64
5222# else
5223# error unknown platform triplet
5224# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005225# elif defined(__mips_hard_float) && defined(_MIPSEL)
5226# if _MIPS_SIM == _ABIO32
5227 mipsel-linux-gnu
5228# elif _MIPS_SIM == _ABIN32
5229 mips64el-linux-gnuabin32
5230# elif _MIPS_SIM == _ABI64
5231 mips64el-linux-gnuabi64
5232# else
5233# error unknown platform triplet
5234# endif
5235# elif defined(__mips_hard_float)
5236# if _MIPS_SIM == _ABIO32
5237 mips-linux-gnu
5238# elif _MIPS_SIM == _ABIN32
5239 mips64-linux-gnuabin32
5240# elif _MIPS_SIM == _ABI64
5241 mips64-linux-gnuabi64
5242# else
5243# error unknown platform triplet
5244# endif
5245# elif defined(__or1k__)
5246 or1k-linux-gnu
5247# elif defined(__powerpc__) && defined(__SPE__)
5248 powerpc-linux-gnuspe
5249# elif defined(__powerpc64__)
5250# if defined(__LITTLE_ENDIAN__)
5251 powerpc64le-linux-gnu
5252# else
5253 powerpc64-linux-gnu
5254# endif
5255# elif defined(__powerpc__)
5256 powerpc-linux-gnu
5257# elif defined(__s390x__)
5258 s390x-linux-gnu
5259# elif defined(__s390__)
5260 s390-linux-gnu
5261# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5262 sh4-linux-gnu
5263# elif defined(__sparc__) && defined(__arch64__)
5264 sparc64-linux-gnu
5265# elif defined(__sparc__)
5266 sparc-linux-gnu
Matthias Kloseddbe9762018-04-30 19:22:16 +02005267# elif defined(__riscv)
5268# if __riscv_xlen == 32
5269 riscv32-linux-gnu
5270# elif __riscv_xlen == 64
5271 riscv64-linux-gnu
5272# else
5273# error unknown platform triplet
5274# endif
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005275# else
5276# error unknown platform triplet
5277# endif
5278#elif defined(__FreeBSD_kernel__)
5279# if defined(__LP64__)
5280 x86_64-kfreebsd-gnu
5281# elif defined(__i386__)
5282 i386-kfreebsd-gnu
5283# else
5284# error unknown platform triplet
5285# endif
5286#elif defined(__gnu_hurd__)
5287 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005288#elif defined(__APPLE__)
5289 darwin
pxinwr32f5fdd2019-02-27 19:09:28 +08005290#elif defined(__VXWORKS__)
5291 vxworks
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005292#else
5293# error unknown platform triplet
5294#endif
5295
5296EOF
5297
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005298if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5301$as_echo "$PLATFORM_TRIPLET" >&6; }
5302else
5303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5304$as_echo "none" >&6; }
5305fi
5306rm -f conftest.c conftest.out
5307
5308if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5309 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5310 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5311 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005312elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5313 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005314fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005315
doko@ubuntu.com55532312016-06-14 08:55:19 +02005316if test x$MULTIARCH != x; then
5317 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5318fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005319
5320
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5322$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5323save_LDFLAGS="$LDFLAGS"
5324LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005325
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327/* end confdefs.h. */
5328
5329int
5330main ()
5331{
5332
5333 ;
5334 return 0;
5335}
5336_ACEOF
5337if ac_fn_c_try_link "$LINENO"; then :
5338 NO_AS_NEEDED="-Wl,--no-as-needed"
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5340$as_echo "yes" >&6; }
5341else
5342 NO_AS_NEEDED=""
5343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5344$as_echo "no" >&6; }
5345fi
5346rm -f core conftest.err conftest.$ac_objext \
5347 conftest$ac_exeext conftest.$ac_ext
5348LDFLAGS="$save_LDFLAGS"
5349
5350
5351
5352# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005353
Matthias Kloseb9621712010-04-24 17:59:49 +00005354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5355$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005356if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005357 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005358else
5359 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5360 then ac_cv_path_EGREP="$GREP -E"
5361 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005362 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005363 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005364 # Loop through the user's path and test for each of PROGNAME-LIST
5365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5367do
5368 IFS=$as_save_IFS
5369 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005370 for ac_prog in egrep; do
5371 for ac_exec_ext in '' $ac_executable_extensions; do
5372 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005373 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005374# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375 # Check for GNU $ac_path_EGREP
5376case `"$ac_path_EGREP" --version 2>&1` in
5377*GNU*)
5378 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5379*)
5380 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 while :
5383 do
5384 cat "conftest.in" "conftest.in" >"conftest.tmp"
5385 mv "conftest.tmp" "conftest.in"
5386 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005388 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5389 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005390 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005391 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5392 # Best one so far, save it but keep looking for a better one
5393 ac_cv_path_EGREP="$ac_path_EGREP"
5394 ac_path_EGREP_max=$ac_count
5395 fi
5396 # 10*(2^10) chars as input seems more than enough
5397 test $ac_count -gt 10 && break
5398 done
5399 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5400esac
5401
Matthias Kloseb9621712010-04-24 17:59:49 +00005402 $ac_path_EGREP_found && break 3
5403 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005406IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005408 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 +00005409 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005410else
5411 ac_cv_path_EGREP=$EGREP
5412fi
5413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005414 fi
5415fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5417$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005418 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005419
5420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5422$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005423if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 $as_echo_n "(cached) " >&6
5425else
5426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005427/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005428#include <stdlib.h>
5429#include <stdarg.h>
5430#include <string.h>
5431#include <float.h>
5432
5433int
5434main ()
5435{
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_compile "$LINENO"; then :
5442 ac_cv_header_stdc=yes
5443else
5444 ac_cv_header_stdc=no
5445fi
5446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5447
5448if test $ac_cv_header_stdc = yes; then
5449 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5451/* end confdefs.h. */
5452#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005453
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005454_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005456 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005457
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005458else
Matthias Kloseb9621712010-04-24 17:59:49 +00005459 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005461rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462
Matthias Kloseb9621712010-04-24 17:59:49 +00005463fi
5464
5465if test $ac_cv_header_stdc = yes; then
5466 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469#include <stdlib.h>
5470
5471_ACEOF
5472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5473 $EGREP "free" >/dev/null 2>&1; then :
5474
5475else
5476 ac_cv_header_stdc=no
5477fi
5478rm -f conftest*
5479
5480fi
5481
5482if test $ac_cv_header_stdc = yes; then
5483 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5484 if test "$cross_compiling" = yes; then :
5485 :
5486else
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <ctype.h>
5490#include <stdlib.h>
5491#if ((' ' & 0x0FF) == 0x020)
5492# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5493# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5494#else
5495# define ISLOWER(c) \
5496 (('a' <= (c) && (c) <= 'i') \
5497 || ('j' <= (c) && (c) <= 'r') \
5498 || ('s' <= (c) && (c) <= 'z'))
5499# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5500#endif
5501
5502#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5503int
5504main ()
5505{
5506 int i;
5507 for (i = 0; i < 256; i++)
5508 if (XOR (islower (i), ISLOWER (i))
5509 || toupper (i) != TOUPPER (i))
5510 return 2;
5511 return 0;
5512}
5513_ACEOF
5514if ac_fn_c_try_run "$LINENO"; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5520 conftest.$ac_objext conftest.beam conftest.$ac_ext
5521fi
5522
5523fi
5524fi
5525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5526$as_echo "$ac_cv_header_stdc" >&6; }
5527if test $ac_cv_header_stdc = yes; then
5528
5529$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5530
5531fi
5532
5533# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5534for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5535 inttypes.h stdint.h unistd.h
5536do :
5537 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5538ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5539"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005540if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005541 cat >>confdefs.h <<_ACEOF
5542#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5543_ACEOF
5544
5545fi
5546
5547done
5548
5549
5550
5551 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 +02005552if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005553 MINIX=yes
5554else
5555 MINIX=
5556fi
5557
5558
5559 if test "$MINIX" = yes; then
5560
5561$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5562
5563
5564$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5565
5566
5567$as_echo "#define _MINIX 1" >>confdefs.h
5568
5569 fi
5570
5571
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5573$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005574if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005575 $as_echo_n "(cached) " >&6
5576else
5577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5578/* end confdefs.h. */
5579
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005580# define __EXTENSIONS__ 1
5581 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005582int
5583main ()
5584{
5585
5586 ;
5587 return 0;
5588}
5589_ACEOF
5590if ac_fn_c_try_compile "$LINENO"; then :
5591 ac_cv_safe_to_define___extensions__=yes
5592else
5593 ac_cv_safe_to_define___extensions__=no
5594fi
5595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5596fi
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5598$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5599 test $ac_cv_safe_to_define___extensions__ = yes &&
5600 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5601
5602 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5603
5604 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5605
5606 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5607
5608 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5609
5610
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611
Xavier de Gaye95750b12016-07-09 11:05:42 +02005612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5613$as_echo_n "checking for the Android API level... " >&6; }
5614cat >> conftest.c <<EOF
5615#ifdef __ANDROID__
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005616android_api = __ANDROID_API__
5617arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005618#else
5619#error not Android
5620#endif
5621EOF
5622
5623if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005624 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5625 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5627$as_echo "$ANDROID_API_LEVEL" >&6; }
xdegayec06c22e2017-11-23 11:44:38 +01005628 if test -z "$ANDROID_API_LEVEL"; then
5629 echo 'Fatal: you must define __ANDROID_API__'
5630 exit 1
5631 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005632
5633cat >>confdefs.h <<_ACEOF
5634#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5635_ACEOF
5636
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005637
5638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5639$as_echo_n "checking for the Android arm ABI... " >&6; }
5640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5641$as_echo "$_arm_arch" >&6; }
5642 if test "$_arm_arch" = 7; then
5643 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5644 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5645 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005646else
5647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5648$as_echo "not Android" >&6; }
5649fi
5650rm -f conftest.c conftest.out
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652# Check for unsupported systems
5653case $ac_sys_system/$ac_sys_release in
5654atheos*|Linux*/1*)
5655 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5656 echo See README for details.
5657 exit 1;;
5658esac
5659
5660
Matthias Kloseb9621712010-04-24 17:59:49 +00005661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5662$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005663
5664# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005665if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 withval=$with_suffix;
5667 case $withval in
5668 no) EXEEXT=;;
5669 yes) EXEEXT=.exe;;
5670 *) EXEEXT=$withval;;
5671 esac
5672fi
5673
Matthias Kloseb9621712010-04-24 17:59:49 +00005674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5675$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005676
5677# Test whether we're running on a non-case-sensitive system, in which
5678# case we give a warning if no ext is given
5679
Matthias Kloseb9621712010-04-24 17:59:49 +00005680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5681$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005682if test ! -d CaseSensitiveTestDir; then
5683mkdir CaseSensitiveTestDir
5684fi
5685
5686if test -d casesensitivetestdir
5687then
Matthias Kloseb9621712010-04-24 17:59:49 +00005688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5689$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690 BUILDEXEEXT=.exe
5691else
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694 BUILDEXEEXT=$EXEEXT
5695fi
5696rmdir CaseSensitiveTestDir
5697
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698case $ac_sys_system in
5699hp*|HP*)
5700 case $CC in
5701 cc|*/cc) CC="$CC -Ae";;
5702 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005703esac
5704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005705
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5707$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708if test -z "$LIBRARY"
5709then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005710 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5713$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# LDLIBRARY is the name of the library to link against (as opposed to the
5716# name of the library into which to insert object files). BLDLIBRARY is also
5717# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5718# is blank as the main program is not linked directly against LDLIBRARY.
5719# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5720# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5721# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5722# DLLLIBRARY is the shared (i.e., DLL) library.
5723#
5724# RUNSHARED is used to run shared python without installed libraries
5725#
5726# INSTSONAME is the name of the shared library that will be use to install
5727# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005728#
5729# LDVERSION is the shared library version number, normally the Python version
5730# with the ABI build flags appended.
5731
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732
5733
5734
5735
5736
5737
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739LDLIBRARY="$LIBRARY"
5740BLDLIBRARY='$(LDLIBRARY)'
5741INSTSONAME='$(LDLIBRARY)'
5742DLLLIBRARY=''
5743LDLIBRARYDIR=''
5744RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005745LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746
5747# LINKCC is the command that links the python executable -- default is $(CC).
5748# If CXX is set, and if it is needed to link a main function that was
5749# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5750# python might then depend on the C++ runtime
5751# This is altered for AIX in order to build the export list before
5752# linking.
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5755$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756if test -z "$LINKCC"
5757then
5758 LINKCC='$(PURIFY) $(MAINCC)'
5759 case $ac_sys_system in
5760 AIX*)
5761 exp_extra="\"\""
5762 if test $ac_sys_release -ge 5 -o \
5763 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5764 exp_extra="."
5765 fi
5766 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767 QNX*)
5768 # qcc must be used because the other compilers do not
5769 # support -N.
5770 LINKCC=qcc;;
5771 esac
5772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5774$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775
5776# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5777# make sure we default having it set to "no": this is used by
5778# distutils.unixccompiler to know if it should add --enable-new-dtags
5779# to linker command lines, and failing to detect GNU ld simply results
5780# in the same bahaviour as before.
5781
Matthias Kloseb9621712010-04-24 17:59:49 +00005782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5783$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784ac_prog=ld
5785if test "$GCC" = yes; then
5786 ac_prog=`$CC -print-prog-name=ld`
5787fi
5788case `"$ac_prog" -V 2>&1 < /dev/null` in
5789 *GNU*)
5790 GNULD=yes;;
5791 *)
5792 GNULD=no;;
5793esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5795$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005796
Matthias Kloseb9621712010-04-24 17:59:49 +00005797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5798$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005799# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005800if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801 enableval=$enable_shared;
5802fi
5803
5804
5805if test -z "$enable_shared"
5806then
5807 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005808 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809 enable_shared="yes";;
5810 *)
5811 enable_shared="no";;
5812 esac
5813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5815$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816
Matthias Kloseb9621712010-04-24 17:59:49 +00005817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5818$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005820if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005821 enableval=$enable_profiling;
5822fi
5823
5824if test "x$enable_profiling" = xyes; then
5825 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005826 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828/* end confdefs.h. */
5829int main() { return 0; }
5830_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005831if ac_fn_c_try_link "$LINENO"; then :
5832
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005834 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005836rm -f core conftest.err conftest.$ac_objext \
5837 conftest$ac_exeext conftest.$ac_ext
5838 CC="$ac_save_cc"
5839else
5840 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5843$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844
doko@ubuntu.comba015832012-06-30 16:52:05 +02005845if test "x$enable_profiling" = xyes; then
5846 BASECFLAGS="-pg $BASECFLAGS"
5847 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005848fi
5849
Matthias Kloseb9621712010-04-24 17:59:49 +00005850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5851$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005852
5853# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5854# library that we build, but we do not want to link against it (we
5855# will find it with a -framework option). For this reason there is an
5856# extra variable BLDLIBRARY against which Python and the extension
5857# modules are linked, BLDLIBRARY. This is normally the same as
5858# LDLIBRARY, but empty for MacOSX framework builds.
5859if test "$enable_framework"
5860then
5861 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005862 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863 BLDLIBRARY=''
5864else
5865 BLDLIBRARY='$(LDLIBRARY)'
5866fi
5867
5868# Other platforms follow
5869if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005870 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005871
Matthias Kloseb9621712010-04-24 17:59:49 +00005872$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873
5874 case $ac_sys_system in
5875 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005876 LDLIBRARY='libpython$(LDVERSION).dll.a'
5877 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878 ;;
5879 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005880 LDLIBRARY='libpython$(LDVERSION).so'
5881 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005882 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005883 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005884 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005885 then
5886 PY3LIBRARY=libpython3.so
5887 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005888 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005889 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005890 LDLIBRARY='libpython$(LDVERSION).so'
5891 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005892 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005894 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005895 then
5896 PY3LIBRARY=libpython3.so
5897 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898 ;;
5899 hp*|HP*)
5900 case `uname -m` in
5901 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005903 ;;
5904 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005905 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005906 ;;
5907 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005908 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005909 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005911 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).dylib'
5913 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005916 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005917 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005918 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005919 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920
5921 esac
5922else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005923 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005924 case $ac_sys_system in
5925 CYGWIN*)
5926 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 esac
5930fi
5931
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005932if test "$cross_compiling" = yes; then
5933 RUNSHARED=
5934fi
5935
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5937$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005940if test -n "$ac_tool_prefix"; then
5941 for ac_prog in ar aal
5942 do
5943 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005947if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005948 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949else
5950 if test -n "$AR"; then
5951 ac_cv_prog_AR="$AR" # Let the user override the test.
5952else
5953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956 IFS=$as_save_IFS
5957 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005958 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005959 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005960 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005961 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 break 2
5963 fi
5964done
Matthias Kloseb9621712010-04-24 17:59:49 +00005965 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966IFS=$as_save_IFS
5967
5968fi
5969fi
5970AR=$ac_cv_prog_AR
5971if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5973$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974else
Matthias Kloseb9621712010-04-24 17:59:49 +00005975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977fi
5978
5979
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005980 test -n "$AR" && break
5981 done
5982fi
5983if test -z "$AR"; then
5984 ac_ct_AR=$AR
5985 for ac_prog in ar aal
5986do
5987 # Extract the first word of "$ac_prog", so it can be a program name with args.
5988set dummy $ac_prog; ac_word=$2
5989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5990$as_echo_n "checking for $ac_word... " >&6; }
5991if ${ac_cv_prog_ac_ct_AR+:} false; then :
5992 $as_echo_n "(cached) " >&6
5993else
5994 if test -n "$ac_ct_AR"; then
5995 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5996else
5997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5998for as_dir in $PATH
5999do
6000 IFS=$as_save_IFS
6001 test -z "$as_dir" && as_dir=.
6002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006004 ac_cv_prog_ac_ct_AR="$ac_prog"
6005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6006 break 2
6007 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006009 done
6010IFS=$as_save_IFS
6011
6012fi
6013fi
6014ac_ct_AR=$ac_cv_prog_ac_ct_AR
6015if test -n "$ac_ct_AR"; then
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6017$as_echo "$ac_ct_AR" >&6; }
6018else
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020$as_echo "no" >&6; }
6021fi
6022
6023
6024 test -n "$ac_ct_AR" && break
6025done
6026
6027 if test "x$ac_ct_AR" = x; then
6028 AR="ar"
6029 else
6030 case $cross_compiling:$ac_tool_warned in
6031yes:)
6032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6034ac_tool_warned=yes ;;
6035esac
6036 AR=$ac_ct_AR
6037 fi
6038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039
6040
6041# tweak ARFLAGS only if the user didn't set it on the command line
6042
6043if test -z "$ARFLAGS"
6044then
Benjamin Petersond15108a2017-09-29 08:42:41 -07006045 ARFLAGS="rcs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046fi
6047
doko@ubuntu.com58844492012-06-30 18:25:32 +02006048if test -n "$ac_tool_prefix"; then
6049 for ac_prog in readelf
6050 do
6051 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6052set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6054$as_echo_n "checking for $ac_word... " >&6; }
6055if ${ac_cv_prog_READELF+:} false; then :
6056 $as_echo_n "(cached) " >&6
6057else
6058 if test -n "$READELF"; then
6059 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6060else
6061as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH
6063do
6064 IFS=$as_save_IFS
6065 test -z "$as_dir" && as_dir=.
6066 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006068 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6070 break 2
6071 fi
6072done
6073 done
6074IFS=$as_save_IFS
6075
6076fi
6077fi
6078READELF=$ac_cv_prog_READELF
6079if test -n "$READELF"; then
6080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6081$as_echo "$READELF" >&6; }
6082else
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6084$as_echo "no" >&6; }
6085fi
6086
6087
6088 test -n "$READELF" && break
6089 done
6090fi
6091if test -z "$READELF"; then
6092 ac_ct_READELF=$READELF
6093 for ac_prog in readelf
6094do
6095 # Extract the first word of "$ac_prog", so it can be a program name with args.
6096set dummy $ac_prog; ac_word=$2
6097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6098$as_echo_n "checking for $ac_word... " >&6; }
6099if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6100 $as_echo_n "(cached) " >&6
6101else
6102 if test -n "$ac_ct_READELF"; then
6103 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6104else
6105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108 IFS=$as_save_IFS
6109 test -z "$as_dir" && as_dir=.
6110 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006112 ac_cv_prog_ac_ct_READELF="$ac_prog"
6113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114 break 2
6115 fi
6116done
6117 done
6118IFS=$as_save_IFS
6119
6120fi
6121fi
6122ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6123if test -n "$ac_ct_READELF"; then
6124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6125$as_echo "$ac_ct_READELF" >&6; }
6126else
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }
6129fi
6130
6131
6132 test -n "$ac_ct_READELF" && break
6133done
6134
6135 if test "x$ac_ct_READELF" = x; then
6136 READELF=":"
6137 else
6138 case $cross_compiling:$ac_tool_warned in
6139yes:)
6140{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6141$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6142ac_tool_warned=yes ;;
6143esac
6144 READELF=$ac_ct_READELF
6145 fi
6146fi
6147
6148if test "$cross_compiling" = yes; then
6149 case "$READELF" in
6150 readelf|:)
6151 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6152 ;;
6153 esac
6154fi
6155
6156
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158case $MACHDEP in
Benjamin Peterson288d1da2017-09-28 22:44:27 -07006159hp*|HP*)
6160 # install -d does not work on HP-UX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 if test -z "$INSTALL"
6162 then
6163 INSTALL="${srcdir}/install-sh -c"
6164 fi
6165esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166# Find a good install program. We prefer a C program (faster),
6167# so one script is as good as another. But avoid the broken or
6168# incompatible versions:
6169# SysV /etc/install, /usr/sbin/install
6170# SunOS /usr/etc/install
6171# IRIX /sbin/install
6172# AIX /bin/install
6173# AmigaOS /C/install, which installs bootblocks on floppy discs
6174# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6175# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6176# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6177# OS/2's system install, which has a completely different semantic
6178# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006179# Reject install programs that cannot install multiple files.
6180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6181$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006182if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006183if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006184 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185else
6186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6187for as_dir in $PATH
6188do
6189 IFS=$as_save_IFS
6190 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006191 # Account for people who put trailing slashes in PATH elements.
6192case $as_dir/ in #((
6193 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006194 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006195 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006196 /usr/ucb/* ) ;;
6197 *)
6198 # OSF1 and SCO ODT 3.0 have their own names for install.
6199 # Don't use installbsd from OSF since it installs stuff as root
6200 # by default.
6201 for ac_prog in ginstall scoinst install; do
6202 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006203 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006204 if test $ac_prog = install &&
6205 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6206 # AIX install. It has an incompatible calling convention.
6207 :
6208 elif test $ac_prog = install &&
6209 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6210 # program-specific install script used by HP pwplus--don't use.
6211 :
6212 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006213 rm -rf conftest.one conftest.two conftest.dir
6214 echo one > conftest.one
6215 echo two > conftest.two
6216 mkdir conftest.dir
6217 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6218 test -s conftest.one && test -s conftest.two &&
6219 test -s conftest.dir/conftest.one &&
6220 test -s conftest.dir/conftest.two
6221 then
6222 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6223 break 3
6224 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 fi
6226 fi
6227 done
6228 done
6229 ;;
6230esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006231
6232 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233IFS=$as_save_IFS
6234
Matthias Kloseb9621712010-04-24 17:59:49 +00006235rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236
6237fi
6238 if test "${ac_cv_path_install+set}" = set; then
6239 INSTALL=$ac_cv_path_install
6240 else
6241 # As a last resort, use the slow shell script. Don't cache a
6242 # value for INSTALL within a source directory, because that will
6243 # break other packages using the cache if that directory is
6244 # removed, or if the value is a relative name.
6245 INSTALL=$ac_install_sh
6246 fi
6247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6249$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006250
6251# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6252# It thinks the first close brace ends the variable substitution.
6253test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6254
6255test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6256
6257test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6258
Matthias Klose93a0ef12012-03-15 18:08:34 +01006259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6260$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6261if test -z "$MKDIR_P"; then
6262 if ${ac_cv_path_mkdir+:} false; then :
6263 $as_echo_n "(cached) " >&6
6264else
6265 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6266for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6267do
6268 IFS=$as_save_IFS
6269 test -z "$as_dir" && as_dir=.
6270 for ac_prog in mkdir gmkdir; do
6271 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006272 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006273 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6274 'mkdir (GNU coreutils) '* | \
6275 'mkdir (coreutils) '* | \
6276 'mkdir (fileutils) '4.1*)
6277 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6278 break 3;;
6279 esac
6280 done
6281 done
6282 done
6283IFS=$as_save_IFS
6284
6285fi
6286
6287 test -d ./--version && rmdir ./--version
6288 if test "${ac_cv_path_mkdir+set}" = set; then
6289 MKDIR_P="$ac_cv_path_mkdir -p"
6290 else
6291 # As a last resort, use the slow shell script. Don't cache a
6292 # value for MKDIR_P within a source directory, because that will
6293 # break other packages using the cache if that directory is
6294 # removed, or if the value is a relative name.
6295 MKDIR_P="$ac_install_sh -d"
6296 fi
6297fi
6298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6299$as_echo "$MKDIR_P" >&6; }
6300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006301
6302# Not every filesystem supports hard links
6303
6304if test -z "$LN" ; then
6305 case $ac_sys_system in
6306 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006307 *) LN=ln;;
6308 esac
6309fi
6310
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006311# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006312
6313ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006314
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6317$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318
6319# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006320if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321 withval=$with_pydebug;
6322if test "$withval" != no
6323then
6324
Matthias Kloseb9621712010-04-24 17:59:49 +00006325$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6328$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006330 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006331else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6332$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333fi
6334else
Matthias Kloseb9621712010-04-24 17:59:49 +00006335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337fi
6338
6339
Victor Stinnerf4e47032019-04-25 00:56:28 +02006340# Check for --with-trace-refs
6341# --with-trace-refs
6342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5
6343$as_echo_n "checking for --with-trace-refs... " >&6; }
6344
6345# Check whether --with-trace-refs was given.
6346if test "${with_trace_refs+set}" = set; then :
6347 withval=$with_trace_refs;
6348else
6349 with_trace_refs=no
6350fi
6351
6352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5
6353$as_echo "$with_trace_refs" >&6; }
6354
6355if test "$with_trace_refs" = "yes"
6356then
6357
6358$as_echo "#define Py_TRACE_REFS 1" >>confdefs.h
6359
6360fi
6361
6362# Check for --with-assertions.
6363# This allows enabling assertions without Py_DEBUG.
T. Woutersddbfa2c2017-05-23 01:30:49 +02006364assertions='false'
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5
6366$as_echo_n "checking for --with-assertions... " >&6; }
6367
6368# Check whether --with-assertions was given.
6369if test "${with_assertions+set}" = set; then :
6370 withval=$with_assertions;
6371if test "$withval" != no
6372then
6373 assertions='true'
6374fi
6375fi
6376
6377if test "$assertions" = 'true'; then
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; }
6380elif test "$Py_DEBUG" = 'true'; then
6381 assertions='true'
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5
6383$as_echo "implied by --with-pydebug" >&6; }
6384else
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6386$as_echo "no" >&6; }
6387fi
6388
Brett Cannon63d98bc2016-09-06 17:12:40 -07006389# Enable optimization flags
6390
6391
6392Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6394$as_echo_n "checking for --enable-optimizations... " >&6; }
6395# Check whether --enable-optimizations was given.
6396if test "${enable_optimizations+set}" = set; then :
6397 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006398if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006399then
6400 Py_OPT='true'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; };
6403else
6404 Py_OPT='false'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; };
6407fi
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006414 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6415 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006416 # 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 +00006417 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006418 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006419 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006420 DEF_MAKE_RULE="build_all"
6421else
6422 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006423 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006424 DEF_MAKE_RULE="all"
6425fi
6426
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006427# Make llvm-relatec checks work on systems where llvm tools are not installed with their
6428# normal names in the default $PATH (ie: Ubuntu). They exist under the
6429# non-suffixed name in their versioned llvm directory.
6430
6431llvm_bin_dir=''
6432llvm_path="${PATH}"
6433if test "${CC}" = "clang"
6434then
6435 clang_bin=`which clang`
6436 # Some systems install clang elsewhere as a symlink to the real path
6437 # which is where the related llvm tools are located.
6438 if test -L "${clang_bin}"
6439 then
6440 clang_dir=`dirname "${clang_bin}"`
6441 clang_bin=`readlink "${clang_bin}"`
6442 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6443 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6444 fi
6445fi
6446
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006447# Enable LTO flags
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6449$as_echo_n "checking for --with-lto... " >&6; }
6450
6451# Check whether --with-lto was given.
6452if test "${with_lto+set}" = set; then :
6453 withval=$with_lto;
6454if test "$withval" != no
6455then
6456 Py_LTO='true'
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6458$as_echo "yes" >&6; };
6459else
6460 Py_LTO='false'
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; };
6463fi
6464else
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469if test "$Py_LTO" = 'true' ; then
6470 case $CC in
6471 *clang*)
Victor Stinner06fe77a2018-06-19 18:24:58 +02006472
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006474$as_echo_n "checking target system type... " >&6; }
6475if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006476 $as_echo_n "(cached) " >&6
6477else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006478 if test "x$target_alias" = x; then
6479 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006480else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006481 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6482 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6483fi
6484
6485fi
6486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6487$as_echo "$ac_cv_target" >&6; }
6488case $ac_cv_target in
6489*-*-*) ;;
6490*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6491esac
6492target=$ac_cv_target
6493ac_save_IFS=$IFS; IFS='-'
6494set x $ac_cv_target
6495shift
6496target_cpu=$1
6497target_vendor=$2
6498shift; shift
6499# Remember, the first character of IFS is used to create $*,
6500# except with old shells:
6501target_os=$*
6502IFS=$ac_save_IFS
6503case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6504
6505
6506# The aliases save the names the user supplied, while $host etc.
6507# will get canonicalized.
6508test -n "$target_alias" &&
6509 test "$program_prefix$program_suffix$program_transform_name" = \
6510 NONENONEs,x,x, &&
6511 program_prefix=${target_alias}-
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006512# Extract the first word of "$target_alias-llvm-ar", so it can be a program name with args.
6513set dummy $target_alias-llvm-ar; ac_word=$2
6514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6515$as_echo_n "checking for $ac_word... " >&6; }
6516if ${ac_cv_path_LLVM_AR+:} false; then :
6517 $as_echo_n "(cached) " >&6
6518else
6519 case $LLVM_AR in
6520 [\\/]* | ?:[\\/]*)
6521 ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path.
6522 ;;
6523 *)
6524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6525for as_dir in ${llvm_path}
6526do
6527 IFS=$as_save_IFS
6528 test -z "$as_dir" && as_dir=.
6529 for ac_exec_ext in '' $ac_executable_extensions; do
6530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6531 ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6533 break 2
6534 fi
6535done
6536 done
6537IFS=$as_save_IFS
6538
6539 ;;
6540esac
6541fi
6542LLVM_AR=$ac_cv_path_LLVM_AR
6543if test -n "$LLVM_AR"; then
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5
6545$as_echo "$LLVM_AR" >&6; }
6546else
6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6548$as_echo "no" >&6; }
6549fi
6550
6551
6552if test -z "$ac_cv_path_LLVM_AR"; then
6553 if test "$build" = "$target"; then
6554 ac_pt_LLVM_AR=$LLVM_AR
6555 # Extract the first word of "llvm-ar", so it can be a program name with args.
6556set dummy llvm-ar; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then :
6560 $as_echo_n "(cached) " >&6
6561else
6562 case $ac_pt_LLVM_AR in
6563 [\\/]* | ?:[\\/]*)
6564 ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path.
6565 ;;
6566 *)
6567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in ${llvm_path}
6569do
6570 IFS=$as_save_IFS
6571 test -z "$as_dir" && as_dir=.
6572 for ac_exec_ext in '' $ac_executable_extensions; do
6573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574 ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext"
6575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576 break 2
6577 fi
6578done
6579 done
6580IFS=$as_save_IFS
6581
6582 test -z "$ac_cv_path_ac_pt_LLVM_AR" && ac_cv_path_ac_pt_LLVM_AR="''"
6583 ;;
6584esac
6585fi
6586ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR
6587if test -n "$ac_pt_LLVM_AR"; then
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5
6589$as_echo "$ac_pt_LLVM_AR" >&6; }
6590else
6591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595 LLVM_AR=$ac_pt_LLVM_AR
6596 else
6597 LLVM_AR="''"
6598 fi
6599else
6600 LLVM_AR="$ac_cv_path_LLVM_AR"
6601fi
6602
6603
6604 if test -n "${LLVM_AR}" -a -x "${LLVM_AR}"
6605 then
6606 LLVM_AR_FOUND="found"
6607 else
6608 LLVM_AR_FOUND="not-found"
6609 fi
6610 if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found"
6611 then
6612 found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null`
6613 if test -n "${found_llvm_ar}"
6614 then
6615 LLVM_AR='/usr/bin/xcrun llvm-ar'
6616 LLVM_AR_FOUND=found
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5
6618$as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;}
6619 fi
6620 fi
6621 if test $LLVM_AR_FOUND = not-found
6622 then
6623 LLVM_PROFR_ERR=yes
6624 as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5
6625 else
6626 LLVM_AR_ERR=no
6627 fi
6628 AR="${LLVM_AR}"
6629 case $ac_sys_system in
6630 Darwin*)
6631 # Any changes made here should be reflected in the GCC+Darwin case below
6632 LTOFLAGS="-flto -Wl,-export_dynamic"
6633 ;;
6634 *)
6635 LTOFLAGS="-flto"
6636 ;;
6637 esac
6638 ;;
6639 *gcc*)
6640 case $ac_sys_system in
6641 Darwin*)
6642 LTOFLAGS="-flto -Wl,-export_dynamic"
6643 ;;
6644 *)
6645 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6646 ;;
6647 esac
6648 ;;
6649 esac
6650
6651 if test "$ac_cv_prog_cc_g" = "yes"
6652 then
6653 # bpo-30345: Add -g to LDFLAGS when compiling with LTO
6654 # to get debug symbols.
6655 LTOFLAGS="$LTOFLAGS -g"
6656 fi
6657
stratakisf92c7aa2018-12-04 15:54:01 +01006658 CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS"
stratakiscf10a752018-12-19 18:19:01 +01006659 LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS"
serge-sans-paille5ad36f92018-10-25 01:54:22 +02006660fi
6661
6662# Enable PGO flags.
6663
6664
6665
6666
6667
6668
Gregory P. Smith799520c2016-09-07 16:10:00 -07006669# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6670set dummy $target_alias-llvm-profdata; ac_word=$2
6671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6672$as_echo_n "checking for $ac_word... " >&6; }
6673if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6674 $as_echo_n "(cached) " >&6
6675else
6676 case $LLVM_PROFDATA in
6677 [\\/]* | ?:[\\/]*)
6678 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6679 ;;
6680 *)
6681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6682for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006683do
6684 IFS=$as_save_IFS
6685 test -z "$as_dir" && as_dir=.
6686 for ac_exec_ext in '' $ac_executable_extensions; do
6687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006688 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6690 break 2
6691 fi
6692done
6693 done
6694IFS=$as_save_IFS
6695
Gregory P. Smith799520c2016-09-07 16:10:00 -07006696 ;;
6697esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006698fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006699LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6700if test -n "$LLVM_PROFDATA"; then
6701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6702$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006703else
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6705$as_echo "no" >&6; }
6706fi
6707
6708
Gregory P. Smith799520c2016-09-07 16:10:00 -07006709if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6710 if test "$build" = "$target"; then
6711 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6712 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6713set dummy llvm-profdata; ac_word=$2
6714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6715$as_echo_n "checking for $ac_word... " >&6; }
6716if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718else
6719 case $ac_pt_LLVM_PROFDATA in
6720 [\\/]* | ?:[\\/]*)
6721 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6722 ;;
6723 *)
6724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6725for as_dir in ${llvm_path}
6726do
6727 IFS=$as_save_IFS
6728 test -z "$as_dir" && as_dir=.
6729 for ac_exec_ext in '' $ac_executable_extensions; do
6730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6731 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6733 break 2
6734 fi
6735done
6736 done
6737IFS=$as_save_IFS
6738
6739 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6740 ;;
6741esac
6742fi
6743ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6744if test -n "$ac_pt_LLVM_PROFDATA"; then
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6746$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6747else
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751
6752 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6753 else
6754 LLVM_PROFDATA="''"
6755 fi
6756else
6757 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6758fi
6759
6760
6761if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6762then
6763 LLVM_PROF_FOUND="found"
6764else
6765 LLVM_PROF_FOUND="not-found"
6766fi
6767if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6768then
6769 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6770 if test -n "${found_llvm_profdata}"
6771 then
6772 # llvm-profdata isn't directly in $PATH in some cases.
6773 # https://apple.stackexchange.com/questions/197053/
6774 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6775 LLVM_PROF_FOUND=found
6776 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6777$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6778 fi
6779fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006780LLVM_PROF_ERR=no
6781case $CC in
6782 *clang*)
6783 # Any changes made here should be reflected in the GCC+Darwin case below
6784 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6785 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006786 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006787 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6788 if test $LLVM_PROF_FOUND = not-found
6789 then
6790 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006791 if test "${REQUIRE_PGO}" = "yes"
6792 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006793 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 -07006794 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006795 fi
6796 ;;
6797 *gcc*)
6798 case $ac_sys_system in
6799 Darwin*)
6800 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6801 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006802 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006803 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006804 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006805 then
6806 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006807 if test "${REQUIRE_PGO}" = "yes"
6808 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006809 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 -07006810 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006811 fi
6812 ;;
6813 *)
6814 PGO_PROF_GEN_FLAG="-fprofile-generate"
6815 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6816 LLVM_PROF_MERGER="true"
6817 LLVM_PROF_FILE=""
6818 ;;
6819 esac
6820 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006821 *icc*)
6822 PGO_PROF_GEN_FLAG="-prof-gen"
6823 PGO_PROF_USE_FLAG="-prof-use"
6824 LLVM_PROF_MERGER="true"
6825 LLVM_PROF_FILE=""
6826 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006827esac
6828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6830# merged with this chunk of code?
6831
6832# Optimizer/debugger flags
6833# ------------------------
6834# (The following bit of code is complicated enough - please keep things
6835# indented properly. Just pretend you're editing Python code. ;-)
6836
6837# There are two parallel sets of case statements below, one that checks to
6838# see if OPT was set and one that does BASECFLAGS setting based upon
6839# compiler and platform. BASECFLAGS tweaks need to be made even if the
6840# user set OPT.
6841
Victor Stinner23a683a2019-04-12 21:27:37 +02006842case $CC in
6843 *clang*)
6844 cc_is_clang=1
6845 ;;
6846 *)
6847 if $CC --version 2>&1 | grep -q clang
6848 then
6849 cc_is_clang=1
6850 else
6851 cc_is_clang=
6852 fi
6853esac
6854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006855# tweak OPT based on compiler and platform, only if the user didn't set
6856# it on the command line
6857
Victor Stinner9ed34a82017-05-02 22:35:58 +02006858
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006859if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860then
6861 case $GCC in
6862 yes)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6864 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6865 WRAP="-fwrapv"
6866 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006867
Victor Stinner35f3d242017-04-21 12:35:24 +02006868 if test -n "${cc_is_clang}"
6869 then
6870 # Clang also needs -fwrapv
6871 WRAP="-fwrapv"
Victor Stinner9ed34a82017-05-02 22:35:58 +02006872 # bpo-30104: disable strict aliasing to compile correctly dtoa.c,
6873 # see Makefile.pre.in for more information
Victor Stinner826f83f2017-04-28 15:07:10 +02006874 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006875 fi
6876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 case $ac_cv_prog_cc_g in
6878 yes)
6879 if test "$Py_DEBUG" = 'true' ; then
6880 # Optimization messes up debuggers, so turn it off for
6881 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006882 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006883 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006884 else
Victor Stinner28205b22017-04-21 11:24:34 +02006885 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006886 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887 else
Victor Stinner28205b22017-04-21 11:24:34 +02006888 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889 fi
6890 ;;
6891 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006892 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006893 ;;
6894 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006895
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006896 case $ac_sys_system in
6897 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6898 ;;
6899 esac
6900 ;;
6901
6902 *)
6903 OPT="-O"
6904 ;;
6905 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006906fi
6907
6908
6909
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006910
stratakiscf10a752018-12-19 18:19:01 +01006911
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006912# The -arch flags for universal builds on OSX
6913UNIVERSAL_ARCH_FLAGS=
6914
6915
6916# tweak BASECFLAGS based on compiler and platform
6917case $GCC in
6918yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006919 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006920
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6922$as_echo_n "checking for -Wextra... " >&6; }
6923 ac_save_cc="$CC"
6924 CC="$CC -Wextra -Werror"
6925 if ${ac_cv_extra_warnings+:} false; then :
6926 $as_echo_n "(cached) " >&6
6927else
6928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6929/* end confdefs.h. */
6930
6931
6932int
6933main ()
6934{
6935
6936 ;
6937 return 0;
6938}
6939
6940_ACEOF
6941if ac_fn_c_try_compile "$LINENO"; then :
6942
6943 ac_cv_extra_warnings=yes
6944
6945else
6946
6947 ac_cv_extra_warnings=no
6948
6949fi
6950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6951fi
6952
6953 CC="$ac_save_cc"
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6955$as_echo "$ac_cv_extra_warnings" >&6; }
6956
6957 if test $ac_cv_extra_warnings = yes
6958 then
6959 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6960 fi
6961
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006962 # Python doesn't violate C99 aliasing rules, but older versions of
6963 # GCC produce warnings for legal Python code. Enable
6964 # -fno-strict-aliasing on versions of GCC that support but produce
6965 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6967$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968 ac_save_cc="$CC"
6969 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006970 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006971 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006972 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006973else
Matthias Kloseb9621712010-04-24 17:59:49 +00006974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006975/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006976
Matthias Kloseb159a552010-04-25 21:00:44 +00006977
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006978int
6979main ()
6980{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006981
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006982 ;
6983 return 0;
6984}
Matthias Kloseb159a552010-04-25 21:00:44 +00006985
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006987if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006988
6989 CC="$ac_save_cc -fstrict-aliasing"
6990 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006992/* end confdefs.h. */
6993
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006994 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006995int
6996main ()
6997{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006998double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006999 ;
7000 return 0;
7001}
Matthias Kloseb159a552010-04-25 21:00:44 +00007002
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007004if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00007005
7006 ac_cv_no_strict_aliasing=no
7007
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008else
Matthias Kloseb159a552010-04-25 21:00:44 +00007009
7010 ac_cv_no_strict_aliasing=yes
7011
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007012fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00007014
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007015else
Matthias Kloseb159a552010-04-25 21:00:44 +00007016
7017 ac_cv_no_strict_aliasing=no
7018
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007019fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00007020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00007021fi
7022
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007023 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007024 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00007025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
7026$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00007027 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007028 then
7029 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
7030 fi
7031
Zachary Ware5af85642015-12-21 12:09:17 -06007032 # ICC doesn't recognize the option, but only emits a warning
7033 ## XXX does it emit an unused result warning and can it be disabled?
7034 case "$CC" in
7035 *icc*)
7036 ac_cv_disable_unused_result_warning=no
7037 ;;
7038 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7040$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7041 ac_save_cc="$CC"
7042 CC="$CC -Wunused-result -Werror"
7043 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007044 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007045 $as_echo_n "(cached) " >&6
7046else
7047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7048/* end confdefs.h. */
7049
7050
7051int
7052main ()
7053{
7054
7055 ;
7056 return 0;
7057}
7058
7059_ACEOF
7060if ac_fn_c_try_compile "$LINENO"; then :
7061
7062 ac_cv_disable_unused_result_warning=yes
7063
7064else
7065
7066 ac_cv_disable_unused_result_warning=no
7067
7068fi
7069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7070fi
7071
7072 CFLAGS="$save_CFLAGS"
7073 CC="$ac_save_cc"
7074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7075$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007076 ;;
7077 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007078
7079 if test $ac_cv_disable_unused_result_warning = yes
7080 then
7081 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007082 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7083 fi
7084
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7086$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7087 ac_save_cc="$CC"
7088 CC="$CC -Wunused-parameter -Werror"
7089 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7090 $as_echo_n "(cached) " >&6
7091else
7092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7093/* end confdefs.h. */
7094
7095
7096int
7097main ()
7098{
7099
7100 ;
7101 return 0;
7102}
7103
7104_ACEOF
7105if ac_fn_c_try_compile "$LINENO"; then :
7106
7107 ac_cv_disable_unused_parameter_warning=yes
7108
7109else
7110
7111 ac_cv_disable_unused_parameter_warning=no
7112
7113fi
7114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7115fi
7116
7117 CC="$ac_save_cc"
7118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7119$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7120
7121 if test $ac_cv_disable_unused_parameter_warning = yes
7122 then
7123 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7124 fi
7125
7126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7127$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7128 ac_save_cc="$CC"
7129 CC="$CC -Wmissing-field-initializers -Werror"
7130 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7131 $as_echo_n "(cached) " >&6
7132else
7133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7134/* end confdefs.h. */
7135
7136
7137int
7138main ()
7139{
7140
7141 ;
7142 return 0;
7143}
7144
7145_ACEOF
7146if ac_fn_c_try_compile "$LINENO"; then :
7147
7148 ac_cv_disable_missing_field_initializers=yes
7149
7150else
7151
7152 ac_cv_disable_missing_field_initializers=no
7153
7154fi
7155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7156fi
7157
7158 CC="$ac_save_cc"
7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7160$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7161
7162 if test $ac_cv_disable_missing_field_initializers = yes
7163 then
7164 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007165 fi
7166
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7168$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7169 ac_save_cc="$CC"
7170 CC="$CC -Wsign-compare"
7171 save_CFLAGS="$CFLAGS"
7172 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7173 $as_echo_n "(cached) " >&6
7174else
7175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7176/* end confdefs.h. */
7177
7178
7179int
7180main ()
7181{
7182
7183 ;
7184 return 0;
7185}
7186
7187_ACEOF
7188if ac_fn_c_try_compile "$LINENO"; then :
7189
7190 ac_cv_enable_sign_compare_warning=yes
7191
7192else
7193
7194 ac_cv_enable_sign_compare_warning=no
7195
7196fi
7197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7198fi
7199
7200 CFLAGS="$save_CFLAGS"
7201 CC="$ac_save_cc"
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7203$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7204
7205 if test $ac_cv_enable_sign_compare_warning = yes
7206 then
7207 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7208 fi
7209
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7211$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7212 ac_save_cc="$CC"
7213 CC="$CC -Wunreachable-code"
7214 save_CFLAGS="$CFLAGS"
7215 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7216 $as_echo_n "(cached) " >&6
7217else
7218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7219/* end confdefs.h. */
7220
7221
7222int
7223main ()
7224{
7225
7226 ;
7227 return 0;
7228}
7229
7230_ACEOF
7231if ac_fn_c_try_compile "$LINENO"; then :
7232
7233 ac_cv_enable_unreachable_code_warning=yes
7234
7235else
7236
7237 ac_cv_enable_unreachable_code_warning=no
7238
7239fi
7240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7241fi
7242
7243 CFLAGS="$save_CFLAGS"
7244 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007245
7246 # Don't enable unreachable code warning in debug mode, since it usually
7247 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007248 # Issue #24324: Unfortunately, the unreachable code warning does not work
7249 # correctly on gcc and has been silently removed from the compiler.
7250 # It is supported on clang but on OS X systems gcc may be an alias
7251 # for clang. Try to determine if the compiler is not really gcc and,
7252 # if so, only then enable the warning.
7253 if test $ac_cv_enable_unreachable_code_warning = yes && \
7254 test "$Py_DEBUG" != "true" && \
7255 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007256 then
7257 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007258 else
7259 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007260 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7262$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007263
INADA Naokie3364842018-06-05 20:40:53 +09007264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5
7265$as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; }
7266 ac_save_cc="$CC"
7267 CC="$CC -Werror -Wstrict-prototypes"
7268 if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then :
7269 $as_echo_n "(cached) " >&6
7270else
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272/* end confdefs.h. */
7273
7274
7275int
7276main ()
7277{
7278
7279 ;
7280 return 0;
7281}
7282
7283_ACEOF
7284if ac_fn_c_try_compile "$LINENO"; then :
7285
7286 ac_cv_enable_strict_prototypes_warning=yes
7287
7288else
7289
7290 ac_cv_enable_strict_prototypes_warning=no
7291
7292fi
7293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7294fi
7295
7296 CC="$ac_save_cc"
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5
7298$as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; }
7299
7300 if test $ac_cv_enable_strict_prototypes_warning = yes
7301 then
7302 CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes"
7303 fi
7304
Victor Stinner193ee0a2017-02-06 14:24:00 +01007305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7306$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7307 ac_save_cc="$CC"
7308 CC="$CC -Werror=implicit-function-declaration"
7309 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7310 $as_echo_n "(cached) " >&6
7311else
7312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7313/* end confdefs.h. */
7314
7315
7316int
7317main ()
7318{
7319
7320 ;
7321 return 0;
7322}
7323
7324_ACEOF
7325if ac_fn_c_try_compile "$LINENO"; then :
7326
7327 ac_cv_enable_implicit_function_declaration_error=yes
7328
7329else
7330
7331 ac_cv_enable_implicit_function_declaration_error=no
7332
7333fi
7334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7335fi
7336
7337 CC="$ac_save_cc"
7338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7339$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7340
7341 if test $ac_cv_enable_implicit_function_declaration_error = yes
7342 then
7343 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7344 fi
7345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7347 # support. Without this, treatment of subnormals doesn't follow
7348 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007349 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007350 alpha*)
7351 BASECFLAGS="$BASECFLAGS -mieee"
7352 ;;
7353 esac
7354
7355 case $ac_sys_system in
7356 SCO_SV*)
7357 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7358 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007359
Ned Deily87adb6e2013-10-18 21:09:56 -07007360 Darwin*)
7361 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7362 # used to be here, but non-Apple gcc doesn't accept them.
7363 if test "${CC}" = gcc
7364 then
7365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007366$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007367 case "${UNIVERSALSDK}" in
7368 */MacOSX10.4u.sdk)
7369 # Build using 10.4 SDK, force usage of gcc when the
7370 # compiler is gcc, otherwise the user will get very
7371 # confusing error messages when building on OSX 10.6
7372 CC=gcc-4.0
7373 CPP=cpp-4.0
7374 ;;
7375 esac
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007377$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007378 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007379
Ned Deily87adb6e2013-10-18 21:09:56 -07007380 if test "${enable_universalsdk}"
7381 then
7382 case "$UNIVERSAL_ARCHS" in
7383 32-bit)
7384 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7385 LIPO_32BIT_FLAGS=""
7386 ARCH_RUN_32BIT=""
7387 ;;
7388 64-bit)
7389 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7390 LIPO_32BIT_FLAGS=""
7391 ARCH_RUN_32BIT="true"
7392 ;;
7393 all)
7394 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7395 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7396 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7397 ;;
7398 intel)
7399 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7400 LIPO_32BIT_FLAGS="-extract i386"
7401 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7402 ;;
7403 intel-32)
7404 UNIVERSAL_ARCH_FLAGS="-arch i386"
7405 LIPO_32BIT_FLAGS=""
7406 ARCH_RUN_32BIT=""
7407 ;;
Ned Deily8c9bb722018-01-30 07:42:14 -05007408 intel-64)
7409 UNIVERSAL_ARCH_FLAGS="-arch x86_64"
7410 LIPO_32BIT_FLAGS=""
7411 ARCH_RUN_32BIT="true"
7412 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007413 3-way)
7414 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7415 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7416 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7417 ;;
7418 *)
7419 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7420 ;;
7421 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422
Ned Deily87adb6e2013-10-18 21:09:56 -07007423 if test "${UNIVERSALSDK}" != "/"
7424 then
Ned Deily8c9bb722018-01-30 07:42:14 -05007425 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7426 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007427 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Ned Deily8c9bb722018-01-30 07:42:14 -05007428 else
7429 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
7430 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}"
Ned Deily87adb6e2013-10-18 21:09:56 -07007431 fi
7432 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433
Ned Deily87adb6e2013-10-18 21:09:56 -07007434 # Calculate an appropriate deployment target for this build:
7435 # The deployment target value is used explicitly to enable certain
7436 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007437 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007438 # component of the string returned by distutils.get_platform().
7439 #
7440 # Use the value from:
7441 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7442 # 2. the operating system version of the build machine if >= 10.6
7443 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7444 # below to pick either 10.3, 10.4, or 10.5 as the target.
7445 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446
Ned Deily87adb6e2013-10-18 21:09:56 -07007447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7448$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007449 cur_target_major=`sw_vers -productVersion | \
7450 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7451 cur_target_minor=`sw_vers -productVersion | \
7452 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7453 cur_target="${cur_target_major}.${cur_target_minor}"
7454 if test ${cur_target_major} -eq 10 && \
7455 test ${cur_target_minor} -ge 3 && \
7456 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007457 then
Ned Deily36820b62014-06-25 13:44:22 -07007458 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007459 cur_target=10.3
7460 if test ${enable_universalsdk}
7461 then
7462 case "$UNIVERSAL_ARCHS" in
7463 all|3-way|intel|64-bit)
7464 # These configurations were first supported in 10.5
7465 cur_target='10.5'
7466 ;;
7467 esac
7468 else
7469 if test `/usr/bin/arch` = "i386"
7470 then
7471 # 10.4 was the first release to support Intel archs
7472 cur_target="10.4"
7473 fi
7474 fi
7475 fi
7476 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007477
Ned Deily87adb6e2013-10-18 21:09:56 -07007478 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7479 # environment with a value that is the same as what we'll use
7480 # in the Makefile to ensure that we'll get the same compiler
7481 # environment during configure and build time.
7482 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7483 export MACOSX_DEPLOYMENT_TARGET
7484 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7486$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007487
Ned Deily87adb6e2013-10-18 21:09:56 -07007488 # end of Darwin* tests
7489 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007490 esac
7491 ;;
7492
7493*)
7494 case $ac_sys_system in
7495 OpenUNIX*|UnixWare*)
7496 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7497 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 SCO_SV*)
7499 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7500 ;;
7501 esac
7502 ;;
7503esac
7504
Zachary Ware5af85642015-12-21 12:09:17 -06007505# ICC needs -fp-model strict or floats behave badly
7506case "$CC" in
7507*icc*)
7508 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7509 ;;
7510esac
7511
T. Woutersddbfa2c2017-05-23 01:30:49 +02007512if test "$assertions" = 'true'; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513 :
7514else
7515 OPT="-DNDEBUG $OPT"
7516fi
7517
7518if test "$ac_arch_flags"
7519then
7520 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7521fi
7522
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007523# On some compilers, pthreads are available without further options
7524# (e.g. MacOS X). On some of these systems, the compiler will not
7525# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7526# So we have to see first whether pthreads are available without
7527# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7529$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007530if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007531 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007532else
Matthias Kloseb9621712010-04-24 17:59:49 +00007533 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007534 ac_cv_pthread_is_default=no
7535else
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007537/* end confdefs.h. */
7538
Stefan Krah7dba5942012-11-22 22:49:11 +01007539#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007540#include <pthread.h>
7541
7542void* routine(void* p){return NULL;}
7543
7544int main(){
7545 pthread_t p;
7546 if(pthread_create(&p,NULL,routine,NULL)!=0)
7547 return 1;
7548 (void)pthread_detach(p);
7549 return 0;
7550}
7551
7552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007553if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007554
7555 ac_cv_pthread_is_default=yes
7556 ac_cv_kthread=no
7557 ac_cv_pthread=no
7558
7559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007564fi
7565
7566
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007567fi
7568
Matthias Kloseb9621712010-04-24 17:59:49 +00007569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7570$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007571
7572
7573if test $ac_cv_pthread_is_default = yes
7574then
7575 ac_cv_kpthread=no
7576else
7577# -Kpthread, if available, provides the right #defines
7578# and linker options to make pthread_create available
7579# Some compilers won't report that they do not support -Kpthread,
7580# so we need to run a program to see whether it really made the
7581# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7583$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007584if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007585 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007586else
7587 ac_save_cc="$CC"
7588CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007589if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007590 ac_cv_kpthread=no
7591else
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007593/* end confdefs.h. */
7594
Stefan Krah7dba5942012-11-22 22:49:11 +01007595#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007596#include <pthread.h>
7597
7598void* routine(void* p){return NULL;}
7599
7600int main(){
7601 pthread_t p;
7602 if(pthread_create(&p,NULL,routine,NULL)!=0)
7603 return 1;
7604 (void)pthread_detach(p);
7605 return 0;
7606}
7607
7608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007609if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007610 ac_cv_kpthread=yes
7611else
Matthias Kloseb9621712010-04-24 17:59:49 +00007612 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7615 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007616fi
7617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007618CC="$ac_save_cc"
7619fi
7620
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7622$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007623fi
7624
7625if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7626then
7627# -Kthread, if available, provides the right #defines
7628# and linker options to make pthread_create available
7629# Some compilers won't report that they do not support -Kthread,
7630# so we need to run a program to see whether it really made the
7631# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7633$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007634if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007636else
7637 ac_save_cc="$CC"
7638CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007639if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007640 ac_cv_kthread=no
7641else
Matthias Kloseb9621712010-04-24 17:59:49 +00007642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007643/* end confdefs.h. */
7644
Stefan Krah7dba5942012-11-22 22:49:11 +01007645#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007646#include <pthread.h>
7647
7648void* routine(void* p){return NULL;}
7649
7650int main(){
7651 pthread_t p;
7652 if(pthread_create(&p,NULL,routine,NULL)!=0)
7653 return 1;
7654 (void)pthread_detach(p);
7655 return 0;
7656}
7657
7658_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007659if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 ac_cv_kthread=yes
7661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666fi
7667
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007668CC="$ac_save_cc"
7669fi
7670
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7672$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007673fi
7674
7675if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7676then
7677# -pthread, if available, provides the right #defines
7678# and linker options to make pthread_create available
7679# Some compilers won't report that they do not support -pthread,
7680# so we need to run a program to see whether it really made the
7681# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7683$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007684if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686else
7687 ac_save_cc="$CC"
7688CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007689if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007690 ac_cv_pthread=no
7691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007693/* end confdefs.h. */
7694
Stefan Krah7dba5942012-11-22 22:49:11 +01007695#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007696#include <pthread.h>
7697
7698void* routine(void* p){return NULL;}
7699
7700int main(){
7701 pthread_t p;
7702 if(pthread_create(&p,NULL,routine,NULL)!=0)
7703 return 1;
7704 (void)pthread_detach(p);
7705 return 0;
7706}
7707
7708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007709if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710 ac_cv_pthread=yes
7711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007716fi
7717
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007718CC="$ac_save_cc"
7719fi
7720
Matthias Kloseb9621712010-04-24 17:59:49 +00007721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7722$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007723fi
7724
7725# If we have set a CC compiler flag for thread support then
7726# check if it works for CXX, too.
7727ac_cv_cxx_thread=no
7728if test ! -z "$CXX"
7729then
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7731$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007732ac_save_cxx="$CXX"
7733
7734if test "$ac_cv_kpthread" = "yes"
7735then
7736 CXX="$CXX -Kpthread"
7737 ac_cv_cxx_thread=yes
7738elif test "$ac_cv_kthread" = "yes"
7739then
7740 CXX="$CXX -Kthread"
7741 ac_cv_cxx_thread=yes
7742elif test "$ac_cv_pthread" = "yes"
7743then
7744 CXX="$CXX -pthread"
7745 ac_cv_cxx_thread=yes
7746fi
7747
7748if test $ac_cv_cxx_thread = yes
7749then
7750 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7751 $CXX -c conftest.$ac_ext 2>&5
7752 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7753 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7754 then
7755 ac_cv_cxx_thread=yes
7756 else
7757 ac_cv_cxx_thread=no
7758 fi
7759 rm -fr conftest*
7760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7762$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007763fi
7764CXX="$ac_save_cxx"
7765
7766
7767# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7769$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007770if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007771 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007772else
Matthias Kloseb9621712010-04-24 17:59:49 +00007773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007774/* end confdefs.h. */
7775#include <stdlib.h>
7776#include <stdarg.h>
7777#include <string.h>
7778#include <float.h>
7779
7780int
7781main ()
7782{
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007788if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789 ac_cv_header_stdc=yes
7790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007792fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7794
7795if test $ac_cv_header_stdc = yes; then
7796 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007798/* end confdefs.h. */
7799#include <string.h>
7800
7801_ACEOF
7802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007803 $EGREP "memchr" >/dev/null 2>&1; then :
7804
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007805else
7806 ac_cv_header_stdc=no
7807fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007808rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007809
7810fi
7811
7812if test $ac_cv_header_stdc = yes; then
7813 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007815/* end confdefs.h. */
7816#include <stdlib.h>
7817
7818_ACEOF
7819if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $EGREP "free" >/dev/null 2>&1; then :
7821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007822else
7823 ac_cv_header_stdc=no
7824fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007825rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007826
7827fi
7828
7829if test $ac_cv_header_stdc = yes; then
7830 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007831 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007832 :
7833else
Matthias Kloseb9621712010-04-24 17:59:49 +00007834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007835/* end confdefs.h. */
7836#include <ctype.h>
7837#include <stdlib.h>
7838#if ((' ' & 0x0FF) == 0x020)
7839# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7840# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7841#else
7842# define ISLOWER(c) \
7843 (('a' <= (c) && (c) <= 'i') \
7844 || ('j' <= (c) && (c) <= 'r') \
7845 || ('s' <= (c) && (c) <= 'z'))
7846# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7847#endif
7848
7849#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7850int
7851main ()
7852{
7853 int i;
7854 for (i = 0; i < 256; i++)
7855 if (XOR (islower (i), ISLOWER (i))
7856 || toupper (i) != TOUPPER (i))
7857 return 2;
7858 return 0;
7859}
7860_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007861if ac_fn_c_try_run "$LINENO"; then :
7862
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007863else
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007865fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7867 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007868fi
7869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007870fi
7871fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7873$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007874if test $ac_cv_header_stdc = yes; then
7875
Matthias Kloseb9621712010-04-24 17:59:49 +00007876$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007877
7878fi
7879
stratakise768c862018-01-23 16:11:24 +01007880for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007881fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007882ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007883sched.h shadow.h signal.h stropts.h termios.h \
Benjamin Petersonea137402018-09-13 21:57:31 -07007884utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007885poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007886sys/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 +01007887sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007888sys/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 +01007889sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007890sys/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 -07007891libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007892linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes75b96182017-09-05 15:53:09 +02007893sys/endian.h sys/sysmacros.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007894do :
7895 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7896ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007897if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007898 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007899#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007900_ACEOF
7901
7902fi
7903
Guido van Rossum627b2d71993-12-24 10:39:16 +00007904done
7905
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007907for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007908 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7910$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007911if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007913else
Matthias Kloseb9621712010-04-24 17:59:49 +00007914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007915/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007916#include <sys/types.h>
7917#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919int
7920main ()
7921{
7922if ((DIR *) 0)
7923return 0;
7924 ;
7925 return 0;
7926}
7927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007928if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007929 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007930else
Matthias Kloseb9621712010-04-24 17:59:49 +00007931 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007935eval ac_res=\$$as_ac_Header
7936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7937$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007938if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007939 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007940#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007941_ACEOF
7942
7943ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007944fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007946done
7947# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7948if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7950$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007951if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007952 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007953else
Martin v. Löwis11437992002-04-12 09:54:03 +00007954 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007957
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007958/* Override any GCC internal prototype to avoid an error.
7959 Use char because int might match the return type of a GCC
7960 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007961#ifdef __cplusplus
7962extern "C"
7963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007964char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
7967{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007969 ;
7970 return 0;
7971}
7972_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007973for ac_lib in '' dir; do
7974 if test -z "$ac_lib"; then
7975 ac_res="none required"
7976 else
7977 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007978 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007979 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007980 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007981 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007983rm -f core conftest.err conftest.$ac_objext \
7984 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007985 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007986 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007987fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988done
Victor Stinnere0be4232011-10-25 13:06:09 +02007989if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991else
7992 ac_cv_search_opendir=no
7993fi
7994rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007995LIBS=$ac_func_search_save_LIBS
7996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7998$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007999ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008000if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00008002
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008004
Michael W. Hudson54241132001-12-07 15:38:26 +00008005else
Matthias Kloseb9621712010-04-24 17:59:49 +00008006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
8007$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008008if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008009 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008010else
8011 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008014
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015/* Override any GCC internal prototype to avoid an error.
8016 Use char because int might match the return type of a GCC
8017 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008018#ifdef __cplusplus
8019extern "C"
8020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008021char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008022int
8023main ()
8024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008026 ;
8027 return 0;
8028}
8029_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008030for ac_lib in '' x; do
8031 if test -z "$ac_lib"; then
8032 ac_res="none required"
8033 else
8034 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008035 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008036 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008037 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008038 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008039fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008040rm -f core conftest.err conftest.$ac_objext \
8041 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008042 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045done
Victor Stinnere0be4232011-10-25 13:06:09 +02008046if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008048else
8049 ac_cv_search_opendir=no
8050fi
8051rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008052LIBS=$ac_func_search_save_LIBS
8053fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008054{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
8055$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008056ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00008057if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008058 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00008059
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008060fi
8061
8062fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00008063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
8065$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008070/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008071#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008072int
8073main ()
8074{
8075return makedev(0, 0);
8076 ;
8077 return 0;
8078}
8079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008080if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008081 ac_cv_header_sys_types_h_makedev=yes
8082else
Matthias Kloseb9621712010-04-24 17:59:49 +00008083 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008084fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008085rm -f core conftest.err conftest.$ac_objext \
8086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008087
8088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8090$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008091
8092if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008093ac_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 +02008094if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008097
8098fi
8099
8100
8101
8102 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008103 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 +02008104if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008105
Matthias Kloseb9621712010-04-24 17:59:49 +00008106$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008107
8108fi
8109
8110
8111 fi
8112fi
8113
Michael W. Hudson54241132001-12-07 15:38:26 +00008114
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008115# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8116# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8117SAVE_CFLAGS=$CFLAGS
8118CFLAGS="-std=c99 $CFLAGS"
8119for ac_header in bluetooth/bluetooth.h
8120do :
8121 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8122if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8123 cat >>confdefs.h <<_ACEOF
8124#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8125_ACEOF
8126
8127fi
8128
8129done
8130
8131CFLAGS=$SAVE_CFLAGS
8132
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008133# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8134for ac_header in net/if.h
8135do :
8136 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8137#ifdef STDC_HEADERS
8138# include <stdlib.h>
8139# include <stddef.h>
8140#else
8141# ifdef HAVE_STDLIB_H
8142# include <stdlib.h>
8143# endif
8144#endif
8145#ifdef HAVE_SYS_SOCKET_H
8146# include <sys/socket.h>
8147#endif
8148
8149"
Victor Stinnere0be4232011-10-25 13:06:09 +02008150if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008151 cat >>confdefs.h <<_ACEOF
8152#define HAVE_NET_IF_H 1
8153_ACEOF
8154
8155fi
8156
8157done
8158
8159
Martin v. Löwis11017b12006-01-14 18:12:57 +00008160# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008161for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008162do :
8163 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 +00008164#ifdef HAVE_ASM_TYPES_H
8165#include <asm/types.h>
8166#endif
8167#ifdef HAVE_SYS_SOCKET_H
8168#include <sys/socket.h>
8169#endif
8170
Matthias Kloseb9621712010-04-24 17:59:49 +00008171"
Victor Stinnere0be4232011-10-25 13:06:09 +02008172if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008173 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008174#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008175_ACEOF
8176
8177fi
8178
8179done
8180
8181
Bjorn Anderssonbb816512018-09-26 06:47:52 -07008182# On Linux, qrtr.h requires asm/types.h
8183for ac_header in linux/qrtr.h
8184do :
8185 ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" "
8186#ifdef HAVE_ASM_TYPES_H
8187#include <asm/types.h>
8188#endif
8189#ifdef HAVE_SYS_SOCKET_H
8190#include <sys/socket.h>
8191#endif
8192
8193"
8194if test "x$ac_cv_header_linux_qrtr_h" = xyes; then :
8195 cat >>confdefs.h <<_ACEOF
8196#define HAVE_LINUX_QRTR_H 1
8197_ACEOF
8198
8199fi
8200
8201done
8202
8203
caaveryeffc12f2017-09-06 18:18:10 -04008204for ac_header in linux/vm_sockets.h
8205do :
8206 ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" "
8207#ifdef HAVE_SYS_SOCKET_H
8208#include <sys/socket.h>
8209#endif
8210
8211"
8212if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then :
8213 cat >>confdefs.h <<_ACEOF
8214#define HAVE_LINUX_VM_SOCKETS_H 1
8215_ACEOF
8216
8217fi
8218
8219done
8220
8221
Charles-François Natali47413c12011-10-06 19:47:44 +02008222# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008223for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008224do :
8225 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8226ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8227#ifdef HAVE_SYS_SOCKET_H
8228#include <sys/socket.h>
8229#endif
8230
8231"
8232if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8233 cat >>confdefs.h <<_ACEOF
8234#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8235_ACEOF
8236
8237fi
8238
8239done
8240
8241
Guido van Rossum627b2d71993-12-24 10:39:16 +00008242# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008243was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8245$as_echo_n "checking for clock_t in time.h... " >&6; }
8246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008247/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008248#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
8250_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008253 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008254else
Martin v. Löwis11437992002-04-12 09:54:03 +00008255
8256
Matthias Kloseb9621712010-04-24 17:59:49 +00008257$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008258
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008259
Guido van Rossum627b2d71993-12-24 10:39:16 +00008260fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008261rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008262
Matthias Kloseb9621712010-04-24 17:59:49 +00008263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8264$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008265
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8267$as_echo_n "checking for makedev... " >&6; }
8268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008269/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008270
Jesus Cea740f53a2010-04-28 11:35:30 +00008271#if defined(MAJOR_IN_MKDEV)
8272#include <sys/mkdev.h>
8273#elif defined(MAJOR_IN_SYSMACROS)
8274#include <sys/sysmacros.h>
8275#else
8276#include <sys/types.h>
8277#endif
8278
Neal Norwitz11690112002-07-30 01:08:28 +00008279int
8280main ()
8281{
Jesus Cea740f53a2010-04-28 11:35:30 +00008282
8283 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008284 ;
8285 return 0;
8286}
Matthias Kloseb159a552010-04-25 21:00:44 +00008287
Neal Norwitz11690112002-07-30 01:08:28 +00008288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008289if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008290 ac_cv_has_makedev=yes
8291else
Matthias Kloseb9621712010-04-24 17:59:49 +00008292 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008294rm -f core conftest.err conftest.$ac_objext \
8295 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8297$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008298if test "$ac_cv_has_makedev" = "yes"; then
8299
Matthias Kloseb9621712010-04-24 17:59:49 +00008300$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008301
8302fi
8303
Christian Heimes985ecdc2013-11-20 11:46:18 +01008304# byte swapping
8305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8306$as_echo_n "checking for le64toh... " >&6; }
8307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8308/* end confdefs.h. */
8309
8310#ifdef HAVE_ENDIAN_H
8311#include <endian.h>
8312#elif defined(HAVE_SYS_ENDIAN_H)
8313#include <sys/endian.h>
8314#endif
8315
8316int
8317main ()
8318{
8319
8320 le64toh(1)
8321 ;
8322 return 0;
8323}
8324
8325_ACEOF
8326if ac_fn_c_try_link "$LINENO"; then :
8327 ac_cv_has_le64toh=yes
8328else
8329 ac_cv_has_le64toh=no
8330fi
8331rm -f core conftest.err conftest.$ac_objext \
8332 conftest$ac_exeext conftest.$ac_ext
8333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8334$as_echo "$ac_cv_has_le64toh" >&6; }
8335if test "$ac_cv_has_le64toh" = "yes"; then
8336
8337$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8338
8339fi
8340
Martin v. Löwis399a6892002-10-04 10:22:02 +00008341use_lfs=yes
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008342# Don't use largefile support for GNU/Hurd
8343case $ac_sys_system in GNU*)
8344 use_lfs=no
8345esac
8346
Martin v. Löwis399a6892002-10-04 10:22:02 +00008347if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008348# Two defines needed to enable largefile support on various platforms
8349# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008350case $ac_sys_system/$ac_sys_release in
8351AIX*)
8352
8353$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8354
8355 ;;
8356esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008359
8360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008362
Martin v. Löwis399a6892002-10-04 10:22:02 +00008363fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008364
Guido van Rossum84e7b241996-08-19 21:59:00 +00008365# Add some code to confdefs.h so that the test for off_t works on SCO
8366cat >> confdefs.h <<\EOF
8367#if defined(SCO_DS)
8368#undef _OFF_T
8369#endif
8370EOF
8371
Guido van Rossumef2255b2000-03-10 22:30:29 +00008372# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008373ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008374if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008375
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008376else
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
8378cat >>confdefs.h <<_ACEOF
8379#define mode_t int
8380_ACEOF
8381
8382fi
8383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008385if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008386
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008387else
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
8389cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008391_ACEOF
8392
8393fi
8394
Matthias Kloseb9621712010-04-24 17:59:49 +00008395ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008396if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008397
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008398else
Martin v. Löwis11437992002-04-12 09:54:03 +00008399
8400cat >>confdefs.h <<_ACEOF
8401#define pid_t int
8402_ACEOF
8403
8404fi
8405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008408#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008410
Matthias Kloseb9621712010-04-24 17:59:49 +00008411ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008412if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008414else
Martin v. Löwis11437992002-04-12 09:54:03 +00008415
8416cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008418_ACEOF
8419
8420fi
8421
Matthias Kloseb9621712010-04-24 17:59:49 +00008422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8423$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008424if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008425 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008426else
Matthias Kloseb9621712010-04-24 17:59:49 +00008427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008428/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008429#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008430
8431_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008432if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008433 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008434 ac_cv_type_uid_t=yes
8435else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008436 ac_cv_type_uid_t=no
8437fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008438rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008440fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8442$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008443if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008444
Matthias Kloseb9621712010-04-24 17:59:49 +00008445$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008446
8447
Matthias Kloseb9621712010-04-24 17:59:49 +00008448$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008449
8450fi
8451
Mark Dickinson983bc162012-12-02 12:11:38 +00008452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008454if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008455
Matthias Kloseb9621712010-04-24 17:59:49 +00008456$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008457
8458fi
8459
Stefan Krah1919b7e2012-03-21 18:25:23 +01008460ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8461if test "x$ac_cv_type___uint128_t" = xyes; then :
8462
8463$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8464
8465fi
8466
Jack Jansendd19cf82001-12-06 22:36:17 +00008467
Michael W. Hudson54241132001-12-07 15:38:26 +00008468# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008469# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470# The cast to long int works around a bug in the HP C Compiler
8471# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8472# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8473# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8475$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008476if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008477 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008478else
Matthias Kloseb9621712010-04-24 17:59:49 +00008479 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 +00008480
Martin v. Löwis11437992002-04-12 09:54:03 +00008481else
Matthias Kloseb9621712010-04-24 17:59:49 +00008482 if test "$ac_cv_type_int" = yes; then
8483 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8484$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008485as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008486See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487 else
8488 ac_cv_sizeof_int=0
8489 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008491
Martin v. Löwis11437992002-04-12 09:54:03 +00008492fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8494$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008495
8496
8497
Martin v. Löwis11437992002-04-12 09:54:03 +00008498cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008499#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008500_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008501
8502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008503# The cast to long int works around a bug in the HP C Compiler
8504# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8505# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8506# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8508$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008509if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008510 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008511else
Matthias Kloseb9621712010-04-24 17:59:49 +00008512 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 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514else
Matthias Kloseb9621712010-04-24 17:59:49 +00008515 if test "$ac_cv_type_long" = yes; then
8516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8517$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008518as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008519See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008520 else
8521 ac_cv_sizeof_long=0
8522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008524
Martin v. Löwis11437992002-04-12 09:54:03 +00008525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8527$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529
8530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008532#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008533_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008534
8535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536# The cast to long int works around a bug in the HP C Compiler
8537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8539# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8541$as_echo_n "checking size of long long... " >&6; }
8542if ${ac_cv_sizeof_long_long+:} false; then :
8543 $as_echo_n "(cached) " >&6
8544else
8545 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8546
8547else
8548 if test "$ac_cv_type_long_long" = yes; then
8549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8551as_fn_error 77 "cannot compute sizeof (long long)
8552See \`config.log' for more details" "$LINENO" 5; }
8553 else
8554 ac_cv_sizeof_long_long=0
8555 fi
8556fi
8557
8558fi
8559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8560$as_echo "$ac_cv_sizeof_long_long" >&6; }
8561
8562
8563
8564cat >>confdefs.h <<_ACEOF
8565#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8566_ACEOF
8567
8568
8569# The cast to long int works around a bug in the HP C Compiler
8570# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8571# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8572# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8574$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008575if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008576 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008577else
Matthias Kloseb9621712010-04-24 17:59:49 +00008578 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 +00008579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580else
Matthias Kloseb9621712010-04-24 17:59:49 +00008581 if test "$ac_cv_type_void_p" = yes; then
8582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008584as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008585See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586 else
8587 ac_cv_sizeof_void_p=0
8588 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590
Martin v. Löwis11437992002-04-12 09:54:03 +00008591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8593$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594
8595
8596
Martin v. Löwis11437992002-04-12 09:54:03 +00008597cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008598#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008599_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008600
8601
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602# The cast to long int works around a bug in the HP C Compiler
8603# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8604# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8605# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8607$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008608if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008610else
Matthias Kloseb9621712010-04-24 17:59:49 +00008611 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 +00008612
Martin v. Löwis11437992002-04-12 09:54:03 +00008613else
Matthias Kloseb9621712010-04-24 17:59:49 +00008614 if test "$ac_cv_type_short" = yes; then
8615 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008617as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008618See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008619 else
8620 ac_cv_sizeof_short=0
8621 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008623
Martin v. Löwis11437992002-04-12 09:54:03 +00008624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8626$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627
8628
8629
Martin v. Löwis11437992002-04-12 09:54:03 +00008630cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008631#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008633
8634
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008635# The cast to long int works around a bug in the HP C Compiler
8636# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8637# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8638# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8640$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008641if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008643else
Matthias Kloseb9621712010-04-24 17:59:49 +00008644 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 +00008645
Martin v. Löwis11437992002-04-12 09:54:03 +00008646else
Matthias Kloseb9621712010-04-24 17:59:49 +00008647 if test "$ac_cv_type_float" = yes; then
8648 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8649$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008650as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008651See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008652 else
8653 ac_cv_sizeof_float=0
8654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008655fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008656
Martin v. Löwis11437992002-04-12 09:54:03 +00008657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8659$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660
8661
8662
Martin v. Löwis11437992002-04-12 09:54:03 +00008663cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008664#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008665_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008666
8667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008668# The cast to long int works around a bug in the HP C Compiler
8669# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8670# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8671# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8673$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008674if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008676else
Matthias Kloseb9621712010-04-24 17:59:49 +00008677 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 +00008678
Martin v. Löwis11437992002-04-12 09:54:03 +00008679else
Matthias Kloseb9621712010-04-24 17:59:49 +00008680 if test "$ac_cv_type_double" = yes; then
8681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8682$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008683as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008684See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685 else
8686 ac_cv_sizeof_double=0
8687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008689
Martin v. Löwis11437992002-04-12 09:54:03 +00008690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8692$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693
8694
8695
Martin v. Löwis11437992002-04-12 09:54:03 +00008696cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008697#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008698_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008699
8700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701# The cast to long int works around a bug in the HP C Compiler
8702# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8703# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8704# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8706$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008707if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008708 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008709else
Matthias Kloseb9621712010-04-24 17:59:49 +00008710 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 +00008711
Martin v. Löwis11437992002-04-12 09:54:03 +00008712else
Matthias Kloseb9621712010-04-24 17:59:49 +00008713 if test "$ac_cv_type_fpos_t" = yes; then
8714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8715$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008716as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008717See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718 else
8719 ac_cv_sizeof_fpos_t=0
8720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8725$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726
8727
8728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008730#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008731_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008732
Michael W. Hudson54241132001-12-07 15:38:26 +00008733
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734# The cast to long int works around a bug in the HP C Compiler
8735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8737# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8739$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008740if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008741 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008742else
Matthias Kloseb9621712010-04-24 17:59:49 +00008743 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 +00008744
Martin v. Löwis18e16552006-02-15 17:27:45 +00008745else
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 if test "$ac_cv_type_size_t" = yes; then
8747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008749as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008751 else
8752 ac_cv_sizeof_size_t=0
8753 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008754fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008755
Martin v. Löwis18e16552006-02-15 17:27:45 +00008756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8758$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008759
8760
8761
Martin v. Löwis18e16552006-02-15 17:27:45 +00008762cat >>confdefs.h <<_ACEOF
8763#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8764_ACEOF
8765
8766
Christian Heimes400adb02008-02-01 08:12:03 +00008767# The cast to long int works around a bug in the HP C Compiler
8768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8770# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8772$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008773if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008774 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008775else
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 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 +00008777
Christian Heimes400adb02008-02-01 08:12:03 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 if test "$ac_cv_type_pid_t" = yes; then
8780 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008782as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008783See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008784 else
8785 ac_cv_sizeof_pid_t=0
8786 fi
8787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008788
Christian Heimes400adb02008-02-01 08:12:03 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8791$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008792
8793
8794
8795cat >>confdefs.h <<_ACEOF
8796#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8797_ACEOF
8798
8799
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008800# The cast to long int works around a bug in the HP C Compiler
8801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8803# This bug is HP SR number 8606223364.
8804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8805$as_echo_n "checking size of uintptr_t... " >&6; }
8806if ${ac_cv_sizeof_uintptr_t+:} false; then :
8807 $as_echo_n "(cached) " >&6
8808else
8809 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8810
8811else
8812 if test "$ac_cv_type_uintptr_t" = yes; then
8813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8815as_fn_error 77 "cannot compute sizeof (uintptr_t)
8816See \`config.log' for more details" "$LINENO" 5; }
8817 else
8818 ac_cv_sizeof_uintptr_t=0
8819 fi
8820fi
8821
8822fi
8823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8824$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8825
8826
8827
8828cat >>confdefs.h <<_ACEOF
8829#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8830_ACEOF
8831
8832
Michael W. Hudson54241132001-12-07 15:38:26 +00008833
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008834
Eitan Adler3055c942018-05-15 22:58:09 -07008835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5
8836$as_echo_n "checking for long double... " >&6; }
8837if ${ac_cv_type_long_double+:} false; then :
8838 $as_echo_n "(cached) " >&6
8839else
8840 if test "$GCC" = yes; then
8841 ac_cv_type_long_double=yes
8842 else
8843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8844/* end confdefs.h. */
8845/* The Stardent Vistra knows sizeof (long double), but does
8846 not support it. */
8847 long double foo = 0.0L;
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008848int
8849main ()
8850{
Eitan Adler3055c942018-05-15 22:58:09 -07008851static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
8852 sizeof (double) <= sizeof (long double))];
8853test_array [0] = 0;
8854return test_array [0];
8855
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008856 ;
8857 return 0;
8858}
8859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008860if ac_fn_c_try_compile "$LINENO"; then :
Eitan Adler3055c942018-05-15 22:58:09 -07008861 ac_cv_type_long_double=yes
8862else
8863 ac_cv_type_long_double=no
8864fi
8865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8866 fi
8867fi
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5
8869$as_echo "$ac_cv_type_long_double" >&6; }
8870 if test $ac_cv_type_long_double = yes; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008871
Matthias Kloseb9621712010-04-24 17:59:49 +00008872$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008873
Eitan Adler3055c942018-05-15 22:58:09 -07008874 fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008875
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008876# The cast to long int works around a bug in the HP C Compiler
8877# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8878# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8879# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8881$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008882if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008884else
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 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 +00008886
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008887else
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 if test "$ac_cv_type_long_double" = yes; then
8889 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8890$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008891as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008892See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008893 else
8894 ac_cv_sizeof_long_double=0
8895 fi
8896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8900$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008901
8902
8903
8904cat >>confdefs.h <<_ACEOF
8905#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8906_ACEOF
8907
8908
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910# The cast to long int works around a bug in the HP C Compiler
8911# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8912# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8913# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8915$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008916if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008917 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008918else
Matthias Kloseb9621712010-04-24 17:59:49 +00008919 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 +00008920
Thomas Woutersb2137042007-02-01 18:02:27 +00008921else
Matthias Kloseb9621712010-04-24 17:59:49 +00008922 if test "$ac_cv_type__Bool" = yes; then
8923 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008925as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008926See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008927 else
8928 ac_cv_sizeof__Bool=0
8929 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008931
Thomas Woutersb2137042007-02-01 18:02:27 +00008932fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8934$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008935
8936
8937
Thomas Woutersb2137042007-02-01 18:02:27 +00008938cat >>confdefs.h <<_ACEOF
8939#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8940_ACEOF
8941
8942
Thomas Woutersb2137042007-02-01 18:02:27 +00008943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008944# The cast to long int works around a bug in the HP C Compiler
8945# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8946# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8947# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8949$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008950if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008952else
Matthias Kloseb9621712010-04-24 17:59:49 +00008953 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008954#ifdef HAVE_SYS_TYPES_H
8955#include <sys/types.h>
8956#endif
8957
Matthias Kloseb9621712010-04-24 17:59:49 +00008958"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008959
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008960else
Matthias Kloseb9621712010-04-24 17:59:49 +00008961 if test "$ac_cv_type_off_t" = yes; then
8962 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8963$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008964as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008965See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966 else
8967 ac_cv_sizeof_off_t=0
8968 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008970
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008971fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8973$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008974
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975
8976
Martin v. Löwis11437992002-04-12 09:54:03 +00008977cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008978#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008979_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008980
Michael W. Hudson54241132001-12-07 15:38:26 +00008981
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008982
Matthias Kloseb9621712010-04-24 17:59:49 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8984$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008985if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008986 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008987
Matthias Kloseb9621712010-04-24 17:59:49 +00008988$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008989
Matthias Kloseb9621712010-04-24 17:59:49 +00008990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8991$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008992else
Matthias Kloseb9621712010-04-24 17:59:49 +00008993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8994$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008995fi
8996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008997# The cast to long int works around a bug in the HP C Compiler
8998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9000# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
9002$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009003if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009004 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009005else
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009007#ifdef HAVE_SYS_TYPES_H
9008#include <sys/types.h>
9009#endif
9010#ifdef HAVE_TIME_H
9011#include <time.h>
9012#endif
9013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009015
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009016else
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 if test "$ac_cv_type_time_t" = yes; then
9018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009020as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009021See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009022 else
9023 ac_cv_sizeof_time_t=0
9024 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009025fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009026
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009027fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
9029$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009030
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009031
9032
Martin v. Löwis11437992002-04-12 09:54:03 +00009033cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009034#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009035_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009036
Michael W. Hudson54241132001-12-07 15:38:26 +00009037
9038
Trent Mick635f6fb2000-08-23 21:33:05 +00009039# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009040ac_save_cc="$CC"
9041if test "$ac_cv_kpthread" = "yes"
9042then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009043elif test "$ac_cv_kthread" = "yes"
9044then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009045elif test "$ac_cv_pthread" = "yes"
9046then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009047fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009048
Matthias Kloseb9621712010-04-24 17:59:49 +00009049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
9050$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009051have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00009052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009053/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009054
9055 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009056int
9057main ()
9058{
Guido van Rossum12580492000-09-24 16:47:19 +00009059pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ;
9061 return 0;
9062}
Matthias Kloseb159a552010-04-25 21:00:44 +00009063
Martin v. Löwis11437992002-04-12 09:54:03 +00009064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009065if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00009066 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00009067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
9070$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00009071if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009072 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009073# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9074# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9075# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00009076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
9077$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009078if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009079 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009080else
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009082#ifdef HAVE_PTHREAD_H
9083#include <pthread.h>
9084#endif
9085
Matthias Kloseb9621712010-04-24 17:59:49 +00009086"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009087
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009088else
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 if test "$ac_cv_type_pthread_t" = yes; then
9090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009092as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02009093See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009094 else
9095 ac_cv_sizeof_pthread_t=0
9096 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00009097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009098
Trent Mick635f6fb2000-08-23 21:33:05 +00009099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
9101$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009102
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009103
9104
Martin v. Löwis11437992002-04-12 09:54:03 +00009105cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009106#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009107_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009109
Trent Mick635f6fb2000-08-23 21:33:05 +00009110fi
Masayuki Yamamoto731e1892017-10-06 19:41:34 +09009111
9112# Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int.
9113# This checking will be unnecessary after removing deprecated TLS API.
9114# The cast to long int works around a bug in the HP C Compiler
9115# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9116# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9117# This bug is HP SR number 8606223364.
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5
9119$as_echo_n "checking size of pthread_key_t... " >&6; }
9120if ${ac_cv_sizeof_pthread_key_t+:} false; then :
9121 $as_echo_n "(cached) " >&6
9122else
9123 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h>
9124"; then :
9125
9126else
9127 if test "$ac_cv_type_pthread_key_t" = yes; then
9128 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9129$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9130as_fn_error 77 "cannot compute sizeof (pthread_key_t)
9131See \`config.log' for more details" "$LINENO" 5; }
9132 else
9133 ac_cv_sizeof_pthread_key_t=0
9134 fi
9135fi
9136
9137fi
9138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5
9139$as_echo "$ac_cv_sizeof_pthread_key_t" >&6; }
9140
9141
9142
9143cat >>confdefs.h <<_ACEOF
9144#define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t
9145_ACEOF
9146
9147
9148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5
9149$as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; }
9150if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then
9151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9152/* end confdefs.h. */
9153#include <pthread.h>
9154int
9155main ()
9156{
9157pthread_key_t k; k * 1;
9158 ;
9159 return 0;
9160}
9161_ACEOF
9162if ac_fn_c_try_compile "$LINENO"; then :
9163 ac_pthread_key_t_is_arithmetic_type=yes
9164else
9165 ac_pthread_key_t_is_arithmetic_type=no
9166
9167fi
9168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5
9170$as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; }
9171 if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then
9172
9173$as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h
9174
9175 fi
9176else
9177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9178$as_echo "no" >&6; }
9179fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009180CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009181
Michael W. Hudson54241132001-12-07 15:38:26 +00009182
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009183case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009184 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009185 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9186 ;;
9187 Darwin/*)
9188 OTHER_LIBTOOL_OPT=""
9189 ;;
9190esac
9191
9192
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009193
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009194case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009195 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009196 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9197 if test "${enable_universalsdk}"; then
9198 :
9199 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009200 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009201 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009202 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009203 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009204 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009205 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009206 if test ${gcc_version} '<' 4.0
9207 then
9208 LIBTOOL_CRUFT="-lcc_dynamic"
9209 else
9210 LIBTOOL_CRUFT=""
9211 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009212 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009213 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009214else
Matthias Kloseb9621712010-04-24 17:59:49 +00009215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009216/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009217
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009218 #include <unistd.h>
9219 int main(int argc, char*argv[])
9220 {
9221 if (sizeof(long) == 4) {
9222 return 0;
9223 } else {
9224 return 1;
9225 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009226 }
9227
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009229if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009230 ac_osx_32bit=yes
9231else
Matthias Kloseb9621712010-04-24 17:59:49 +00009232 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009234rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9235 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009236fi
9237
9238
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009239 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009240 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009241 i386)
9242 MACOSX_DEFAULT_ARCH="i386"
9243 ;;
9244 ppc)
9245 MACOSX_DEFAULT_ARCH="ppc"
9246 ;;
9247 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009248 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009249 ;;
9250 esac
9251 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009252 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009253 i386)
9254 MACOSX_DEFAULT_ARCH="x86_64"
9255 ;;
9256 ppc)
9257 MACOSX_DEFAULT_ARCH="ppc64"
9258 ;;
9259 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009260 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009261 ;;
9262 esac
9263
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009264 fi
9265
9266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009267 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009268 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009269esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9271$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009272if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009273then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009274 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009276 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009277
Matthias Kloseb9621712010-04-24 17:59:49 +00009278$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
Matthias Kloseb9621712010-04-24 17:59:49 +00009280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9281$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009282 if test $enable_shared = "yes"
9283 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009284 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 +00009285 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009286else
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009289fi
9290
Matthias Kloseb9621712010-04-24 17:59:49 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9292$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009293case $ac_sys_system/$ac_sys_release in
9294 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009295
Matthias Kloseb9621712010-04-24 17:59:49 +00009296$as_echo "#define WITH_DYLD 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: always on for Darwin" >&5
9299$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009300 ;;
9301 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009304 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009305esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009306
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009308
Michael W. Hudson54241132001-12-07 15:38:26 +00009309
9310
9311
9312
Benjamin Peterson99f03762010-04-11 22:15:28 +00009313
Thomas Wouters477c8d52006-05-27 19:21:47 +00009314
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009315# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9316# -- usually .so, .sl on HP-UX, .dll on Cygwin
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9318$as_echo_n "checking the extension of shared libraries... " >&6; }
9319if test -z "$SHLIB_SUFFIX"; then
9320 case $ac_sys_system in
9321 hp*|HP*)
9322 case `uname -m` in
9323 ia64) SHLIB_SUFFIX=.so;;
9324 *) SHLIB_SUFFIX=.sl;;
9325 esac
9326 ;;
9327 CYGWIN*) SHLIB_SUFFIX=.dll;;
9328 *) SHLIB_SUFFIX=.so;;
9329 esac
9330fi
9331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9332$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009333
Guido van Rossum0a516c91994-09-12 10:58:40 +00009334# LDSHARED is the ld *command* used to create shared library
Benjamin Peterson06930632017-09-04 16:36:05 -07009335# -- "cc -G" on SunOS 5.x.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009336# (Shared libraries in this instance are shared modules to be loaded into
9337# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9339$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340if test -z "$LDSHARED"
9341then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009342 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009343 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009344 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009345 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009346 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009347 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009348 if test "$GCC" = "yes" ; then
9349 LDSHARED='$(CC) -shared'
9350 LDCXXSHARED='$(CXX) -shared'
9351 else
9352 LDSHARED='$(CC) -G'
9353 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009354 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009355 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009356 if test "$GCC" = "yes" ; then
9357 LDSHARED='$(CC) -shared'
9358 LDCXXSHARED='$(CXX) -shared'
9359 else
Rob Boehne9d25bd12017-12-06 11:58:17 -06009360 LDSHARED='$(CC) -b'
Benjamin Peterson62ed6be2017-12-21 21:43:09 -08009361 LDCXXSHARED='$(CXX) -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009362 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009363 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009364 LDSHARED='$(CC) -bundle'
9365 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009366 if test "$enable_framework" ; then
9367 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009368 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9369 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009370 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009371 else
9372 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009373 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009374 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009375 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009376 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009377 LDSHARED='$(CC) -bundle'
9378 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009379 if test "$enable_framework" ; then
9380 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009381 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9382 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009383 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009384 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009385 # No framework, use the Python app as bundle-loader
9386 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009387 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009388 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009389 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009390 Darwin/*)
9391 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9392 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009393
Ned Deily36820b62014-06-25 13:44:22 -07009394 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9395 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9396 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9397 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9398 if test ${dep_target_major} -eq 10 && \
9399 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009400 then
Ned Deily36820b62014-06-25 13:44:22 -07009401 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009402 LDSHARED='$(CC) -bundle'
9403 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009404 if test "$enable_framework" ; then
9405 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009406 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9407 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009408 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009409 else
9410 # No framework, use the Python app as bundle-loader
9411 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9412 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009413 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009414 fi
Ned Deily36820b62014-06-25 13:44:22 -07009415 else
9416 # building for OS X 10.3 and later
9417 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9418 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9419 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009420 fi
9421 ;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009422 Linux*|GNU*|QNX*|VxWorks*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009423 LDSHARED='$(CC) -shared'
9424 LDCXXSHARED='$(CXX) -shared';;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009425 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009426 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009427 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009428 LDSHARED='$(CC) -shared'
9429 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009430 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009431 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009432 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009433 OpenBSD*)
9434 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9435 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009436 LDSHARED='$(CC) -shared $(CCSHARED)'
9437 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009438 else
9439 case `uname -r` in
9440 [01].* | 2.[0-7] | 2.[0-7].*)
9441 LDSHARED="ld -Bshareable ${LDFLAGS}"
9442 ;;
9443 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009444 LDSHARED='$(CC) -shared $(CCSHARED)'
9445 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009446 ;;
9447 esac
9448 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009449 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009450 LDSHARED='$(CC) -shared'
9451 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009452 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009453 if test "$GCC" = "yes" ; then
9454 LDSHARED='$(CC) -shared'
9455 LDCXXSHARED='$(CXX) -shared'
9456 else
9457 LDSHARED='$(CC) -G'
9458 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009459 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009460 SCO_SV*)
9461 LDSHARED='$(CC) -Wl,-G,-Bexport'
9462 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9463 CYGWIN*)
9464 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9465 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009466 *) LDSHARED="ld";;
9467 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9470$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009471LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009472BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009473# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009474# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9476$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009477if test -z "$CCSHARED"
9478then
Guido van Rossum07397971997-04-29 21:49:50 +00009479 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009480 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009481 then CCSHARED="-fPIC";
9482 elif test `uname -p` = sparc;
9483 then CCSHARED="-xcode=pic32";
9484 else CCSHARED="-Kpic";
9485 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009486 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009487 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009488 else CCSHARED="+z";
9489 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009490 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009491 Linux*|GNU*) CCSHARED="-fPIC";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009492 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009493 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009494 if test "$GCC" = "yes"
9495 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009496 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009497 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009498 SCO_SV*)
9499 if test "$GCC" = "yes"
9500 then CCSHARED="-fPIC"
9501 else CCSHARED="-Kpic -belf"
9502 fi;;
pxinwr32f5fdd2019-02-27 19:09:28 +08009503 VxWorks*)
9504 CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
Guido van Rossum0a516c91994-09-12 10:58:40 +00009505 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009506fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9508$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009510# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9512$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513if test -z "$LINKFORSHARED"
9514then
Guido van Rossum07397971997-04-29 21:49:50 +00009515 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009516 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009517 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009518 LINKFORSHARED="-Wl,-E -Wl,+s";;
9519# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009520 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009521 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009522 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009523 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009524 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00009525 if test "$enable_framework"
9526 then
Jack Jansenda49e192005-01-07 13:08:22 +00009527 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009528 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009529 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009530 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009531 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009532 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009533 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009534 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9535 then
9536 LINKFORSHARED="-Wl,--export-dynamic"
9537 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009538 SunOS/5*) case $CC in
9539 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009540 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009541 then
9542 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009543 fi;;
9544 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009545 CYGWIN*)
9546 if test $enable_shared = "no"
9547 then
9548 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9549 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009550 QNX*)
9551 # -Wl,-E causes the symbols to be added to the dynamic
9552 # symbol table so that they can be found when a module
9553 # is loaded. -N 2048K causes the stack size to be set
9554 # to 2048 kilobytes so that the stack doesn't overflow
9555 # when running test_compile.py.
9556 LINKFORSHARED='-Wl,-E -N 2048K';;
pxinwr32f5fdd2019-02-27 19:09:28 +08009557 VxWorks*)
9558 LINKFORSHARED='--export-dynamic';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009559 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009560fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9562$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009563
Michael W. Hudson54241132001-12-07 15:38:26 +00009564
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009565
Matthias Kloseb9621712010-04-24 17:59:49 +00009566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9567$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009568if test ! "$LIBRARY" = "$LDLIBRARY"
9569then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009570 case $ac_sys_system in
9571 CYGWIN*)
9572 # Cygwin needs CCSHARED when building extension DLLs
9573 # but not when building the interpreter DLL.
9574 CFLAGSFORSHARED='';;
9575 *)
9576 CFLAGSFORSHARED='$(CCSHARED)'
9577 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009578fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9580$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009581
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009582# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9583# library (with --enable-shared).
9584# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009585# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9586# if it is not required, since it creates a dependency of the shared library
9587# to LIBS. This, in turn, means that applications linking the shared libpython
9588# don't need to link LIBS explicitly. The default should be only changed
9589# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009590
Matthias Kloseb9621712010-04-24 17:59:49 +00009591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9592$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009593case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009594 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009595 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009596esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9598$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009599
9600
Guido van Rossum627b2d71993-12-24 10:39:16 +00009601# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9603$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009604if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009605 $as_echo_n "(cached) " >&6
9606else
9607 ac_check_lib_save_LIBS=$LIBS
9608LIBS="-lsendfile $LIBS"
9609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9610/* end confdefs.h. */
9611
9612/* Override any GCC internal prototype to avoid an error.
9613 Use char because int might match the return type of a GCC
9614 builtin and then its argument prototype would still apply. */
9615#ifdef __cplusplus
9616extern "C"
9617#endif
9618char sendfile ();
9619int
9620main ()
9621{
9622return sendfile ();
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627if ac_fn_c_try_link "$LINENO"; then :
9628 ac_cv_lib_sendfile_sendfile=yes
9629else
9630 ac_cv_lib_sendfile_sendfile=no
9631fi
9632rm -f core conftest.err conftest.$ac_objext \
9633 conftest$ac_exeext conftest.$ac_ext
9634LIBS=$ac_check_lib_save_LIBS
9635fi
9636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9637$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009638if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009639 cat >>confdefs.h <<_ACEOF
9640#define HAVE_LIBSENDFILE 1
9641_ACEOF
9642
9643 LIBS="-lsendfile $LIBS"
9644
9645fi
9646
Matthias Kloseb9621712010-04-24 17:59:49 +00009647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9648$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009649if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009650 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009651else
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009653LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009654cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009656
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657/* Override any GCC internal prototype to avoid an error.
9658 Use char because int might match the return type of a GCC
9659 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009663char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009664int
9665main ()
9666{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009667return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009668 ;
9669 return 0;
9670}
9671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009674else
Matthias Kloseb9621712010-04-24 17:59:49 +00009675 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009676fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009677rm -f core conftest.err conftest.$ac_objext \
9678 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009679LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9682$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009683if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009684 cat >>confdefs.h <<_ACEOF
9685#define HAVE_LIBDL 1
9686_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009687
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009688 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009689
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009690fi
9691 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9693$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009694if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009695 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009696else
Martin v. Löwis11437992002-04-12 09:54:03 +00009697 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009698LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009699cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009702/* Override any GCC internal prototype to avoid an error.
9703 Use char because int might match the return type of a GCC
9704 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705#ifdef __cplusplus
9706extern "C"
9707#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009708char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009709int
9710main ()
9711{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009712return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ;
9714 return 0;
9715}
9716_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009717if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009719else
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722rm -f core conftest.err conftest.$ac_objext \
9723 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009724LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9727$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009728if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 cat >>confdefs.h <<_ACEOF
9730#define HAVE_LIBDLD 1
9731_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009733 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009734
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009735fi
9736 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009737
Michael Felt0d3ccb42017-12-30 22:39:20 +01009738# checks for uuid.h location
9739for ac_header in uuid/uuid.h uuid.h
9740do :
9741 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9742ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9743if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9744 cat >>confdefs.h <<_ACEOF
9745#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9746_ACEOF
9747
9748fi
9749
9750done
9751
9752
Berker Peksag9a10ff42017-11-08 23:09:16 +03009753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5
9754$as_echo_n "checking for uuid_generate_time_safe... " >&6; }
9755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9756/* end confdefs.h. */
9757#include <uuid/uuid.h>
9758int
9759main ()
9760{
9761
9762#ifndef uuid_generate_time_safe
Berker Peksag0e163d22017-11-09 00:43:14 +03009763void *x = uuid_generate_time_safe
Berker Peksag9a10ff42017-11-08 23:09:16 +03009764#endif
9765
9766 ;
9767 return 0;
9768}
9769_ACEOF
9770if ac_fn_c_try_compile "$LINENO"; then :
9771
9772$as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h
9773
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9775$as_echo "yes" >&6; }
9776else
9777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9778$as_echo "no" >&6; }
9779
9780fi
9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9782
Michael Felt0d3ccb42017-12-30 22:39:20 +01009783# AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007)
David Carlierb4ebaa72018-01-09 19:38:07 +00009784# FreeBSD and OpenBSD provides support as well
9785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5
9786$as_echo_n "checking for uuid_create... " >&6; }
Michael Felt0d3ccb42017-12-30 22:39:20 +01009787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9788/* end confdefs.h. */
9789#include <uuid.h>
9790int
9791main ()
9792{
9793
9794#ifndef uuid_create
9795void *x = uuid_create
9796#endif
9797
9798 ;
9799 return 0;
9800}
9801_ACEOF
9802if ac_fn_c_try_compile "$LINENO"; then :
9803
9804$as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h
9805
9806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9807$as_echo "yes" >&6; }
9808else
9809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810$as_echo "no" >&6; }
9811
9812fi
9813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9814
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009815# Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet
9816# stream in big-endian byte-order
9817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5
9818$as_echo_n "checking for uuid_enc_be... " >&6; }
9819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9820/* end confdefs.h. */
9821#include <uuid.h>
9822int
9823main ()
9824{
9825
9826#ifndef uuid_enc_be
Ned Deilyced0adb2018-06-09 18:19:57 -04009827void *x = uuid_enc_be
Serhiy Storchaka17d88302018-05-25 01:45:09 +03009828#endif
9829
9830 ;
9831 return 0;
9832}
9833_ACEOF
9834if ac_fn_c_try_compile "$LINENO"; then :
9835
9836$as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h
9837
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9839$as_echo "yes" >&6; }
9840else
9841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842$as_echo "no" >&6; }
9843
9844fi
9845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9846
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009847# 'Real Time' functions on Solaris
9848# posix4 on Solaris 2.6
9849# pthread (first!) on Linux
Berker Peksag7e666ee2017-11-06 19:06:05 +03009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009851$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009852if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009853 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009854else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009855 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009859/* Override any GCC internal prototype to avoid an error.
9860 Use char because int might match the return type of a GCC
9861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862#ifdef __cplusplus
9863extern "C"
9864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009865char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009866int
9867main ()
9868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 ;
9871 return 0;
9872}
9873_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009874for ac_lib in '' pthread rt posix4; do
9875 if test -z "$ac_lib"; then
9876 ac_res="none required"
9877 else
9878 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009879 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009882 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009883fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009884rm -f core conftest.err conftest.$ac_objext \
9885 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009886 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009888fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889done
Victor Stinnere0be4232011-10-25 13:06:09 +02009890if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892else
9893 ac_cv_search_sem_init=no
9894fi
9895rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009896LIBS=$ac_func_search_save_LIBS
9897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9899$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009900ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009901if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009902 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009903
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009904fi
Serhiy Storchaka9e78dc22017-11-11 19:18:28 +02009905
Martin v. Löwis519adae2003-09-20 10:47:47 +00009906
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9909$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009910if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009912else
9913 ac_check_lib_save_LIBS=$LIBS
9914LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009917
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918/* Override any GCC internal prototype to avoid an error.
9919 Use char because int might match the return type of a GCC
9920 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009921#ifdef __cplusplus
9922extern "C"
9923#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009924char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009925int
9926main ()
9927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009929 ;
9930 return 0;
9931}
9932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009934 ac_cv_lib_intl_textdomain=yes
9935else
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009937fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009938rm -f core conftest.err conftest.$ac_objext \
9939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940LIBS=$ac_check_lib_save_LIBS
9941fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9943$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009944if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009945
Matthias Kloseb9621712010-04-24 17:59:49 +00009946$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009947
Brett Cannonc6d936e2009-06-07 20:09:53 +00009948 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009949fi
9950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009951
9952# checks for system dependent C++ extensions support
9953case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009954 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9955$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009957/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009958
Georg Brandl59e87bd2011-02-15 19:48:59 +00009959 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009960int
9961main ()
9962{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009963loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ;
9965 return 0;
9966}
Matthias Kloseb159a552010-04-25 21:00:44 +00009967
Martin v. Löwis11437992002-04-12 09:54:03 +00009968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009969if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009970
Matthias Kloseb159a552010-04-25 21:00:44 +00009971
Matthias Kloseb9621712010-04-24 17:59:49 +00009972$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009973
Matthias Kloseb159a552010-04-25 21:00:44 +00009974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009975$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009976
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009977else
Matthias Kloseb159a552010-04-25 21:00:44 +00009978
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009980$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009981
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009983rm -f core conftest.err conftest.$ac_objext \
9984 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009985 *) ;;
9986esac
9987
Christian Heimes985ecdc2013-11-20 11:46:18 +01009988# check for systems that require aligned memory access
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9990$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009991if ${ac_cv_aligned_required+:} false; then :
9992 $as_echo_n "(cached) " >&6
9993else
9994 if test "$cross_compiling" = yes; then :
9995 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009996else
9997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9998/* end confdefs.h. */
9999
10000int main()
10001{
10002 char s[16];
10003 int i, *p1, *p2;
10004 for (i=0; i < 16; i++)
10005 s[i] = i;
10006 p1 = (int*)(s+1);
10007 p2 = (int*)(s+2);
10008 if (*p1 == *p2)
10009 return 1;
10010 return 0;
10011}
Christian Heimes985ecdc2013-11-20 11:46:18 +010010012_ACEOF
10013if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010014 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +010010015else
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010016 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +010010017fi
10018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10019 conftest.$ac_objext conftest.beam conftest.$ac_ext
10020fi
10021
10022
Benjamin Petersone4f961b2017-04-14 09:36:45 -070010023fi
10024
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
10026$as_echo "$ac_cv_aligned_required" >&6; }
10027if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +010010028
10029$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
10030
10031fi
Christian Heimes985ecdc2013-11-20 11:46:18 +010010032
10033# str, bytes and memoryview hash algorithm
10034
10035
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
10037$as_echo_n "checking for --with-hash-algorithm... " >&6; }
10038
10039# Check whether --with-hash_algorithm was given.
10040if test "${with_hash_algorithm+set}" = set; then :
10041 withval=$with_hash_algorithm;
10042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10043$as_echo "$withval" >&6; }
10044case "$withval" in
10045 siphash24)
10046 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
10047
10048 ;;
10049 fnv)
10050 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
10051
10052 ;;
10053 *)
10054 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
10055 ;;
10056esac
10057
10058else
10059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
10060$as_echo "default" >&6; }
10061fi
10062
10063
Charles-François Natalid30b0222014-05-08 23:08:51 +010010064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
10065$as_echo_n "checking for --with-address-sanitizer... " >&6; }
10066
10067# Check whether --with-address_sanitizer was given.
10068if test "${with_address_sanitizer+set}" = set; then :
10069 withval=$with_address_sanitizer;
10070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10071$as_echo "$withval" >&6; }
10072BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
10073LDFLAGS="-fsanitize=address $LDFLAGS"
Gregory P. Smith1584a002018-11-12 12:07:14 -080010074# ASan works by controlling memory allocation, our own malloc interferes.
10075with_pymalloc="no"
10076
10077else
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5
10084$as_echo_n "checking for --with-memory-sanitizer... " >&6; }
10085
10086# Check whether --with-memory_sanitizer was given.
10087if test "${with_memory_sanitizer+set}" = set; then :
10088 withval=$with_memory_sanitizer;
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10090$as_echo "$withval" >&6; }
10091BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS"
10092LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS"
10093# MSan works by controlling memory allocation, our own malloc interferes.
10094with_pymalloc="no"
10095
10096else
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098$as_echo "no" >&6; }
10099fi
10100
10101
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5
10103$as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; }
10104
10105# Check whether --with-undefined_behavior_sanitizer was given.
10106if test "${with_undefined_behavior_sanitizer+set}" = set; then :
10107 withval=$with_undefined_behavior_sanitizer;
10108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10109$as_echo "$withval" >&6; }
10110BASECFLAGS="-fsanitize=undefined $BASECFLAGS"
10111LDFLAGS="-fsanitize=undefined $LDFLAGS"
Charles-François Natalid30b0222014-05-08 23:08:51 +010010112
10113else
10114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10115$as_echo "no" >&6; }
10116fi
10117
10118
Guido van Rossum70c7f481998-03-26 18:44:10 +000010119# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
10121$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010122if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010123 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010124else
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010126LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010130/* Override any GCC internal prototype to avoid an error.
10131 Use char because int might match the return type of a GCC
10132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133#ifdef __cplusplus
10134extern "C"
10135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010136char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010137int
10138main ()
10139{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010140return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ;
10142 return 0;
10143}
10144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010147else
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010149fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010150rm -f core conftest.err conftest.$ac_objext \
10151 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010152LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010153fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
10155$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010156if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010157 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010158fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010159 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
10161$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010162if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010164else
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010166LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010169
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170/* Override any GCC internal prototype to avoid an error.
10171 Use char because int might match the return type of a GCC
10172 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010173#ifdef __cplusplus
10174extern "C"
10175#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010176char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010177int
10178main ()
10179{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ;
10182 return 0;
10183}
10184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010185if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010187else
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010189fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010190rm -f core conftest.err conftest.$ac_objext \
10191 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010192LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010193fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
10195$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010196if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010197 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010198fi
10199 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
10202$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010205if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +000010207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
10208$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000010209LIBS="$withval $LIBS"
10210
10211else
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10213$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214fi
10215
Guido van Rossum7f43da71994-08-01 12:15:30 +000010216
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010217
10218
10219
10220
10221
10222
Victor Stinner23a683a2019-04-12 21:27:37 +020010223
Chih-Hsuan Yen03c0d2e2018-05-24 14:37:08 +080010224if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10225 if test -n "$ac_tool_prefix"; then
10226 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10227set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10229$as_echo_n "checking for $ac_word... " >&6; }
10230if ${ac_cv_path_PKG_CONFIG+:} false; then :
10231 $as_echo_n "(cached) " >&6
10232else
10233 case $PKG_CONFIG in
10234 [\\/]* | ?:[\\/]*)
10235 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10236 ;;
10237 *)
10238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10239for as_dir in $PATH
10240do
10241 IFS=$as_save_IFS
10242 test -z "$as_dir" && as_dir=.
10243 for ac_exec_ext in '' $ac_executable_extensions; do
10244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10245 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10247 break 2
10248 fi
10249done
10250 done
10251IFS=$as_save_IFS
10252
10253 ;;
10254esac
10255fi
10256PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10257if test -n "$PKG_CONFIG"; then
10258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10259$as_echo "$PKG_CONFIG" >&6; }
10260else
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10262$as_echo "no" >&6; }
10263fi
10264
10265
10266fi
10267if test -z "$ac_cv_path_PKG_CONFIG"; then
10268 ac_pt_PKG_CONFIG=$PKG_CONFIG
10269 # Extract the first word of "pkg-config", so it can be a program name with args.
10270set dummy pkg-config; ac_word=$2
10271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10272$as_echo_n "checking for $ac_word... " >&6; }
10273if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
10274 $as_echo_n "(cached) " >&6
10275else
10276 case $ac_pt_PKG_CONFIG in
10277 [\\/]* | ?:[\\/]*)
10278 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10279 ;;
10280 *)
10281 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10282for as_dir in $PATH
10283do
10284 IFS=$as_save_IFS
10285 test -z "$as_dir" && as_dir=.
10286 for ac_exec_ext in '' $ac_executable_extensions; do
10287 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10288 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10289 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10290 break 2
10291 fi
10292done
10293 done
10294IFS=$as_save_IFS
10295
10296 ;;
10297esac
10298fi
10299ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10300if test -n "$ac_pt_PKG_CONFIG"; then
10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10302$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10303else
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10305$as_echo "no" >&6; }
10306fi
10307
10308 if test "x$ac_pt_PKG_CONFIG" = x; then
10309 PKG_CONFIG=""
10310 else
10311 case $cross_compiling:$ac_tool_warned in
10312yes:)
10313{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10314$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10315ac_tool_warned=yes ;;
10316esac
10317 PKG_CONFIG=$ac_pt_PKG_CONFIG
10318 fi
10319else
10320 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10321fi
10322
10323fi
10324if test -n "$PKG_CONFIG"; then
10325 _pkg_min_version=0.9.0
10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10327$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10328 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10330$as_echo "yes" >&6; }
10331 else
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334 PKG_CONFIG=""
10335 fi
10336fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010337
10338# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10340$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010341
10342# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010343if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010344 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010345else
10346 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010347fi
10348
10349
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10351$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010352
10353# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10355$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010356
10357# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010358if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010359 withval=$with_system_ffi;
10360fi
10361
10362
Zachary Waref40d4dd2016-09-17 01:25:24 -050010363if test "$ac_sys_system" = "Darwin"
10364then
10365 case "$with_system_ffi" in
10366 "")
10367 with_system_ffi="no"
10368 ;;
10369 yes|no)
10370 ;;
10371 *)
10372 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10373 ;;
10374 esac
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10376$as_echo "$with_system_ffi" >&6; }
10377else
10378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10379$as_echo "yes" >&6; }
10380 if test "$with_system_ffi" != ""
10381 then
10382 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10383$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10384 fi
10385 with_system_ffi="yes"
10386fi
Zachary Ware935043d2016-09-09 17:01:21 -070010387
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010388if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010389 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10390else
10391 LIBFFI_INCLUDEDIR=""
10392fi
10393
10394
Stefan Krah60187b52012-03-23 19:06:27 +010010395# Check for use of the system libmpdec library
10396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10397$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10398
10399# Check whether --with-system_libmpdec was given.
10400if test "${with_system_libmpdec+set}" = set; then :
10401 withval=$with_system_libmpdec;
10402else
10403 with_system_libmpdec="no"
10404fi
10405
10406
10407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10408$as_echo "$with_system_libmpdec" >&6; }
10409
Benjamin Peterson076ed002010-10-31 17:11:02 +000010410# Check for support for loadable sqlite extensions
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10412$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10413# Check whether --enable-loadable-sqlite-extensions was given.
10414if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10415 enableval=$enable_loadable_sqlite_extensions;
10416else
10417 enable_loadable_sqlite_extensions="no"
10418fi
10419
10420
10421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10422$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10423
Ned Deilyd819b932013-09-06 01:07:05 -070010424# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10425
10426
10427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10428$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10429
10430# Check whether --with-tcltk-includes was given.
10431if test "${with_tcltk_includes+set}" = set; then :
10432 withval=$with_tcltk_includes;
10433else
10434 with_tcltk_includes="default"
10435fi
10436
10437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10438$as_echo "$with_tcltk_includes" >&6; }
10439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10440$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10441
10442# Check whether --with-tcltk-libs was given.
10443if test "${with_tcltk_libs+set}" = set; then :
10444 withval=$with_tcltk_libs;
10445else
10446 with_tcltk_libs="default"
10447fi
10448
10449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10450$as_echo "$with_tcltk_libs" >&6; }
10451if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10452then
10453 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10454 then
10455 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10456 fi
10457 TCLTK_INCLUDES=""
10458 TCLTK_LIBS=""
10459else
10460 TCLTK_INCLUDES="$with_tcltk_includes"
10461 TCLTK_LIBS="$with_tcltk_libs"
10462fi
10463
Matthias Klose55708cc2009-04-30 08:06:49 +000010464# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10466$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010467
10468# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010470 withval=$with_dbmliborder;
10471if test x$with_dbmliborder = xyes
10472then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010473as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010474else
10475 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10476 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10477 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010478 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010479 fi
10480 done
10481fi
10482fi
10483
Matthias Kloseb9621712010-04-24 17:59:49 +000010484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10485$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010486
Martin v. Löwis11437992002-04-12 09:54:03 +000010487# Templates for things AC_DEFINEd more than once.
10488# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010489
10490
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010491if test "$ac_cv_pthread_is_default" = yes
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010492then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010493 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010495
10496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010497elif test "$ac_cv_kpthread" = "yes"
10498then
10499 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010500 if test "$ac_cv_cxx_thread" = "yes"; then
10501 CXX="$CXX -Kpthread"
10502 fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010503 posix_threads=yes
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010504elif test "$ac_cv_kthread" = "yes"
10505then
10506 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010507 if test "$ac_cv_cxx_thread" = "yes"; then
10508 CXX="$CXX -Kthread"
10509 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010510 posix_threads=yes
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010511elif test "$ac_cv_pthread" = "yes"
10512then
10513 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010514 if test "$ac_cv_cxx_thread" = "yes"; then
10515 CXX="$CXX -pthread"
10516 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010517 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518else
Martin v. Löwis130fb172001-07-19 11:00:41 +000010519 if test ! -z "$withval" -a -d "$withval"
10520 then LDFLAGS="$LDFLAGS -L$withval"
10521 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010522
10523 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010524 # define _POSIX_THREADS in unistd.h. Some apparently don't
10525 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10527$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010530
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010531#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010532#ifdef _POSIX_THREADS
10533yes
10534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010535
10536_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010538 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010539 unistd_defines_pthreads=yes
10540else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010541 unistd_defines_pthreads=no
10542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010543rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010544
Matthias Kloseb9621712010-04-24 17:59:49 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10546$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010549
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010550 # Just looking for pthread_create in libpthread is not enough:
10551 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10552 # So we really have to include pthread.h, and then link.
10553 _libs=$LIBS
10554 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10556$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010558/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010559
10560#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010561#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010562
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010563void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010564int
10565main ()
10566{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010567
10568pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010569 ;
10570 return 0;
10571}
10572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010574
Matthias Kloseb9621712010-04-24 17:59:49 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10576$as_echo "yes" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010577 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010578
Guido van Rossum02a1c402000-02-25 19:26:31 +000010579else
Martin v. Löwis11437992002-04-12 09:54:03 +000010580
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010581 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010583if test "x$ac_cv_func_pthread_detach" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +000010584
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010585 posix_threads=yes
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010586
Guido van Rossumad678af1998-10-02 14:42:15 +000010587else
Guido van Rossumad678af1998-10-02 14:42:15 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10590$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010591if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010592 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010593else
Martin v. Löwis11437992002-04-12 09:54:03 +000010594 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010595LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010599/* Override any GCC internal prototype to avoid an error.
10600 Use char because int might match the return type of a GCC
10601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010602#ifdef __cplusplus
10603extern "C"
10604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010605char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010606int
10607main ()
10608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010609return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ;
10611 return 0;
10612}
10613_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010614if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010615 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010616else
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010618fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010619rm -f core conftest.err conftest.$ac_objext \
10620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010621LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10624$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010625if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Greg Steinadf63d62000-07-05 10:38:09 +000010626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010628 LIBS="$LIBS -lpthreads"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010629
Greg Steinadf63d62000-07-05 10:38:09 +000010630else
Greg Steinadf63d62000-07-05 10:38:09 +000010631
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10633$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010634if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010635 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010636else
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010638LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642/* Override any GCC internal prototype to avoid an error.
10643 Use char because int might match the return type of a GCC
10644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010645#ifdef __cplusplus
10646extern "C"
10647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010648char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010649int
10650main ()
10651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010653 ;
10654 return 0;
10655}
10656_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010659else
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010662rm -f core conftest.err conftest.$ac_objext \
10663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010664LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10667$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010668if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Guido van Rossum49545951997-12-02 19:28:29 +000010669
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010670 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010671 LIBS="$LIBS -lc_r"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010672
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010673else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010674
Matthias Kloseb9621712010-04-24 17:59:49 +000010675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10676$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010677if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010678 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010679else
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010681LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010685/* Override any GCC internal prototype to avoid an error.
10686 Use char because int might match the return type of a GCC
10687 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010688#ifdef __cplusplus
10689extern "C"
10690#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010691char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010692int
10693main ()
10694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 ;
10697 return 0;
10698}
10699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010701 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010702else
Matthias Kloseb9621712010-04-24 17:59:49 +000010703 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010705rm -f core conftest.err conftest.$ac_objext \
10706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10710$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010711if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010712
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010713 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010714 LIBS="$LIBS -lpthread"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010715
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010716else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010717
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10719$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010720if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010722else
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010724LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010725cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728/* Override any GCC internal prototype to avoid an error.
10729 Use char because int might match the return type of a GCC
10730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010731#ifdef __cplusplus
10732extern "C"
10733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010734char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010735int
10736main ()
10737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ;
10740 return 0;
10741}
10742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010743if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010744 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010745else
Matthias Kloseb9621712010-04-24 17:59:49 +000010746 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010748rm -f core conftest.err conftest.$ac_objext \
10749 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010750LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10753$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010754if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Guido van Rossumb93a8621998-05-07 13:27:32 +000010755
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010757 LIBS="$LIBS -lcma"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010758
Guido van Rossumb93a8621998-05-07 13:27:32 +000010759else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010760
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010761 as_fn_error $? "could not find pthreads on your system" "$LINENO" 5
10762
Guido van Rossum2d38f911996-06-26 19:47:01 +000010763fi
10764
Guido van Rossum627b2d71993-12-24 10:39:16 +000010765
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010766fi
10767
Guido van Rossum0be3e491997-05-22 20:33:33 +000010768fi
10769
Guido van Rossum49545951997-12-02 19:28:29 +000010770fi
10771
Guido van Rossumb93a8621998-05-07 13:27:32 +000010772fi
10773
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010774fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010775rm -f core conftest.err conftest.$ac_objext \
10776 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010777
Matthias Kloseb9621712010-04-24 17:59:49 +000010778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10779$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010780if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010781 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010782else
Martin v. Löwis11437992002-04-12 09:54:03 +000010783 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010784LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788/* Override any GCC internal prototype to avoid an error.
10789 Use char because int might match the return type of a GCC
10790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010791#ifdef __cplusplus
10792extern "C"
10793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010794char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010795int
10796main ()
10797{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010799 ;
10800 return 0;
10801}
10802_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010803if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010805else
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010807fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010808rm -f core conftest.err conftest.$ac_objext \
10809 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010810LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10813$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010814if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Guido van Rossum627b2d71993-12-24 10:39:16 +000010815
Martin v. Löwis130fb172001-07-19 11:00:41 +000010816 LIBS="$LIBS -lmpc"
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020010817
Guido van Rossum627b2d71993-12-24 10:39:16 +000010818fi
10819
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010820
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010821fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010822
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010823if test "$posix_threads" = "yes"; then
10824 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010825
Matthias Kloseb9621712010-04-24 17:59:49 +000010826$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010827
10828 fi
10829
10830 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10831 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010832 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010833$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010834
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010835 ;;
10836 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010837$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010838
10839 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010840 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010841$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010842
10843 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 esac
10845
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10847$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010848 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010850else
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010852 ac_cv_pthread_system_supported=no
10853else
Matthias Kloseb9621712010-04-24 17:59:49 +000010854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010855/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010856
10857 #include <stdio.h>
10858 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 void *foo(void *parm) {
10860 return NULL;
10861 }
10862 main() {
10863 pthread_attr_t attr;
10864 pthread_t id;
10865 if (pthread_attr_init(&attr)) exit(-1);
10866 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10867 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10868 exit(0);
10869 }
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 ac_cv_pthread_system_supported=yes
10873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010878fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010880
Guido van Rossum627b2d71993-12-24 10:39:16 +000010881fi
10882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10884$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010885 if test "$ac_cv_pthread_system_supported" = "yes"; then
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888
10889 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 for ac_func in pthread_sigmask
10891do :
10892 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010893if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010894 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010895#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010896_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010897 case $ac_sys_system in
10898 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010899
Matthias Kloseb9621712010-04-24 17:59:49 +000010900$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010901
10902 ;;
10903 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010904fi
10905done
10906
pdoxe14679c2017-10-05 00:01:56 -070010907 for ac_func in pthread_getcpuclockid
10908do :
10909 ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid"
10910if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then :
10911 cat >>confdefs.h <<_ACEOF
10912#define HAVE_PTHREAD_GETCPUCLOCKID 1
10913_ACEOF
10914
10915fi
10916done
10917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010918fi
10919
10920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010921# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10924$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010925# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010926if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010927 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010928 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10930$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010931 ipv6=no
10932 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10934$as_echo "yes" >&6; }
10935 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010936
10937 ipv6=yes
10938 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010943/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010944 /* AF_INET6 available check */
10945#include <sys/types.h>
10946#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010947int
10948main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010949{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010950int domain = AF_INET6;
10951 ;
10952 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010953}
Martin v. Löwis11437992002-04-12 09:54:03 +000010954_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010955if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010959 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010960
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010961else
Matthias Kloseb159a552010-04-25 21:00:44 +000010962
Matthias Kloseb9621712010-04-24 17:59:49 +000010963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10964$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010965 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010967fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010970if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10972$as_echo_n "checking if RFC2553 API is available... " >&6; }
10973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010974/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010975
10976 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010977#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010978int
10979main ()
10980{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010981struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010982 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010983 ;
10984 return 0;
10985}
Matthias Kloseb159a552010-04-25 21:00:44 +000010986
Martin v. Löwis11437992002-04-12 09:54:03 +000010987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010989
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 ipv6=yes
10993
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010994else
Matthias Kloseb159a552010-04-25 21:00:44 +000010995
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010997$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010998 ipv6=no
10999
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011000fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011002fi
11003
11004if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011005 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011006
11007fi
11008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011009fi
11010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011011
11012ipv6type=unknown
11013ipv6lib=none
11014ipv6trylibc=no
11015
11016if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
11018$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000011019 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11020 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011021 case $i in
11022 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011024/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011025
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011026#include <netinet/in.h>
11027#ifdef IPV6_INRIA_VERSION
11028yes
11029#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011030_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011031if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011033 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011034fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011035rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011036
11037 ;;
11038 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000011039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011041
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011042#include <netinet/in.h>
11043#ifdef __KAME__
11044yes
11045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011046_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011047if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011049 ipv6type=$i;
11050 ipv6lib=inet6
11051 ipv6libdir=/usr/local/v6/lib
11052 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011053fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011054rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011055
11056 ;;
11057 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000011058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011059/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011060
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011061#include <features.h>
11062#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11063yes
11064#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011065_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011066if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011067 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011068 ipv6type=$i;
11069 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011070fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011071rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011072
11073 ;;
11074 linux-inet6)
11075 if test -d /usr/inet6; then
11076 ipv6type=$i
11077 ipv6lib=inet6
11078 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011079 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011080 fi
11081 ;;
11082 solaris)
11083 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000011084 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011085 ipv6type=$i
11086 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011087 fi
11088 fi
11089 ;;
11090 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011092/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011094#include <sys/param.h>
11095#ifdef _TOSHIBA_INET6
11096yes
11097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011100 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011101 ipv6type=$i;
11102 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011103 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011104fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011105rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011106
11107 ;;
11108 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000011109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011110/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011111
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011112#include </usr/local/v6/include/sys/v6config.h>
11113#ifdef __V6D__
11114yes
11115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011116_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011117if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011118 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011119 ipv6type=$i;
11120 ipv6lib=v6;
11121 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011122 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011123fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011124rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011125
11126 ;;
11127 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011129/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011130
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011131#include <sys/param.h>
11132#ifdef _ZETA_MINAMI_INET6
11133yes
11134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000011137 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011138 ipv6type=$i;
11139 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011140 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011141fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000011142rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011143
11144 ;;
11145 esac
11146 if test "$ipv6type" != "unknown"; then
11147 break
11148 fi
11149 done
Matthias Kloseb9621712010-04-24 17:59:49 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
11151$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011152fi
11153
11154if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
11155 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
11156 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
11157 echo "using lib$ipv6lib"
11158 else
11159 if test $ipv6trylibc = "yes"; then
11160 echo "using libc"
11161 else
11162 echo 'Fatal: no $ipv6lib library found. cannot continue.'
11163 echo "You need to fetch lib$ipv6lib.a from appropriate"
11164 echo 'ipv6 kit and compile beforehand.'
11165 exit 1
11166 fi
11167 fi
11168fi
11169
Larry Hastingsa6cc5512015-04-13 17:48:40 -040011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
11171$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h. */
11174 /* CAN_RAW_FD_FRAMES available check */
11175#include <linux/can/raw.h>
11176int
11177main ()
11178{
11179int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
11180 ;
11181 return 0;
11182}
11183_ACEOF
11184if ac_fn_c_try_compile "$LINENO"; then :
11185
11186
11187$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
11188
11189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11190$as_echo "yes" >&6; }
11191
11192else
11193
11194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11195$as_echo "no" >&6; }
11196
11197fi
11198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11199
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011200# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000011201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
11202$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011204# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011205if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011206 withval=$with_doc_strings;
11207fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011208
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011209
11210if test -z "$with_doc_strings"
11211then with_doc_strings="yes"
11212fi
11213if test "$with_doc_strings" != "no"
11214then
11215
Matthias Kloseb9621712010-04-24 17:59:49 +000011216$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011217
11218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11220$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011221
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011222# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11224$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011225
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011227if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011228 withval=$with_pymalloc;
11229fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011230
Neil Schemenauera35c6882001-02-27 04:45:05 +000011231
Neil Schemenauer16c22972002-03-22 15:34:49 +000011232if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011233then
11234 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011235fi
11236if test "$with_pymalloc" != "no"
11237then
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
Matthias Kloseb9621712010-04-24 17:59:49 +000011239$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011240
11241fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11243$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011244
Nick Coghlan6ea41862017-06-11 13:16:15 +100011245# Check for --with-c-locale-coercion
11246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5
11247$as_echo_n "checking for --with-c-locale-coercion... " >&6; }
11248
11249# Check whether --with-c-locale-coercion was given.
11250if test "${with_c_locale_coercion+set}" = set; then :
11251 withval=$with_c_locale_coercion;
11252fi
11253
11254
11255if test -z "$with_c_locale_coercion"
11256then
11257 with_c_locale_coercion="yes"
11258fi
11259if test "$with_c_locale_coercion" != "no"
11260then
11261
11262$as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h
11263
11264fi
11265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5
11266$as_echo "$with_c_locale_coercion" >&6; }
11267
Benjamin Peterson05159c42009-12-03 03:01:27 +000011268# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11270$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011271
11272# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011273if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011274 withval=$with_valgrind;
11275else
11276 with_valgrind=no
11277fi
11278
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11280$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011281if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 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 +020011283if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011286
11287else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011288 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011289
11290fi
11291
11292
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011293 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011294fi
11295
Łukasz Langaa785c872016-09-09 17:37:37 -070011296# Check for DTrace support
11297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11298$as_echo_n "checking for --with-dtrace... " >&6; }
11299
11300# Check whether --with-dtrace was given.
11301if test "${with_dtrace+set}" = set; then :
11302 withval=$with_dtrace;
11303else
11304 with_dtrace=no
11305fi
11306
11307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11308$as_echo "$with_dtrace" >&6; }
11309
11310
11311
11312
11313
11314DTRACE=
11315DFLAGS=
11316DTRACE_HEADERS=
11317DTRACE_OBJS=
11318
11319if test "$with_dtrace" = "yes"
11320then
11321 # Extract the first word of "dtrace", so it can be a program name with args.
11322set dummy dtrace; ac_word=$2
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11324$as_echo_n "checking for $ac_word... " >&6; }
11325if ${ac_cv_path_DTRACE+:} false; then :
11326 $as_echo_n "(cached) " >&6
11327else
11328 case $DTRACE in
11329 [\\/]* | ?:[\\/]*)
11330 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11331 ;;
11332 *)
11333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11334for as_dir in $PATH
11335do
11336 IFS=$as_save_IFS
11337 test -z "$as_dir" && as_dir=.
11338 for ac_exec_ext in '' $ac_executable_extensions; do
11339 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11340 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11341 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11342 break 2
11343 fi
11344done
11345 done
11346IFS=$as_save_IFS
11347
11348 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11349 ;;
11350esac
11351fi
11352DTRACE=$ac_cv_path_DTRACE
11353if test -n "$DTRACE"; then
11354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11355$as_echo "$DTRACE" >&6; }
11356else
11357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11358$as_echo "no" >&6; }
11359fi
11360
11361
11362 if test "$DTRACE" = "not found"; then
11363 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11364 fi
11365
11366$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11367
11368 DTRACE_HEADERS="Include/pydtrace_probes.h"
11369
11370 # On OS X, DTrace providers do not need to be explicitly compiled and
11371 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11372 # generation flag '-G'. We check for presence of this flag, rather than
11373 # hardcoding support by OS, in the interest of robustness.
11374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11375$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11376if ${ac_cv_dtrace_link+:} false; then :
11377 $as_echo_n "(cached) " >&6
11378else
11379 ac_cv_dtrace_link=no
Jakub Kulík5c8f5372019-01-24 18:29:48 +010011380 echo 'BEGIN{}' > conftest.d
Łukasz Langaa785c872016-09-09 17:37:37 -070011381 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11382 ac_cv_dtrace_link=yes
11383
11384fi
11385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11386$as_echo "$ac_cv_dtrace_link" >&6; }
11387 if test "$ac_cv_dtrace_link" = "yes"; then
11388 DTRACE_OBJS="Python/pydtrace.o"
11389 fi
11390fi
11391
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011392# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011393
Guido van Rossum98935bf2001-09-05 19:13:16 +000011394DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011395
Guido van Rossume97ee181999-12-20 21:27:22 +000011396# the dlopen() function means we might want to use dynload_shlib.o. some
11397# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011398for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011399do :
11400 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011401if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011403#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011404_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011405
Guido van Rossume97ee181999-12-20 21:27:22 +000011406fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011407done
Guido van Rossume97ee181999-12-20 21:27:22 +000011408
Michael W. Hudson54241132001-12-07 15:38:26 +000011409
Guido van Rossume97ee181999-12-20 21:27:22 +000011410# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11411# loading of modules.
11412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11414$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011415if test -z "$DYNLOADFILE"
11416then
11417 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011418 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11419 if test "$ac_cv_func_dlopen" = yes
11420 then DYNLOADFILE="dynload_shlib.o"
11421 else DYNLOADFILE="dynload_aix.o"
11422 fi
11423 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011424 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011425 *)
11426 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11427 # out any dynamic loading
11428 if test "$ac_cv_func_dlopen" = yes
11429 then DYNLOADFILE="dynload_shlib.o"
11430 else DYNLOADFILE="dynload_stub.o"
11431 fi
11432 ;;
11433 esac
11434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11436$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011437if test "$DYNLOADFILE" != "dynload_stub.o"
11438then
Martin v. Löwis11437992002-04-12 09:54:03 +000011439
Matthias Kloseb9621712010-04-24 17:59:49 +000011440$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011441
11442fi
11443
Neil Schemenauer4e425612001-06-19 15:44:15 +000011444# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11445
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Matthias Kloseb9621712010-04-24 17:59:49 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11448$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011449if test -z "$MACHDEP_OBJS"
11450then
Jack Jansene578a632001-08-15 01:27:14 +000011451 MACHDEP_OBJS=$extra_machdep_objs
11452else
11453 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011454fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011455if test -z "$MACHDEP_OBJS"; then
11456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11457$as_echo "none" >&6; }
11458else
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11460$as_echo "$MACHDEP_OBJS" >&6; }
11461fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011462
Guido van Rossum627b2d71993-12-24 10:39:16 +000011463# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011464for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
David Carlier51aa35e2019-05-23 04:32:44 +000011465 clock confstr ctermid dup3 execv explicit_bzero explicit_memset faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011466 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011467 futimens futimes gai_strerror getentropy \
William Grzybowski23e65b22018-09-07 09:06:15 -030011468 getgrgid_r getgrnam_r \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011469 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
William Grzybowski23e65b22018-09-07 09:06:15 -030011470 getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \
xdegaye5ad7ef82017-11-23 11:13:22 +010011471 if_nameindex \
David Carlier51aa35e2019-05-23 04:32:44 +000011472 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011473 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011474 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Joannah Nanjekye92b83222019-01-16 16:29:26 +030011475 posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \
Inada Naoki001fee12019-02-20 10:00:09 +090011476 pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \
11477 readlink readlinkat readv realpath renameat \
Benjamin Petersona2344852017-09-04 10:21:42 -070011478 sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011479 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011480 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011481 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11482 sched_rr_get_interval \
Antoine Pitrou9d3627e2018-05-04 13:00:50 +020011483 sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \
Michael Osipov48ce4892018-08-23 15:27:19 +020011484 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011485 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011486 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
pxinwrf2d7ac72019-05-21 18:46:37 +080011487 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn
Matthias Kloseb9621712010-04-24 17:59:49 +000011488do :
11489 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11490ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011491if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011492 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011493#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011494_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011496fi
11497done
11498
Michael W. Hudson54241132001-12-07 15:38:26 +000011499
Benjamin Peterson40caa052018-09-12 15:52:40 -070011500# Force lchmod off for Linux. Linux disallows changing the mode of symbolic
11501# links. Some libc implementations have a stub lchmod implementation that always
11502# returns an error.
11503if test "$MACHDEP" != linux; then
Benjamin Petersoned709d52018-09-12 17:22:11 -070011504 for ac_func in lchmod
11505do :
Benjamin Peterson40caa052018-09-12 15:52:40 -070011506 ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod"
11507if test "x$ac_cv_func_lchmod" = xyes; then :
Benjamin Petersoned709d52018-09-12 17:22:11 -070011508 cat >>confdefs.h <<_ACEOF
11509#define HAVE_LCHMOD 1
11510_ACEOF
Benjamin Peterson40caa052018-09-12 15:52:40 -070011511
11512fi
Benjamin Petersoned709d52018-09-12 17:22:11 -070011513done
Benjamin Peterson40caa052018-09-12 15:52:40 -070011514
11515fi
11516
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011517ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11518 #include <dirent.h>
11519"
11520if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11521
11522$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11523
11524fi
11525
11526
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011527# For some functions, having a definition is not sufficient, since
11528# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11530$as_echo_n "checking for chroot... " >&6; }
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011533#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011534int
11535main ()
11536{
11537void *x=chroot
11538 ;
11539 return 0;
11540}
11541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011543
Matthias Kloseb9621712010-04-24 17:59:49 +000011544$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011545
Matthias Kloseb159a552010-04-25 21:00:44 +000011546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011547$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011548else
Matthias Kloseb9621712010-04-24 17:59:49 +000011549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011551
11552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11555$as_echo_n "checking for link... " >&6; }
11556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011557/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011558#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011559int
11560main ()
11561{
11562void *x=link
11563 ;
11564 return 0;
11565}
11566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011568
Matthias Kloseb9621712010-04-24 17:59:49 +000011569$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011570
Matthias Kloseb159a552010-04-25 21:00:44 +000011571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011572$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011573else
Matthias Kloseb9621712010-04-24 17:59:49 +000011574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11575$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011576
11577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11580$as_echo_n "checking for symlink... " >&6; }
11581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011582/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011583#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011584int
11585main ()
11586{
11587void *x=symlink
11588 ;
11589 return 0;
11590}
11591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011592if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011595
Matthias Kloseb159a552010-04-25 21:00:44 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011597$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011598else
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11600$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011601
11602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11605$as_echo_n "checking for fchdir... " >&6; }
11606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011607/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011608#include <unistd.h>
11609int
11610main ()
11611{
11612void *x=fchdir
11613 ;
11614 return 0;
11615}
11616_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011617if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011618
Matthias Kloseb9621712010-04-24 17:59:49 +000011619$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011620
Matthias Kloseb159a552010-04-25 21:00:44 +000011621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011622$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011623else
Matthias Kloseb9621712010-04-24 17:59:49 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11625$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011626
11627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11630$as_echo_n "checking for fsync... " >&6; }
11631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011632/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011633#include <unistd.h>
11634int
11635main ()
11636{
11637void *x=fsync
11638 ;
11639 return 0;
11640}
11641_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011642if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011643
Matthias Kloseb9621712010-04-24 17:59:49 +000011644$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011645
Matthias Kloseb159a552010-04-25 21:00:44 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011647$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011648else
Matthias Kloseb9621712010-04-24 17:59:49 +000011649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011651
11652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11655$as_echo_n "checking for fdatasync... " >&6; }
11656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011657/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011658#include <unistd.h>
11659int
11660main ()
11661{
11662void *x=fdatasync
11663 ;
11664 return 0;
11665}
11666_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011667if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011668
Matthias Kloseb9621712010-04-24 17:59:49 +000011669$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011670
Matthias Kloseb159a552010-04-25 21:00:44 +000011671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011672$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11675$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011676
11677fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11680$as_echo_n "checking for epoll... " >&6; }
11681cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011682/* end confdefs.h. */
11683#include <sys/epoll.h>
11684int
11685main ()
11686{
11687void *x=epoll_create
11688 ;
11689 return 0;
11690}
11691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011692if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011693
Matthias Kloseb9621712010-04-24 17:59:49 +000011694$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011695
Matthias Kloseb159a552010-04-25 21:00:44 +000011696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011698else
Matthias Kloseb9621712010-04-24 17:59:49 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11700$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011701
11702fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11705$as_echo_n "checking for epoll_create1... " >&6; }
11706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11707/* end confdefs.h. */
11708#include <sys/epoll.h>
11709int
11710main ()
11711{
11712void *x=epoll_create1
11713 ;
11714 return 0;
11715}
11716_ACEOF
11717if ac_fn_c_try_compile "$LINENO"; then :
11718
11719$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11720
11721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11722$as_echo "yes" >&6; }
11723else
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11725$as_echo "no" >&6; }
11726
11727fi
11728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11730$as_echo_n "checking for kqueue... " >&6; }
11731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011732/* end confdefs.h. */
11733
11734#include <sys/types.h>
11735#include <sys/event.h>
11736
11737int
11738main ()
11739{
11740int x=kqueue()
11741 ;
11742 return 0;
11743}
11744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011745if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011746
Matthias Kloseb9621712010-04-24 17:59:49 +000011747$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011748
Matthias Kloseb159a552010-04-25 21:00:44 +000011749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011750$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011751else
Matthias Kloseb9621712010-04-24 17:59:49 +000011752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011754
11755fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11758$as_echo_n "checking for prlimit... " >&6; }
11759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11760/* end confdefs.h. */
11761
11762#include <sys/time.h>
11763#include <sys/resource.h>
11764
11765int
11766main ()
11767{
11768void *x=prlimit
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773if ac_fn_c_try_compile "$LINENO"; then :
11774
11775$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11776
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11778$as_echo "yes" >&6; }
11779else
11780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11781$as_echo "no" >&6; }
11782
11783fi
11784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11785
Martin v. Löwisd5843682002-11-21 20:41:28 +000011786# On some systems (eg. FreeBSD 5), we would find a definition of the
11787# functions ctermid_r, setgroups in the library, but no prototype
11788# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11789# address to avoid compiler warnings and potential miscompilations
11790# because of the missing prototypes.
11791
Matthias Kloseb9621712010-04-24 17:59:49 +000011792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11793$as_echo_n "checking for ctermid_r... " >&6; }
11794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011795/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011796
Martin v. Löwisd5843682002-11-21 20:41:28 +000011797#include <stdio.h>
11798
Martin v. Löwisd5843682002-11-21 20:41:28 +000011799int
11800main ()
11801{
11802void* p = ctermid_r
11803 ;
11804 return 0;
11805}
11806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011810
Matthias Kloseb159a552010-04-25 21:00:44 +000011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011812$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011813else
Matthias Kloseb9621712010-04-24 17:59:49 +000011814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11815$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011816
11817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11819
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11821$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011822if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011823 $as_echo_n "(cached) " >&6
11824else
11825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011826/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011827#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011828int
11829main ()
11830{
11831void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011832
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011833 ;
11834 return 0;
11835}
11836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011837if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011838 ac_cv_flock_decl=yes
11839else
11840 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011841
11842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011844
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011845fi
11846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11847$as_echo "$ac_cv_flock_decl" >&6; }
11848if test "x${ac_cv_flock_decl}" = xyes; then
11849 for ac_func in flock
11850do :
11851 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011852if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011853 cat >>confdefs.h <<_ACEOF
11854#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011855_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011856
Antoine Pitroua3000072010-09-07 14:52:42 +000011857else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011859$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011861 $as_echo_n "(cached) " >&6
11862else
11863 ac_check_lib_save_LIBS=$LIBS
11864LIBS="-lbsd $LIBS"
11865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866/* end confdefs.h. */
11867
11868/* Override any GCC internal prototype to avoid an error.
11869 Use char because int might match the return type of a GCC
11870 builtin and then its argument prototype would still apply. */
11871#ifdef __cplusplus
11872extern "C"
11873#endif
11874char flock ();
11875int
11876main ()
11877{
11878return flock ();
11879 ;
11880 return 0;
11881}
11882_ACEOF
11883if ac_fn_c_try_link "$LINENO"; then :
11884 ac_cv_lib_bsd_flock=yes
11885else
11886 ac_cv_lib_bsd_flock=no
11887fi
11888rm -f core conftest.err conftest.$ac_objext \
11889 conftest$ac_exeext conftest.$ac_ext
11890LIBS=$ac_check_lib_save_LIBS
11891fi
11892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11893$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011894if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011895 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011896
11897
11898$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11899
11900
11901fi
11902
11903
11904fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011905done
11906
Antoine Pitroua3000072010-09-07 14:52:42 +000011907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11910$as_echo_n "checking for getpagesize... " >&6; }
11911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011912/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011913
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011914#include <unistd.h>
11915
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011916int
11917main ()
11918{
11919void* p = getpagesize
11920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011925
Matthias Kloseb9621712010-04-24 17:59:49 +000011926$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011927
Matthias Kloseb159a552010-04-25 21:00:44 +000011928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011929$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11932$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011933
11934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011936
Victor Stinner984890f2011-11-24 13:53:38 +010011937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11938$as_echo_n "checking for broken unsetenv... " >&6; }
11939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11940/* end confdefs.h. */
11941
11942#include <stdlib.h>
11943
11944int
11945main ()
11946{
11947int res = unsetenv("DUMMY")
11948 ;
11949 return 0;
11950}
11951_ACEOF
11952if ac_fn_c_try_compile "$LINENO"; then :
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11954$as_echo "no" >&6; }
11955else
11956
11957$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11958
11959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11960$as_echo "yes" >&6; }
11961
11962fi
11963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11964
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011965for ac_prog in true
11966do
11967 # Extract the first word of "$ac_prog", so it can be a program name with args.
11968set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11970$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011973else
11974 if test -n "$TRUE"; then
11975 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11976else
11977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11978for as_dir in $PATH
11979do
11980 IFS=$as_save_IFS
11981 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011982 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011983 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011984 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011985 $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 +000011986 break 2
11987 fi
11988done
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011990IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011991
11992fi
11993fi
11994TRUE=$ac_cv_prog_TRUE
11995if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11997$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011998else
Matthias Kloseb9621712010-04-24 17:59:49 +000011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12000$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012001fi
12002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012003
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012004 test -n "$TRUE" && break
12005done
12006test -n "$TRUE" || TRUE="/bin/true"
12007
12008
Matthias Kloseb9621712010-04-24 17:59:49 +000012009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
12010$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012011if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012012 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012013else
12014 ac_check_lib_save_LIBS=$LIBS
12015LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012017/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012019/* Override any GCC internal prototype to avoid an error.
12020 Use char because int might match the return type of a GCC
12021 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012022#ifdef __cplusplus
12023extern "C"
12024#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012025char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012026int
12027main ()
12028{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012029return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012030 ;
12031 return 0;
12032}
12033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012034if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012035 ac_cv_lib_c_inet_aton=yes
12036else
Matthias Kloseb9621712010-04-24 17:59:49 +000012037 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012038fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012039rm -f core conftest.err conftest.$ac_objext \
12040 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012041LIBS=$ac_check_lib_save_LIBS
12042fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
12044$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012045if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012046 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012047else
Matthias Kloseb9621712010-04-24 17:59:49 +000012048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
12049$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012050if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012051 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012052else
12053 ac_check_lib_save_LIBS=$LIBS
12054LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012056/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058/* Override any GCC internal prototype to avoid an error.
12059 Use char because int might match the return type of a GCC
12060 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012061#ifdef __cplusplus
12062extern "C"
12063#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012064char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012065int
12066main ()
12067{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012074 ac_cv_lib_resolv_inet_aton=yes
12075else
Matthias Kloseb9621712010-04-24 17:59:49 +000012076 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012078rm -f core conftest.err conftest.$ac_objext \
12079 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012080LIBS=$ac_check_lib_save_LIBS
12081fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
12083$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012085 cat >>confdefs.h <<_ACEOF
12086#define HAVE_LIBRESOLV 1
12087_ACEOF
12088
12089 LIBS="-lresolv $LIBS"
12090
12091fi
12092
12093
12094fi
12095
12096
Christian Heimesd0764e22007-12-04 15:00:33 +000012097# On Tru64, chflags seems to be present, but calling it will
12098# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
12100$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012101if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012105 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012106else
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012108/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012109
Christian Heimesd0764e22007-12-04 15:00:33 +000012110#include <sys/stat.h>
12111#include <unistd.h>
12112int main(int argc, char*argv[])
12113{
12114 if(chflags(argv[0], 0) != 0)
12115 return 1;
12116 return 0;
12117}
Ned Deily3eb67d52011-06-28 00:00:28 -070012118
Christian Heimesd0764e22007-12-04 15:00:33 +000012119_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012120if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012121 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012122else
Matthias Kloseb9621712010-04-24 17:59:49 +000012123 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012124fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012127fi
12128
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012129
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
12132$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012133if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012135if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012136 ac_cv_have_chflags="yes"
12137else
12138 ac_cv_have_chflags="no"
12139fi
12140
12141fi
12142if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012143
Matthias Kloseb9621712010-04-24 17:59:49 +000012144$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012145
12146fi
12147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
12149$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012154 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000012155else
Matthias Kloseb9621712010-04-24 17:59:49 +000012156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000012157/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070012158
Christian Heimesd0764e22007-12-04 15:00:33 +000012159#include <sys/stat.h>
12160#include <unistd.h>
12161int main(int argc, char*argv[])
12162{
12163 if(lchflags(argv[0], 0) != 0)
12164 return 1;
12165 return 0;
12166}
Ned Deily3eb67d52011-06-28 00:00:28 -070012167
Christian Heimesd0764e22007-12-04 15:00:33 +000012168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012170 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000012176fi
12177
12178
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
12181$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012182if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020012184if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000012185 ac_cv_have_lchflags="yes"
12186else
12187 ac_cv_have_lchflags="no"
12188fi
12189
12190fi
12191if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012192
Matthias Kloseb9621712010-04-24 17:59:49 +000012193$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012194
12195fi
12196
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012197case $ac_sys_system/$ac_sys_release in
12198Darwin/*)
12199 _CUR_CFLAGS="${CFLAGS}"
12200 _CUR_LDFLAGS="${LDFLAGS}"
12201 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
12202 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
12203 ;;
12204esac
12205
Matthias Kloseb9621712010-04-24 17:59:49 +000012206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
12207$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012209 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012210else
12211 ac_check_lib_save_LIBS=$LIBS
12212LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012213cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012214/* end confdefs.h. */
12215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216/* Override any GCC internal prototype to avoid an error.
12217 Use char because int might match the return type of a GCC
12218 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012219#ifdef __cplusplus
12220extern "C"
12221#endif
12222char inflateCopy ();
12223int
12224main ()
12225{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012226return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012227 ;
12228 return 0;
12229}
12230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012231if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012232 ac_cv_lib_z_inflateCopy=yes
12233else
Matthias Kloseb9621712010-04-24 17:59:49 +000012234 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012235fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012236rm -f core conftest.err conftest.$ac_objext \
12237 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012238LIBS=$ac_check_lib_save_LIBS
12239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
12241$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012242if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012243
Matthias Kloseb9621712010-04-24 17:59:49 +000012244$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000012245
12246fi
12247
12248
12249case $ac_sys_system/$ac_sys_release in
12250Darwin/*)
12251 CFLAGS="${_CUR_CFLAGS}"
12252 LDFLAGS="${_CUR_LDFLAGS}"
12253 ;;
12254esac
12255
Matthias Kloseb9621712010-04-24 17:59:49 +000012256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12257$as_echo_n "checking for hstrerror... " >&6; }
12258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012260
Martin v. Löwise9416172003-05-03 10:12:45 +000012261#include <netdb.h>
12262
Martin v. Löwise9416172003-05-03 10:12:45 +000012263int
12264main ()
12265{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012266void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012274
Matthias Kloseb159a552010-04-25 21:00:44 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012276$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012277else
Matthias Kloseb9621712010-04-24 17:59:49 +000012278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12279$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012280
12281fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012282rm -f core conftest.err conftest.$ac_objext \
12283 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12286$as_echo_n "checking for inet_aton... " >&6; }
12287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012288/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012289
Martin v. Löwis86d66262006-02-17 08:40:11 +000012290#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012291#include <sys/socket.h>
12292#include <netinet/in.h>
12293#include <arpa/inet.h>
12294
Martin v. Löwise9416172003-05-03 10:12:45 +000012295int
12296main ()
12297{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012298void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012304
Matthias Kloseb9621712010-04-24 17:59:49 +000012305$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012306
Matthias Kloseb159a552010-04-25 21:00:44 +000012307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012308$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12311$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012312
12313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012314rm -f core conftest.err conftest.$ac_objext \
12315 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12318$as_echo_n "checking for inet_pton... " >&6; }
12319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012320/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012321
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012322#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012323#include <sys/socket.h>
12324#include <netinet/in.h>
12325#include <arpa/inet.h>
12326
Martin v. Löwise9416172003-05-03 10:12:45 +000012327int
12328main ()
12329{
12330void* p = inet_pton
12331 ;
12332 return 0;
12333}
12334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012336
Matthias Kloseb9621712010-04-24 17:59:49 +000012337$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012338
Matthias Kloseb159a552010-04-25 21:00:44 +000012339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012341else
Matthias Kloseb9621712010-04-24 17:59:49 +000012342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12343$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012344
12345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012347
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012348# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12350$as_echo_n "checking for setgroups... " >&6; }
12351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012352/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012353
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012354#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012355#ifdef HAVE_GRP_H
12356#include <grp.h>
12357#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012358
Martin v. Löwisd5843682002-11-21 20:41:28 +000012359int
12360main ()
12361{
12362void* p = setgroups
12363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012368
Matthias Kloseb9621712010-04-24 17:59:49 +000012369$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012370
Matthias Kloseb159a552010-04-25 21:00:44 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012372$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012373else
Matthias Kloseb9621712010-04-24 17:59:49 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012376
12377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012379
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012380# check for openpty and forkpty
12381
12382for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012383do :
12384 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012385if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012387#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012388_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012389
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012390else
Matthias Kloseb9621712010-04-24 17:59:49 +000012391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12392$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012393if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012394 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012395else
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012397LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401/* Override any GCC internal prototype to avoid an error.
12402 Use char because int might match the return type of a GCC
12403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012404#ifdef __cplusplus
12405extern "C"
12406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012407char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012408int
12409main ()
12410{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012412 ;
12413 return 0;
12414}
12415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012416if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012418else
Matthias Kloseb9621712010-04-24 17:59:49 +000012419 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012421rm -f core conftest.err conftest.$ac_objext \
12422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012423LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12426$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012427if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012429 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012430else
Matthias Kloseb9621712010-04-24 17:59:49 +000012431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12432$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012433if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012434 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012435else
12436 ac_check_lib_save_LIBS=$LIBS
12437LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012439/* end confdefs.h. */
12440
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441/* Override any GCC internal prototype to avoid an error.
12442 Use char because int might match the return type of a GCC
12443 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012444#ifdef __cplusplus
12445extern "C"
12446#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012447char openpty ();
12448int
12449main ()
12450{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012451return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012452 ;
12453 return 0;
12454}
12455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012456if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012457 ac_cv_lib_bsd_openpty=yes
12458else
Matthias Kloseb9621712010-04-24 17:59:49 +000012459 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012461rm -f core conftest.err conftest.$ac_objext \
12462 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012463LIBS=$ac_check_lib_save_LIBS
12464fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12466$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012467if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012468 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012469 LIBS="$LIBS -lbsd"
12470fi
12471
12472
12473fi
12474
Fred Drake8cef4cf2000-06-28 16:40:38 +000012475
12476fi
12477done
12478
12479for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012480do :
12481 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012482if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012484#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012485_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012486
Fred Drake8cef4cf2000-06-28 16:40:38 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12489$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012490if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012492else
Martin v. Löwis11437992002-04-12 09:54:03 +000012493 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012494LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498/* Override any GCC internal prototype to avoid an error.
12499 Use char because int might match the return type of a GCC
12500 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012501#ifdef __cplusplus
12502extern "C"
12503#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012504char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012515else
Matthias Kloseb9621712010-04-24 17:59:49 +000012516 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012518rm -f core conftest.err conftest.$ac_objext \
12519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012520LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012521fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12523$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012524if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012526 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012527else
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12529$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012530if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012532else
12533 ac_check_lib_save_LIBS=$LIBS
12534LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012536/* end confdefs.h. */
12537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538/* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012541#ifdef __cplusplus
12542extern "C"
12543#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012544char forkpty ();
12545int
12546main ()
12547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012549 ;
12550 return 0;
12551}
12552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012554 ac_cv_lib_bsd_forkpty=yes
12555else
Matthias Kloseb9621712010-04-24 17:59:49 +000012556 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012558rm -f core conftest.err conftest.$ac_objext \
12559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012560LIBS=$ac_check_lib_save_LIBS
12561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12563$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012564if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012565 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012566 LIBS="$LIBS -lbsd"
12567fi
12568
12569
12570fi
12571
Fred Drake8cef4cf2000-06-28 16:40:38 +000012572
12573fi
12574done
12575
Jack Jansendd19cf82001-12-06 22:36:17 +000012576
Michael W. Hudson54241132001-12-07 15:38:26 +000012577# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012578for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012579do :
12580 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12581ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012582if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012584#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012585_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012587fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012588done
12589
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012591ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012592if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012593 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012594
Martin v. Löwis1142de32002-03-29 16:28:31 +000012595else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012596 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012597 *" dup2.$ac_objext "* ) ;;
12598 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012599 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012600esac
12601
Martin v. Löwis1142de32002-03-29 16:28:31 +000012602fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012603
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012604ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012605if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012606 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12607
12608else
12609 case " $LIBOBJS " in
12610 *" strdup.$ac_objext "* ) ;;
12611 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12612 ;;
12613esac
12614
12615fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012616
12617
12618for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012619do :
12620 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012621if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012622 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012623#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012626/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012627#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012628int
12629main ()
12630{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012631getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 ;
12633 return 0;
12634}
12635_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012636if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Matthias Kloseb9621712010-04-24 17:59:49 +000012638$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012639
Guido van Rossum627b2d71993-12-24 10:39:16 +000012640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012642
Guido van Rossum627b2d71993-12-24 10:39:16 +000012643fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012644done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012645
Jack Jansen150753c2003-03-29 22:07:47 +000012646for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012647do :
12648 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012649if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012650 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012651#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012655#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012656int
12657main ()
12658{
12659setpgrp(0,0);
12660 ;
12661 return 0;
12662}
12663_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012667
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012670
12671fi
12672done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012673
Thomas Wouters3a584202000-08-05 23:28:51 +000012674for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012675do :
12676 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012677if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012678 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012679#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012680_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012682/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012683#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012687gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 ;
12689 return 0;
12690}
12691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012692if ac_fn_c_try_compile "$LINENO"; then :
12693
Guido van Rossum627b2d71993-12-24 10:39:16 +000012694else
Skip Montanaro6dead952003-09-25 14:50:04 +000012695
Matthias Kloseb9621712010-04-24 17:59:49 +000012696$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012697
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Guido van Rossum627b2d71993-12-24 10:39:16 +000012699fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012701
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012702fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012703done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704
Michael W. Hudson54241132001-12-07 15:38:26 +000012705
Gregory P. Smith387512c2018-12-30 15:42:32 -080012706# We search for both crypt and crypt_r as one or the other may be defined
12707# This gets us our -lcrypt in LIBS when required on the target platform.
12708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5
12709$as_echo_n "checking for library containing crypt... " >&6; }
12710if ${ac_cv_search_crypt+:} false; then :
12711 $as_echo_n "(cached) " >&6
12712else
12713 ac_func_search_save_LIBS=$LIBS
12714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12715/* end confdefs.h. */
12716
12717/* Override any GCC internal prototype to avoid an error.
12718 Use char because int might match the return type of a GCC
12719 builtin and then its argument prototype would still apply. */
12720#ifdef __cplusplus
12721extern "C"
12722#endif
12723char crypt ();
12724int
12725main ()
12726{
12727return crypt ();
12728 ;
12729 return 0;
12730}
12731_ACEOF
12732for ac_lib in '' crypt; do
12733 if test -z "$ac_lib"; then
12734 ac_res="none required"
12735 else
12736 ac_res=-l$ac_lib
12737 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12738 fi
12739 if ac_fn_c_try_link "$LINENO"; then :
12740 ac_cv_search_crypt=$ac_res
12741fi
12742rm -f core conftest.err conftest.$ac_objext \
12743 conftest$ac_exeext
12744 if ${ac_cv_search_crypt+:} false; then :
12745 break
12746fi
12747done
12748if ${ac_cv_search_crypt+:} false; then :
12749
12750else
12751 ac_cv_search_crypt=no
12752fi
12753rm conftest.$ac_ext
12754LIBS=$ac_func_search_save_LIBS
12755fi
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5
12757$as_echo "$ac_cv_search_crypt" >&6; }
12758ac_res=$ac_cv_search_crypt
12759if test "$ac_res" != no; then :
12760 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12761
12762fi
12763
12764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5
12765$as_echo_n "checking for library containing crypt_r... " >&6; }
12766if ${ac_cv_search_crypt_r+:} false; then :
12767 $as_echo_n "(cached) " >&6
12768else
12769 ac_func_search_save_LIBS=$LIBS
12770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12771/* end confdefs.h. */
12772
12773/* Override any GCC internal prototype to avoid an error.
12774 Use char because int might match the return type of a GCC
12775 builtin and then its argument prototype would still apply. */
12776#ifdef __cplusplus
12777extern "C"
12778#endif
12779char crypt_r ();
12780int
12781main ()
12782{
12783return crypt_r ();
12784 ;
12785 return 0;
12786}
12787_ACEOF
12788for ac_lib in '' crypt; do
12789 if test -z "$ac_lib"; then
12790 ac_res="none required"
12791 else
12792 ac_res=-l$ac_lib
12793 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12794 fi
12795 if ac_fn_c_try_link "$LINENO"; then :
12796 ac_cv_search_crypt_r=$ac_res
12797fi
12798rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext
12800 if ${ac_cv_search_crypt_r+:} false; then :
12801 break
12802fi
12803done
12804if ${ac_cv_search_crypt_r+:} false; then :
12805
12806else
12807 ac_cv_search_crypt_r=no
12808fi
12809rm conftest.$ac_ext
12810LIBS=$ac_func_search_save_LIBS
12811fi
12812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5
12813$as_echo "$ac_cv_search_crypt_r" >&6; }
12814ac_res=$ac_cv_search_crypt_r
12815if test "$ac_res" != no; then :
12816 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12817
12818fi
12819
12820
12821ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r"
12822if test "x$ac_cv_func_crypt_r" = xyes; then :
12823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12824/* end confdefs.h. */
12825
12826#define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */
12827#include <crypt.h>
12828
12829int
12830main ()
12831{
12832
12833struct crypt_data d;
12834char *r = crypt_r("", "", &d);
12835
12836 ;
12837 return 0;
12838}
12839_ACEOF
12840if ac_fn_c_try_compile "$LINENO"; then :
12841
12842$as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h
12843
12844fi
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12846
12847fi
12848
12849
Victor Stinnere0be4232011-10-25 13:06:09 +020012850for ac_func in clock_gettime
12851do :
12852 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12853if test "x$ac_cv_func_clock_gettime" = xyes; then :
12854 cat >>confdefs.h <<_ACEOF
12855#define HAVE_CLOCK_GETTIME 1
12856_ACEOF
12857
12858else
12859
12860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12861$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12862if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12863 $as_echo_n "(cached) " >&6
12864else
12865 ac_check_lib_save_LIBS=$LIBS
12866LIBS="-lrt $LIBS"
12867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12868/* end confdefs.h. */
12869
12870/* Override any GCC internal prototype to avoid an error.
12871 Use char because int might match the return type of a GCC
12872 builtin and then its argument prototype would still apply. */
12873#ifdef __cplusplus
12874extern "C"
12875#endif
12876char clock_gettime ();
12877int
12878main ()
12879{
12880return clock_gettime ();
12881 ;
12882 return 0;
12883}
12884_ACEOF
12885if ac_fn_c_try_link "$LINENO"; then :
12886 ac_cv_lib_rt_clock_gettime=yes
12887else
12888 ac_cv_lib_rt_clock_gettime=no
12889fi
12890rm -f core conftest.err conftest.$ac_objext \
12891 conftest$ac_exeext conftest.$ac_ext
12892LIBS=$ac_check_lib_save_LIBS
12893fi
12894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12895$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12896if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12897
Victor Stinner7efb8332014-08-29 15:41:08 +020012898 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012899 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12900
12901
12902$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12903
12904
12905fi
12906
12907
12908fi
12909done
12910
12911
12912for ac_func in clock_getres
12913do :
12914 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12915if test "x$ac_cv_func_clock_getres" = xyes; then :
12916 cat >>confdefs.h <<_ACEOF
12917#define HAVE_CLOCK_GETRES 1
12918_ACEOF
12919
12920else
12921
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12923$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12924if ${ac_cv_lib_rt_clock_getres+:} false; then :
12925 $as_echo_n "(cached) " >&6
12926else
12927 ac_check_lib_save_LIBS=$LIBS
12928LIBS="-lrt $LIBS"
12929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12930/* end confdefs.h. */
12931
12932/* Override any GCC internal prototype to avoid an error.
12933 Use char because int might match the return type of a GCC
12934 builtin and then its argument prototype would still apply. */
12935#ifdef __cplusplus
12936extern "C"
12937#endif
12938char clock_getres ();
12939int
12940main ()
12941{
12942return clock_getres ();
12943 ;
12944 return 0;
12945}
12946_ACEOF
12947if ac_fn_c_try_link "$LINENO"; then :
12948 ac_cv_lib_rt_clock_getres=yes
12949else
12950 ac_cv_lib_rt_clock_getres=no
12951fi
12952rm -f core conftest.err conftest.$ac_objext \
12953 conftest$ac_exeext conftest.$ac_ext
12954LIBS=$ac_check_lib_save_LIBS
12955fi
12956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12957$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12958if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12959
12960 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12961
12962
12963fi
12964
12965
12966fi
12967done
12968
12969
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012970for ac_func in clock_settime
12971do :
12972 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12973if test "x$ac_cv_func_clock_settime" = xyes; then :
12974 cat >>confdefs.h <<_ACEOF
12975#define HAVE_CLOCK_SETTIME 1
12976_ACEOF
12977
12978else
12979
12980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12981$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12982if ${ac_cv_lib_rt_clock_settime+:} false; then :
12983 $as_echo_n "(cached) " >&6
12984else
12985 ac_check_lib_save_LIBS=$LIBS
12986LIBS="-lrt $LIBS"
12987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12988/* end confdefs.h. */
12989
12990/* Override any GCC internal prototype to avoid an error.
12991 Use char because int might match the return type of a GCC
12992 builtin and then its argument prototype would still apply. */
12993#ifdef __cplusplus
12994extern "C"
12995#endif
12996char clock_settime ();
12997int
12998main ()
12999{
13000return clock_settime ();
13001 ;
13002 return 0;
13003}
13004_ACEOF
13005if ac_fn_c_try_link "$LINENO"; then :
13006 ac_cv_lib_rt_clock_settime=yes
13007else
13008 ac_cv_lib_rt_clock_settime=no
13009fi
13010rm -f core conftest.err conftest.$ac_objext \
13011 conftest$ac_exeext conftest.$ac_ext
13012LIBS=$ac_check_lib_save_LIBS
13013fi
13014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
13015$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
13016if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
13017
13018 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
13019
13020
13021fi
13022
13023
13024fi
13025done
13026
13027
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
13029$as_echo_n "checking for major... " >&6; }
13030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013031/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013032
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013033#if defined(MAJOR_IN_MKDEV)
13034#include <sys/mkdev.h>
13035#elif defined(MAJOR_IN_SYSMACROS)
13036#include <sys/sysmacros.h>
13037#else
13038#include <sys/types.h>
13039#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013040
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013041int
13042main ()
13043{
13044
13045 makedev(major(0),minor(0));
13046
13047 ;
13048 return 0;
13049}
13050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013052
13053
Matthias Kloseb9621712010-04-24 17:59:49 +000013054$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013055
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13057$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013058
13059else
Skip Montanaro6dead952003-09-25 14:50:04 +000013060
Matthias Kloseb9621712010-04-24 17:59:49 +000013061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13062$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000013063
13064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013065rm -f core conftest.err conftest.$ac_objext \
13066 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013067
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013068# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000013069# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000013070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
13071$as_echo_n "checking for getaddrinfo... " >&6; }
13072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013073/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013074
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013075#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013076#include <sys/socket.h>
13077#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000013078#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013079
Martin v. Löwis11437992002-04-12 09:54:03 +000013080int
13081main ()
13082{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013083getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000013084 ;
13085 return 0;
13086}
13087_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013088if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013089 have_getaddrinfo=yes
13090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013092fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013093rm -f core conftest.err conftest.$ac_objext \
13094 conftest$ac_exeext conftest.$ac_ext
13095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
13096$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013097if test $have_getaddrinfo = yes
13098then
Matthias Kloseb9621712010-04-24 17:59:49 +000013099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
13100$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013101 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013102 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013103else
Matthias Kloseb9621712010-04-24 17:59:49 +000013104 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010013105
13106if test "${enable_ipv6+set}" = set; then
13107 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
13108else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013109 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010013110fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013113/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013114
Stefan Krah19c21392012-11-22 23:47:32 +010013115#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116#include <sys/types.h>
13117#include <netdb.h>
13118#include <string.h>
13119#include <sys/socket.h>
13120#include <netinet/in.h>
13121
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013122int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013123{
13124 int passive, gaierr, inet4 = 0, inet6 = 0;
13125 struct addrinfo hints, *ai, *aitop;
13126 char straddr[INET6_ADDRSTRLEN], strport[16];
13127
13128 for (passive = 0; passive <= 1; passive++) {
13129 memset(&hints, 0, sizeof(hints));
13130 hints.ai_family = AF_UNSPEC;
13131 hints.ai_flags = passive ? AI_PASSIVE : 0;
13132 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000013133 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013134 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
13135 (void)gai_strerror(gaierr);
13136 goto bad;
13137 }
13138 for (ai = aitop; ai; ai = ai->ai_next) {
13139 if (ai->ai_addr == NULL ||
13140 ai->ai_addrlen == 0 ||
13141 getnameinfo(ai->ai_addr, ai->ai_addrlen,
13142 straddr, sizeof(straddr), strport, sizeof(strport),
13143 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
13144 goto bad;
13145 }
13146 switch (ai->ai_family) {
13147 case AF_INET:
13148 if (strcmp(strport, "54321") != 0) {
13149 goto bad;
13150 }
13151 if (passive) {
13152 if (strcmp(straddr, "0.0.0.0") != 0) {
13153 goto bad;
13154 }
13155 } else {
13156 if (strcmp(straddr, "127.0.0.1") != 0) {
13157 goto bad;
13158 }
13159 }
13160 inet4++;
13161 break;
13162 case AF_INET6:
13163 if (strcmp(strport, "54321") != 0) {
13164 goto bad;
13165 }
13166 if (passive) {
13167 if (strcmp(straddr, "::") != 0) {
13168 goto bad;
13169 }
13170 } else {
13171 if (strcmp(straddr, "::1") != 0) {
13172 goto bad;
13173 }
13174 }
13175 inet6++;
13176 break;
13177 case AF_UNSPEC:
13178 goto bad;
13179 break;
13180 default:
13181 /* another family support? */
13182 break;
13183 }
13184 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070013185 freeaddrinfo(aitop);
13186 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013187 }
13188
13189 if (!(inet4 == 0 || inet4 == 2))
13190 goto bad;
13191 if (!(inet6 == 0 || inet6 == 2))
13192 goto bad;
13193
13194 if (aitop)
13195 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013196 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013197
13198 bad:
13199 if (aitop)
13200 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013201 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013202}
13203
Martin v. Löwis11437992002-04-12 09:54:03 +000013204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013205if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013206 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013207else
Matthias Kloseb9621712010-04-24 17:59:49 +000013208 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013209fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013210rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13211 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013212fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013213
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013214fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013215
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013217
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
13219$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
13220
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020013221if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013222then
13223 if test $ipv6 = yes
13224 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013225 echo 'Fatal: You must get working getaddrinfo() function.'
13226 echo ' or you can specify "--disable-ipv6"'.
13227 exit 1
13228 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013229else
Martin v. Löwis11437992002-04-12 09:54:03 +000013230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000013232
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013233fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000013234
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013235for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000013236do :
13237 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020013238if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013240#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013242
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013243fi
13244done
13245
Michael W. Hudson54241132001-12-07 15:38:26 +000013246
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013247# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000013248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
13249$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013250if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013252else
Matthias Kloseb9621712010-04-24 17:59:49 +000013253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013254/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013255#include <sys/types.h>
13256#include <sys/time.h>
13257#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
Martin v. Löwis11437992002-04-12 09:54:03 +000013259int
13260main ()
13261{
13262if ((struct tm *) 0)
13263return 0;
13264 ;
13265 return 0;
13266}
13267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013269 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013270else
Matthias Kloseb9621712010-04-24 17:59:49 +000013271 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
13276$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013277if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013278
Matthias Kloseb9621712010-04-24 17:59:49 +000013279$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013280
13281fi
13282
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
13284$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013285if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013286 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013287else
Matthias Kloseb9621712010-04-24 17:59:49 +000013288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013289/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013290#include <sys/types.h>
13291#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013292
Martin v. Löwis11437992002-04-12 09:54:03 +000013293int
13294main ()
13295{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013296struct tm tm;
13297 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 ;
13300 return 0;
13301}
13302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013303if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013304 ac_cv_struct_tm=time.h
13305else
Matthias Kloseb9621712010-04-24 17:59:49 +000013306 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13311$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013312if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013313
Matthias Kloseb9621712010-04-24 17:59:49 +000013314$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013315
13316fi
13317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318ac_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 +000013319#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Matthias Kloseb9621712010-04-24 17:59:49 +000013321"
Victor Stinnere0be4232011-10-25 13:06:09 +020013322if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013323
13324cat >>confdefs.h <<_ACEOF
13325#define HAVE_STRUCT_TM_TM_ZONE 1
13326_ACEOF
13327
13328
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013329fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013330
Martin v. Löwis11437992002-04-12 09:54:03 +000013331if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13332
Matthias Kloseb9621712010-04-24 17:59:49 +000013333$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334
13335else
Matthias Kloseb9621712010-04-24 17:59:49 +000013336 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13337"
Victor Stinnere0be4232011-10-25 13:06:09 +020013338if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340else
Matthias Kloseb9621712010-04-24 17:59:49 +000013341 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342fi
13343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013344cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013345#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346_ACEOF
13347
Matthias Kloseb9621712010-04-24 17:59:49 +000013348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13349$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013350if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013352else
Matthias Kloseb9621712010-04-24 17:59:49 +000013353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013354/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013355#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356#if !HAVE_DECL_TZNAME
13357extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013358#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013359
Martin v. Löwis11437992002-04-12 09:54:03 +000013360int
13361main ()
13362{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013363return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013364 ;
13365 return 0;
13366}
13367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013369 ac_cv_var_tzname=yes
13370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013373rm -f core conftest.err conftest.$ac_objext \
13374 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13377$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013378 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013379
Matthias Kloseb9621712010-04-24 17:59:49 +000013380$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013381
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013382 fi
13383fi
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385ac_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 +020013386if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
13388cat >>confdefs.h <<_ACEOF
13389#define HAVE_STRUCT_STAT_ST_RDEV 1
13390_ACEOF
13391
13392
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013393fi
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395ac_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 +020013396if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013397
Martin v. Löwis11437992002-04-12 09:54:03 +000013398cat >>confdefs.h <<_ACEOF
13399#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13400_ACEOF
13401
13402
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013403fi
13404
Matthias Kloseb9621712010-04-24 17:59:49 +000013405ac_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 +020013406if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013407
13408cat >>confdefs.h <<_ACEOF
13409#define HAVE_STRUCT_STAT_ST_FLAGS 1
13410_ACEOF
13411
13412
13413fi
13414
Matthias Kloseb9621712010-04-24 17:59:49 +000013415ac_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 +020013416if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013417
13418cat >>confdefs.h <<_ACEOF
13419#define HAVE_STRUCT_STAT_ST_GEN 1
13420_ACEOF
13421
13422
13423fi
13424
Matthias Kloseb9621712010-04-24 17:59:49 +000013425ac_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 +020013426if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013427
13428cat >>confdefs.h <<_ACEOF
13429#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13430_ACEOF
13431
13432
13433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435ac_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 +020013436if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013437
Martin v. Löwis11437992002-04-12 09:54:03 +000013438cat >>confdefs.h <<_ACEOF
13439#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13440_ACEOF
13441
13442
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013443fi
13444
Stefan Krah267b6392016-04-26 01:09:18 +020013445ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13446 #include <sys/types.h>
13447 #include <pwd.h>
13448
13449"
13450if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13451
13452cat >>confdefs.h <<_ACEOF
13453#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13454_ACEOF
13455
13456
13457fi
13458ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13459 #include <sys/types.h>
13460 #include <pwd.h>
13461
13462"
13463if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13464
13465cat >>confdefs.h <<_ACEOF
13466#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13467_ACEOF
13468
13469
13470fi
13471
Zachary Ware6a6967e2016-10-01 00:47:27 -050013472# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13473ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13474"
13475if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13476
13477cat >>confdefs.h <<_ACEOF
13478#define HAVE_SIGINFO_T_SI_BAND 1
13479_ACEOF
13480
13481
13482fi
13483
Michael W. Hudson54241132001-12-07 15:38:26 +000013484
Matthias Kloseb9621712010-04-24 17:59:49 +000013485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13486$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013487if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013488 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013489else
Matthias Kloseb159a552010-04-25 21:00:44 +000013490
Matthias Kloseb9621712010-04-24 17:59:49 +000013491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013492/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013493#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013494int
13495main ()
13496{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013497return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ;
13499 return 0;
13500}
13501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013502if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503 ac_cv_header_time_altzone=yes
13504else
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013508
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013509fi
13510
Matthias Kloseb9621712010-04-24 17:59:49 +000013511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13512$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013513if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516
13517fi
13518
Guido van Rossumda88dad1995-01-26 00:46:29 +000013519was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13521$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13522cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013523/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013524
13525#include <sys/types.h>
13526#include <sys/select.h>
13527#include <sys/time.h>
13528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529int
13530main ()
13531{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013532;
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 ;
13534 return 0;
13535}
13536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013537if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013538
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013541
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013542 was_it_defined=yes
13543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13547$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548
Matthias Kloseb9621712010-04-24 17:59:49 +000013549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13550$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013551if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013552 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013553else
Matthias Kloseb9621712010-04-24 17:59:49 +000013554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013555/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013556#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013557int
13558main ()
13559{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013560struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013565if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013566 ac_cv_struct_addrinfo=yes
13567else
Matthias Kloseb9621712010-04-24 17:59:49 +000013568 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13571fi
13572
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13574$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013575if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013578
13579fi
13580
Matthias Kloseb9621712010-04-24 17:59:49 +000013581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13582$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013583if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013585else
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013588
13589# include <sys/types.h>
13590# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013591int
13592main ()
13593{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013594struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 ;
13596 return 0;
13597}
13598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013600 ac_cv_struct_sockaddr_storage=yes
13601else
Matthias Kloseb9621712010-04-24 17:59:49 +000013602 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13605fi
13606
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13608$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013609if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013610
Matthias Kloseb9621712010-04-24 17:59:49 +000013611$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013612
13613fi
13614
Christian Heimesdffa3942016-09-05 23:54:41 +020013615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13616$as_echo_n "checking for sockaddr_alg... " >&6; }
13617if ${ac_cv_struct_sockaddr_alg+:} false; then :
13618 $as_echo_n "(cached) " >&6
13619else
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621/* end confdefs.h. */
13622
13623# include <sys/types.h>
13624# include <sys/socket.h>
13625# include <linux/if_alg.h>
13626int
13627main ()
13628{
13629struct sockaddr_alg s
13630 ;
13631 return 0;
13632}
13633_ACEOF
13634if ac_fn_c_try_compile "$LINENO"; then :
13635 ac_cv_struct_sockaddr_alg=yes
13636else
13637 ac_cv_struct_sockaddr_alg=no
13638fi
13639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13640fi
13641
13642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13643$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13644if test $ac_cv_struct_sockaddr_alg = yes; then
13645
13646$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13647
13648fi
13649
Guido van Rossum627b2d71993-12-24 10:39:16 +000013650# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13653$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013654if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013655 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013656else
Matthias Kloseb9621712010-04-24 17:59:49 +000013657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013659$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013660int
13661main ()
13662{
13663static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013664test_array [0] = 0;
13665return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013666
13667 ;
13668 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013669}
Martin v. Löwis11437992002-04-12 09:54:03 +000013670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013671if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013672 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013673else
Matthias Kloseb9621712010-04-24 17:59:49 +000013674 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013675fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013677fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13679$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013680if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013681 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013682
13683fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013684
Matthias Kloseb9621712010-04-24 17:59:49 +000013685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13686$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013687if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013688 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013689else
Matthias Kloseb9621712010-04-24 17:59:49 +000013690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013691/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693int
13694main ()
13695{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013696
Martin v. Löwis11437992002-04-12 09:54:03 +000013697#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013698 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013700 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013702 char const *const *pcpcc;
13703 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013704 /* NEC SVR4.0.2 mips cc rejects this. */
13705 struct point {int x, y;};
13706 static struct point const zero = {0,0};
13707 /* AIX XL C 1.02.0.0 rejects this.
13708 It does not let you subtract one const X* pointer from another in
13709 an arm of an if-expression whose if-part is not a constant
13710 expression */
13711 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013712 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013713 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714 ++pcpcc;
13715 ppc = (char**) pcpcc;
13716 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013717 { /* SCO 3.2v4 cc rejects this sort of thing. */
13718 char tx;
13719 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013721
Martin v. Löwis11437992002-04-12 09:54:03 +000013722 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013723 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 }
13725 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13726 int x[] = {25, 17};
13727 const int *foo = &x[0];
13728 ++foo;
13729 }
13730 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13731 typedef const int *iptr;
13732 iptr p = 0;
13733 ++p;
13734 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013735 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013737 struct s { int j; const int *ap[3]; } bx;
13738 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 }
13740 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13741 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013742 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013744 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013745#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747 ;
13748 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013749}
Martin v. Löwis11437992002-04-12 09:54:03 +000013750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013752 ac_cv_c_const=yes
13753else
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13759$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013760if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013763
13764fi
13765
Michael W. Hudson54241132001-12-07 15:38:26 +000013766
Guido van Rossumda88dad1995-01-26 00:46:29 +000013767works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13769$as_echo_n "checking for working signed char... " >&6; }
13770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013771/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013772
Martin v. Löwis11437992002-04-12 09:54:03 +000013773int
13774main ()
13775{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013776signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013777 ;
13778 return 0;
13779}
13780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013781if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013782 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013783else
Skip Montanaro6dead952003-09-25 14:50:04 +000013784
Matthias Kloseb9621712010-04-24 17:59:49 +000013785$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013786
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013787
Guido van Rossum7f43da71994-08-01 12:15:30 +000013788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13791$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013792
Guido van Rossumda88dad1995-01-26 00:46:29 +000013793have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13795$as_echo_n "checking for prototypes... " >&6; }
13796cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013797/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013798int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013799int
13800main ()
13801{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013802return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ;
13804 return 0;
13805}
13806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Matthias Kloseb9621712010-04-24 17:59:49 +000013809$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013810
Matthias Kloseb159a552010-04-25 21:00:44 +000013811 have_prototypes=yes
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: $have_prototypes" >&5
13815$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013816
Guido van Rossumda88dad1995-01-26 00:46:29 +000013817works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13819$as_echo_n "checking for variable length prototypes and stdarg.h... " >&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 +000013822
13823#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013824int foo(int x, ...) {
13825 va_list va;
13826 va_start(va, x);
13827 va_arg(va, int);
13828 va_arg(va, char *);
13829 va_arg(va, double);
13830 return 0;
13831}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833int
13834main ()
13835{
Guido van Rossum90eea071996-08-30 20:58:57 +000013836return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ;
13838 return 0;
13839}
13840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013841if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013842
13843
Matthias Kloseb9621712010-04-24 17:59:49 +000013844$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013846 works=yes
13847
Guido van Rossum627b2d71993-12-24 10:39:16 +000013848fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13851$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013852
Martin v. Löwisd6320502004-08-12 13:45:08 +000013853# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13855$as_echo_n "checking for socketpair... " >&6; }
13856cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013857/* end confdefs.h. */
13858
13859#include <sys/types.h>
13860#include <sys/socket.h>
13861
13862int
13863main ()
13864{
13865void *x=socketpair
13866 ;
13867 return 0;
13868}
13869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013870if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013871
Matthias Kloseb9621712010-04-24 17:59:49 +000013872$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013873
Matthias Kloseb159a552010-04-25 21:00:44 +000013874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013875$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013876else
Matthias Kloseb9621712010-04-24 17:59:49 +000013877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13878$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013879
13880fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013882
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013883# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13885$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013887/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013888#include <sys/types.h>
13889#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013890int
13891main ()
13892{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013893struct sockaddr x;
13894x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013895 ;
13896 return 0;
13897}
13898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013899if ac_fn_c_try_compile "$LINENO"; then :
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13901$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Matthias Kloseb9621712010-04-24 17:59:49 +000013903$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013904
13905else
Matthias Kloseb9621712010-04-24 17:59:49 +000013906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13907$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013908
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013911
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013912# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013913
13914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013916if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013917
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013919
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13921$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013922 OLD_CFLAGS=$CFLAGS
13923 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013925/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013926
13927# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013928
Martin v. Löwis11437992002-04-12 09:54:03 +000013929int
13930main ()
13931{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013932
13933 char *name;
13934 struct hostent *he, *res;
13935 char buffer[2048];
13936 int buflen = 2048;
13937 int h_errnop;
13938
13939 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013940
13941 ;
13942 return 0;
13943}
13944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013945if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013946
Matthias Kloseb9621712010-04-24 17:59:49 +000013947 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013948
Martin v. Löwis11437992002-04-12 09:54:03 +000013949
Matthias Kloseb9621712010-04-24 17:59:49 +000013950$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013951
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13953$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013954
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013955else
Skip Montanaro6dead952003-09-25 14:50:04 +000013956
Matthias Kloseb9621712010-04-24 17:59:49 +000013957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13958$as_echo "no" >&6; }
13959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13960$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013962/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013964# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
Martin v. Löwis11437992002-04-12 09:54:03 +000013966int
13967main ()
13968{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013969
13970 char *name;
13971 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013972 char buffer[2048];
13973 int buflen = 2048;
13974 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013975
Matthias Kloseb159a552010-04-25 21:00:44 +000013976 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013977
13978 ;
13979 return 0;
13980}
13981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013982if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013985
Martin v. Löwis11437992002-04-12 09:54:03 +000013986
Matthias Kloseb159a552010-04-25 21:00:44 +000013987$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013988
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13990$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013992else
Skip Montanaro6dead952003-09-25 14:50:04 +000013993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13995$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13997$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13999/* end confdefs.h. */
14000
14001# include <netdb.h>
14002
14003int
14004main ()
14005{
14006
14007 char *name;
14008 struct hostent *he;
14009 struct hostent_data data;
14010
14011 (void) gethostbyname_r(name, he, &data);
14012
14013 ;
14014 return 0;
14015}
14016_ACEOF
14017if ac_fn_c_try_compile "$LINENO"; then :
14018
14019 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
14020
14021
14022$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
14023
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14025$as_echo "yes" >&6; }
14026
14027else
14028
14029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14030$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014031
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014037
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014040 CFLAGS=$OLD_CFLAGS
14041
14042else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044 for ac_func in gethostbyname
14045do :
14046 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020014047if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014050_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014051
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014052fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014053done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014054
Michael W. Hudson54241132001-12-07 15:38:26 +000014055
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000014056fi
14057
Michael W. Hudson54241132001-12-07 15:38:26 +000014058
14059
14060
14061
14062
14063
Guido van Rossum627b2d71993-12-24 10:39:16 +000014064# checks for system services
14065# (none yet)
14066
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014067# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000014068ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020014069if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014070
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
14073$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014074if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014075 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014078LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082/* Override any GCC internal prototype to avoid an error.
14083 Use char because int might match the return type of a GCC
14084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014085#ifdef __cplusplus
14086extern "C"
14087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014088char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014089int
14090main ()
14091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014092return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ;
14094 return 0;
14095}
14096_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014097if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014098 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014099else
Matthias Kloseb9621712010-04-24 17:59:49 +000014100 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014101fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014102rm -f core conftest.err conftest.$ac_objext \
14103 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014104LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
14107$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014108if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 cat >>confdefs.h <<_ACEOF
14110#define HAVE_LIBIEEE 1
14111_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014112
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014113 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014114
Guido van Rossum627b2d71993-12-24 10:39:16 +000014115fi
14116
Michael W. Hudson54241132001-12-07 15:38:26 +000014117
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000014118fi
14119
Michael W. Hudson54241132001-12-07 15:38:26 +000014120
Guido van Rossum7f43da71994-08-01 12:15:30 +000014121# check for --with-libm=...
14122
Guido van Rossum563e7081996-09-10 18:20:48 +000014123case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000014124Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014125*) LIBM=-lm
14126esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
14128$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014131if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014132 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000014133if test "$withval" = no
14134then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000014135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
14136$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014137elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014138then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
14140$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014141else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000014142fi
Guido van Rossum7f253911997-05-09 02:42:48 +000014143else
Matthias Kloseb9621712010-04-24 17:59:49 +000014144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
14145$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014146fi
14147
Guido van Rossum7f43da71994-08-01 12:15:30 +000014148
14149# check for --with-libc=...
14150
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
14152$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014154# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014155if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014156 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000014157if test "$withval" = no
14158then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
14160$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000014161elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000014162then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
14164$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014165else as_fn_error $? "proper usage is --with-libc=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 LIBC=\"$LIBC\"" >&5
14169$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014170fi
14171
Guido van Rossum7f43da71994-08-01 12:15:30 +000014172
Stefan Krah1919b7e2012-03-21 18:25:23 +010014173# **************************************
14174# * Check for gcc x64 inline assembler *
14175# **************************************
14176
14177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
14178$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
14179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14180/* end confdefs.h. */
14181
14182int
14183main ()
14184{
14185
14186 __asm__ __volatile__ ("movq %rcx, %rax");
14187
14188 ;
14189 return 0;
14190}
14191_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014192if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010014193 have_gcc_asm_for_x64=yes
14194else
14195 have_gcc_asm_for_x64=no
14196fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014197rm -f core conftest.err conftest.$ac_objext \
14198 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010014199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
14200$as_echo "$have_gcc_asm_for_x64" >&6; }
14201if test "$have_gcc_asm_for_x64" = yes
14202then
14203
14204$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
14205
14206fi
14207
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014208# **************************************************
14209# * Check for various properties of floating point *
14210# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014211
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5
14213$as_echo_n "checking whether float word ordering is bigendian... " >&6; }
14214if ${ax_cv_c_float_words_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014216else
14217
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014218
14219ax_cv_c_float_words_bigendian=unknown
14220cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014221/* end confdefs.h. */
14222
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014223
14224double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
14225
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014226
14227_ACEOF
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014228if ac_fn_c_try_compile "$LINENO"; then :
14229
14230
14231if grep noonsees conftest.$ac_objext >/dev/null ; then
14232 ax_cv_c_float_words_bigendian=yes
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014233fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014234if grep seesnoon conftest.$ac_objext >/dev/null ; then
14235 if test "$ax_cv_c_float_words_bigendian" = unknown; then
14236 ax_cv_c_float_words_bigendian=no
14237 else
14238 ax_cv_c_float_words_bigendian=unknown
14239 fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014240fi
14241
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014242
14243fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014245fi
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5
14247$as_echo "$ax_cv_c_float_words_bigendian" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014248
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014249case $ax_cv_c_float_words_bigendian in
14250 yes)
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014251
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014252$as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h
14253 ;;
14254 no)
14255 ;;
14256 *)
14257 as_fn_error $? "
14258
14259Unknown float word ordering. You need to manually preset
14260ax_cv_c_float_words_bigendian=no (or yes) according to your system.
14261
14262 " "$LINENO" 5 ;;
14263esac
14264
14265
14266if test "$ax_cv_c_float_words_bigendian" = "yes"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014267then
14268
Matthias Kloseb9621712010-04-24 17:59:49 +000014269$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014270
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014271elif test "$ax_cv_c_float_words_bigendian" = "no"
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014272then
14273
Benjamin Petersonb3b8cb42018-09-18 23:49:05 -070014274$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
14275
14276else
14277 # Some ARM platforms use a mixed-endian representation for doubles.
14278 # While Python doesn't currently have full support for these platforms
14279 # (see e.g., issue 1762561), we can at least make sure that float <-> string
14280 # conversions work.
14281 # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
14282 # or little, then it must be this?
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014285
14286fi
14287
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014288# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014289# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014290# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014291# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014292# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014293# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014294
14295# This inline assembler syntax may also work for suncc and icc,
14296# so we try it on all platforms.
14297
Matthias Kloseb9621712010-04-24 17:59:49 +000014298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14299$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14300cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014301/* end confdefs.h. */
14302
14303int
14304main ()
14305{
14306
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014307 unsigned short cw;
14308 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14309 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014310
14311 ;
14312 return 0;
14313}
14314_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014315if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014316 have_gcc_asm_for_x87=yes
14317else
Matthias Kloseb9621712010-04-24 17:59:49 +000014318 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014319fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014320rm -f core conftest.err conftest.$ac_objext \
14321 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14323$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014324if test "$have_gcc_asm_for_x87" = yes
14325then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014328
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014329fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14332$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14334/* end confdefs.h. */
14335
14336int
14337main ()
14338{
14339
14340 unsigned int fpcr;
14341 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14342 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14343
14344 ;
14345 return 0;
14346}
14347_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014348if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014349 have_gcc_asm_for_mc68881=yes
14350else
14351 have_gcc_asm_for_mc68881=no
14352fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014353rm -f core conftest.err conftest.$ac_objext \
14354 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14356$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14357if test "$have_gcc_asm_for_mc68881" = yes
14358then
14359
14360$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14361
14362fi
14363
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014364# Detect whether system arithmetic is subject to x87-style double
14365# rounding issues. The result of this test has little meaning on non
14366# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14367# mode is round-to-nearest and double rounding issues are present, and
14368# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14370$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014371# $BASECFLAGS may affect the result
14372ac_save_cc="$CC"
14373CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014374if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014375 ac_cv_x87_double_rounding=no
14376else
Matthias Kloseb9621712010-04-24 17:59:49 +000014377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014378/* end confdefs.h. */
14379
14380#include <stdlib.h>
14381#include <math.h>
14382int main() {
14383 volatile double x, y, z;
14384 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14385 x = 0.99999999999999989; /* 1-2**-53 */
14386 y = 1./x;
14387 if (y != 1.)
14388 exit(0);
14389 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14390 x = 1e16;
14391 y = 2.99999;
14392 z = x + y;
14393 if (z != 1e16+4.)
14394 exit(0);
14395 /* both tests show evidence of double rounding */
14396 exit(1);
14397}
14398
14399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014400if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014401 ac_cv_x87_double_rounding=no
14402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014404fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14406 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014407fi
14408
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014409CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14411$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014412if test "$ac_cv_x87_double_rounding" = yes
14413then
14414
Matthias Kloseb9621712010-04-24 17:59:49 +000014415$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014416
14417fi
14418
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014419# ************************************
14420# * Check for mathematical functions *
14421# ************************************
14422
14423LIBS_SAVE=$LIBS
14424LIBS="$LIBS $LIBM"
14425
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014426for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14427do :
14428 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14429ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014430if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014431 cat >>confdefs.h <<_ACEOF
14432#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14433_ACEOF
14434
14435fi
14436done
14437
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014438for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014439do :
14440 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14441ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014442if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014443 cat >>confdefs.h <<_ACEOF
14444#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14445_ACEOF
14446
14447fi
14448done
14449
14450ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14451"
Victor Stinnere0be4232011-10-25 13:06:09 +020014452if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014453 ac_have_decl=1
14454else
14455 ac_have_decl=0
14456fi
14457
14458cat >>confdefs.h <<_ACEOF
14459#define HAVE_DECL_ISINF $ac_have_decl
14460_ACEOF
14461ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14462"
Victor Stinnere0be4232011-10-25 13:06:09 +020014463if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014464 ac_have_decl=1
14465else
14466 ac_have_decl=0
14467fi
14468
14469cat >>confdefs.h <<_ACEOF
14470#define HAVE_DECL_ISNAN $ac_have_decl
14471_ACEOF
14472ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14473"
Victor Stinnere0be4232011-10-25 13:06:09 +020014474if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014475 ac_have_decl=1
14476else
14477 ac_have_decl=0
14478fi
14479
14480cat >>confdefs.h <<_ACEOF
14481#define HAVE_DECL_ISFINITE $ac_have_decl
14482_ACEOF
14483
14484
Mark Dickinsona614f042009-11-28 12:48:43 +000014485# For multiprocessing module, check that sem_open
14486# actually works. For FreeBSD versions <= 7.2,
14487# the kernel module that provides POSIX semaphores
14488# isn't loaded by default, so an attempt to call
14489# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14491$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014492if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014493 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014494else
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014496 ac_cv_posix_semaphores_enabled=yes
14497else
Matthias Kloseb9621712010-04-24 17:59:49 +000014498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014499/* end confdefs.h. */
14500
14501#include <unistd.h>
14502#include <fcntl.h>
14503#include <stdio.h>
14504#include <semaphore.h>
14505#include <sys/stat.h>
14506
14507int main(void) {
14508 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14509 if (a == SEM_FAILED) {
14510 perror("sem_open");
14511 return 1;
14512 }
14513 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014514 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014515 return 0;
14516}
14517
14518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014519if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014520 ac_cv_posix_semaphores_enabled=yes
14521else
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14525 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014526fi
14527
14528
Mark Dickinsona614f042009-11-28 12:48:43 +000014529fi
14530
Matthias Kloseb9621712010-04-24 17:59:49 +000014531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14532$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014533if test $ac_cv_posix_semaphores_enabled = no
14534then
14535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014537
14538fi
14539
Mark Dickinson10683072009-04-18 21:18:19 +000014540# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14542$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014543if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014544 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014547 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014548else
Matthias Kloseb9621712010-04-24 17:59:49 +000014549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014550/* end confdefs.h. */
14551
14552#include <unistd.h>
14553#include <fcntl.h>
14554#include <stdio.h>
14555#include <semaphore.h>
14556#include <sys/stat.h>
14557
14558int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014559 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014560 int count;
14561 int res;
14562 if(a==SEM_FAILED){
14563 perror("sem_open");
14564 return 1;
14565
14566 }
14567 res = sem_getvalue(a, &count);
14568 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014569 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014570 return res==-1 ? 1 : 0;
14571}
14572
Mark Dickinson10683072009-04-18 21:18:19 +000014573_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014574if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014575 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014576else
Matthias Kloseb9621712010-04-24 17:59:49 +000014577 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014578fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014579rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14580 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014581fi
14582
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014583
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014584fi
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14587$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014588if test $ac_cv_broken_sem_getvalue = yes
14589then
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014592
14593fi
14594
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014595ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14596"
14597if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14598 ac_have_decl=1
14599else
14600 ac_have_decl=0
14601fi
14602
14603cat >>confdefs.h <<_ACEOF
14604#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14605_ACEOF
14606ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14607"
14608if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14609 ac_have_decl=1
14610else
14611 ac_have_decl=0
14612fi
14613
14614cat >>confdefs.h <<_ACEOF
14615#define HAVE_DECL_RTLD_NOW $ac_have_decl
14616_ACEOF
14617ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14618"
14619if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14620 ac_have_decl=1
14621else
14622 ac_have_decl=0
14623fi
14624
14625cat >>confdefs.h <<_ACEOF
14626#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14627_ACEOF
14628ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14629"
14630if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14631 ac_have_decl=1
14632else
14633 ac_have_decl=0
14634fi
14635
14636cat >>confdefs.h <<_ACEOF
14637#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14638_ACEOF
14639ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14640"
14641if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14642 ac_have_decl=1
14643else
14644 ac_have_decl=0
14645fi
14646
14647cat >>confdefs.h <<_ACEOF
14648#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14649_ACEOF
14650ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14651"
14652if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14653 ac_have_decl=1
14654else
14655 ac_have_decl=0
14656fi
14657
14658cat >>confdefs.h <<_ACEOF
14659#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14660_ACEOF
14661ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14662"
14663if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14664 ac_have_decl=1
14665else
14666 ac_have_decl=0
14667fi
14668
14669cat >>confdefs.h <<_ACEOF
14670#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14671_ACEOF
Michael Feltc5ae1692017-12-19 13:58:49 +010014672ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h>
14673"
14674if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then :
14675 ac_have_decl=1
14676else
14677 ac_have_decl=0
14678fi
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_DECL_RTLD_MEMBER $ac_have_decl
14682_ACEOF
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014683
14684
Mark Dickinsonbd792642009-03-18 20:06:12 +000014685# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14687$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014688# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014689if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014690 enableval=$enable_big_digits; case $enable_big_digits in
14691yes)
14692 enable_big_digits=30 ;;
14693no)
14694 enable_big_digits=15 ;;
1469515|30)
14696 ;;
14697*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014698 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 +000014699esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14701$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014702
14703cat >>confdefs.h <<_ACEOF
14704#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14705_ACEOF
14706
14707
14708else
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14710$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014711fi
14712
14713
Guido van Rossumef2255b2000-03-10 22:30:29 +000014714# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014715ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014716if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014717
14718
Matthias Kloseb9621712010-04-24 17:59:49 +000014719$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014720
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014721 wchar_h="yes"
14722
Guido van Rossumef2255b2000-03-10 22:30:29 +000014723else
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014725
14726fi
14727
Michael W. Hudson54241132001-12-07 15:38:26 +000014728
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014730# determine wchar_t size
14731if test "$wchar_h" = yes
14732then
Matthias Kloseb9621712010-04-24 17:59:49 +000014733 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14738$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014739if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14743"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 if test "$ac_cv_type_wchar_t" = yes; then
14747 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014749as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014750See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014751 else
14752 ac_cv_sizeof_wchar_t=0
14753 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014755
Martin v. Löwis11437992002-04-12 09:54:03 +000014756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14758$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014759
14760
14761
Martin v. Löwis11437992002-04-12 09:54:03 +000014762cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014763#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014764_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014765
Michael W. Hudson54241132001-12-07 15:38:26 +000014766
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014767fi
14768
Matthias Kloseb9621712010-04-24 17:59:49 +000014769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14770$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014771have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014773/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014774
14775#include <tcl.h>
14776#if TCL_UTF_MAX != 6
14777# error "NOT UCS4_TCL"
14778#endif
14779int
14780main ()
14781{
14782
14783 ;
14784 return 0;
14785}
14786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014787if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014788
14789
Matthias Kloseb9621712010-04-24 17:59:49 +000014790$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014791
14792 have_ucs4_tcl=yes
14793
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14797$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014798
Skip Montanaro6dead952003-09-25 14:50:04 +000014799# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014800if test "$wchar_h" = yes
14801then
14802 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14804$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014805 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014806 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014807else
14808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014810 ac_cv_wchar_t_signed=yes
14811else
Matthias Kloseb9621712010-04-24 17:59:49 +000014812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014813/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014814
14815 #include <wchar.h>
14816 int main()
14817 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014818 /* Success: exit code 0 */
14819 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014820 }
14821
14822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014823if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014824 ac_cv_wchar_t_signed=yes
14825else
Matthias Kloseb9621712010-04-24 17:59:49 +000014826 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014827fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014828rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14829 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014830fi
14831
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014832fi
14833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14835$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014836fi
14837
Michael Osipov3738fad2018-08-24 18:17:19 +020014838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5
14839$as_echo_n "checking whether wchar_t is usable... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014840# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014841if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014842 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014843then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014846
Michael Osipov3738fad2018-08-24 18:17:19 +020014847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14848$as_echo "yes" >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000014849else
Michael Osipov3738fad2018-08-24 18:17:19 +020014850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14851$as_echo "no" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014852fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000014853
14854# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14856$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014857if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014859else
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 ac_cv_c_bigendian=unknown
14861 # See if we're dealing with a universal compiler.
14862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14863/* end confdefs.h. */
14864#ifndef __APPLE_CC__
14865 not a universal capable compiler
14866 #endif
14867 typedef int dummy;
14868
Skip Montanaro6dead952003-09-25 14:50:04 +000014869_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014870if ac_fn_c_try_compile "$LINENO"; then :
14871
14872 # Check for potential -arch flags. It is not universal unless
14873 # there are at least two -arch flags with different values.
14874 ac_arch=
14875 ac_prev=
14876 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14877 if test -n "$ac_prev"; then
14878 case $ac_word in
14879 i?86 | x86_64 | ppc | ppc64)
14880 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14881 ac_arch=$ac_word
14882 else
14883 ac_cv_c_bigendian=universal
14884 break
14885 fi
14886 ;;
14887 esac
14888 ac_prev=
14889 elif test "x$ac_word" = "x-arch"; then
14890 ac_prev=arch
14891 fi
14892 done
14893fi
14894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14895 if test $ac_cv_c_bigendian = unknown; then
14896 # See if sys/param.h defines the BYTE_ORDER macro.
14897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014898/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014899#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014900 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014901
Martin v. Löwis11437992002-04-12 09:54:03 +000014902int
14903main ()
14904{
Matthias Kloseb9621712010-04-24 17:59:49 +000014905#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14906 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14907 && LITTLE_ENDIAN)
14908 bogus endian macros
14909 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014910
14911 ;
14912 return 0;
14913}
14914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014915if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014916 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014918/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014919#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014920 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922int
14923main ()
14924{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014925#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014926 not big endian
14927 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014928
14929 ;
14930 return 0;
14931}
14932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014933if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014934 ac_cv_c_bigendian=yes
14935else
Matthias Kloseb9621712010-04-24 17:59:49 +000014936 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014939fi
14940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941 fi
14942 if test $ac_cv_c_bigendian = unknown; then
14943 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014946#include <limits.h>
14947
Martin v. Löwis11437992002-04-12 09:54:03 +000014948int
14949main ()
14950{
Matthias Kloseb9621712010-04-24 17:59:49 +000014951#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14952 bogus endian macros
14953 #endif
14954
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ;
14956 return 0;
14957}
14958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014959if ac_fn_c_try_compile "$LINENO"; then :
14960 # It does; now see whether it defined to _BIG_ENDIAN or not.
14961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962/* end confdefs.h. */
14963#include <limits.h>
14964
14965int
14966main ()
14967{
14968#ifndef _BIG_ENDIAN
14969 not big endian
14970 #endif
14971
14972 ;
14973 return 0;
14974}
14975_ACEOF
14976if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14982fi
14983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14984 fi
14985 if test $ac_cv_c_bigendian = unknown; then
14986 # Compile a test program.
14987 if test "$cross_compiling" = yes; then :
14988 # Try to guess by grepping values from an object file.
14989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14990/* end confdefs.h. */
14991short int ascii_mm[] =
14992 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14993 short int ascii_ii[] =
14994 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14995 int use_ascii (int i) {
14996 return ascii_mm[i] + ascii_ii[i];
14997 }
14998 short int ebcdic_ii[] =
14999 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
15000 short int ebcdic_mm[] =
15001 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
15002 int use_ebcdic (int i) {
15003 return ebcdic_mm[i] + ebcdic_ii[i];
15004 }
15005 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015006
Matthias Kloseb9621712010-04-24 17:59:49 +000015007int
15008main ()
15009{
15010return use_ascii (foo) == use_ebcdic (foo);
15011 ;
15012 return 0;
15013}
15014_ACEOF
15015if ac_fn_c_try_compile "$LINENO"; then :
15016 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
15017 ac_cv_c_bigendian=yes
15018 fi
15019 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
15020 if test "$ac_cv_c_bigendian" = unknown; then
15021 ac_cv_c_bigendian=no
15022 else
15023 # finding both strings is unlikely to happen, but who knows?
15024 ac_cv_c_bigendian=unknown
15025 fi
15026 fi
15027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015029else
Matthias Kloseb9621712010-04-24 17:59:49 +000015030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015031/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015033int
15034main ()
15035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015036
Matthias Kloseb9621712010-04-24 17:59:49 +000015037 /* Are we little or big endian? From Harbison&Steele. */
15038 union
15039 {
15040 long int l;
15041 char c[sizeof (long int)];
15042 } u;
15043 u.l = 1;
15044 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045
15046 ;
15047 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000015048}
Martin v. Löwis11437992002-04-12 09:54:03 +000015049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015050if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000015051 ac_cv_c_bigendian=no
15052else
Matthias Kloseb9621712010-04-24 17:59:49 +000015053 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000015054fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15056 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000015057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058
Matthias Kloseb9621712010-04-24 17:59:49 +000015059 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
15062$as_echo "$ac_cv_c_bigendian" >&6; }
15063 case $ac_cv_c_bigendian in #(
15064 yes)
15065 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
15066;; #(
15067 no)
15068 ;; #(
15069 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015072
Matthias Kloseb9621712010-04-24 17:59:49 +000015073 ;; #(
15074 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015075 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020015076 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000015078
Michael W. Hudson54241132001-12-07 15:38:26 +000015079
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015080# ABI version string for Python extension modules. This appears between the
15081# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
15082# from the following attributes which affect the ABI of this Python build (in
15083# this order):
15084#
15085# * The Python implementation (always 'cpython-' for us)
15086# * The major and minor version numbers
15087# * --with-pydebug (adds a 'd')
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015088#
15089# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000015090# would get a shared library ABI version tag of 'cpython-32dmu' and shared
15091# libraries would be named 'foo.cpython-32dmu.so'.
Victor Stinner6c44fde2019-04-24 16:10:09 +020015092#
15093# In Python 3.2 and older, --with-wide-unicode added a 'u' flag.
15094# In Python 3.7 and older, --with-pymalloc added a 'm' flag.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015095
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
15097$as_echo_n "checking ABIFLAGS... " >&6; }
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
15099$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
15101$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020015102SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
15104$as_echo "$SOABI" >&6; }
15105
Victor Stinner6d13e5b2019-04-26 18:56:19 +020015106# Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI
15107if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then
Victor Stinner5422e3c2019-04-26 01:40:00 +020015108 # Similar to SOABI but remove "d" flag from ABIFLAGS
15109
15110 ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
15111
15112cat >>confdefs.h <<_ACEOF
15113#define ALT_SOABI "${ALT_SOABI}"
15114_ACEOF
15115
15116fi
15117
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015118
15119case $ac_sys_system in
pxinwr32f5fdd2019-02-27 19:09:28 +080015120 Linux*|GNU*|Darwin|VxWorks)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070015121 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
15122 *)
15123 EXT_SUFFIX=${SHLIB_SUFFIX};;
15124esac
15125
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000015126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
15127$as_echo_n "checking LDVERSION... " >&6; }
15128LDVERSION='$(VERSION)$(ABIFLAGS)'
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15130$as_echo "$LDVERSION" >&6; }
15131
E. M. Brayc994c8f2019-05-24 17:33:47 +020015132# On Android and Cygwin the shared libraries must be linked with libpython.
xdegaye254b3092019-04-29 09:27:40 +020015133
E. M. Brayc994c8f2019-05-24 17:33:47 +020015134if test -z "$ANDROID_API_LEVEL" -o "$MACHDEP" != "cygwin"; then
xdegaye254b3092019-04-29 09:27:40 +020015135 LIBPYTHON=''
15136else
15137 LIBPYTHON="-lpython${VERSION}${ABIFLAGS}"
15138fi
15139
doko@python.org87421192013-01-26 11:39:31 +010015140
doko@ubuntu.com55532312016-06-14 08:55:19 +020015141if test x$PLATFORM_TRIPLET = x; then
15142 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15143else
15144 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15145fi
doko@python.org87421192013-01-26 11:39:31 +010015146
15147
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015148# Check whether right shifting a negative integer extends the sign bit
15149# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15151$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015152if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015154else
Martin v. Löwis11437992002-04-12 09:54:03 +000015155
Matthias Kloseb9621712010-04-24 17:59:49 +000015156if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015157 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015160/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015161
15162int main()
15163{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015164 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015165}
15166
Martin v. Löwis11437992002-04-12 09:54:03 +000015167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015168if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015169 ac_cv_rshift_extends_sign=yes
15170else
Matthias Kloseb9621712010-04-24 17:59:49 +000015171 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015175fi
15176
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177fi
15178
Matthias Kloseb9621712010-04-24 17:59:49 +000015179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15180$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015181if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015182then
Martin v. Löwis11437992002-04-12 09:54:03 +000015183
Matthias Kloseb9621712010-04-24 17:59:49 +000015184$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015185
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015186fi
15187
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015188# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15190$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015191if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015192 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015193else
Martin v. Löwis11437992002-04-12 09:54:03 +000015194
Matthias Kloseb9621712010-04-24 17:59:49 +000015195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015196/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015197#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015198int
15199main ()
15200{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015201
15202 FILE *f = fopen("/dev/null", "r");
15203 flockfile(f);
15204 getc_unlocked(f);
15205 funlockfile(f);
15206
Martin v. Löwis11437992002-04-12 09:54:03 +000015207 ;
15208 return 0;
15209}
15210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015211if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015212 ac_cv_have_getc_unlocked=yes
15213else
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 ac_cv_have_getc_unlocked=no
15215fi
15216rm -f core conftest.err conftest.$ac_objext \
15217 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15221$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015222if test "$ac_cv_have_getc_unlocked" = yes
15223then
Martin v. Löwis11437992002-04-12 09:54:03 +000015224
Matthias Kloseb9621712010-04-24 17:59:49 +000015225$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015226
15227fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015228
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015229# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015230# save the value of LIBS so we don't actually link Python with readline
15231LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015232
Gregory P. Smith18820942008-09-07 06:24:49 +000015233# On some systems we need to link readline to a termcap compatible
15234# library. NOTE: Keep the precedence of listed libraries synchronised
15235# with setup.py.
15236py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15238$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015239for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015240 if test -z "$py_libtermcap"; then
15241 READLINE_LIBS="-lreadline"
15242 else
15243 READLINE_LIBS="-lreadline -l$py_libtermcap"
15244 fi
15245 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015247/* end confdefs.h. */
15248
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015249/* Override any GCC internal prototype to avoid an error.
15250 Use char because int might match the return type of a GCC
15251 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015252#ifdef __cplusplus
15253extern "C"
15254#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015255char readline ();
15256int
15257main ()
15258{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015260 ;
15261 return 0;
15262}
15263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015264if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015265 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015266fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015267rm -f core conftest.err conftest.$ac_objext \
15268 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015269 if test $py_cv_lib_readline = yes; then
15270 break
15271 fi
15272done
15273# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15274#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015275if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15277$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015278else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15280$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015281
Matthias Kloseb9621712010-04-24 17:59:49 +000015282$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015283
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015284fi
15285
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015286# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015288/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015289#include <readline/readline.h>
15290_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015291if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015292 have_readline=yes
15293else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015294 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015295
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015296fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015297rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015298if test $have_readline = yes
15299then
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015301/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015302#include <readline/readline.h>
15303
15304_ACEOF
15305if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015306 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015307
Matthias Kloseb9621712010-04-24 17:59:49 +000015308$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015309
15310fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015311rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015312
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015314/* end confdefs.h. */
15315#include <readline/readline.h>
15316
15317_ACEOF
15318if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015319 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015322
15323fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015324rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015325
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015326fi
15327
Martin v. Löwis0daad592001-09-30 21:09:59 +000015328# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15330$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015331if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015333else
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015335LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339/* Override any GCC internal prototype to avoid an error.
15340 Use char because int might match the return type of a GCC
15341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015342#ifdef __cplusplus
15343extern "C"
15344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015345char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015346int
15347main ()
15348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015350 ;
15351 return 0;
15352}
15353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015355 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015356else
Matthias Kloseb9621712010-04-24 17:59:49 +000015357 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015359rm -f core conftest.err conftest.$ac_objext \
15360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015361LIBS=$ac_check_lib_save_LIBS
15362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15364$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015365if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015366
Matthias Kloseb9621712010-04-24 17:59:49 +000015367$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015368
Martin v. Löwis0daad592001-09-30 21:09:59 +000015369fi
15370
Michael W. Hudson54241132001-12-07 15:38:26 +000015371
Thomas Wouters89d996e2007-09-08 17:39:28 +000015372# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15374$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015375if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015376 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015377else
15378 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015379LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015381/* end confdefs.h. */
15382
15383/* Override any GCC internal prototype to avoid an error.
15384 Use char because int might match the return type of a GCC
15385 builtin and then its argument prototype would still apply. */
15386#ifdef __cplusplus
15387extern "C"
15388#endif
15389char rl_completion_display_matches_hook ();
15390int
15391main ()
15392{
15393return rl_completion_display_matches_hook ();
15394 ;
15395 return 0;
15396}
15397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015398if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015399 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15400else
Matthias Kloseb9621712010-04-24 17:59:49 +000015401 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015403rm -f core conftest.err conftest.$ac_objext \
15404 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015405LIBS=$ac_check_lib_save_LIBS
15406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15408$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015409if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015410
Matthias Kloseb9621712010-04-24 17:59:49 +000015411$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015412
15413fi
15414
15415
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015416# also in 4.0, but not in editline
15417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15418$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15419if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15420 $as_echo_n "(cached) " >&6
15421else
15422 ac_check_lib_save_LIBS=$LIBS
15423LIBS="-lreadline $READLINE_LIBS $LIBS"
15424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15425/* end confdefs.h. */
15426
15427/* Override any GCC internal prototype to avoid an error.
15428 Use char because int might match the return type of a GCC
15429 builtin and then its argument prototype would still apply. */
15430#ifdef __cplusplus
15431extern "C"
15432#endif
15433char rl_resize_terminal ();
15434int
15435main ()
15436{
15437return rl_resize_terminal ();
15438 ;
15439 return 0;
15440}
15441_ACEOF
15442if ac_fn_c_try_link "$LINENO"; then :
15443 ac_cv_lib_readline_rl_resize_terminal=yes
15444else
15445 ac_cv_lib_readline_rl_resize_terminal=no
15446fi
15447rm -f core conftest.err conftest.$ac_objext \
15448 conftest$ac_exeext conftest.$ac_ext
15449LIBS=$ac_check_lib_save_LIBS
15450fi
15451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15452$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15453if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15454
15455$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15456
15457fi
15458
15459
Martin v. Löwis0daad592001-09-30 21:09:59 +000015460# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15462$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015463if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015465else
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015467LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015469/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471/* Override any GCC internal prototype to avoid an error.
15472 Use char because int might match the return type of a GCC
15473 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015474#ifdef __cplusplus
15475extern "C"
15476#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015477char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015478int
15479main ()
15480{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015481return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015482 ;
15483 return 0;
15484}
15485_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015486if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015487 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015488else
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015490fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015491rm -f core conftest.err conftest.$ac_objext \
15492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015493LIBS=$ac_check_lib_save_LIBS
15494fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15496$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015497if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015500
Guido van Rossum353ae582001-07-10 16:45:32 +000015501fi
15502
Jack Jansendd19cf82001-12-06 22:36:17 +000015503
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015504# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015506/* end confdefs.h. */
15507#include <readline/readline.h>
15508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015509if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015510 have_readline=yes
15511else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015512 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015513
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015514fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015515rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015516if test $have_readline = yes
15517then
Matthias Kloseb9621712010-04-24 17:59:49 +000015518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015519/* end confdefs.h. */
15520#include <readline/readline.h>
15521
15522_ACEOF
15523if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015524 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015525
Matthias Kloseb9621712010-04-24 17:59:49 +000015526$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015527
15528fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015529rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015530
15531fi
15532
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15534$as_echo_n "checking for append_history in -lreadline... " >&6; }
15535if ${ac_cv_lib_readline_append_history+:} false; then :
15536 $as_echo_n "(cached) " >&6
15537else
15538 ac_check_lib_save_LIBS=$LIBS
15539LIBS="-lreadline $READLINE_LIBS $LIBS"
15540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15541/* end confdefs.h. */
15542
15543/* Override any GCC internal prototype to avoid an error.
15544 Use char because int might match the return type of a GCC
15545 builtin and then its argument prototype would still apply. */
15546#ifdef __cplusplus
15547extern "C"
15548#endif
15549char append_history ();
15550int
15551main ()
15552{
15553return append_history ();
15554 ;
15555 return 0;
15556}
15557_ACEOF
15558if ac_fn_c_try_link "$LINENO"; then :
15559 ac_cv_lib_readline_append_history=yes
15560else
15561 ac_cv_lib_readline_append_history=no
15562fi
15563rm -f core conftest.err conftest.$ac_objext \
15564 conftest$ac_exeext conftest.$ac_ext
15565LIBS=$ac_check_lib_save_LIBS
15566fi
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15568$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15569if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15570
15571$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15572
15573fi
15574
15575
Martin v. Löwis82bca632006-02-10 20:49:30 +000015576# End of readline checks: restore LIBS
15577LIBS=$LIBS_no_readline
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15580$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015581if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015582 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015583else
Martin v. Löwis11437992002-04-12 09:54:03 +000015584
Matthias Kloseb9621712010-04-24 17:59:49 +000015585if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015586 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015587else
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015590
Benjamin Petersonb84df2d2019-02-25 21:37:59 -080015591#include <stdlib.h>
15592#include <unistd.h>
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015593int main()
15594{
15595 int val1 = nice(1);
15596 if (val1 != -1 && val1 == nice(2))
15597 exit(0);
15598 exit(1);
15599}
15600
Martin v. Löwis11437992002-04-12 09:54:03 +000015601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015602if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015603 ac_cv_broken_nice=yes
15604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015606fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015609fi
15610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611fi
15612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15614$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015615if test "$ac_cv_broken_nice" = yes
15616then
Martin v. Löwis11437992002-04-12 09:54:03 +000015617
Matthias Kloseb9621712010-04-24 17:59:49 +000015618$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015619
15620fi
15621
Matthias Kloseb9621712010-04-24 17:59:49 +000015622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15623$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015624if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015626else
Matthias Kloseb9621712010-04-24 17:59:49 +000015627 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015628 ac_cv_broken_poll=no
15629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015631/* end confdefs.h. */
15632
15633#include <poll.h>
15634
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015635int main()
15636{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015637 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015638 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015639
15640 close (42);
15641
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015642 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015643 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015644 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015645 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015646 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015647 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015648 return 1;
15649}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015650
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015653 ac_cv_broken_poll=yes
15654else
Matthias Kloseb9621712010-04-24 17:59:49 +000015655 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015656fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15658 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015660
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015661fi
15662
Matthias Kloseb9621712010-04-24 17:59:49 +000015663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15664$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015665if test "$ac_cv_broken_poll" = yes
15666then
15667
Matthias Kloseb9621712010-04-24 17:59:49 +000015668$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015669
15670fi
15671
Martin v. Löwis1d459062005-03-14 21:23:33 +000015672# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15674$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015675if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015676 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015677else
15678
Matthias Kloseb9621712010-04-24 17:59:49 +000015679if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015680 ac_cv_working_tzset=no
15681else
Matthias Kloseb9621712010-04-24 17:59:49 +000015682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015683/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015684
15685#include <stdlib.h>
15686#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015687#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015688
15689#if HAVE_TZNAME
15690extern char *tzname[];
15691#endif
15692
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015693int main()
15694{
Brett Cannon18367812003-09-19 00:59:16 +000015695 /* Note that we need to ensure that not only does tzset(3)
15696 do 'something' with localtime, but it works as documented
15697 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015698 This includes making sure that tzname is set properly if
15699 tm->tm_zone does not exist since it is the alternative way
15700 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015701
15702 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015703 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015704 */
15705
Martin v. Löwis1d459062005-03-14 21:23:33 +000015706 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015707 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15708
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015709 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015710 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015711 if (localtime(&groundhogday)->tm_hour != 0)
15712 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015713#if HAVE_TZNAME
15714 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15715 if (strcmp(tzname[0], "UTC") ||
15716 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15717 exit(1);
15718#endif
Brett Cannon18367812003-09-19 00:59:16 +000015719
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015720 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015722 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015723 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015724#if HAVE_TZNAME
15725 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15726 exit(1);
15727#endif
Brett Cannon18367812003-09-19 00:59:16 +000015728
15729 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15730 tzset();
15731 if (localtime(&groundhogday)->tm_hour != 11)
15732 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015733#if HAVE_TZNAME
15734 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15735 exit(1);
15736#endif
15737
15738#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015739 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15740 exit(1);
15741 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15742 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015743#endif
Brett Cannon18367812003-09-19 00:59:16 +000015744
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015745 exit(0);
15746}
15747
15748_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015749if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015750 ac_cv_working_tzset=yes
15751else
Matthias Kloseb9621712010-04-24 17:59:49 +000015752 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015753fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015754rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15755 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015756fi
15757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758fi
15759
Matthias Kloseb9621712010-04-24 17:59:49 +000015760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15761$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015762if test "$ac_cv_working_tzset" = yes
15763then
15764
Matthias Kloseb9621712010-04-24 17:59:49 +000015765$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015766
15767fi
15768
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015769# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15771$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015772if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015773 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015774else
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015776/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015777#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015778int
15779main ()
15780{
15781
15782struct stat st;
15783st.st_mtim.tv_nsec = 1;
15784
15785 ;
15786 return 0;
15787}
15788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015789if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015790 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015791else
Matthias Kloseb9621712010-04-24 17:59:49 +000015792 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15795fi
15796
Matthias Kloseb9621712010-04-24 17:59:49 +000015797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15798$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015799if test "$ac_cv_stat_tv_nsec" = yes
15800then
15801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015803
15804fi
15805
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015806# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15808$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015809if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015811else
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015813/* end confdefs.h. */
15814#include <sys/stat.h>
15815int
15816main ()
15817{
15818
15819struct stat st;
15820st.st_mtimespec.tv_nsec = 1;
15821
15822 ;
15823 return 0;
15824}
15825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015826if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015827 ac_cv_stat_tv_nsec2=yes
15828else
Matthias Kloseb9621712010-04-24 17:59:49 +000015829 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832fi
15833
Matthias Kloseb9621712010-04-24 17:59:49 +000015834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15835$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015836if test "$ac_cv_stat_tv_nsec2" = yes
15837then
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015840
15841fi
15842
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015843# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015844ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015845if test "$cross_compiling" = no; then
15846 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15847fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015848
15849for ac_header in curses.h ncurses.h
15850do :
15851 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15852ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15854 cat >>confdefs.h <<_ACEOF
15855#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15856_ACEOF
15857
15858fi
15859
15860done
15861
15862
15863# On Solaris, term.h requires curses.h
15864for ac_header in term.h
15865do :
15866 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15867#ifdef HAVE_CURSES_H
15868#include <curses.h>
15869#endif
15870
15871"
15872if test "x$ac_cv_header_term_h" = xyes; then :
15873 cat >>confdefs.h <<_ACEOF
15874#define HAVE_TERM_H 1
15875_ACEOF
15876
15877fi
15878
15879done
15880
15881
Jack Jansen666b1e72001-10-31 12:11:48 +000015882# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15884$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015885if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015886 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015887else
Matthias Kloseb9621712010-04-24 17:59:49 +000015888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015889/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015890#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015891int
15892main ()
15893{
Jack Jansen666b1e72001-10-31 12:11:48 +000015894
15895 int rtn;
15896 rtn = mvwdelch(0,0,0);
15897
Martin v. Löwis11437992002-04-12 09:54:03 +000015898 ;
15899 return 0;
15900}
15901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015902if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015903 ac_cv_mvwdelch_is_expression=yes
15904else
Matthias Kloseb9621712010-04-24 17:59:49 +000015905 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015906fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908fi
15909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15911$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015912
15913if test "$ac_cv_mvwdelch_is_expression" = yes
15914then
Martin v. Löwis11437992002-04-12 09:54:03 +000015915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015917
15918fi
15919
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015920# Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque
15921# structs since version 5.7. If the macro is defined as zero before including
15922# [n]curses.h, ncurses will expose fields of the structs regardless of the
15923# configuration.
Matthias Kloseb9621712010-04-24 17:59:49 +000015924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15925$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015926if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015927 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015930/* end confdefs.h. */
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015931
15932 #define NCURSES_OPAQUE 0
15933 #include <curses.h>
15934
Martin v. Löwis11437992002-04-12 09:54:03 +000015935int
15936main ()
15937{
Jack Jansen666b1e72001-10-31 12:11:48 +000015938
15939 WINDOW *w;
15940 w->_flags = 0;
15941
Martin v. Löwis11437992002-04-12 09:54:03 +000015942 ;
15943 return 0;
15944}
15945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015946if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015947 ac_cv_window_has_flags=yes
15948else
Matthias Kloseb9621712010-04-24 17:59:49 +000015949 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015950fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15952fi
15953
Matthias Kloseb9621712010-04-24 17:59:49 +000015954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15955$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015956
Jack Jansen666b1e72001-10-31 12:11:48 +000015957
15958if test "$ac_cv_window_has_flags" = yes
15959then
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
Matthias Kloseb9621712010-04-24 17:59:49 +000015961$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015962
15963fi
15964
Masayuki Yamamoto8bc7d632017-11-01 21:05:26 +090015965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5
15966$as_echo_n "checking for is_pad... " >&6; }
15967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15968/* end confdefs.h. */
15969#include <curses.h>
15970int
15971main ()
15972{
15973
15974#ifndef is_pad
15975void *x=is_pad
15976#endif
15977
15978 ;
15979 return 0;
15980}
15981_ACEOF
15982if ac_fn_c_try_compile "$LINENO"; then :
15983
15984$as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h
15985
15986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15987$as_echo "yes" >&6; }
15988else
15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15990$as_echo "no" >&6; }
15991
15992fi
15993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15996$as_echo_n "checking for is_term_resized... " >&6; }
15997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015998/* end confdefs.h. */
15999#include <curses.h>
16000int
16001main ()
16002{
16003void *x=is_term_resized
16004 ;
16005 return 0;
16006}
16007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016008if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016009
Matthias Kloseb9621712010-04-24 17:59:49 +000016010$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016011
Matthias Kloseb159a552010-04-25 21:00:44 +000016012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016013$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016014else
Matthias Kloseb9621712010-04-24 17:59:49 +000016015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16016$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016017
16018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016019rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16020
Matthias Kloseb9621712010-04-24 17:59:49 +000016021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
16022$as_echo_n "checking for resize_term... " >&6; }
16023cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016024/* end confdefs.h. */
16025#include <curses.h>
16026int
16027main ()
16028{
16029void *x=resize_term
16030 ;
16031 return 0;
16032}
16033_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016034if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016035
Matthias Kloseb9621712010-04-24 17:59:49 +000016036$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016037
Matthias Kloseb159a552010-04-25 21:00:44 +000016038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016039$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016040else
Matthias Kloseb9621712010-04-24 17:59:49 +000016041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16042$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016043
16044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16046
Matthias Kloseb9621712010-04-24 17:59:49 +000016047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
16048$as_echo_n "checking for resizeterm... " >&6; }
16049cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016050/* end confdefs.h. */
16051#include <curses.h>
16052int
16053main ()
16054{
16055void *x=resizeterm
16056 ;
16057 return 0;
16058}
16059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016060if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016061
Matthias Kloseb9621712010-04-24 17:59:49 +000016062$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016063
Matthias Kloseb159a552010-04-25 21:00:44 +000016064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016066else
Matthias Kloseb9621712010-04-24 17:59:49 +000016067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16068$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016069
16070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016072
16073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5
16074$as_echo_n "checking for immedok... " >&6; }
16075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076/* end confdefs.h. */
16077#include <curses.h>
16078int
16079main ()
16080{
16081
16082#ifndef immedok
16083void *x=immedok
16084#endif
16085
16086 ;
16087 return 0;
16088}
16089_ACEOF
16090if ac_fn_c_try_compile "$LINENO"; then :
16091
16092$as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h
16093
16094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16095$as_echo "yes" >&6; }
16096else
16097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16098$as_echo "no" >&6; }
16099
16100fi
16101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16102
16103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5
16104$as_echo_n "checking for syncok... " >&6; }
16105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16106/* end confdefs.h. */
16107#include <curses.h>
16108int
16109main ()
16110{
16111
16112#ifndef syncok
16113void *x=syncok
16114#endif
16115
16116 ;
16117 return 0;
16118}
16119_ACEOF
16120if ac_fn_c_try_compile "$LINENO"; then :
16121
16122$as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h
16123
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16125$as_echo "yes" >&6; }
16126else
16127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16128$as_echo "no" >&6; }
16129
16130fi
16131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16132
Serhiy Storchaka894ebd02017-11-01 14:34:20 +020016133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5
16134$as_echo_n "checking for wchgat... " >&6; }
16135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16136/* end confdefs.h. */
16137#include <curses.h>
16138int
16139main ()
16140{
16141
16142#ifndef wchgat
16143void *x=wchgat
16144#endif
16145
16146 ;
16147 return 0;
16148}
16149_ACEOF
16150if ac_fn_c_try_compile "$LINENO"; then :
16151
16152$as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h
16153
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16155$as_echo "yes" >&6; }
16156else
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16158$as_echo "no" >&6; }
16159
16160fi
16161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16162
Serhiy Storchakabaac01e2017-10-31 13:56:44 +020016163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5
16164$as_echo_n "checking for filter... " >&6; }
16165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16166/* end confdefs.h. */
16167#include <curses.h>
16168int
16169main ()
16170{
16171
16172#ifndef filter
16173void *x=filter
16174#endif
16175
16176 ;
16177 return 0;
16178}
16179_ACEOF
16180if ac_fn_c_try_compile "$LINENO"; then :
16181
16182$as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h
16183
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16185$as_echo "yes" >&6; }
16186else
16187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16188$as_echo "no" >&6; }
16189
16190fi
16191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16192
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5
16194$as_echo_n "checking for has_key... " >&6; }
16195cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196/* end confdefs.h. */
16197#include <curses.h>
16198int
16199main ()
16200{
16201
16202#ifndef has_key
16203void *x=has_key
16204#endif
16205
16206 ;
16207 return 0;
16208}
16209_ACEOF
16210if ac_fn_c_try_compile "$LINENO"; then :
16211
16212$as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h
16213
16214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16215$as_echo "yes" >&6; }
16216else
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16218$as_echo "no" >&6; }
16219
16220fi
16221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16222
16223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5
16224$as_echo_n "checking for typeahead... " >&6; }
16225cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227#include <curses.h>
16228int
16229main ()
16230{
16231
16232#ifndef typeahead
16233void *x=typeahead
16234#endif
16235
16236 ;
16237 return 0;
16238}
16239_ACEOF
16240if ac_fn_c_try_compile "$LINENO"; then :
16241
16242$as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h
16243
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16245$as_echo "yes" >&6; }
16246else
16247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16248$as_echo "no" >&6; }
16249
16250fi
16251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16252
16253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5
16254$as_echo_n "checking for use_env... " >&6; }
16255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16256/* end confdefs.h. */
16257#include <curses.h>
16258int
16259main ()
16260{
16261
16262#ifndef use_env
16263void *x=use_env
16264#endif
16265
16266 ;
16267 return 0;
16268}
16269_ACEOF
16270if ac_fn_c_try_compile "$LINENO"; then :
16271
16272$as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h
16273
16274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16275$as_echo "yes" >&6; }
16276else
16277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16278$as_echo "no" >&6; }
16279
16280fi
16281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016282# last curses configure check
16283CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16286$as_echo "$as_me: checking for device files" >&6;}
16287
16288if test "x$cross_compiling" = xyes; then
16289 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16291$as_echo_n "checking for /dev/ptmx... " >&6; }
16292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16293$as_echo "not set" >&6; }
16294 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16295 fi
16296 if test "${ac_cv_file__dev_ptc+set}" != set; then
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16298$as_echo_n "checking for /dev/ptc... " >&6; }
16299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16300$as_echo "not set" >&6; }
16301 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16302 fi
16303fi
16304
Matthias Kloseb9621712010-04-24 17:59:49 +000016305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16306$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016307if ${ac_cv_file__dev_ptmx+:} false; then :
16308 $as_echo_n "(cached) " >&6
16309else
16310 test "$cross_compiling" = yes &&
16311 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16312if test -r "/dev/ptmx"; then
16313 ac_cv_file__dev_ptmx=yes
16314else
16315 ac_cv_file__dev_ptmx=no
16316fi
16317fi
16318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16319$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16320if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016321
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016322fi
16323
16324if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016325
Matthias Kloseb9621712010-04-24 17:59:49 +000016326$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016327
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16330$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016331if ${ac_cv_file__dev_ptc+:} false; then :
16332 $as_echo_n "(cached) " >&6
16333else
16334 test "$cross_compiling" = yes &&
16335 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16336if test -r "/dev/ptc"; then
16337 ac_cv_file__dev_ptc=yes
16338else
16339 ac_cv_file__dev_ptc=no
16340fi
16341fi
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16343$as_echo "$ac_cv_file__dev_ptc" >&6; }
16344if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016345
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016346fi
16347
16348if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016349
Matthias Kloseb9621712010-04-24 17:59:49 +000016350$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016351
Neal Norwitz865400f2003-03-21 01:42:58 +000016352fi
16353
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016354if test $ac_sys_system = Darwin
16355then
16356 LIBS="$LIBS -framework CoreFoundation"
16357fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016358
Matthias Kloseb9621712010-04-24 17:59:49 +000016359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16360$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016361if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016362 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016363else
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016365 ac_cv_have_size_t_format="cross -- assuming yes"
16366
Thomas Wouters477c8d52006-05-27 19:21:47 +000016367else
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016369/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016370
Thomas Wouters477c8d52006-05-27 19:21:47 +000016371#include <stdio.h>
16372#include <stddef.h>
16373#include <string.h>
16374
Christian Heimes2c181612007-12-17 20:04:13 +000016375#ifdef HAVE_SYS_TYPES_H
16376#include <sys/types.h>
16377#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016378
16379#ifdef HAVE_SSIZE_T
16380typedef ssize_t Py_ssize_t;
16381#elif SIZEOF_VOID_P == SIZEOF_LONG
16382typedef long Py_ssize_t;
16383#else
16384typedef int Py_ssize_t;
16385#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016386
Christian Heimes2c181612007-12-17 20:04:13 +000016387int main()
16388{
16389 char buffer[256];
16390
Thomas Wouters477c8d52006-05-27 19:21:47 +000016391 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16392 return 1;
16393
Thomas Wouters89f507f2006-12-13 04:49:30 +000016394 if (strcmp(buffer, "123"))
16395 return 1;
16396
16397 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16398 return 1;
16399
16400 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016401 return 1;
16402
16403 return 0;
16404}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016405
Thomas Wouters477c8d52006-05-27 19:21:47 +000016406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016407if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016408 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016409else
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016412rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16413 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016414fi
16415
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016416fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16418$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016419if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016420
Matthias Kloseb9621712010-04-24 17:59:49 +000016421$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016422
16423fi
16424
Matthias Kloseb9621712010-04-24 17:59:49 +000016425ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016426#ifdef HAVE_SYS_TYPES_H
16427#include <sys/types.h>
16428#endif
16429#ifdef HAVE_SYS_SOCKET_H
16430#include <sys/socket.h>
16431#endif
16432
Matthias Kloseb9621712010-04-24 17:59:49 +000016433"
Victor Stinnere0be4232011-10-25 13:06:09 +020016434if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016437
Matthias Kloseb9621712010-04-24 17:59:49 +000016438$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016439
16440fi
16441
Michael W. Hudson54241132001-12-07 15:38:26 +000016442
Matthias Kloseb9621712010-04-24 17:59:49 +000016443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16444$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016445if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016446 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016447else
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016449 ac_cv_broken_mbstowcs=no
16450else
Matthias Kloseb9621712010-04-24 17:59:49 +000016451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016452/* end confdefs.h. */
16453
Stefan Krah19c21392012-11-22 23:47:32 +010016454#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016455#include<stdlib.h>
16456int main() {
16457 size_t len = -1;
16458 const char *str = "text";
16459 len = mbstowcs(NULL, str, 0);
16460 return (len != 4);
16461}
16462
16463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016464if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016465 ac_cv_broken_mbstowcs=no
16466else
Matthias Kloseb9621712010-04-24 17:59:49 +000016467 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016468fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016469rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16470 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016471fi
16472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016473fi
16474
Matthias Kloseb9621712010-04-24 17:59:49 +000016475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16476$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016477if test "$ac_cv_broken_mbstowcs" = yes
16478then
16479
Matthias Kloseb9621712010-04-24 17:59:49 +000016480$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016481
16482fi
16483
Antoine Pitroub52ec782009-01-25 16:34:23 +000016484# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16486$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016487
16488# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016489if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016490 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016491if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016492then
16493
Matthias Kloseb9621712010-04-24 17:59:49 +000016494$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016495
Matthias Kloseb9621712010-04-24 17:59:49 +000016496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16497$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016498fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016499if test "$withval" = no
16500then
16501
16502$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16503
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16505$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016506fi
16507
Antoine Pitrou042b1282010-08-13 21:15:58 +000016508else
16509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16510$as_echo "no value specified" >&6; }
16511fi
16512
Antoine Pitroub52ec782009-01-25 16:34:23 +000016513
Matthias Kloseb17289e2012-03-15 19:51:34 +010016514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16515$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16516if ${ac_cv_computed_gotos+:} false; then :
16517 $as_echo_n "(cached) " >&6
16518else
16519 if test "$cross_compiling" = yes; then :
16520 if test "${with_computed_gotos+set}" = set; then
16521 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16522 else
16523 ac_cv_computed_gotos=no
16524 fi
16525else
16526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16527/* end confdefs.h. */
16528
16529int main(int argc, char **argv)
16530{
16531 static void *targets[1] = { &&LABEL1 };
16532 goto LABEL2;
16533LABEL1:
16534 return 0;
16535LABEL2:
16536 goto *targets[0];
16537 return 1;
16538}
16539
16540_ACEOF
16541if ac_fn_c_try_run "$LINENO"; then :
16542 ac_cv_computed_gotos=yes
16543else
16544 ac_cv_computed_gotos=no
16545fi
16546rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16547 conftest.$ac_objext conftest.beam conftest.$ac_ext
16548fi
16549
16550fi
16551
16552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16553$as_echo "$ac_cv_computed_gotos" >&6; }
16554case "$ac_cv_computed_gotos" in yes*)
16555
16556$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16557
16558esac
16559
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016560case $ac_sys_system in
16561AIX*)
16562
16563$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16564 ;;
16565esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016566
Michael W. Hudson54241132001-12-07 15:38:26 +000016567
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016568
16569
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016570for h in `(cd $srcdir;echo Python/thread_*.h)`
16571do
16572 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16573done
16574
Michael W. Hudson54241132001-12-07 15:38:26 +000016575
Victor Stinner21a74a92019-04-11 22:28:12 +020016576SRCDIRS="Parser Objects Python Modules Modules/_io Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16578$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016579for dir in $SRCDIRS; do
16580 if test ! -d $dir; then
16581 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016582 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016583done
Matthias Kloseb9621712010-04-24 17:59:49 +000016584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16585$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016586
Stefan Krah1919b7e2012-03-21 18:25:23 +010016587# Availability of -O2:
16588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16589$as_echo_n "checking for -O2... " >&6; }
16590saved_cflags="$CFLAGS"
16591CFLAGS="-O2"
16592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16593/* end confdefs.h. */
16594
16595int
16596main ()
16597{
16598
16599
16600 ;
16601 return 0;
16602}
16603_ACEOF
16604if ac_fn_c_try_compile "$LINENO"; then :
16605 have_O2=yes
16606else
16607 have_O2=no
16608fi
16609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16611$as_echo "$have_O2" >&6; }
16612CFLAGS="$saved_cflags"
16613
16614# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16615# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16617$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16618saved_cflags="$CFLAGS"
16619CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16620if test "$have_O2" = no; then
16621 CFLAGS=""
16622fi
16623if test "$cross_compiling" = yes; then :
16624 have_glibc_memmove_bug=undefined
16625else
16626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
16628
16629#include <stdio.h>
16630#include <stdlib.h>
16631#include <string.h>
16632void foo(void *p, void *q) { memmove(p, q, 19); }
16633int main() {
16634 char a[32] = "123456789000000000";
16635 foo(&a[9], a);
16636 if (strcmp(a, "123456789123456789000000000") != 0)
16637 return 1;
16638 foo(a, &a[9]);
16639 if (strcmp(a, "123456789000000000") != 0)
16640 return 1;
16641 return 0;
16642}
16643
16644_ACEOF
16645if ac_fn_c_try_run "$LINENO"; then :
16646 have_glibc_memmove_bug=no
16647else
16648 have_glibc_memmove_bug=yes
16649fi
16650rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16651 conftest.$ac_objext conftest.beam conftest.$ac_ext
16652fi
16653
16654CFLAGS="$saved_cflags"
16655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16656$as_echo "$have_glibc_memmove_bug" >&6; }
16657if test "$have_glibc_memmove_bug" = yes; then
16658
16659$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16660
16661fi
16662
16663if test "$have_gcc_asm_for_x87" = yes; then
16664 # Some versions of gcc miscompile inline asm:
16665 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16666 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16667 case $CC in
16668 *gcc*)
16669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16670$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16671 saved_cflags="$CFLAGS"
16672 CFLAGS="-O2"
16673 if test "$cross_compiling" = yes; then :
16674 have_ipa_pure_const_bug=undefined
16675else
16676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16677/* end confdefs.h. */
16678
16679 __attribute__((noinline)) int
16680 foo(int *p) {
16681 int r;
16682 asm ( "movl \$6, (%1)\n\t"
16683 "xorl %0, %0\n\t"
16684 : "=r" (r) : "r" (p) : "memory"
16685 );
16686 return r;
16687 }
16688 int main() {
16689 int p = 8;
16690 if ((foo(&p) ? : p) != 6)
16691 return 1;
16692 return 0;
16693 }
16694
16695_ACEOF
16696if ac_fn_c_try_run "$LINENO"; then :
16697 have_ipa_pure_const_bug=no
16698else
16699 have_ipa_pure_const_bug=yes
16700fi
16701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16702 conftest.$ac_objext conftest.beam conftest.$ac_ext
16703fi
16704
16705 CFLAGS="$saved_cflags"
16706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16707$as_echo "$have_ipa_pure_const_bug" >&6; }
16708 if test "$have_ipa_pure_const_bug" = yes; then
16709
16710$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16711
16712 fi
16713 ;;
16714 esac
16715fi
16716
Victor Stinner4f5366e2015-01-09 02:13:19 +010016717# Check for stdatomic.h
16718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16719$as_echo_n "checking for stdatomic.h... " >&6; }
16720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16721/* end confdefs.h. */
16722
16723
16724 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016725 atomic_int value = ATOMIC_VAR_INIT(1);
Victor Stinner4f5366e2015-01-09 02:13:19 +010016726 int main() {
16727 int loaded_value = atomic_load(&value);
16728 return 0;
16729 }
16730
16731
16732_ACEOF
16733if ac_fn_c_try_link "$LINENO"; then :
16734 have_stdatomic_h=yes
16735else
16736 have_stdatomic_h=no
16737fi
16738rm -f core conftest.err conftest.$ac_objext \
16739 conftest$ac_exeext conftest.$ac_ext
16740
16741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16742$as_echo "$have_stdatomic_h" >&6; }
16743
16744if test "$have_stdatomic_h" = yes; then
16745
16746$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16747
16748fi
16749
16750# Check for GCC >= 4.7 __atomic builtins
16751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16752$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16754/* end confdefs.h. */
16755
16756
16757 volatile int val = 1;
16758 int main() {
16759 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16760 return 0;
16761 }
16762
16763
16764_ACEOF
16765if ac_fn_c_try_link "$LINENO"; then :
16766 have_builtin_atomic=yes
16767else
16768 have_builtin_atomic=no
16769fi
16770rm -f core conftest.err conftest.$ac_objext \
16771 conftest$ac_exeext conftest.$ac_ext
16772
16773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16774$as_echo "$have_builtin_atomic" >&6; }
16775
16776if test "$have_builtin_atomic" = yes; then
16777
16778$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16779
16780fi
16781
Ned Deily322f5ba2013-11-21 23:01:59 -080016782# ensurepip option
16783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16784$as_echo_n "checking for ensurepip... " >&6; }
16785
16786# Check whether --with-ensurepip was given.
16787if test "${with_ensurepip+set}" = set; then :
16788 withval=$with_ensurepip;
16789else
16790 with_ensurepip=upgrade
16791fi
16792
16793case $with_ensurepip in #(
16794 yes|upgrade) :
16795 ENSUREPIP=upgrade ;; #(
16796 install) :
16797 ENSUREPIP=install ;; #(
16798 no) :
16799 ENSUREPIP=no ;; #(
16800 *) :
16801 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16802esac
16803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16804$as_echo "$ENSUREPIP" >&6; }
16805
16806
Victor Stinner35a97c02015-03-08 02:59:09 +010016807# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16809$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16810cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16811/* end confdefs.h. */
16812
16813
16814 #include <dirent.h>
16815
16816 int main() {
16817 struct dirent entry;
16818 return entry.d_type == DT_UNKNOWN;
16819 }
16820
16821
16822_ACEOF
16823if ac_fn_c_try_link "$LINENO"; then :
16824 have_dirent_d_type=yes
16825else
16826 have_dirent_d_type=no
16827fi
16828rm -f core conftest.err conftest.$ac_objext \
16829 conftest$ac_exeext conftest.$ac_ext
16830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16831$as_echo "$have_dirent_d_type" >&6; }
16832
16833if test "$have_dirent_d_type" = yes; then
16834
16835$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16836
16837fi
16838
Victor Stinner9eb57c52015-03-19 22:21:49 +010016839# check if the Linux getrandom() syscall is available
16840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16841$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16842cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16843/* end confdefs.h. */
16844
16845
Victor Stinner1b80b242016-04-12 22:34:58 +020016846 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016847 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016848 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016849
16850 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016851 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016852 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016853 const int flags = GRND_NONBLOCK;
16854 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016855 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016856 return 0;
16857 }
16858
16859
16860_ACEOF
16861if ac_fn_c_try_link "$LINENO"; then :
16862 have_getrandom_syscall=yes
16863else
16864 have_getrandom_syscall=no
16865fi
16866rm -f core conftest.err conftest.$ac_objext \
16867 conftest$ac_exeext conftest.$ac_ext
16868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16869$as_echo "$have_getrandom_syscall" >&6; }
16870
16871if test "$have_getrandom_syscall" = yes; then
16872
16873$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16874
16875fi
16876
Victor Stinner3abf44e2015-09-18 15:38:37 +020016877# check if the getrandom() function is available
16878# the test was written for the Solaris function of <sys/random.h>
16879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16880$as_echo_n "checking for the getrandom() function... " >&6; }
16881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16882/* end confdefs.h. */
16883
16884
16885 #include <sys/random.h>
16886
16887 int main() {
16888 char buffer[1];
16889 const size_t buflen = sizeof(buffer);
16890 const int flags = 0;
16891 /* ignore the result, Python checks for ENOSYS at runtime */
16892 (void)getrandom(buffer, buflen, flags);
16893 return 0;
16894 }
16895
16896
16897_ACEOF
16898if ac_fn_c_try_link "$LINENO"; then :
16899 have_getrandom=yes
16900else
16901 have_getrandom=no
16902fi
16903rm -f core conftest.err conftest.$ac_objext \
16904 conftest$ac_exeext conftest.$ac_ext
16905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16906$as_echo "$have_getrandom" >&6; }
16907
16908if test "$have_getrandom" = yes; then
16909
16910$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16911
16912fi
16913
Neil Schemenauer5741c452019-02-08 10:48:46 -080016914# checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c
16915# shm_* may only be available if linking against librt
16916save_LIBS="$LIBS"
16917save_includes_default="$ac_includes_default"
16918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
16919$as_echo_n "checking for library containing shm_open... " >&6; }
16920if ${ac_cv_search_shm_open+:} false; then :
16921 $as_echo_n "(cached) " >&6
16922else
16923 ac_func_search_save_LIBS=$LIBS
16924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16925/* end confdefs.h. */
16926
16927/* Override any GCC internal prototype to avoid an error.
16928 Use char because int might match the return type of a GCC
16929 builtin and then its argument prototype would still apply. */
16930#ifdef __cplusplus
16931extern "C"
16932#endif
16933char shm_open ();
16934int
16935main ()
16936{
16937return shm_open ();
16938 ;
16939 return 0;
16940}
16941_ACEOF
16942for ac_lib in '' rt; do
16943 if test -z "$ac_lib"; then
16944 ac_res="none required"
16945 else
16946 ac_res=-l$ac_lib
16947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16948 fi
16949 if ac_fn_c_try_link "$LINENO"; then :
16950 ac_cv_search_shm_open=$ac_res
16951fi
16952rm -f core conftest.err conftest.$ac_objext \
16953 conftest$ac_exeext
16954 if ${ac_cv_search_shm_open+:} false; then :
16955 break
16956fi
16957done
16958if ${ac_cv_search_shm_open+:} false; then :
16959
16960else
16961 ac_cv_search_shm_open=no
16962fi
16963rm conftest.$ac_ext
16964LIBS=$ac_func_search_save_LIBS
16965fi
16966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
16967$as_echo "$ac_cv_search_shm_open" >&6; }
16968ac_res=$ac_cv_search_shm_open
16969if test "$ac_res" != no; then :
16970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16971
16972fi
16973
16974if test "$ac_cv_search_shm_open" = "-lrt"; then
16975
16976$as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h
16977
16978fi
16979for ac_header in sys/mman.h
16980do :
16981 ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
16982if test "x$ac_cv_header_sys_mman_h" = xyes; then :
16983 cat >>confdefs.h <<_ACEOF
16984#define HAVE_SYS_MMAN_H 1
16985_ACEOF
16986
16987fi
16988
16989done
16990
16991# temporarily override ac_includes_default for AC_CHECK_FUNCS below
16992ac_includes_default="\
16993${ac_includes_default}
16994#ifndef __cplusplus
16995# ifdef HAVE_SYS_MMAN_H
16996# include <sys/mman.h>
16997# endif
16998#endif
16999"
17000for ac_func in shm_open shm_unlink
17001do :
17002 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17003ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17004if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17005 cat >>confdefs.h <<_ACEOF
17006#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17007_ACEOF
17008
17009fi
17010done
17011
17012# we don't want to link with librt always, restore LIBS
17013LIBS="$save_LIBS"
17014ac_includes_default="$save_includes_default"
17015
Christian Heimesff5be6e2018-01-20 13:19:21 +010017016# Check for usable OpenSSL
17017
17018 found=false
17019
17020# Check whether --with-openssl was given.
17021if test "${with_openssl+set}" = set; then :
17022 withval=$with_openssl;
17023 case "$withval" in
17024 "" | y | ye | yes | n | no)
17025 as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5
17026 ;;
17027 *) ssldirs="$withval"
17028 ;;
17029 esac
17030
17031else
17032
17033 # if pkg-config is installed and openssl has installed a .pc file,
17034 # then use that information and don't search ssldirs
17035 if test -n "$ac_tool_prefix"; then
17036 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
17037set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
17038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17039$as_echo_n "checking for $ac_word... " >&6; }
17040if ${ac_cv_prog_PKG_CONFIG+:} false; then :
17041 $as_echo_n "(cached) " >&6
17042else
17043 if test -n "$PKG_CONFIG"; then
17044 ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test.
17045else
17046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17047for as_dir in $PATH
17048do
17049 IFS=$as_save_IFS
17050 test -z "$as_dir" && as_dir=.
17051 for ac_exec_ext in '' $ac_executable_extensions; do
17052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17053 ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config"
17054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17055 break 2
17056 fi
17057done
17058 done
17059IFS=$as_save_IFS
17060
17061fi
17062fi
17063PKG_CONFIG=$ac_cv_prog_PKG_CONFIG
17064if test -n "$PKG_CONFIG"; then
17065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
17066$as_echo "$PKG_CONFIG" >&6; }
17067else
17068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17069$as_echo "no" >&6; }
17070fi
17071
17072
17073fi
17074if test -z "$ac_cv_prog_PKG_CONFIG"; then
17075 ac_ct_PKG_CONFIG=$PKG_CONFIG
17076 # Extract the first word of "pkg-config", so it can be a program name with args.
17077set dummy pkg-config; ac_word=$2
17078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17079$as_echo_n "checking for $ac_word... " >&6; }
17080if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then :
17081 $as_echo_n "(cached) " >&6
17082else
17083 if test -n "$ac_ct_PKG_CONFIG"; then
17084 ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test.
17085else
17086as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17087for as_dir in $PATH
17088do
17089 IFS=$as_save_IFS
17090 test -z "$as_dir" && as_dir=.
17091 for ac_exec_ext in '' $ac_executable_extensions; do
17092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17093 ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config"
17094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17095 break 2
17096 fi
17097done
17098 done
17099IFS=$as_save_IFS
17100
17101fi
17102fi
17103ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG
17104if test -n "$ac_ct_PKG_CONFIG"; then
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5
17106$as_echo "$ac_ct_PKG_CONFIG" >&6; }
17107else
17108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17109$as_echo "no" >&6; }
17110fi
17111
17112 if test "x$ac_ct_PKG_CONFIG" = x; then
17113 PKG_CONFIG=""
17114 else
17115 case $cross_compiling:$ac_tool_warned in
17116yes:)
17117{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17118$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17119ac_tool_warned=yes ;;
17120esac
17121 PKG_CONFIG=$ac_ct_PKG_CONFIG
17122 fi
17123else
17124 PKG_CONFIG="$ac_cv_prog_PKG_CONFIG"
17125fi
17126
17127 if test x"$PKG_CONFIG" != x""; then
17128 OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
17129 if test $? = 0; then
17130 OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
17131 OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
17132 found=true
17133 fi
17134 fi
17135
17136 # no such luck; use some default ssldirs
17137 if ! $found; then
17138 ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
17139 fi
17140
17141
17142fi
17143
17144
17145
17146 # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
17147 # an 'openssl' subdirectory
17148
17149 if ! $found; then
17150 OPENSSL_INCLUDES=
17151 for ssldir in $ssldirs; do
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5
17153$as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
17154 if test -f "$ssldir/include/openssl/ssl.h"; then
17155 OPENSSL_INCLUDES="-I$ssldir/include"
17156 OPENSSL_LDFLAGS="-L$ssldir/lib"
17157 OPENSSL_LIBS="-lssl -lcrypto"
17158 found=true
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17160$as_echo "yes" >&6; }
17161 break
17162 else
17163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17164$as_echo "no" >&6; }
17165 fi
17166 done
17167
17168 # if the file wasn't found, well, go ahead and try the link anyway -- maybe
17169 # it will just work!
17170 fi
17171
17172 # try the preprocessor and linker with our new flags,
17173 # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
17174
17175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5
17176$as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; }
17177 echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
17178 "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5
17179
17180 save_LIBS="$LIBS"
17181 save_LDFLAGS="$LDFLAGS"
17182 save_CPPFLAGS="$CPPFLAGS"
17183 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17184 LIBS="$OPENSSL_LIBS $LIBS"
17185 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17187/* end confdefs.h. */
17188#include <openssl/ssl.h>
17189int
17190main ()
17191{
17192SSL_new(NULL)
17193 ;
17194 return 0;
17195}
17196_ACEOF
17197if ac_fn_c_try_link "$LINENO"; then :
17198
17199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17200$as_echo "yes" >&6; }
17201 have_openssl=yes
17202
17203else
17204
17205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17206$as_echo "no" >&6; }
17207 have_openssl=no
17208
17209fi
17210rm -f core conftest.err conftest.$ac_objext \
17211 conftest$ac_exeext conftest.$ac_ext
17212 CPPFLAGS="$save_CPPFLAGS"
17213 LDFLAGS="$save_LDFLAGS"
17214 LIBS="$save_LIBS"
17215
17216
17217
17218
17219
17220
17221if test "$have_openssl" = yes; then
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5
17223$as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; }
17224
17225 save_LIBS="$LIBS"
17226 save_LDFLAGS="$LDFLAGS"
17227 save_CPPFLAGS="$CPPFLAGS"
17228 LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
17229 LIBS="$OPENSSL_LIBS $LIBS"
17230 CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
17231
17232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17233/* end confdefs.h. */
17234
17235 #include <openssl/x509_vfy.h>
17236
17237int
17238main ()
17239{
17240
17241 X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new();
17242 X509_VERIFY_PARAM_set1_host(p, "localhost", 0);
17243 X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1");
17244 X509_VERIFY_PARAM_set_hostflags(p, 0);
17245
17246 ;
17247 return 0;
17248}
17249
17250_ACEOF
17251if ac_fn_c_try_link "$LINENO"; then :
17252
17253 ac_cv_has_x509_verify_param_set1_host=yes
17254
17255else
17256
17257 ac_cv_has_x509_verify_param_set1_host=no
17258
17259fi
17260rm -f core conftest.err conftest.$ac_objext \
17261 conftest$ac_exeext conftest.$ac_ext
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5
17263$as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; }
17264 if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then
17265
17266$as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h
17267
17268 fi
17269
17270 CPPFLAGS="$save_CPPFLAGS"
17271 LDFLAGS="$save_LDFLAGS"
17272 LIBS="$save_LIBS"
17273fi
17274
Christian Heimes892d66e2018-01-29 14:10:18 +010017275# ssl module default cipher suite string
17276
17277
17278
17279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5
17280$as_echo_n "checking for --with-ssl-default-suites... " >&6; }
17281
17282# Check whether --with-ssl-default-suites was given.
17283if test "${with_ssl_default_suites+set}" = set; then :
17284 withval=$with_ssl_default_suites;
17285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
17286$as_echo "$withval" >&6; }
17287case "$withval" in
17288 python)
17289 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17290
17291 ;;
17292 openssl)
17293 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h
17294
17295 ;;
17296 *)
17297 $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h
17298
17299 cat >>confdefs.h <<_ACEOF
17300#define PY_SSL_DEFAULT_CIPHER_STRING "$withval"
17301_ACEOF
17302
17303 ;;
17304esac
17305
17306else
17307
17308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5
17309$as_echo "python" >&6; }
17310$as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h
17311
17312
17313fi
17314
17315
17316
Guido van Rossum627b2d71993-12-24 10:39:16 +000017317# generate output files
Victor Stinner0a8e5722019-05-23 03:30:23 +020017318ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000017319
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017320ac_config_files="$ac_config_files Modules/ld_so_aix"
17321
Martin v. Löwis11437992002-04-12 09:54:03 +000017322cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017323# This file is a shell script that caches the results of configure
17324# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000017325# scripts and configure runs, see configure's option --config-cache.
17326# It is not useful on other systems. If it contains results you don't
17327# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017328#
Martin v. Löwis11437992002-04-12 09:54:03 +000017329# config.status only pays attention to the cache file if you give it
17330# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017331#
Skip Montanaro6dead952003-09-25 14:50:04 +000017332# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000017333# loading this file, other *unset* `ac_cv_foo' will be assigned the
17334# following values.
17335
17336_ACEOF
17337
Guido van Rossumf78abae1997-01-21 22:02:36 +000017338# The following way of writing the cache mishandles newlines in values,
17339# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017341# Ultrix sh set writes to stderr and can't be redirected directly,
17342# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017343(
17344 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17345 eval ac_val=\$$ac_var
17346 case $ac_val in #(
17347 *${as_nl}*)
17348 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017349 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17350$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351 esac
17352 case $ac_var in #(
17353 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000017354 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17355 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356 esac ;;
17357 esac
17358 done
17359
Martin v. Löwis11437992002-04-12 09:54:03 +000017360 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017361 case $as_nl`(ac_space=' '; set) 2>&1` in #(
17362 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000017363 # `set' does not quote correctly, so add quotes: double-quote
17364 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000017365 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017366 "s/'/'\\\\''/g;
17367 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000017369 *)
17370 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000017372 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017373 esac |
17374 sort
17375) |
Martin v. Löwis11437992002-04-12 09:54:03 +000017376 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017377 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017379 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000017380 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17381 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017382 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17383 :end' >>confcache
17384if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17385 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017386 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017387 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17388$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020017389 if test ! -f "$cache_file" || test -h "$cache_file"; then
17390 cat confcache >"$cache_file"
17391 else
17392 case $cache_file in #(
17393 */* | ?:*)
17394 mv -f confcache "$cache_file"$$ &&
17395 mv -f "$cache_file"$$ "$cache_file" ;; #(
17396 *)
17397 mv -f confcache "$cache_file" ;;
17398 esac
17399 fi
17400 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017401 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017402 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17403$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017404 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017405fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017406rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000017407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017408test "x$prefix" = xNONE && prefix=$ac_default_prefix
17409# Let make expand exec_prefix.
17410test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000017411
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017412DEFS=-DHAVE_CONFIG_H
17413
Skip Montanaro6dead952003-09-25 14:50:04 +000017414ac_libobjs=
17415ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017416U=
Skip Montanaro6dead952003-09-25 14:50:04 +000017417for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17418 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000017420 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017421 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
17422 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000017423 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17424 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000017425done
17426LIBOBJS=$ac_libobjs
17427
17428LTLIBOBJS=$ac_ltlibobjs
17429
17430
Martin v. Löwis11437992002-04-12 09:54:03 +000017431
Matthias Kloseb9621712010-04-24 17:59:49 +000017432
Victor Stinnere0be4232011-10-25 13:06:09 +020017433: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000017434ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000017435ac_clean_files_save=$ac_clean_files
17436ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000017437{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17438$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17439as_write_fail=0
17440cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017441#! $SHELL
17442# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017443# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017444# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000017445# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000017448ac_cs_recheck=false
17449ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000017450
Matthias Kloseb9621712010-04-24 17:59:49 +000017451SHELL=\${CONFIG_SHELL-$SHELL}
17452export SHELL
17453_ASEOF
17454cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17455## -------------------- ##
17456## M4sh Initialization. ##
17457## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000017458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459# Be more Bourne compatible
17460DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000017461if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 emulate sh
17463 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000017464 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000017465 # is contrary to our usage. Disable this feature.
17466 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017468else
Matthias Kloseb9621712010-04-24 17:59:49 +000017469 case `(set -o) 2>/dev/null` in #(
17470 *posix*) :
17471 set -o posix ;; #(
17472 *) :
17473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017474esac
Michael W. Hudson54241132001-12-07 15:38:26 +000017475fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000017476
17477
Matthias Kloseb9621712010-04-24 17:59:49 +000017478as_nl='
17479'
17480export as_nl
17481# Printing a long string crashes Solaris 7 /usr/bin/printf.
17482as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17483as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17484as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17485# Prefer a ksh shell builtin over an external printf program on Solaris,
17486# but without wasting forks for bash or zsh.
17487if test -z "$BASH_VERSION$ZSH_VERSION" \
17488 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17489 as_echo='print -r --'
17490 as_echo_n='print -rn --'
17491elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17492 as_echo='printf %s\n'
17493 as_echo_n='printf %s'
17494else
17495 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17496 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17497 as_echo_n='/usr/ucb/echo -n'
17498 else
17499 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17500 as_echo_n_body='eval
17501 arg=$1;
17502 case $arg in #(
17503 *"$as_nl"*)
17504 expr "X$arg" : "X\\(.*\\)$as_nl";
17505 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17506 esac;
17507 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17508 '
17509 export as_echo_n_body
17510 as_echo_n='sh -c $as_echo_n_body as_echo'
17511 fi
17512 export as_echo_body
17513 as_echo='sh -c $as_echo_body as_echo'
17514fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017515
17516# The user is always right.
17517if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 PATH_SEPARATOR=:
17519 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17520 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17521 PATH_SEPARATOR=';'
17522 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017523fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017525
17526# IFS
17527# We need space, tab and new line, in precisely that order. Quoting is
17528# there to prevent editors from complaining about space-tab.
17529# (If _AS_PATH_WALK were called with IFS unset, it would disable word
17530# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531IFS=" "" $as_nl"
17532
17533# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020017534as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000017535case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536 *[\\/]* ) as_myself=$0 ;;
17537 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000017538for as_dir in $PATH
17539do
17540 IFS=$as_save_IFS
17541 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000017542 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17543 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000017545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017546 ;;
17547esac
17548# We did not find ourselves, most probably we were run as `sh COMMAND'
17549# in which case we are not to be found in the path.
17550if test "x$as_myself" = x; then
17551 as_myself=$0
17552fi
17553if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017554 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17555 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556fi
17557
Matthias Kloseb9621712010-04-24 17:59:49 +000017558# Unset variables that we do not need and which cause bugs (e.g. in
17559# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
17560# suppresses any "Segmentation fault" message there. '((' could
17561# trigger a bug in pdksh 5.2.14.
17562for as_var in BASH_ENV ENV MAIL MAILPATH
17563do eval test x\${$as_var+set} = xset \
17564 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017565done
17566PS1='$ '
17567PS2='> '
17568PS4='+ '
17569
17570# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000017571LC_ALL=C
17572export LC_ALL
17573LANGUAGE=C
17574export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575
Matthias Kloseb9621712010-04-24 17:59:49 +000017576# CDPATH.
17577(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17578
17579
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017580# as_fn_error STATUS ERROR [LINENO LOG_FD]
17581# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000017582# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17583# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017584# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000017585as_fn_error ()
17586{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017587 as_status=$1; test $as_status -eq 0 && as_status=1
17588 if test "$4"; then
17589 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17590 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000017591 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000017593 as_fn_exit $as_status
17594} # as_fn_error
17595
17596
17597# as_fn_set_status STATUS
17598# -----------------------
17599# Set $? to STATUS, without forking.
17600as_fn_set_status ()
17601{
17602 return $1
17603} # as_fn_set_status
17604
17605# as_fn_exit STATUS
17606# -----------------
17607# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17608as_fn_exit ()
17609{
17610 set +e
17611 as_fn_set_status $1
17612 exit $1
17613} # as_fn_exit
17614
17615# as_fn_unset VAR
17616# ---------------
17617# Portably unset VAR.
17618as_fn_unset ()
17619{
17620 { eval $1=; unset $1;}
17621}
17622as_unset=as_fn_unset
17623# as_fn_append VAR VALUE
17624# ----------------------
17625# Append the text in VALUE to the end of the definition contained in VAR. Take
17626# advantage of any shell optimizations that allow amortized linear growth over
17627# repeated appends, instead of the typical quadratic growth present in naive
17628# implementations.
17629if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17630 eval 'as_fn_append ()
17631 {
17632 eval $1+=\$2
17633 }'
17634else
17635 as_fn_append ()
17636 {
17637 eval $1=\$$1\$2
17638 }
17639fi # as_fn_append
17640
17641# as_fn_arith ARG...
17642# ------------------
17643# Perform arithmetic evaluation on the ARGs, and store the result in the
17644# global $as_val. Take advantage of shells that can avoid forks. The arguments
17645# must be portable across $(()) and expr.
17646if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17647 eval 'as_fn_arith ()
17648 {
17649 as_val=$(( $* ))
17650 }'
17651else
17652 as_fn_arith ()
17653 {
17654 as_val=`expr "$@" || test $? -eq 1`
17655 }
17656fi # as_fn_arith
17657
17658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017659if expr a : '\(a\)' >/dev/null 2>&1 &&
17660 test "X`expr 00001 : '.*\(...\)'`" = X001; then
17661 as_expr=expr
17662else
17663 as_expr=false
17664fi
17665
17666if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17667 as_basename=basename
17668else
17669 as_basename=false
17670fi
17671
Matthias Kloseb9621712010-04-24 17:59:49 +000017672if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17673 as_dirname=dirname
17674else
17675 as_dirname=false
17676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678as_me=`$as_basename -- "$0" ||
17679$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17680 X"$0" : 'X\(//\)$' \| \
17681 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017682$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683 sed '/^.*\/\([^/][^/]*\)\/*$/{
17684 s//\1/
17685 q
17686 }
17687 /^X\/\(\/\/\)$/{
17688 s//\1/
17689 q
17690 }
17691 /^X\/\(\/\).*/{
17692 s//\1/
17693 q
17694 }
17695 s/.*/./; q'`
17696
Matthias Kloseb9621712010-04-24 17:59:49 +000017697# Avoid depending upon Character Ranges.
17698as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17699as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17700as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17701as_cr_digits='0123456789'
17702as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017703
17704ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017705case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017708 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017709 xy) ECHO_C='\c';;
17710 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17711 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017712 esac;;
17713*)
17714 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017715esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017716
Martin v. Löwis11437992002-04-12 09:54:03 +000017717rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017718if test -d conf$$.dir; then
17719 rm -f conf$$.dir/conf$$.file
17720else
17721 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017722 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017724if (echo >conf$$.file) 2>/dev/null; then
17725 if ln -s conf$$.file conf$$ 2>/dev/null; then
17726 as_ln_s='ln -s'
17727 # ... but there are two gotchas:
17728 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17729 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017730 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017731 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017732 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017733 elif ln conf$$.file conf$$ 2>/dev/null; then
17734 as_ln_s=ln
17735 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017736 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017737 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017738else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017739 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017740fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017741rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17742rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017743
Matthias Kloseb9621712010-04-24 17:59:49 +000017744
17745# as_fn_mkdir_p
17746# -------------
17747# Create "$as_dir" as a directory, including parents if necessary.
17748as_fn_mkdir_p ()
17749{
17750
17751 case $as_dir in #(
17752 -*) as_dir=./$as_dir;;
17753 esac
17754 test -d "$as_dir" || eval $as_mkdir_p || {
17755 as_dirs=
17756 while :; do
17757 case $as_dir in #(
17758 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17759 *) as_qdir=$as_dir;;
17760 esac
17761 as_dirs="'$as_qdir' $as_dirs"
17762 as_dir=`$as_dirname -- "$as_dir" ||
17763$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17764 X"$as_dir" : 'X\(//\)[^/]' \| \
17765 X"$as_dir" : 'X\(//\)$' \| \
17766 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17767$as_echo X"$as_dir" |
17768 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17769 s//\1/
17770 q
17771 }
17772 /^X\(\/\/\)[^/].*/{
17773 s//\1/
17774 q
17775 }
17776 /^X\(\/\/\)$/{
17777 s//\1/
17778 q
17779 }
17780 /^X\(\/\).*/{
17781 s//\1/
17782 q
17783 }
17784 s/.*/./; q'`
17785 test -d "$as_dir" && break
17786 done
17787 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017788 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017789
17790
17791} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017792if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017793 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017794else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017795 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017796 as_mkdir_p=false
17797fi
17798
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017799
17800# as_fn_executable_p FILE
17801# -----------------------
17802# Test if FILE is an executable regular file.
17803as_fn_executable_p ()
17804{
17805 test -f "$1" && test -x "$1"
17806} # as_fn_executable_p
17807as_test_x='test -x'
17808as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017809
17810# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017811as_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 +000017812
17813# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017814as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
17816
Martin v. Löwis11437992002-04-12 09:54:03 +000017817exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017818## ----------------------------------- ##
17819## Main body of $CONFIG_STATUS script. ##
17820## ----------------------------------- ##
17821_ASEOF
17822test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017823
Matthias Kloseb9621712010-04-24 17:59:49 +000017824cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17825# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017826# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827# values after options handling.
17828ac_log="
Ned Deily5489bda2018-01-31 17:44:09 -050017829This file was extended by python $as_me 3.8, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017830generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017831
17832 CONFIG_FILES = $CONFIG_FILES
17833 CONFIG_HEADERS = $CONFIG_HEADERS
17834 CONFIG_LINKS = $CONFIG_LINKS
17835 CONFIG_COMMANDS = $CONFIG_COMMANDS
17836 $ $0 $@
17837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017838on `(hostname || uname -n) 2>/dev/null | sed 1q`
17839"
17840
Martin v. Löwis11437992002-04-12 09:54:03 +000017841_ACEOF
17842
Matthias Kloseb9621712010-04-24 17:59:49 +000017843case $ac_config_files in *"
17844"*) set x $ac_config_files; shift; ac_config_files=$*;;
17845esac
17846
17847case $ac_config_headers in *"
17848"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17849esac
17850
17851
17852cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017853# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017854config_files="$ac_config_files"
17855config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017856
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017857_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017858
Matthias Kloseb9621712010-04-24 17:59:49 +000017859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017860ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017861\`$as_me' instantiates files and other configuration actions
17862from templates according to the current configuration. Unless the files
17863and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017864
Matthias Kloseb9621712010-04-24 17:59:49 +000017865Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017866
17867 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017868 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017869 --config print configuration, then exit
17870 -q, --quiet, --silent
17871 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017872 -d, --debug don't remove temporary files
17873 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017874 --file=FILE[:TEMPLATE]
17875 instantiate the configuration file FILE
17876 --header=FILE[:TEMPLATE]
17877 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017878
17879Configuration files:
17880$config_files
17881
17882Configuration headers:
17883$config_headers
17884
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017885Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017886
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017888cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17889ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017890ac_cs_version="\\
Ned Deily5489bda2018-01-31 17:44:09 -050017891python config.status 3.8
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017892configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017894
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017895Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017896This config.status script is free software; the Free Software Foundation
17897gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017898
17899ac_pwd='$ac_pwd'
17900srcdir='$srcdir'
17901INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017902MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017903test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017904_ACEOF
17905
Matthias Kloseb9621712010-04-24 17:59:49 +000017906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17907# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017908ac_need_defaults=:
17909while test $# != 0
17910do
17911 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017912 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17914 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017915 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017916 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017917 --*=)
17918 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17919 ac_optarg=
17920 ac_shift=:
17921 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017923 ac_option=$1
17924 ac_optarg=$2
17925 ac_shift=shift
17926 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017927 esac
17928
Skip Montanaro6dead952003-09-25 14:50:04 +000017929 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017930 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017931 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17932 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017934 $as_echo "$ac_cs_version"; exit ;;
17935 --config | --confi | --conf | --con | --co | --c )
17936 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017937 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017938 debug=: ;;
17939 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017940 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017941 case $ac_optarg in
17942 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017943 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017944 esac
17945 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 ac_need_defaults=false;;
17947 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017948 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017949 case $ac_optarg in
17950 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17951 esac
17952 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017953 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017954 --he | --h)
17955 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017956 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017957Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017958 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017959 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017960 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17961 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17962 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017963
17964 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017965 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017966Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017967
Matthias Kloseb9621712010-04-24 17:59:49 +000017968 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017969 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017970
17971 esac
17972 shift
17973done
17974
Skip Montanaro6dead952003-09-25 14:50:04 +000017975ac_configure_extra_args=
17976
17977if $ac_cs_silent; then
17978 exec 6>/dev/null
17979 ac_configure_extra_args="$ac_configure_extra_args --silent"
17980fi
17981
17982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017984if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017985 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017986 shift
17987 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17988 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017989 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017990 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017991fi
17992
Martin v. Löwis11437992002-04-12 09:54:03 +000017993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017995exec 5>>config.log
17996{
17997 echo
17998 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17999## Running $as_me. ##
18000_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000018001 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018002} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018004_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018005cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018006_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018007
Matthias Kloseb9621712010-04-24 17:59:49 +000018008cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018009
18010# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000018011for ac_config_target in $ac_config_targets
18012do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018013 case $ac_config_target in
18014 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18015 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
18016 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000018017 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
18018 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000018020 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Victor Stinner0a8e5722019-05-23 03:30:23 +020018021 "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010018022 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018023 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018024
Victor Stinnere0be4232011-10-25 13:06:09 +020018025 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018026 esac
18027done
18028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018029
Martin v. Löwis11437992002-04-12 09:54:03 +000018030# If the user did not use the arguments to specify the items to instantiate,
18031# then the envvar interface is used. Set only those that are not.
18032# We use the long form for the default assignment because of an extremely
18033# bizarre bug on SunOS 4.1.3.
18034if $ac_need_defaults; then
18035 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18036 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18037fi
18038
Skip Montanaro6dead952003-09-25 14:50:04 +000018039# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018040# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000018041# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042# Hook for its removal unless debugging.
18043# Note that there is a small window in which the directory will not be cleaned:
18044# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000018045$debug ||
18046{
Victor Stinnere0be4232011-10-25 13:06:09 +020018047 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018048 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020018049 : "${ac_tmp:=$tmp}"
18050 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018051' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000018052 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000018053}
Martin v. Löwis11437992002-04-12 09:54:03 +000018054# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018055
Martin v. Löwis11437992002-04-12 09:54:03 +000018056{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018057 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018058 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000018059} ||
18060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018061 tmp=./conf$$-$RANDOM
18062 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018063} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018064ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000018065
Matthias Kloseb9621712010-04-24 17:59:49 +000018066# Set up the scripts for CONFIG_FILES section.
18067# No need to generate them if there are no CONFIG_FILES.
18068# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018070
Matthias Kloseb9621712010-04-24 17:59:49 +000018071
18072ac_cr=`echo X | tr X '\015'`
18073# On cygwin, bash can eat \r inside `` if the user requested igncr.
18074# But we know of no other shell where ac_cr would be empty at this
18075# point, so we can use a bashism as a fallback.
18076if test "x$ac_cr" = x; then
18077 eval ac_cr=\$\'\\r\'
18078fi
18079ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18080if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018081 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000018082else
18083 ac_cs_awk_cr=$ac_cr
18084fi
18085
Victor Stinnere0be4232011-10-25 13:06:09 +020018086echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018087_ACEOF
18088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089
Matthias Kloseb9621712010-04-24 17:59:49 +000018090{
18091 echo "cat >conf$$subs.awk <<_ACEOF" &&
18092 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18093 echo "_ACEOF"
18094} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018095 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18096ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018097ac_delim='%!_!# '
18098for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000018099 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018100 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018101
Matthias Kloseb9621712010-04-24 17:59:49 +000018102 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18103 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104 break
18105 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018106 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107 else
18108 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000018109 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018110done
Matthias Kloseb9621712010-04-24 17:59:49 +000018111rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018112
Matthias Kloseb9621712010-04-24 17:59:49 +000018113cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020018114cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018116sed -n '
18117h
18118s/^/S["/; s/!.*/"]=/
18119p
18120g
18121s/^[^!]*!//
18122:repl
18123t repl
18124s/'"$ac_delim"'$//
18125t delim
18126:nl
18127h
18128s/\(.\{148\}\)..*/\1/
18129t more1
18130s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18131p
18132n
18133b repl
18134:more1
18135s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18136p
18137g
18138s/.\{148\}//
18139t nl
18140:delim
18141h
18142s/\(.\{148\}\)..*/\1/
18143t more2
18144s/["\\]/\\&/g; s/^/"/; s/$/"/
18145p
18146b
18147:more2
18148s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18149p
18150g
18151s/.\{148\}//
18152t delim
18153' <conf$$subs.awk | sed '
18154/^[^""]/{
18155 N
18156 s/\n//
18157}
18158' >>$CONFIG_STATUS || ac_write_fail=1
18159rm -f conf$$subs.awk
18160cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18161_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020018162cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018163 for (key in S) S_is_set[key] = 1
18164 FS = ""
18165
18166}
18167{
18168 line = $ 0
18169 nfields = split(line, field, "@")
18170 substed = 0
18171 len = length(field[1])
18172 for (i = 2; i < nfields; i++) {
18173 key = field[i]
18174 keylen = length(key)
18175 if (S_is_set[key]) {
18176 value = S[key]
18177 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18178 len += length(value) + length(field[++i])
18179 substed = 1
18180 } else
18181 len += 1 + keylen
18182 }
18183
18184 print line
18185}
18186
18187_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018189cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18190if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18191 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18192else
18193 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020018194fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018195 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000018196_ACEOF
18197
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018198# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18199# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018200# trailing colons and then remove the whole line if VPATH becomes empty
18201# (actually we leave an empty line to preserve line numbers).
18202if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018203 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
18204h
18205s///
18206s/^/:/
18207s/[ ]*$/:/
18208s/:\$(srcdir):/:/g
18209s/:\${srcdir}:/:/g
18210s/:@srcdir@:/:/g
18211s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018212s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018213x
18214s/\(=[ ]*\).*/\1/
18215G
18216s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217s/^[^=]*=[ ]*$//
18218}'
18219fi
18220
Matthias Kloseb9621712010-04-24 17:59:49 +000018221cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018222fi # test -n "$CONFIG_FILES"
18223
Matthias Kloseb9621712010-04-24 17:59:49 +000018224# Set up the scripts for CONFIG_HEADERS section.
18225# No need to generate them if there are no CONFIG_HEADERS.
18226# This happens for instance with `./config.status Makefile'.
18227if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020018228cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018229BEGIN {
18230_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018231
Matthias Kloseb9621712010-04-24 17:59:49 +000018232# Transform confdefs.h into an awk script `defines.awk', embedded as
18233# here-document in config.status, that substitutes the proper values into
18234# config.h.in to produce config.h.
18235
18236# Create a delimiter string that does not exist in confdefs.h, to ease
18237# handling of long lines.
18238ac_delim='%!_!# '
18239for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020018240 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18241 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018242 break
18243 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018244 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018245 else
18246 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18247 fi
18248done
18249
18250# For the awk script, D is an array of macro values keyed by name,
18251# likewise P contains macro parameters if any. Preserve backslash
18252# newline sequences.
18253
18254ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18255sed -n '
18256s/.\{148\}/&'"$ac_delim"'/g
18257t rset
18258:rset
18259s/^[ ]*#[ ]*define[ ][ ]*/ /
18260t def
18261d
18262:def
18263s/\\$//
18264t bsnl
18265s/["\\]/\\&/g
18266s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18267D["\1"]=" \3"/p
18268s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
18269d
18270:bsnl
18271s/["\\]/\\&/g
18272s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
18273D["\1"]=" \3\\\\\\n"\\/p
18274t cont
18275s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18276t cont
18277d
18278:cont
18279n
18280s/.\{148\}/&'"$ac_delim"'/g
18281t clear
18282:clear
18283s/\\$//
18284t bsnlc
18285s/["\\]/\\&/g; s/^/"/; s/$/"/p
18286d
18287:bsnlc
18288s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18289b cont
18290' <confdefs.h | sed '
18291s/'"$ac_delim"'/"\\\
18292"/g' >>$CONFIG_STATUS || ac_write_fail=1
18293
18294cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18295 for (key in D) D_is_set[key] = 1
18296 FS = ""
18297}
18298/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18299 line = \$ 0
18300 split(line, arg, " ")
18301 if (arg[1] == "#") {
18302 defundef = arg[2]
18303 mac1 = arg[3]
18304 } else {
18305 defundef = substr(arg[1], 2)
18306 mac1 = arg[2]
18307 }
18308 split(mac1, mac2, "(") #)
18309 macro = mac2[1]
18310 prefix = substr(line, 1, index(line, defundef) - 1)
18311 if (D_is_set[macro]) {
18312 # Preserve the white space surrounding the "#".
18313 print prefix "define", macro P[macro] D[macro]
18314 next
18315 } else {
18316 # Replace #undef with comments. This is necessary, for example,
18317 # in the case of _POSIX_SOURCE, which is predefined and required
18318 # on some systems where configure will not decide to define it.
18319 if (defundef == "undef") {
18320 print "/*", prefix defundef, macro, "*/"
18321 next
18322 }
18323 }
18324}
18325{ print }
18326_ACAWK
18327_ACEOF
18328cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018329 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018330fi # test -n "$CONFIG_HEADERS"
18331
18332
18333eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
18334shift
18335for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018336do
18337 case $ac_tag in
18338 :[FHLC]) ac_mode=$ac_tag; continue;;
18339 esac
18340 case $ac_mode$ac_tag in
18341 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020018342 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018343 :[FH]-) ac_tag=-:-;;
18344 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18345 esac
18346 ac_save_IFS=$IFS
18347 IFS=:
18348 set x $ac_tag
18349 IFS=$ac_save_IFS
18350 shift
18351 ac_file=$1
18352 shift
18353
18354 case $ac_mode in
18355 :L) ac_source=$1;;
18356 :[FH])
18357 ac_file_inputs=
18358 for ac_f
18359 do
18360 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020018361 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018362 *) # Look for the file first in the build tree, then in the source tree
18363 # (if the path is not absolute). The absolute path cannot be DOS-style,
18364 # because $ac_f cannot contain `:'.
18365 test -f "$ac_f" ||
18366 case $ac_f in
18367 [\\/$]*) false;;
18368 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18369 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020018370 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018371 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000018372 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18373 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018374 done
18375
18376 # Let's still pretend it is `configure' which instantiates (i.e., don't
18377 # use $as_me), people would be surprised to read:
18378 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000018379 configure_input='Generated from '`
18380 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18381 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382 if test x"$ac_file" != x-; then
18383 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000018384 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18385$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018386 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000018387 # Neutralize special characters interpreted by sed in replacement strings.
18388 case $configure_input in #(
18389 *\&* | *\|* | *\\* )
18390 ac_sed_conf_input=`$as_echo "$configure_input" |
18391 sed 's/[\\\\&|]/\\\\&/g'`;; #(
18392 *) ac_sed_conf_input=$configure_input;;
18393 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018394
18395 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020018396 *:-:* | *:-) cat >"$ac_tmp/stdin" \
18397 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398 esac
18399 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 esac
18401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018402 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018403$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018404 X"$ac_file" : 'X\(//\)[^/]' \| \
18405 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000018407$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018408 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18409 s//\1/
18410 q
18411 }
18412 /^X\(\/\/\)[^/].*/{
18413 s//\1/
18414 q
18415 }
18416 /^X\(\/\/\)$/{
18417 s//\1/
18418 q
18419 }
18420 /^X\(\/\).*/{
18421 s//\1/
18422 q
18423 }
18424 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000018425 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000018426 ac_builddir=.
18427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428case "$ac_dir" in
18429.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18430*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018431 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018432 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000018433 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 case $ac_top_builddir_sub in
18435 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18436 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18437 esac ;;
18438esac
18439ac_abs_top_builddir=$ac_pwd
18440ac_abs_builddir=$ac_pwd$ac_dir_suffix
18441# for backward compatibility:
18442ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000018443
18444case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018445 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018447 ac_top_srcdir=$ac_top_builddir_sub
18448 ac_abs_top_srcdir=$ac_pwd ;;
18449 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000018450 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018451 ac_top_srcdir=$srcdir
18452 ac_abs_top_srcdir=$srcdir ;;
18453 *) # Relative name.
18454 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18455 ac_top_srcdir=$ac_top_build_prefix$srcdir
18456 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018457esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000018459
Martin v. Löwis11437992002-04-12 09:54:03 +000018460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018461 case $ac_mode in
18462 :F)
18463 #
18464 # CONFIG_FILE
18465 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018466
18467 case $INSTALL in
18468 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018470 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010018471 ac_MKDIR_P=$MKDIR_P
18472 case $MKDIR_P in
18473 [\\/$]* | ?:[\\/]* ) ;;
18474 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
18475 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000018476_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018477
Matthias Kloseb9621712010-04-24 17:59:49 +000018478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018479# If the template does not know about datarootdir, expand it.
18480# FIXME: This hack should be removed a few years after 2.60.
18481ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000018482ac_sed_dataroot='
18483/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484 p
18485 q
18486}
18487/@datadir@/p
18488/@docdir@/p
18489/@infodir@/p
18490/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000018491/@mandir@/p'
18492case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018493*datarootdir*) ac_datarootdir_seen=yes;;
18494*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000018495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18496$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018499 ac_datarootdir_hack='
18500 s&@datadir@&$datadir&g
18501 s&@docdir@&$docdir&g
18502 s&@infodir@&$infodir&g
18503 s&@localedir@&$localedir&g
18504 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000018505 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018506esac
18507_ACEOF
18508
18509# Neutralize VPATH when `$srcdir' = `.'.
18510# Shell code in configure.ac might set extrasub.
18511# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000018512cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18513ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000018514$extrasub
18515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000018516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000018517:t
18518/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000018519s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018520s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000018521s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018522s&@srcdir@&$ac_srcdir&;t t
18523s&@abs_srcdir@&$ac_abs_srcdir&;t t
18524s&@top_srcdir@&$ac_top_srcdir&;t t
18525s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18526s&@builddir@&$ac_builddir&;t t
18527s&@abs_builddir@&$ac_abs_builddir&;t t
18528s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18529s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010018530s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018531$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000018532"
Victor Stinnere0be4232011-10-25 13:06:09 +020018533eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18534 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018536test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020018537 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18538 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
18539 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000018540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018541which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000018542$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018543which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000018544
Victor Stinnere0be4232011-10-25 13:06:09 +020018545 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000018546 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020018547 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18548 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000018549 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018550 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018551 ;;
18552 :H)
18553 #
18554 # CONFIG_HEADER
18555 #
Martin v. Löwis11437992002-04-12 09:54:03 +000018556 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018557 {
18558 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018559 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18560 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018561 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020018562 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000018563 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18564$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018566 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020018567 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018568 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 fi
18570 else
Matthias Kloseb9621712010-04-24 17:59:49 +000018571 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020018572 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018573 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000018574 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018575 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018577
18578 esac
18579
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000018580
18581 case $ac_file$ac_mode in
18582 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
18583
18584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018585done # for ac_tag
18586
Guido van Rossum627b2d71993-12-24 10:39:16 +000018587
Matthias Kloseb9621712010-04-24 17:59:49 +000018588as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000018589_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018590ac_clean_files=$ac_clean_files_save
18591
Matthias Kloseb9621712010-04-24 17:59:49 +000018592test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018593 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000018594
Martin v. Löwis11437992002-04-12 09:54:03 +000018595
18596# configure is writing to config.log, and then calls config.status.
18597# config.status does its own redirection, appending to config.log.
18598# Unfortunately, on DOS this fails, as config.log is still kept open
18599# by configure, so config.status won't be able to write to it; its
18600# output is simply discarded. So we exec the FD to /dev/null,
18601# effectively closing config.log, so it can be properly (re)opened and
18602# appended to by config.status. When coming back to configure, we
18603# need to make the FD available again.
18604if test "$no_create" != yes; then
18605 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018606 ac_config_status_args=
18607 test "$silent" = yes &&
18608 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000018609 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000018610 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018611 exec 5>>config.log
18612 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18613 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020018614 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000018615fi
18616if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18618$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018619fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018620
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018621
Christian Heimes75ed8902013-11-20 01:11:18 +010018622echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018623if test ! -f Modules/Setup.local
18624then
18625 echo "# Edit this file for local setup changes" >Modules/Setup.local
18626fi
18627
Christian Heimes75ed8902013-11-20 01:11:18 +010018628echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000018629$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
Antoine Pitroua6a4dc82017-09-07 18:56:24 +020018630 -s Modules \
Antoine Pitrou961d54c2018-07-16 19:03:03 +020018631 Modules/Setup.local $srcdir/Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000018632mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070018633
18634if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
18635 echo "" >&6
18636 echo "" >&6
Brett Cannonb4e5fee2017-06-09 13:56:57 -070018637 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 +000018638 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070018639 echo "" >&6
18640 echo "" >&6
18641fi
18642